Officially deprecate ResourceDictField.iter*() functions.

Review Request #12643 — Created Sept. 25, 2022 and submitted — Latest diff uploaded

Information

RBTools
release-4.x

Reviewers

ResourceDictField.iteritems() and ResourceDictField.iterfields()
have been legacy for a long time, but with the removal of Python 2.7,
there's no longer any good reason to keep maintaining them.

This officially deprecates both. They will emit deprecation warnings on
use, recommending the modern replacements.

Other resource classes still have iter*() functions
(ItemResource.iterfields(), for example), but there's no replacement
function available, and we may have to worry about names clashing. This
change is ignoring this situation, leaving it to another day to solve.

Unit tests pass.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Officially deprecate ResourceDictField.iter*() functions.
`ResourceDictField.iteritems()` and `ResourceDictField.iterfields()` have been legacy for a long time, but with the removal of Python 2.7, there's no longer any good reason to keep maintaining them. This officially deprecates both. They will emit deprecation warnings on use, recommending the modern replacements. Other resource classes still have `iter*()` functions (`ItemResource.iterfields()`, for example), but there's no replacement function available, and we may have to worry about names clashing. This change is ignoring this situation, leaving it to another day to solve.
eeff211c781a3f5db164c71a4d1fc0b9e39bdb65 Christian Hammond
rbtools/api/resource.py
rbtools/api/tests/test_resource.py
Loading...