GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use `annotationlib` to resolve forward refs in `test_official` by visveshkhanna · Pull Request #5402 · python-telegram-bot/python-telegram-bot

Conversation

@visveshkhanna

@visveshkhanna visveshkhanna commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

test_official resolved forward refs with the private typing._eval_type, which got a new required type_params argument in 3.15, so it was skipped there since #5259. This swaps it for the public typing.evaluate_forward_ref, which also resolves nested refs like the "InputFile" inside FileLike.

Since that needs 3.14+, test_official now skips below 3.14 and the workflow runs it on 3.14 and 3.15 instead of 3.11. The old version check compared strings, so that's fixed along the way. Also updated the version note in tests/README.rst.

Checked locally on 3.14.4 and 3.15.2: same results as master. The remaining failures are already on master and come from Bot API changes that aren't in PTB yet (WidgetQuery*, TonWallet*, etc.), not from this change.

Closes #5260

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
visveshkhanna added 5 commits November 11, 2026 15:27
@visveshkhanna
Use annotationlib to resolve forward refs in test_official
cebf013
Replace the private typing._eval_type, whose signature changed in
Python 3.15, with the public typing.evaluate_forward_ref, which also
resolves nested forward references. test_official now requires
Python 3.14+ and runs on 3.14 and 3.15 in CI.

Closes python-telegram-bot#5260
@visveshkhanna
Add Visvesh Khanna to AUTHORS.rst
be1b4ea
@visveshkhanna
Add chango fragment
fec3e4d
@visveshkhanna
Add chango fragment
de5d2e4
@visveshkhanna
Remove duplicate chango fragment
19deb44

This branch has not been deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Use annotationlib to simplify test_official

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@visveshkhanna
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.