Uh oh!
There was an error while loading. Please reload this page.
Drop python3.6 and remove the usage of OrderedDict - #1783
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 <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>
coveralls
commented
Jan 19, 2022
Pull Request Test Coverage Report for Build 1719080679
💛 - Coveralls |
MVrachev
commented
Jan 19, 2022
Honestly, I am not sure why the CI started testing with python 3.6 when I removed it from |
jku
commented
Jan 20, 2022
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
commented
Jan 20, 2022
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 <mvrachev@vmware.com>
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: