confluentinc / confluent-kafka-python

Confluent's Kafka Python Client
http://docs.confluent.io/current/clients/confluent-kafka-python
Other
140 stars 898 forks source link

jsonschema version is not constrained: jsonschema.RefResolver is deprecated as of v4.18.0 #1840

Open timonviola opened 1 month ago

timonviola commented 1 month ago

Description

jsonschema version is not constrained by this package and we are seeing warning in our test runs.

jsonschema 4.23.0 An implementation of JSON Schema valid

============================== warnings summary ===============================
.venv/lib/python3.10/site-packages/confluent_kafka/schema_registry/json_schema.py:23
.venv/lib/python3.10/site-packages/confluent_kafka/schema_registry/json_schema.py:23
  /Users/timon/work/kafka-log/kafka-log/.venv/lib/python3.10/site-packages/confluent_kafka/schema_registry/json_schema.py:23: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization. A future release will remove RefResolver. Please file a feature request (on referencing) if you are missing an API for the kind of customization you need.
    from jsonschema import validate, ValidationError, RefResolver

How to reproduce

Create a fresh installation of the package with json extras.

Checklist

Please provide the following information: