Skip to content

types-jsonschema 4.19.0.0 cannot be used with mypy on Python 3.7 #10772

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

Closed
GavBurke opened this issue Sep 25, 2023 · 8 comments
Closed

types-jsonschema 4.19.0.0 cannot be used with mypy on Python 3.7 #10772

GavBurke opened this issue Sep 25, 2023 · 8 comments

Comments

@GavBurke
Copy link

There's not much info I can give in this "bug report", so hopefully others seen the same issue and can chime in, but after our nightly pipeline upgrade it's types-jsonschema from 4.17.0.10 to 4.19.0.0 on Saturday night, our pipeline now breaks with mypy reporting /home/gavin/.local/lib/python3.7/site-packages/referencing/_core.py:188: error: invalid syntax [syntax] Found 1 error in 1 file (errors prevented further checking)

Downgrading types-jsonschema to 4.17.0.10 then fixes this issue

@AlexWaygood
Copy link
Member

types-jsonschema 4.19.0.0 depends on the referencing library following #10583. The referencing library is incompatible with Python 3.7, as it uses PEP-570 syntax (but the library didn't state as such in its pyproject.toml or setup.py file in its early versions, meaning that pip will happily install it on Python 3.7, unfortunately).

@AlexWaygood AlexWaygood changed the title types-jsonschema 4.19.0.0 has broken mypy integration types-jsonschema 4.19.0.0 is incompatible with Python 3.7 Sep 25, 2023
@AlexWaygood
Copy link
Member

Once typeshed-internal/stub_uploader#103 is merged, we will be able to push a release of types-jsonschema to PyPI that properly declares that it can only be used with Python 3.8+. Not sure what's to be done with the already-released version of types-jsonschema, though.

@AlexWaygood AlexWaygood changed the title types-jsonschema 4.19.0.0 is incompatible with Python 3.7 types-jsonschema 4.19.0.0 cannot be used with mypy on Python 3.7 Sep 25, 2023
@srittau
Copy link
Collaborator

srittau commented Sep 25, 2023

We could yank release 14.9.0.0.

@AlexWaygood
Copy link
Member

AlexWaygood commented Sep 25, 2023

We could yank release 14.9.0.0.

Yeah. Suggested plan of action:

  1. Revert Bump jsonschema to 4.19.* #10583 temporarily
  2. Yank release 4.19.0.0 from PyPI
  3. Merge Add a "requires-python" metadata field in stub distributions typeshed-internal/stub_uploader#103
  4. Revert the revert of Bump jsonschema to 4.19.* #10583, but add requires_python = ">= 3.8" to the METADATA.toml file

@srittau
Copy link
Collaborator

srittau commented Sep 25, 2023

This seems to have worked: https://pypi.org/project/types-jsonschema/#files

@ilevkivskyi Could you yank types-jsonschema 4.19.0.0 and 4.19.0.1?

@GavBurke
Copy link
Author

This seems to have worked: https://pypi.org/project/types-jsonschema/#files

@ilevkivskyi Could you yank types-jsonschema 4.19.0.0 and 4.19.0.1?

Any timeline on the yanking of the 4.19.x python 3.7 packages??

@ilevkivskyi
Copy link
Member

Could you yank types-jsonschema 4.19.0.0 and 4.19.0.1?

Done.

@AlexWaygood
Copy link
Member

I confirmed locally that pip install types-jsonschema --upgrade will now install types-jsonschema-4.17.0.10 if you're using Python 3.7. This should therefore now be fixed.

Thanks for yanking @ilevkivskyi, and thanks for reporting @GavBurke! Sorry for the disruption -- please let us know if you have any more problems :-)

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

No branches or pull requests

4 participants