-
Notifications
You must be signed in to change notification settings - Fork 314
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
grafanalib 0.7.1 trips with ImportError: cannot import name 'Literal' from 'typing'
#650
Comments
Most probably, Python 3.7 became unsupported without bumping to 0.8.0. That would be the easiest and most straight-forward explanation. We can't find anything in the changelog about it, though, and setup.py still lists Python 3.7. Is it true? |
The reason is because of commit #622 which added the Literal import from typing. The changelog says:
However, it breaks py37 functionality. Is it not possible to upgrade to 3.8, which has it (since 3.7 is EOL) ? It's my opinion that either the Literal has to be changed in order to make it back compliant with 3.7 ( by using typing_extensions) or 3.7 should be removed as supported version and you will need to upgrade. Ideally it should be the second one in my opinion |
Dear @davaffy, thanks for your quick reply.
Yeah, I think it will be fine to remove the compatibility definition in project metadata. Line 36 in b312693
With kind regards, |
Hi again, on our downstream project grafana-wtf, we removed support for Python 3.7, and upgraded to grafanalib 0.7.1. Thanks!
On matters of grafanalib itself, we submitted a corresponding patch to fix the project metadata. With kind regards, |
Hi there,
first things first: Thanks a stack for conceiving and maintaining grafanalib.
Looking at our CI run #7525555866, it trips like this:
We did not investigate about the root cause yet, just wanted to report here for a start.
With kind regards,
Andreas.
The text was updated successfully, but these errors were encountered: