Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py3 iterators conversion #736

Conversation

maxnbk
Copy link
Contributor

@maxnbk maxnbk commented Sep 6, 2019

tested performance on some uncached resolves in method. interestingly, py2 performance has not suffered, but py3 performance is not yet reaching py2 performance. Unsure of the reasons yet, but since py2 seems unaffected, I think we should move forward with this when most other py3 PRs are resolved.

I suggest reviewing this PR commit by commit, as each commit only holds one type of change, but the commits are inseparable (pulling only 1 commit at a time will break rez)

@maxnbk maxnbk added the topic:py3 Python 3 label Sep 6, 2019
@nerdvegas
Copy link
Contributor

Are you confident that all the iteritems->items changes in py2 don't affect performance? If so then I think this is ok, but if there's any doubt then we should instead use our own iteritems() compatibility function - basically this: https://python-future.org/_modules/future/utils.html.

@@ -359,7 +359,7 @@ def _process(value):

def _trim(value):
if isinstance(value, dict):
for k, v in value.items():
for k, v in value.copy().items():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list(value.items()) would more closely match convention everywhere else.

@nerdvegas nerdvegas merged commit 4eb25f3 into AcademySoftwareFoundation:master Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:py3 Python 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants