openapi-core icon indicating copy to clipboard operation
openapi-core copied to clipboard

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

Open p1c2u opened this issue 2 years ago • 16 comments

Follow up from https://github.com/p1c2u/openapi-spec-validator/issues/173

p1c2u avatar Sep 02 '22 13:09 p1c2u

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

p1c2u avatar Sep 02 '22 13:09 p1c2u

Fix was released with version 0.14.3

p1c2u avatar Sep 02 '22 14:09 p1c2u

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?

dabljues avatar Sep 02 '22 15:09 dabljues

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.

p1c2u avatar Sep 02 '22 15:09 p1c2u

@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.

adammkelly avatar Sep 02 '22 15:09 adammkelly

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,

dabljues avatar Sep 02 '22 16:09 dabljues

@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 avatar Sep 02 '22 16:09 p1c2u

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

p1c2u avatar Sep 02 '22 16:09 p1c2u

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

dabljues avatar Sep 02 '22 16:09 dabljues

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

EDIT: Version .0.14.4 released.

p1c2u avatar Sep 02 '22 16:09 p1c2u

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!

dabljues avatar Sep 02 '22 16:09 dabljues

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?

adammkelly avatar Sep 02 '22 16:09 adammkelly

@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?

p1c2u avatar Sep 02 '22 16:09 p1c2u

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)

adammkelly avatar Sep 02 '22 17:09 adammkelly

@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 avatar Sep 02 '22 17:09 p1c2u

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

p1c2u avatar Sep 02 '22 20:09 p1c2u