bugfix: Use notify_all#162
Merged
eli-darkly merged 1 commit intoFeb 14, 2022
Merged
Conversation
The standard library threading.Condition class had `notifyAll` implemented as an alias to `notify_all` for backwards comaptibility with older versions of python which still used the camel case methods. Python3.10 deprecated the `notifyAll` alias. This change removes the call to `notifyAll`, in favor of `notify_all` which should exist as far back as python 3.5.
Contributor
|
Thanks for catching this. It is indeed an obsolete usage left over from the days when we had to support older Pythons. |
Contributor
|
(Filed internally as 142074) |
eli-darkly
approved these changes
Feb 14, 2022
Merged
LaunchDarklyReleaseBot
pushed a commit
that referenced
this pull request
Feb 14, 2022
…empty more Big Segments fixes
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.
The standard library threading.Condition class had
notifyAllimplemented as an alias tonotify_allfor backwards compatibility with older versions of python which still used the camel case methods. Python3.10 deprecated thenotifyAllalias.This change removes the call to
notifyAll, in favor ofnotify_allwhich should exist as far back as python 3.5.Requirements
Related issues
None.
Describe the solution you've provided
Python 3.10 deprecated the backwards compatibility alias
threading.Condition.notifyAlltonotify_all. I've removed the call tonotifyAllin favor ofnotify_all.Describe alternatives you've considered
Considered doing something like this:
However as
notifyAllwas only an alias fornotify_allit didn't seem necessary given the support matrix for python beginning with 3.5. Additionally the docs for 3.5 havenotify_allin them. So this conditional doesn't seem necessary.Additional context
Changes are documented in the 3.10 release notes, and in an update to the documentation here.