-
Notifications
You must be signed in to change notification settings - Fork 278
Drop python3.6 and remove the usage of OrderedDict #1783
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
Conversation
Python version 3.6 was supported until December 23-rd 2021 meaning its end of life has expired before more than 20 days. Dropping support for python version 3.6 will allow us to remove OrderedDicts. After a quick check I saw that Warehouse target python version 3.8.2: - their docker file: https://github.com/pypa/warehouse/blob/main/Dockerfile#L47 - https://github.com/pypa/warehouse/blob/main/.python-version - last pr updating pr version: pypi/warehouse#7828 Pip supports python version 3.7+ as well. They dropped python 3.6 a couple of months ago: pypa/pip#10641 This means it shouldn't cause headache to our users if we drop python version 3.6 too. Signed-off-by: Martin Vrachev <[email protected]>
After we drop support for python3.6 we can relly that dictionaries preserve the insertion order: https://docs.python.org/3.7/whatsnew/3.7.html This means we can replace the usage of OrderedDict with a standard dictionaries. Something we have to keep in mind is that even thought the insertion order is preserved the equality comparison for normal dicts is insensitive for normal dicts compared to OrderedDict For example: >>> OrderedDict([(1,1), (2,2)]) == OrderedDict([(2,2), (1,1)]) False >>> dict([(1,1), (2,2)]) == dict([(2,2), (1,1)]) True Signed-off-by: Martin Vrachev <[email protected]>
Pull Request Test Coverage Report for Build 1719080679
💛 - Coveralls |
Honestly, I am not sure why the CI started testing with python 3.6 when I removed it from |
It didn't: The UI does not make it very clear but current project settings define those tests as required for merge -- so this PR stays blocked because required tests haven't executed. |
Seems like a good use case for my administrative super powers. 🦸 |
Python version 3.6 was supported until December 23-rd 2021 (see https://endoflife.date/python) meaning its end of life has expired before more than 20 days. Dropping support for python version 3.6 will allow us to make some small cleanups. python-tuf dropped support for python3.6 as well: theupdateframework/python-tuf#1783 Signed-off-by: Martin Vrachev <[email protected]>
Description of the changes being introduced by the pull request:
Python version 3.6 was supported until December 23-rd 2021 meaning its
end of life has expired more than 20 days. See https://endoflife.date/python.
Dropping support for python version 3.6 will allow us to remove
OrderedDicts.
After a quick check I saw that Warehouse target python version 3.8.2:
Pip supports python version 3.7+ as well. They dropped python 3.6 a couple of months ago:
Drop support for soon-EOL Python 3.6 pypa/pip#10641
This means it shouldn't cause headache to our users if we drop python
version 3.6 too.
In all versions, python3.7+ dictionaries preserve the insertion order.
This means we can replace the usage of OrderedDict with a standard dictionary.
Something we have to keep in mind is that even though the insertion order is preserved
the equality comparison for normal dicts is insensitive for normal dicts compared to
OrderedDict
For example: