Skip to content

fix: Backward compatible type subscriptions/unions#48

Merged
Sambigeara merged 2 commits intomainfrom
fix/type-union-backwards-compatibility
Jan 24, 2024
Merged

fix: Backward compatible type subscriptions/unions#48
Sambigeara merged 2 commits intomainfrom
fix/type-union-backwards-compatibility

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
@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