Drop python3.6 and remove the usage of OrderedDict#1783
Merged
lukpueh merged 2 commits intotheupdateframework:developfrom Jan 20, 2022
Merged
Drop python3.6 and remove the usage of OrderedDict#1783lukpueh merged 2 commits intotheupdateframework:developfrom
lukpueh merged 2 commits intotheupdateframework:developfrom
Conversation
added 2 commits
January 19, 2022 17:11
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 <mvrachev@vmware.com>
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 <mvrachev@vmware.com>
Pull Request Test Coverage Report for Build 1719080679
💛 - Coveralls |
Collaborator
Author
|
Honestly, I am not sure why the CI started testing with python 3.6 when I removed it from |
Member
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. |
lukpueh
approved these changes
Jan 20, 2022
Member
Seems like a good use case for my administrative super powers. 🦸 |
3 tasks
MVrachev
pushed a commit
to MVrachev/securesystemslib
that referenced
this pull request
Jan 27, 2022
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 <mvrachev@vmware.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
OrderedDictFor example: