Skip to content

DeprecationWarning on Python 3.10 #390

Closed
@nikitagashkov

Description

@nikitagashkov

Hi! I've encountered a deprecation warning running on Python 3.10 complaining about using distutils:

../../../.pyenv/versions/3.10.1/envs/project/lib/python3.10/site-packages/openapi_core/unmarshalling/schemas/util.py:5
  /Users/gashkov/.pyenv/versions/3.10.1/envs/project/lib/python3.10/site-packages/openapi_core/unmarshalling/schemas/util.py:5: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
    from distutils.util import strtobool

Also, looks like there's a couple related to a new jsonschema:

  /Users/gashkov/.pyenv/versions/3.10.1/envs/project/lib/python3.10/site-packages/openapi_core/unmarshalling/schemas/unmarshallers.py:61: DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release. Call validator.evolve(schema=new_schema).iter_errors(...) instead.
    errors = tuple(errors_iter)

  /Users/gashkov/.pyenv/versions/3.10.1/envs/project/lib/python3.10/site-packages/jsonschema/validators.py:245: DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release. Call validator.evolve(schema=new_schema).iter_errors(...) instead.
    for error in self.evolve(schema=schema).iter_errors(instance):

  /Users/gashkov/.pyenv/versions/3.10.1/envs/project/lib/python3.10/site-packages/jsonschema/validators.py:276: DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release. Call validator.evolve(schema=new_schema).iter_errors(...) instead.
    error = next(self.iter_errors(instance), None)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions