Skip to content

Use of __future__ prevents use in python 3.13 and later #3245

@sarahec

Description

@sarahec

While building for NixOS/nixpkgs, compilation fails on python 3.13 with error: future-1.0.0 not supported for interpreter python3.13

The future package is a python 2-to-3 compatibility layer and has been fully absorbed into Python. What's new in python 3.13 states:

Future statements are no longer triggered by relative imports of the future module, meaning that statements of the form from .future import ... are now simply standard relative imports, with no special features activated. (Contributed by Jeremiah Gabriel Pascual in gh-118216.)

In this case, you're using from __future__ import annotations in three places. In all of these cases, you can use inspect.get_annotations() to read the annotations, see https://docs.python.org/3/howto/annotations.html#annotations-best-practices

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions