Skip to content

[3.12] gh-119698: fix a special case in symtable.Class.get_methods (GH-121802) - #121910

Merged
JelleZijlstra merged 2 commits into
python:3.12from
miss-islington:backport-6682d91-3.12
Jul 17, 2024
Merged

[3.12] gh-119698: fix a special case in symtable.Class.get_methods (GH-121802)#121910
JelleZijlstra merged 2 commits into
python:3.12from
miss-islington:backport-6682d91-3.12

Conversation

@miss-islington

@miss-islingtonmiss-islington commented Jul 17, 2024

Copy link
Copy Markdown
Contributor

…ythonGH-121802)
(cherry picked from commit 6682d91)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@picnixz

Copy link
Copy Markdown
Member

Oh:

 type x[genexpr= (xasyncforxin [])] = (xasyncforxin [])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^SyntaxError: invalidsyntax. Maybeyoumeant'=='or':='insteadof'='?

Is it expected? did something change between 3.12 and 3.13 for this?

@JelleZijlstra

Copy link
Copy Markdown
Member

Oh yeah, I made comprehensions in annotation scopes a syntax error in 3.12, but then added support in 3.13.

@JelleZijlstra

Copy link
Copy Markdown
Member

And also, the tests were using TypeVar defaults, which only exist in 3.13. I removed the tests that rely on comprehensions within annotation scopes within classes, because that was a SyntaxError in 3.12.

@JelleZijlstra
JelleZijlstra merged commit 3279a4f into python:3.12Jul 17, 2024
@miss-islington
miss-islington deleted the backport-6682d91-3.12 branch January 2, 2026 17:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@miss-islington@picnixz@JelleZijlstra