Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Backward compatible type subscriptions/unions #48

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

Sambigeara
Copy link
Collaborator

Previously, the codebase specified support for Python>=3.8, when it used | type union syntax (introduced in 3.10), and subscriptable built-in types (introduced in 3.9).

This change uses earlier syntax in order to allow 3.8 interpreters to handle type specific code.

Previously, the codebase specified support for Python>=3.8, when it used
`|` type union syntax (introduced in 3.10), and subscriptable built-in
types (introduced in 3.9).

This change uses earlier syntax in order to allow 3.8 interpreters to
handle type specific code.

Signed-off-by: Sam Lock <sam@swlock.co.uk>
Signed-off-by: Sam Lock <sam@swlock.co.uk>
@Sambigeara Sambigeara force-pushed the fix/type-union-backwards-compatibility branch from d47de13 to 935c353 Compare January 24, 2024 15:26
@Sambigeara Sambigeara merged commit a6558dc into main Jan 24, 2024
2 checks passed
@Sambigeara Sambigeara deleted the fix/type-union-backwards-compatibility branch January 24, 2024 15:30
Sambigeara added a commit to cerbos/query-plan-adapters that referenced this pull request Jan 25, 2024
Makes type hinting syntax compatible with Python 3.8 (as per the
versioning specified in `pyproject.toml`).

See cerbos/cerbos-sdk-python#48 for more
context.

---------

Signed-off-by: Sam Lock <sam@swlock.co.uk>
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.

2 participants