-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
bpo-32107 - Better merge of #4494 #4576
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 all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
ebbaa22
bpo-32107 - Fix test_uuid
warsaw 941b47d
Return None instead of 0
warsaw e529214
Never return a locally administered MAC address
warsaw 24c4db2
Several sleep-improved fixes
warsaw c056584
A missed return
warsaw 7fd446e
Two typos
warsaw fb2c2f2
DEBUGGING TRAVIS - DO NOT MERGE
warsaw 99e86b2
Two tests cannot succeed on Travis-CI
warsaw 74702e3
bpo-32107: Remove the check of the multicast bit in test_uuid.
serhiy-storchaka 41adbad
bpo-32107 - Fix test_uuid
warsaw d3d0465
Return None instead of 0
warsaw 7c17cd8
Never return a locally administered MAC address
warsaw 511fab0
Several sleep-improved fixes
warsaw af7929c
A missed return
warsaw 51ba0b3
Two typos
warsaw 909ee79
DEBUGGING TRAVIS - DO NOT MERGE
warsaw 6acb120
Two tests cannot succeed on Travis-CI
warsaw b7d647c
Merge branch 'test_uuid' of github.com:warsaw/cpython into test_uuid
warsaw 26db2f5
Merge branch 'test-uuid-multicast-bit' of https://github.com/serhiy-s…
warsaw 18a96ce
bpo-32107 - Fix test_uuid
warsaw 83dc3a3
Return None instead of 0
warsaw fb156f3
Never return a locally administered MAC address
warsaw 3e8e17d
Several sleep-improved fixes
warsaw 668f4f6
A missed return
warsaw 6eecb80
Two typos
warsaw 87712f3
DEBUGGING TRAVIS - DO NOT MERGE
warsaw 740393e
Two tests cannot succeed on Travis-CI
warsaw 225b063
bpo-32107: Remove the check of the multicast bit in test_uuid.
serhiy-storchaka 5b8ca90
DEBUGGING TRAVIS - DO NOT MERGE
warsaw 2aa4f50
Two tests cannot succeed on Travis-CI
warsaw 71ab3b5
Merge branch 'test_uuid' of github.com:warsaw/cpython into test_uuid
warsaw efb6c07
Add NEWS after all.
warsaw 17deb59
Respond to review comments.
warsaw 34e4cb1
Tweak the tests one more time.
warsaw af4a656
s/admin/check_bit/
warsaw 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
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
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
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Library/2017-11-26-18-48-17.bpo-32107.h2ph2K.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Improve the private ``*_getnode()`` methods for UUID1 such that universally | ||
| administered MAC addresses are preferred over locally administered MAC | ||
| addresses. If only the latter is available, the first such one is returned. | ||
| Improve the related tests and fix some bugs there as well. |
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.
The difference is that exceptions in
_random_getnode()no longer ignored. Ignoring all exceptions is not a good idea, but what exceptions can raise_random_getnode()?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.
I think the only possibility is an import error. Ultimately,
random.getrandbits()boils down toos.urandom()which I think can block but AFAICT won't raise an exception. And it bothers me (as I think it bothers you) that all exceptions in all those getters are just swallowed. Here's my thinking: since I'm not sure of the best way to report any errors in the other getters, and since the last getter is_random_getnode(), and since it's pretty unlikely that the function will experience anImportError, and if it does then I think it's better to report that than to silently swallow the exception and returnNonefromgetnode(), since that will lead to even more mysterious bugs, I think letting any rare exceptions in_random_getnode()not be swallowed is the better choice.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.
It's LGTM. I just wanted to make sure that this is an intentional change.