Skip to content

Use annotationlib to simplify test_official #5260

@harshil21

Description

@harshil21

What kind of feature are you missing? Where do you notice a shortcoming of PTB?

Starting from Python 3.14, we can use annotationlib to refactor test_official to more properly work with annotations, specially forward references.

Describe the solution you'd like

Using annotationlib means we will require >=3.14 to run test official. IISC, annotationlib also resolves nested forward references, which is great for our use case.

Describe alternatives you've considered

Do patch work on existing codebase, but that's not a healthy practice.

Additional context

This recently came up in the #5259 PR where internal python API was changed, making it annoying to run the test official on 3.15.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority

    Low

    Effort

    Medium

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions