Drop python3.6 and remove the usage of OrderedDict #1783
Merged
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
OrderedDict
For example: