Upgrading to a more recent version of jsonschema

Stephen Finucane stephenfin at redhat.com
Mon Jul 18 15:57:41 UTC 2022


On Sat, 2022-07-16 at 11:12 +0200, Thomas Goirand wrote:
> Hi there!
> 
> On 7/14/22 18:09, Dmitry Tantsur wrote:
> > Ironic was not too bad either: 
> > https://review.opendev.org/c/openstack/ironic/+/849882 
> > <https://review.opendev.org/c/openstack/ironic/+/849882>
> > Similar for Nova: https://review.opendev.org/c/openstack/nova/+/849881 
> > <https://review.opendev.org/c/openstack/nova/+/849881>
> 
> Thanks, I was able to backport these fixes in the Yoga version of Ironic 
> and Nova, and uploaded them to Debian Unstable (currently I'm finishing 
> to build Ironic that had its unit tests passing already).
> 
> >      > - sahara
> >      >
> >      > I'll try to see what I can do to fix these, maybe some of the
> >     failures
> >      > are unrelated (I haven't investigated yet).
> 
> Only Sahara is missing a fix now. I tracked it down to this:
> 
> https://github.com/openstack/sahara/blob/master/sahara/utils/api_validator.py#L177
> 
> the error being:
> 
> TypeError: __init__() got an unexpected keyword argument 'types'
> 
> Looks like "types" has gone away from the parent class. Does anyone know 
> what's going on, and what the replacement is? I first thought it looks 
> like "types" should really be "type_checker", so I tried that, but it 
> didn't work...
> 
> Once Sahara is fixed, I'm done for all OpenStack packages, and only 2 
> other Debian packages will need a fix (but I filed Debian bugs against 
> these packages, so we're good...).

Looks like Sahara didn't have deprecation warnings turned on in CI and missed .
[1]. Google leads me to [2]. I guess you want [3]. That's all I've got so far.

Stephen

[1] https://github.com/python-jsonschema/jsonschema/blob/v3.2.0/jsonschema/validators.py#L269-L282
[2] https://python-jsonschema.readthedocs.io/en/latest/creating/
[3] https://python-jsonschema.readthedocs.io/en/latest/creating/#jsonschema.validators.extend

> 
> Cheers,
> 
> Thomas Goirand (zigo)
> 




More information about the openstack-discuss mailing list