GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-102029: Deprecate passing arguments to `_PyRLock` in `threading` by sobolevn · Pull Request #102071 · python/cpython Conversation
|
|
@pablogsal friendly ping :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me, but I want to run it through a huge pile of tests at work just to see what - if any - oddball code was relying on passing ignored values. I hope nothing. I'll do that this week.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you! In the meantime, I will change the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
note to self: I included this PR in an internal test run today, I'll have results by tonight/tomorrow. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
hypothesis failures are not related. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I found only a single instance of a parameter being passed to RLock via testing this change in our huge codebase at work:
That code was originally written for Python 2.7 which did support an undocumented Easy to fix. But it does suggest that we should just do this API change via our usual DeprecationWarning cycle rather than just assuming we can make it without notice. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| * Passing any arguments to :func:`threading.RLock` is now restricted. | ||
| Previously C version allowed any numbers of args and kwargs, | ||
| but they were just ignored. Python version never allowed any arguments. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This statement isn't accurate; Python <= 2.7 and 3.1 accepted a single undocumented verbose argument.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Lock = _allocate_lock | ||
|
|
||
| def RLock(*args, **kwargs): | ||
| def RLock(): |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Lets do a regular DeprecationWarning API change cycle on this.
if args or kwargs:
warnings.warn(DeprecationWarning, ...)
we can put that in 3.12 remove the ignored args/kwargs in 3.14.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I thought that 3.12 is now only accepting bugfixes, isn't it? I would prefer to have this change as safe as possible and to put it in 3.13+. Unless you insist :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be poked with soft cushions! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have made the requested changes; please review again |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for making the requested changes! @gpshead: please review the changes made to this pull request. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
__new__ sigs of _CRLock and _PyRLock in threading_PyRLock in threading
|
@gpshead now this is deprecated in 3.13 and stated to be changed in 3.15 :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing and re-opening to retrigger CLA checks. Sorry for the noise. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks everyone! CI is now green :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can someone please click "merge"? :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.