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

Using vertical bar "|" for unions makes the package incompatible to python < 3.10 but 3.9 is still listed #23

Closed
SimonStier opened this issue Jul 22, 2024 · 1 comment · Fixed by #24
Labels
bug Something isn't working

Comments

@SimonStier
Copy link

Usage:

def search(self, name: Iterable[str] | str = "*") -> Iterator[Any]:

Version compatibility:

"Programming Language :: Python :: 3.9",

See also: https://stackoverflow.com/questions/64615988/what-does-vertical-bar-pipe-in-function-arguments-type-annotations-mean

@liamhuber
Copy link
Member

Hi @SimonStier, welcome to snippets!

Good catch 🚀 I believe we can get backwards compatibility for this syntax using from __future__ import annotations in the relevant files, and this is my preferred solution.

Unfortunately, our CI suite has a bug preventing our python versions from being correctly read, so we're not actually getting 3.9 test coverage. Hence having missed the bug in this file. Fixing that bug is my top priority today, but this one is so quick I made a little PR just now. Once I get the CI bug fixed and the version updated here, we'll get a final confirmation that this (or a related) bug is not hiding anywhere else in snippets, and I'll release a patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants