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

New openapi-spec-validator 0.5.x breaks openapi-core 0.14.x #402

Closed
p1c2u opened this issue Sep 2, 2022 · 16 comments
Closed

New openapi-spec-validator 0.5.x breaks openapi-core 0.14.x #402

p1c2u opened this issue Sep 2, 2022 · 16 comments

Comments

@p1c2u
Copy link
Collaborator

p1c2u commented Sep 2, 2022

Follow up from python-openapi/openapi-spec-validator#173

@p1c2u p1c2u changed the title New openapi-spec-validator version breaks openapi-core 0.14.x New openapi-spec-validator 0.5.x breaks openapi-core 0.14.x Sep 2, 2022
@p1c2u
Copy link
Collaborator Author

p1c2u commented Sep 2, 2022

We will need to pin dependencies in 0.14.x based on dependency matrix

@p1c2u
Copy link
Collaborator Author

p1c2u commented Sep 2, 2022

Fix was released with version 0.14.3

@dabljues
Copy link

dabljues commented Sep 2, 2022

I was also having this issue. However, the new version of openapi-core has a conflicting dependency:

The conflict is caused by:
    foo[tests] 0.0.1.dev2+gf9f72220.d20220902 depends on pyyaml
    openapi-core 0.14.3 depends on PyYAML<6.0; python_version >= "3.6"
    The user requested (constraint) pyyaml==6.0

This was not the case with openapi-core==0.14.2. I know I can go for pyyaml<6.0 in my requirements/setup, but can't openapi-core work with pyyaml==6.0?

@p1c2u
Copy link
Collaborator Author

p1c2u commented Sep 2, 2022

Hi @dabljues
are you sure openapi-core 0.14.2 did work for you with pyyaml 6?
I limited pyyaml because tests didn't pass in the CI and I couldn't get the history of previous test runs to check which version CI was using before.

@adammkelly
Copy link

@p1c2u Seeing this with the latest release.
ERROR: jsonschema-spec 0.1.1 has requirement jsonschema<5.0.0,>=4.0.0, but you'll have jsonschema 3.2.0 which is incompatible.
ERROR: openapi-core 0.14.3 has requirement PyYAML<6.0; python_version >= "3.6", but you'll have pyyaml 6.0 which is incompatible.

@dabljues
Copy link

dabljues commented Sep 2, 2022

Hi @dabljues are you sure openapi-core 0.14.2 did work for you with pyyaml 6? I limited pyyaml because tests didn't pass in the CI and I couldn't get the history of previous test runs to check which version CI was using before.

Yes, we didn't have pyyaml==6.00 per se, we just didn't cap it, so we were running our CI on pyyaml 6.0, essentially. I can see our old (like a couple of days old) pipelines on GitLab and I see openapi-core==0.14.2 and PyYAML==6.0 and they worked,

@p1c2u
Copy link
Collaborator Author

p1c2u commented Sep 2, 2022

@adammkelly that's interesting, you shouldn't have jsonschema-spec 0.1.1 as a requirement for openapi-core 0.14.x . jsonschema-spec is part of openapi-spec-validator 0.4.x (which was limited to 0.3.x in openapi-core 0.14.x)

@p1c2u
Copy link
Collaborator Author

p1c2u commented Sep 2, 2022

Thanks @dabljues . That means I made pyyaml requirement too strict and fixing failing test should be enough.

@dabljues
Copy link

dabljues commented Sep 2, 2022

And thanks to you @p1c2u for quick responses :) So that means we can expect a new release with the pyyaml constraint loosened?

@p1c2u
Copy link
Collaborator Author

p1c2u commented Sep 2, 2022

Yeah I will release patched version in minutes. Hope it will solve all requirements problems.

EDIT: Version .0.14.4 released.

@dabljues
Copy link

dabljues commented Sep 2, 2022

Yeah I will release patched version in minutes. Hope it will solve all requirements problems.

EDIT: Version .0.14.4 released.

I checked and it works, much appreciated, thanks!

@adammkelly
Copy link

I think the jsonschema-spec was due to a dupe requirement installing the newer version of this package.

Verified 0.14.4 isn't showing the same symptoms but I am seeing this.

ERROR: openapi-spec-validator 0.3.3 has requirement jsonschema<4.0.0,>=3.2.0, but you'll have jsonschema 4.15.0 which is incompatible.

Name: openapi-core Version: 0.14.4 Summary: client-side and server-side support for the OpenAPI Specification v3 Home-page: https://github.com/p1c2u/openapi-core Author: Artur Maciag Author-email: [email protected] License: BSD 3-Clause License Location: /usr/local/lib/python3.8/site-packages Requires: six, parse, openapi-spec-validator, werkzeug, more-itertools, lazy-object-proxy, attrs, dictpath, isodate, openapi-schema-validator Required-by:

Name: openapi-spec-validator Version: 0.3.3 Summary: OpenAPI 2.0 (aka Swagger) and OpenAPI 3.0 spec validator Home-page: https://github.com/p1c2u/openapi-spec-validator Author: Artur Maciag Author-email: [email protected] License: Apache-2.0 Location: /usr/local/lib/python3.8/site-packages Requires: PyYAML, openapi-schema-validator, jsonschema, setuptools, six, pyrsistent Required-by: openapi-core

Name: openapi-schema-validator Version: 0.1.6 Summary: OpenAPI schema validation for Python Home-page: https://github.com/p1c2u/openapi-schema-validator Author: Artur Maciag Author-email: [email protected] License: 3-clause BSD License Location: /usr/local/lib/python3.8/site-packages Requires: six, jsonschema, isodate Required-by: openapi-spec-validator, openapi-core

How come it doesnt use the latest jsonschema?

@p1c2u
Copy link
Collaborator Author

p1c2u commented Sep 2, 2022

@adammkelly openapi-spec-validator 0.3.3 indeed has limitation of jsonschema<4 because of python 2.7 support. Did you use openapi-spec-validator 0.4.x with openapi-core 0.14.x before?

@adammkelly
Copy link

We just require the latest openapi-core which then pulls in the other 2 packages, should we be doing something different for python 3?

We have to pin:
openapi-spec-validator==0.3.1
jsonschema==4.9.1

to get around some previous issues (I think you already fixed them months ago)

@p1c2u
Copy link
Collaborator Author

p1c2u commented Sep 2, 2022

@adammkelly I see you use openapi-spec-validator==0.3.1 because it's the last version without jsonschema upper version limitation.

do you have list of requirements for previous builds that were working for you?

@p1c2u
Copy link
Collaborator Author

p1c2u commented Sep 2, 2022

Version 0.14.5 released with the openapi-spec-validator constraint loosened

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

3 participants