catalystneuro / neuroconv

Create NWB files by converting and combining neural data in proprietary formats and adding essential metadata.
https://neuroconv.readthedocs.io
BSD 3-Clause "New" or "Revised" License
51 stars 22 forks source link

DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0 #1048

Open rly opened 2 months ago

rly commented 2 months ago

Running neuroconv generates a DeprecationWarning:

  /Users/rly/mambaforge/envs/jdb/lib/python3.12/site-packages/neuroconv/tools/yaml_conversion_specification/_yaml_conversion_specification.py:7: 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 RefResolver, validate

https://github.com/catalystneuro/neuroconv/blob/905dc73b549ce877487401d9dbcb67ebebff4e8d/src/neuroconv/tools/yaml_conversion_specification/_yaml_conversion_specification.py#L7

Neuroconv uses jsonschema>=3.2.0: https://github.com/catalystneuro/neuroconv/blob/main/pyproject.toml#L37

Release notes: https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst#v4180

h-mayorquin commented 2 months ago

There is also a yaml one. I will look into it.