Skip to content

Union syntax compatibility with pre- Python 3.10#106

Merged
rolandwalker merged 1 commit intomainfrom
RW/older-python-union-compatibility
Feb 18, 2026
Merged

Union syntax compatibility with pre- Python 3.10#106
rolandwalker merged 1 commit intomainfrom
RW/older-python-union-compatibility

Conversation

@rolandwalker
Copy link
Contributor

Description

We probably shouldn't be supporting EOL'd Pythons, but setup.py and CONTRIBUTING.rst both say Python 3.6+ at this time, and the code does not run on Python 3.6.

The easy fix for now is to use from tying import Union; a better fix for the future would be to advance this project to Python 3.10+.

Fixes #105 .

Checklist

  • I've added this contribution to the CHANGELOG.
  • I've added my name to the AUTHORS file (or it's already there).
  • I installed pre-commit hooks (pip install pre-commit && pre-commit install), and ran black on my code.
  • Please squash merge this pull request (uncheck if you'd like us to merge as multiple commits)

We probably shouldn't be supporting EOL'd Pythons, but setup.py and
CONTRIBUTING.rst both say Python 3.6+ at this time, and the code does
not run on Python 3.6.

The easy fix for now is to use "from tying import Union"; a better fix
for the future would be to advance this project to Python 3.10+.
@rolandwalker rolandwalker self-assigned this Feb 18, 2026
@rolandwalker rolandwalker merged commit 8ff14cd into main Feb 18, 2026
2 checks passed
@rolandwalker rolandwalker deleted the RW/older-python-union-compatibility branch February 18, 2026 10:19
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.

TypeError: unsupported operand type(s) for |: 'type' and 'type'

1 participant

Comments