-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
gh-137808: use argument clinic for _thread.lock
and _thread.RLock
#137809
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
Conversation
I am surprised that this change did not affect |
41c41
< | __exit__(self, /, *exc_info)
---
> | __exit__(self, exc_type=None, exc_value=None, exc_tb=None, /)
48c48,50
< | Lock the lock. Without argument, this blocks if the lock is already
---
> | Lock the lock.
> |
> | Without argument, this blocks if the lock is already
65c67,69
< | Release the lock, allowing another thread that is blocked waiting for
---
> | Release the lock.
> |
> | Allows another thread that is blocked waiting for
84c88
< | __exit__(self, /, *exc_info)
---
> | __exit__(self, exc_type=None, exc_value=None, exc_tb=None, /)
91c95,97
< | Lock the lock. `blocking` indicates whether we should wait
---
> | Lock the lock.
> |
> | `blocking` indicates whether we should wait
105,106d110
< | locked()
< |
110c114,116
< | Release the lock, allowing another thread that is blocked waiting for
---
> | Release the lock.
> |
> | Allows another thread that is blocked waiting for
142c148
< | __exit__(self, /, *exc_info)
---
> | __exit__(self, exc_type=None, exc_value=None, exc_tb=None, /)
149c155,157
< | Lock the lock. Without argument, this blocks if the lock is already
---
> | Lock the lock.
> |
> | Without argument, this blocks if the lock is already
166c174,176
< | Release the lock, allowing another thread that is blocked waiting for
---
> | Release the lock.
> |
> | Allows another thread that is blocked waiting for
|
What about the Oh, and |
Help on method descriptor acquire in _thread.RLock:
_thread.RLock.acquire = acquire(self, /, blocking=True, timeout=-1) unbound _thread.RLock method
Lock the lock.
Help on method descriptor acquire in _thread.lock:
_thread.lock.acquire = acquire(self, /, blocking=True, timeout=-1) unbound _thread.lock method
Lock the lock. The signatures looks fine to me for acquire methods, what do you mean by "machine readable signatures"? are these two signatures incorrect? |
Aha, this is because signatures were already encoded in the docstrings! Now Argument Clinic will generate identical signatures, this is why there was not difference in the |
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.
LGTM. 👍
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.
LGTM as well
Uh oh!
There was an error while loading. Please reload this page.