10000 gh-85795: Add support for `super()` in `NamedTuple` subclasses by bswck · Pull Request #129352 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-85795: Add support for super() in NamedTuple subclasses #129352

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

Closed
wants to merge 16 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter 8000 by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor aesthetical
  • Loading branch information
bswck committed Jan 28, 2025
commit f8cf62f1516996dccfb93ec8cd6d4d88c429d646
3 changes: 2 additions & 1 deletion Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8137,6 +8137,7 @@ class Group(NamedTuple):

def test_super_and_dunder_class_work(self):
# See #85795: __class__ not set defining 'X' as <class '__main__.X'>

class Pointer(NamedTuple):
address: int
target_type = "int"
Expand All @@ -8157,7 +8158,7 @@ def count(self, item):

@cpython_only
def test_classcell_not_leaked(self):
# __classcell__ should never be leaked into end classes
# __classcell__ should never leak into end classes

class Spam(NamedTuple):
lambda: super()
Expand Down
Loading
0