Skip to content

Fix tests on PyPy3.11+#756

Merged
JelleZijlstra merged 1 commit into
mainfrom
codex/fix-pypy-namedtuple-text-signature-test
May 18, 2026
Merged

Fix tests on PyPy3.11+#756
JelleZijlstra merged 1 commit into
mainfrom
codex/fix-pypy-namedtuple-text-signature-test

Conversation

@AlexWaygood
Copy link
Copy Markdown
Member

PyPy made a recent change that exposes a __text_signature__ attribute on all functions: pypy/pypy@d3fba0e. That broke this test, which assumed that typing_extensions.NamedTuple would define __text_signature__ but typing.NamedTuple would not. But typing_extensions.NamedTuple itself hasn't defined __text_signature__ for a while, so the special-casing of __text_signature__ here is outdated. We can fix the PyPy failure by just simplifying the test and getting rid of the special casing.

Fixes #751

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.38%. Comparing base (7b79d4a) to head (4e20797).
⚠️ Report is 1 commits behind head on main.

@@           Coverage Diff           @@
##             main     #756   +/-   ##
=======================================
  Coverage   97.38%   97.38%           
=======================================
  Files           3        3           
  Lines        7773     7773           
=======================================
  Hits         7570     7570           
  Misses        203      203           
Flag Coverage Δ
3.10 89.09% <ø> (ø)
3.10.4 89.09% <ø> (ø)
3.11 88.33% <ø> (ø)
3.11.0 87.57% <ø> (ø)
3.12 88.27% <ø> (ø)
3.12.0 88.26% <ø> (ø)
3.13 83.05% <ø> (ø)
3.13.0 83.77% <ø> (ø)
3.14 79.14% <ø> (ø)
3.9 89.79% <ø> (ø)
3.9.12 89.79% <ø> (ø)
pypy3.10 88.92% <ø> (ø)
pypy3.11 88.18% <ø> (?)
pypy3.9 89.62% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/test_typing_extensions.py 98.41% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlexWaygood
Copy link
Copy Markdown
Member Author

(We stopped setting __text_signature__ manually on NamedTuple in #267)

@JelleZijlstra JelleZijlstra merged commit 72895d0 into main May 18, 2026
24 checks passed
@JelleZijlstra JelleZijlstra deleted the codex/fix-pypy-namedtuple-text-signature-test branch May 18, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Daily tests failed on Fri May 15 2026

2 participants