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 prep: replacing iteritems and itervalues #33

Merged
merged 1 commit into from Mar 22, 2020

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented Mar 22, 2020

In python3, dict.items() and dict.values() are iterators by defualt, so the
iteritems functions have been removed. In python2, these return a copy of the
keys, which has small runtime penalty but is unlikely to be material for NixOps.

Changing it to just .items() makes us both py2 and py3 compatible and prepares
us for the migration #29.

CC @grahamc @AmineChikhaoui

In python3, `dict.items()` and `dict.values()` are iterators by defualt, so the
`iteritems` functions have been removed. In python2, these return a copy of the
keys, which has small runtime penalty but is unlikely to be material for NixOps.

Changing it to just `.items()` makes us both py2 and py3 compatible and prepares
us for the migration NixOS#29.
@grahamc grahamc merged commit 51d61d9 into NixOS:master Mar 22, 2020
@bhipple bhipple deleted the feature/py3-prep branch March 22, 2020 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants