-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
bpo-4963: Fix for initialization and non-deterministic behavior issues in mimetypes #3062
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ecabb1c
Addresses mimetypes initialization problems and non-deterministic beh…
davidkhess 0e8c48f
Fix edge case with init.
davidkhess 10abe19
Fix another edge case.
davidkhess 2486b92
Fix whitespace issue with added test.
davidkhess 384178c
Capture the new init() behavior in the documentation.
davidkhess 32cd666
Merge remote-tracking branch 'python/master' into fix-issue-4963
davidkhess d2097be
Tweak to the documentation per review feedback.
davidkhess 1f45e83
Merge remote-tracking branch 'python/master' into fix-issue-4963
davidkhess f9e59f9
Add news entry.
davidkhess 59d1128
Remove use of OrderedDict
davidkhess 799ce54
Merge remote-tracking branch 'python/master' into fix-issue-4963
davidkhess File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Addresses mimetypes initialization problems and non-deterministic beh…
…avior.
- Loading branch information
commit ecabb1cb57e7e066a693653f485f2f687dcc7f6b
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This no longer needed in 3.7+.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I remove all usage of OrderedDict from the PR and let others add it back for back porting it to 2.7? Or should I do something like set OrderedDict = dict if Python version >= 3.7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of the items in the list is a critical part of the fix - I'd vote for retaining the explicit use of OrderedDict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding OrderedDict makes this PR more complex, and the resulting code clumsy, and this is absolutely unneeded in 3.7+. I think it would be better to merge a simple fix into master and 3.7, and prepare more complex backport for 3.6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since 3.6 is only receiving security fixes, there's no need to worry about the backport to 3.6 anymore. So, you can remove the OrderedDict as this will only be in 3.7 and 3.8.