python-openapi / openapi-spec-validator

OpenAPI Spec Validator is a CLI, pre-commit hook and python package that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0 and OpenAPI 3.1 specification.
Apache License 2.0
323 stars 61 forks source link

Validation fails due to AttributeError while using Python 3.12.1 #327

Closed dmdhrumilmistry closed 1 month ago

dmdhrumilmistry commented 5 months ago
eccles commented 2 months ago

Just encountered this erro - any chance of a resolution?

eccles commented 1 month ago

Ok - I fixed this. It always puzzled me why this code failed in 3.12 even though there are tests in the github actons for 3.12.

Removing -qq when install using pip showed that pip downgraded openapi-spec-validateor to 0.6.2 because my virtualenv also installed requests 2.29.0 and they share a common dependency. Upgrading requests module to 2.31.0 fixed the problem - openapi-spec-validator at 0.7.1 does work on 3.12.

This is new behaviour of pip - so I believe. I am only an occasional python develeoper these days and have not kept up.