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

Support jsonschema >= 4.0.0 #1430

Closed
kruegener opened this issue Oct 1, 2021 · 7 comments · Fixed by #1447 or bluerobotics/BlueOS#745
Closed

Support jsonschema >= 4.0.0 #1430

kruegener opened this issue Oct 1, 2021 · 7 comments · Fixed by #1447 or bluerobotics/BlueOS#745

Comments

@kruegener
Copy link

kruegener commented Oct 1, 2021

Description

connexion uses the _util part of jsonschema package. There was a breaking change in the latest release 4.0 release of jsonschema removing the types_msg function.
Removal commit: python-jsonschema/jsonschema@00031cb

https://github.com/zalando/connexion/blob/main/connexion/json_schema.py#L64 uses the removed function.

Expected behaviour

Not use missing private function.

Actual behaviour

Uses missing private function.

Steps to reproduce

Install jsonschema with version 4.0 and up.

Additional info:

Output of the commands:

  • python --version: 3.6.10
  • pip show connexion | grep "^Version\:": 2.7.0
@kruegener
Copy link
Author

I see the requirements of connexion have been changed with 2.8/2.9 to require jsonschema<4, solving this issue.
Are there any plans to support versions 4 and above?

@RobbeSneyders
Copy link
Member

Thanks for the report @kruegener. This should indeed be fixed since version 2.8.

The reason to add the upper bound was exactly to prevent breaking changes in dependencies like this. Now that jsonschema 4 is out, we should fix and test the integration, and then increase the upper limit to the next major version.

I'll update this issue to reflect this.

@RobbeSneyders RobbeSneyders changed the title connexion breaks with jsonschema >= 4.0.0 Support jsonschema >= 4.0.0 Oct 1, 2021
@alex-zywicki
Copy link

Is there any progress on this? I'm experiencing this issue currently and have other non connexion related dependencies that require jsonschema >= 4.0.0 preventing me from using jsonschema < 4.0.0

@ewalshmndt
Copy link

With the release of openapi-schema-validator==0.2.0, I've got connexion conflicting with its own dependencies:

There are incompatible versions in the resolved dependencies:
  jsonschema (from openapi-spec-validator==0.3.1->connexion2==2.10.0->-r /tmp/pipenvf3jugp0grequirements/pipenv-p7f7j2ul-constraints.txt (line 9))
  jsonschema<4,>=2.5.1 (from connexion2==2.10.0->-r /tmp/pipenvf3jugp0grequirements/pipenv-p7f7j2ul-constraints.txt (line 9))
  jsonschema<5.0.0,>=4.0.0 (from openapi-schema-validator==0.2.0->openapi-spec-validator==0.3.1->connexion2==2.10.0->-r /tmp/pipenvf3jugp0grequirements/pipenv-p7f7j2ul-constraints.txt (line 9))

@jonrkarr
Copy link

jonrkarr commented Jan 7, 2022

I temporarily worked around the issue discussed by @alex-zywicki and @ewalshmndt by adding an additional constraint (e.g., openapi-schema-validator < 0.2).

@JosEnerv
Copy link

@jonrkarr Something seems to be off still.
I can't find the dependency on openapi-schema-validator, only on openapi-spec-validator.
The jsonschema dependency in connexion is set to >=2.5.1,<4

This conflicts with the following jsonschema dependency :
connexion -> openapi-spec-validation (>=0.2.4,<0.4)-> openapi-schema-validation -> jsonschema==4.0.0

@jonrkarr
Copy link

The current version of connexion can be used with openapi-schema-validator <= 0.1.6 because those versions of openapi-schema-validator have compatible version requirements for jsonschema. However, in my experience, pip isn't able to find this version of openapi-schema-validator, unless I add the add the additional requirement openapi-schema-validator < 0.2. Adding this additional requirement seems to help pip find this solution to the requirement for jsonschema. In principle, this shouldn't be needed, but pip doesn't appear to fully consider older versions of packages as potential solutions to the requirements.

rafaellehmkuhl added a commit to rafaellehmkuhl/companion-docker that referenced this issue Jan 18, 2022
As stated [here](python-openapi/openapi-schema-validator#31) version 0.2.0 of openapi-schema-validator introduces a dependency conflict with jsonschema.

As our dependency is connexion, we should follow [this](spec-first/connexion#1430) issue to be on track with changes.
rafaellehmkuhl added a commit to rafaellehmkuhl/companion-docker that referenced this issue Jan 18, 2022
As stated [here](python-openapi/openapi-schema-validator#31) version 0.2.0 of openapi-schema-validator introduces a dependency conflict with jsonschema.

As our dependency is connexion, we should follow [this](spec-first/connexion#1430) issue to be on track with changes.
patrickelectric pushed a commit to bluerobotics/BlueOS that referenced this issue Jan 18, 2022
As stated [here](python-openapi/openapi-schema-validator#31) version 0.2.0 of openapi-schema-validator introduces a dependency conflict with jsonschema.

As our dependency is connexion, we should follow [this](spec-first/connexion#1430) issue to be on track with changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants