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

Bug: jsonschema.compat #149

Open
peterdudfield opened this issue Sep 30, 2021 · 9 comments
Open

Bug: jsonschema.compat #149

peterdudfield opened this issue Sep 30, 2021 · 9 comments

Comments

@peterdudfield
Copy link

ModuleNotFoundError: No module named 'jsonschema.compat

Jsonschema has a new version out, where this does not exist, and causes an error.

https://github.com/Yelp/swagger_spec_validator/blob/master/swagger_spec_validator/ref_validators.py#L14

See error more detail here

@tirkarthi
Copy link

tirkarthi commented Sep 30, 2021

Given that this project supports 2.7 and jsonschema 4.0 drop support for 2.7 it makes sense to pin the version number in setup.py .

@tirkarthi
Copy link

See also python-jsonschema/jsonschema#845

@peterdudfield
Copy link
Author

so maybe #148 this the fix do - just pin it in the requirements? But this doesnt seem so nice a solution

@tirkarthi
Copy link

This seems to be an issue with python_requires being not honored. This is fixed in python-jsonschema/jsonschema@e61dcbc . There is also 4.0.1 tagged with the commit https://github.com/Julian/jsonschema/releases/tag/v4.0.1 . So probably once 4.0.0 is yanked with the fixed version (4.0.1) in PyPI tools will continue to pull jsonschema < 4.0.0 automatically.

@tirkarthi
Copy link

Sorry, I was wrong here. It seems the version for jsonschema needs to be pinned here or to fix jsonschema.compat usage netbox-community/netbox#7401

@uoxiu
Copy link

uoxiu commented Oct 5, 2021

Yep, swagger_spec_validator should be fixed to work with jsonschema==4.x or set in setup.py max version 3.x

temporary fix is to install manually version 3.x pip install jsonschema==3.2.0

@peterdudfield
Copy link
Author

#146 this is a good solution - using 'six'

@leplatrem
Copy link

What is the status of this issue?

@peterdudfield
Copy link
Author

peterdudfield commented Jan 5, 2022

I think it go fixed in 734c7e1#diff-f63c3ee26a4134e668551fb48835df29afe314537b277b8ffe33de979262210b
and all unittest tests pass with jsonschema=4.3.3

So I reckon this issue can be closed

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