Skip to content

Update types.pyi for Python3.12 - #10288

Merged
AlexWaygood merged 2 commits into
mainfrom
py312-types
Jun 9, 2023
Merged

AlexWaygood merged 2 commits into
mainfrom
py312-types

Conversation

@sobolevn

@sobolevn sobolevn commented Jun 9, 2023

Copy link
Copy Markdown
Member

Source: https://github.com/python/cpython/blob/3.12/Objects/genobject.c#L1551

It is read-only:

>>> async def some():
...    yield 1
... 
>>> some()
<async_generator object some at 0x10559d300>
>>> some().ag_suspended
False
>>> some().ag_suspended = True
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: attribute 'ag_suspended' of 'async_generator' objects is not writable
@github-actions

github-actions Bot commented Jun 9, 2023

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants