Skip to content

Conversation

@Morakinyo-Joseph
Copy link

Problem

The current release (4.x) utilizes PEP 585 Generic Alias Types (e.g., dict[Any, Any]), which were introduced in Python 3.9.

When installing this package on a Python 3.8 environment, pip currently pulls the latest version because setup.py is missing the python_requires constraint. This leads to an immediate runtime crash:
TypeError: 'type' object is not subscriptable.

Solution

This PR adds python_requires='>=3.9' to setup.py.

Benefit

This ensures that pip on older environments (Python 3.8 and below) will correctly ignore the incompatible 4.x releases and automatically fall back to the last compatible version (3.x), preventing broken builds for users on legacy systems.

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.

1 participant