Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-jsonschema for openSUSE:Factory checked in at 2023-09-07 21:12:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-jsonschema (Old) and /work/SRC/openSUSE:Factory/.python-jsonschema.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jsonschema" Thu Sep 7 21:12:13 2023 rev:42 rq:1109430 version:4.19.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-jsonschema/python-jsonschema.changes 2023-08-05 12:55:02.716632170 +0200 +++ /work/SRC/openSUSE:Factory/.python-jsonschema.new.1766/python-jsonschema.changes 2023-09-07 21:12:26.480662558 +0200 @@ -1,0 +2,13 @@ +Thu Sep 7 06:16:46 UTC 2023 - Johannes Kastl <ka...@b1-systems.de> + +- update to 4.19.0: + * Importing the |Validator| protocol directly from the package + root is deprecated. Import it from + |jsonschema.protocols.Validator| instead. + * Automatic retrieval of remote references (which is still + deprecated) now properly succeeds even if the retrieved + resource does not declare which version of JSON Schema it uses. + Such resources are assumed to be 2020-12 schemas. This more + closely matches the pre-|referencing| library behavior. + +------------------------------------------------------------------- @@ -384 +397 @@ -- update to version 3.2.0: +- update to version 3.2.0 (jsc#SLE-18756): Old: ---- jsonschema-4.18.6.tar.gz New: ---- jsonschema-4.19.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-jsonschema.spec ++++++ --- /var/tmp/diff_new_pack.BPhcKN/_old 2023-09-07 21:12:27.784709175 +0200 +++ /var/tmp/diff_new_pack.BPhcKN/_new 2023-09-07 21:12:27.784709175 +0200 @@ -33,7 +33,7 @@ %{?sle15_python_module_pythons} Name: python-jsonschema%{psuffix} -Version: 4.18.6 +Version: 4.19.0 Release: 0 Summary: An implementation of JSON-Schema validation for Python License: MIT ++++++ jsonschema-4.18.6.tar.gz -> jsonschema-4.19.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/CHANGELOG.rst new/jsonschema-4.19.0/CHANGELOG.rst --- old/jsonschema-4.18.6/CHANGELOG.rst 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/CHANGELOG.rst 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,12 @@ +v4.19.0 +======= + +* Importing the ``Validator`` protocol directly from the package root is deprecated. + Import it from ``jsonschema.protocols.Validator`` instead. +* Automatic retrieval of remote references (which is still deprecated) now properly succeeds even if the retrieved resource does not declare which version of JSON Schema it uses. + Such resources are assumed to be 2020-12 schemas. + This more closely matches the pre-referencing library behavior. + v4.18.6 ======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/PKG-INFO new/jsonschema-4.19.0/PKG-INFO --- old/jsonschema-4.18.6/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: jsonschema -Version: 4.18.6 +Version: 4.19.0 Summary: An implementation of JSON Schema validation for Python Project-URL: Documentation, https://python-jsonschema.readthedocs.io/ Project-URL: Homepage, https://github.com/python-jsonschema/jsonschema @@ -169,7 +169,11 @@ Release Information ------------------- -v4.18.6 +v4.19.0 ======= -* Set a ``jsonschema`` specific user agent when automatically retrieving remote references (which is deprecated). +* Importing the ``Validator`` protocol directly from the package root is deprecated. + Import it from ``jsonschema.protocols.Validator`` instead. +* Automatic retrieval of remote references (which is still deprecated) now properly succeeds even if the retrieved resource does not declare which version of JSON Schema it uses. + Such resources are assumed to be 2020-12 schemas. + This more closely matches the pre-referencing library behavior. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/remotes/draft-next/detached-dynamicref.json new/jsonschema-4.19.0/json/remotes/draft-next/detached-dynamicref.json --- old/jsonschema-4.18.6/json/remotes/draft-next/detached-dynamicref.json 1970-01-01 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/remotes/draft-next/detached-dynamicref.json 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,13 @@ +{ + "$id": "http://localhost:1234/draft-next/detached-dynamicref.json", + "$schema": "https://json-schema.org/draft/next/schema", + "$defs": { + "foo": { + "$dynamicRef": "#detached" + }, + "detached": { + "$dynamicAnchor": "detached", + "type": "integer" + } + } +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/remotes/draft-next/detached-ref.json new/jsonschema-4.19.0/json/remotes/draft-next/detached-ref.json --- old/jsonschema-4.18.6/json/remotes/draft-next/detached-ref.json 1970-01-01 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/remotes/draft-next/detached-ref.json 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,13 @@ +{ + "$id": "http://localhost:1234/draft-next/detached-ref.json", + "$schema": "https://json-schema.org/draft/next/schema", + "$defs": { + "foo": { + "$ref": "#detached" + }, + "detached": { + "$anchor": "detached", + "type": "integer" + } + } +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/remotes/draft2019-09/detached-ref.json new/jsonschema-4.19.0/json/remotes/draft2019-09/detached-ref.json --- old/jsonschema-4.18.6/json/remotes/draft2019-09/detached-ref.json 1970-01-01 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/remotes/draft2019-09/detached-ref.json 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,13 @@ +{ + "$id": "http://localhost:1234/draft2019-09/detached-ref.json", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "foo": { + "$ref": "#detached" + }, + "detached": { + "$anchor": "detached", + "type": "integer" + } + } +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/remotes/draft2020-12/detached-dynamicref.json new/jsonschema-4.19.0/json/remotes/draft2020-12/detached-dynamicref.json --- old/jsonschema-4.18.6/json/remotes/draft2020-12/detached-dynamicref.json 1970-01-01 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/remotes/draft2020-12/detached-dynamicref.json 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,13 @@ +{ + "$id": "http://localhost:1234/draft2020-12/detached-dynamicref.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "foo": { + "$dynamicRef": "#detached" + }, + "detached": { + "$dynamicAnchor": "detached", + "type": "integer" + } + } +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/remotes/draft2020-12/detached-ref.json new/jsonschema-4.19.0/json/remotes/draft2020-12/detached-ref.json --- old/jsonschema-4.18.6/json/remotes/draft2020-12/detached-ref.json 1970-01-01 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/remotes/draft2020-12/detached-ref.json 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,13 @@ +{ + "$id": "http://localhost:1234/draft2020-12/detached-ref.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "foo": { + "$ref": "#detached" + }, + "detached": { + "$anchor": "detached", + "type": "integer" + } + } +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/remotes/draft6/detached-ref.json new/jsonschema-4.19.0/json/remotes/draft6/detached-ref.json --- old/jsonschema-4.18.6/json/remotes/draft6/detached-ref.json 1970-01-01 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/remotes/draft6/detached-ref.json 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,13 @@ +{ + "$id": "http://localhost:1234/draft6/detached-ref.json", + "$schema": "http://json-schema.org/draft-06/schema#", + "definitions": { + "foo": { + "$ref": "#detached" + }, + "detached": { + "$id": "#detached", + "type": "integer" + } + } +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/remotes/draft7/detached-ref.json new/jsonschema-4.19.0/json/remotes/draft7/detached-ref.json --- old/jsonschema-4.18.6/json/remotes/draft7/detached-ref.json 1970-01-01 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/remotes/draft7/detached-ref.json 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,13 @@ +{ + "$id": "http://localhost:1234/draft7/detached-ref.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "foo": { + "$ref": "#detached" + }, + "detached": { + "$id": "#detached", + "type": "integer" + } + } +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/tests/draft-next/dynamicRef.json new/jsonschema-4.19.0/json/tests/draft-next/dynamicRef.json --- old/jsonschema-4.18.6/json/tests/draft-next/dynamicRef.json 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/tests/draft-next/dynamicRef.json 2020-02-02 01:00:00.000000000 +0100 @@ -207,45 +207,75 @@ "schema": { "$schema": "https://json-schema.org/draft/next/schema", "$id": "https://test.json-schema.org/dynamic-ref-with-multiple-paths/main", - "$defs": { - "inner": { - "$id": "inner", - "$dynamicAnchor": "foo", - "title": "inner", - "additionalProperties": { - "$dynamicRef": "#foo" - } + "propertyDependencies": { + "kindOfList": { + "numbers": { "$ref": "numberList" }, + "strings": { "$ref": "stringList" } } }, - "if": { - "propertyNames": { - "pattern": "^[a-m]" + "$defs": { + "genericList": { + "$id": "genericList", + "properties": { + "list": { + "items": { "$dynamicRef": "#itemType" } + } + } + }, + "numberList": { + "$id": "numberList", + "$defs": { + "itemType": { + "$dynamicAnchor": "itemType", + "type": "number" + } + }, + "$ref": "genericList" + }, + "stringList": { + "$id": "stringList", + "$defs": { + "itemType": { + "$dynamicAnchor": "itemType", + "type": "string" + } + }, + "$ref": "genericList" } - }, - "then": { - "title": "any type of node", - "$id": "anyLeafNode", - "$dynamicAnchor": "foo", - "$ref": "inner" - }, - "else": { - "title": "integer node", - "$id": "integerNode", - "$dynamicAnchor": "foo", - "type": [ "object", "integer" ], - "$ref": "inner" } }, "tests": [ { - "description": "recurse to anyLeafNode - floats are allowed", - "data": { "alpha": 1.1 }, + "description": "number list with number values", + "data": { + "kindOfList": "numbers", + "list": [1.1] + }, "valid": true }, { - "description": "recurse to integerNode - floats are not allowed", - "data": { "november": 1.1 }, + "description": "number list with string values", + "data": { + "kindOfList": "numbers", + "list": ["foo"] + }, "valid": false + }, + { + "description": "string list with number values", + "data": { + "kindOfList": "strings", + "list": [1.1] + }, + "valid": false + }, + { + "description": "string list with string values", + "data": { + "kindOfList": "strings", + "list": ["foo"] + }, + "valid": true } ] }, @@ -564,5 +594,23 @@ "valid": false } ] + }, + { + "description": "$ref to $dynamicRef finds detached $dynamicAnchor", + "schema": { + "$ref": "http://localhost:1234/draft-next/detached-dynamicref.json#/$defs/foo" + }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "non-number is invalid", + "data": "a", + "valid": false + } + ] } ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/tests/draft-next/refRemote.json new/jsonschema-4.19.0/json/tests/draft-next/refRemote.json --- old/jsonschema-4.18.6/json/tests/draft-next/refRemote.json 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/tests/draft-next/refRemote.json 2020-02-02 01:00:00.000000000 +0100 @@ -310,5 +310,23 @@ "valid": true } ] + }, + { + "description": "$ref to $ref finds detached $anchor", + "schema": { + "$ref": "http://localhost:1234/draft-next/detached-ref.json#/$defs/foo" + }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "non-number is invalid", + "data": "a", + "valid": false + } + ] } ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/tests/draft2019-09/refRemote.json new/jsonschema-4.19.0/json/tests/draft2019-09/refRemote.json --- old/jsonschema-4.18.6/json/tests/draft2019-09/refRemote.json 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/tests/draft2019-09/refRemote.json 2020-02-02 01:00:00.000000000 +0100 @@ -310,5 +310,23 @@ "valid": true } ] + }, + { + "description": "$ref to $ref finds detached $anchor", + "schema": { + "$ref": "http://localhost:1234/draft2019-09/detached-ref.json#/$defs/foo" + }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "non-number is invalid", + "data": "a", + "valid": false + } + ] } ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/tests/draft2020-12/dynamicRef.json new/jsonschema-4.19.0/json/tests/draft2020-12/dynamicRef.json --- old/jsonschema-4.18.6/json/tests/draft2020-12/dynamicRef.json 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/tests/draft2020-12/dynamicRef.json 2020-02-02 01:00:00.000000000 +0100 @@ -392,45 +392,84 @@ "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://test.json-schema.org/dynamic-ref-with-multiple-paths/main", + "if": { + "properties": { + "kindOfList": { "const": "numbers" } + }, + "required": ["kindOfList"] + }, + "then": { "$ref": "numberList" }, + "else": { "$ref": "stringList" }, + "$defs": { - "inner": { - "$id": "inner", - "$dynamicAnchor": "foo", - "title": "inner", - "additionalProperties": { - "$dynamicRef": "#foo" + "genericList": { + "$id": "genericList", + "properties": { + "list": { + "items": { "$dynamicRef": "#itemType" } + } + }, + "$defs": { + "defaultItemType": { + "$comment": "Only needed to satisfy bookending requirement", + "$dynamicAnchor": "itemType" + } } + }, + "numberList": { + "$id": "numberList", + "$defs": { + "itemType": { + "$dynamicAnchor": "itemType", + "type": "number" + } + }, + "$ref": "genericList" + }, + "stringList": { + "$id": "stringList", + "$defs": { + "itemType": { + "$dynamicAnchor": "itemType", + "type": "string" + } + }, + "$ref": "genericList" } - }, - "if": { - "propertyNames": { - "pattern": "^[a-m]" - } - }, - "then": { - "title": "any type of node", - "$id": "anyLeafNode", - "$dynamicAnchor": "foo", - "$ref": "inner" - }, - "else": { - "title": "integer node", - "$id": "integerNode", - "$dynamicAnchor": "foo", - "type": [ "object", "integer" ], - "$ref": "inner" } }, "tests": [ { - "description": "recurse to anyLeafNode - floats are allowed", - "data": { "alpha": 1.1 }, + "description": "number list with number values", + "data": { + "kindOfList": "numbers", + "list": [1.1] + }, "valid": true }, { - "description": "recurse to integerNode - floats are not allowed", - "data": { "november": 1.1 }, + "description": "number list with string values", + "data": { + "kindOfList": "numbers", + "list": ["foo"] + }, + "valid": false + }, + { + "description": "string list with number values", + "data": { + "kindOfList": "strings", + "list": [1.1] + }, "valid": false + }, + { + "description": "string list with string values", + "data": { + "kindOfList": "strings", + "list": ["foo"] + }, + "valid": true } ] }, @@ -669,5 +708,23 @@ "valid": true } ] + }, + { + "description": "$ref to $dynamicRef finds detached $dynamicAnchor", + "schema": { + "$ref": "http://localhost:1234/draft2020-12/detached-dynamicref.json#/$defs/foo" + }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "non-number is invalid", + "data": "a", + "valid": false + } + ] } ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/tests/draft2020-12/refRemote.json new/jsonschema-4.19.0/json/tests/draft2020-12/refRemote.json --- old/jsonschema-4.18.6/json/tests/draft2020-12/refRemote.json 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/tests/draft2020-12/refRemote.json 2020-02-02 01:00:00.000000000 +0100 @@ -310,5 +310,23 @@ "valid": true } ] + }, + { + "description": "$ref to $ref finds detached $anchor", + "schema": { + "$ref": "http://localhost:1234/draft2020-12/detached-ref.json#/$defs/foo" + }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "non-number is invalid", + "data": "a", + "valid": false + } + ] } ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/tests/draft6/refRemote.json new/jsonschema-4.19.0/json/tests/draft6/refRemote.json --- old/jsonschema-4.18.6/json/tests/draft6/refRemote.json 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/tests/draft6/refRemote.json 2020-02-02 01:00:00.000000000 +0100 @@ -235,5 +235,23 @@ "valid": true } ] + }, + { + "description": "$ref to $ref finds location-independent $id", + "schema": { + "$ref": "http://localhost:1234/draft6/detached-ref.json#/definitions/foo" + }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "non-number is invalid", + "data": "a", + "valid": false + } + ] } ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/json/tests/draft7/refRemote.json new/jsonschema-4.19.0/json/tests/draft7/refRemote.json --- old/jsonschema-4.18.6/json/tests/draft7/refRemote.json 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/json/tests/draft7/refRemote.json 2020-02-02 01:00:00.000000000 +0100 @@ -235,5 +235,23 @@ "valid": true } ] + }, + { + "description": "$ref to $ref finds location-independent $id", + "schema": { + "$ref": "http://localhost:1234/draft7/detached-ref.json#/definitions/foo" + }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "non-number is invalid", + "data": "a", + "valid": false + } + ] } ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/jsonschema/__init__.py new/jsonschema-4.19.0/jsonschema/__init__.py --- old/jsonschema-4.18.6/jsonschema/__init__.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/jsonschema/__init__.py 2020-02-02 01:00:00.000000000 +0100 @@ -13,7 +13,6 @@ from jsonschema._format import FormatChecker from jsonschema._types import TypeChecker from jsonschema.exceptions import SchemaError, ValidationError -from jsonschema.protocols import Validator from jsonschema.validators import ( Draft3Validator, Draft4Validator, @@ -65,6 +64,16 @@ ) from jsonschema.exceptions import FormatError return FormatError + elif name == "Validator": + warnings.warn( + "Importing Validator directly from the jsonschema package " + "is deprecated and will become an ImportError. Import it from " + "jsonschema.protocols instead.", + DeprecationWarning, + stacklevel=2, + ) + from jsonschema.protocols import Validator + return Validator elif name == "RefResolutionError": from jsonschema.exceptions import _RefResolutionError warnings.warn( @@ -107,6 +116,5 @@ "SchemaError", "TypeChecker", "ValidationError", - "Validator", "validate", ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/jsonschema/tests/test_deprecations.py new/jsonschema-4.19.0/jsonschema/tests/test_deprecations.py --- old/jsonschema-4.18.6/jsonschema/tests/test_deprecations.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/jsonschema/tests/test_deprecations.py 2020-02-02 01:00:00.000000000 +0100 @@ -9,7 +9,7 @@ import referencing.exceptions -from jsonschema import FormatChecker, exceptions, validators +from jsonschema import FormatChecker, exceptions, protocols, validators class TestDeprecations(TestCase): @@ -64,6 +64,19 @@ self.assertEqual(FormatError, exceptions.FormatError) self.assertEqual(w.filename, __file__) + def test_import_Validator(self): + """ + As of v4.19.0, importing Validator from the package root is + deprecated in favor of doing so from jsonschema.protocols. + """ + + message = "Importing Validator directly from the jsonschema package " + with self.assertWarnsRegex(DeprecationWarning, message) as w: + from jsonschema import Validator + + self.assertEqual(Validator, protocols.Validator) + self.assertEqual(w.filename, __file__) + def test_validators_validators(self): """ As of v4.0.0, accessing jsonschema.validators.validators is @@ -368,10 +381,7 @@ Automatic retrieval of remote references is deprecated as of v4.18.0. """ ref = "http://bar#/$defs/baz" - schema = { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": {"baz": {"type": "integer"}}, - } + schema = {"$defs": {"baz": {"type": "integer"}}} if "requests" in sys.modules: # pragma: no cover self.addCleanup( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonschema-4.18.6/jsonschema/validators.py new/jsonschema-4.19.0/jsonschema/validators.py --- old/jsonschema-4.18.6/jsonschema/validators.py 2020-02-02 01:00:00.000000000 +0100 +++ new/jsonschema-4.19.0/jsonschema/validators.py 2020-02-02 01:00:00.000000000 +0100 @@ -119,7 +119,10 @@ DeprecationWarning, stacklevel=9, # Ha ha ha ha magic numbers :/ ) - return referencing.Resource.from_contents(json.load(response)) + return referencing.Resource.from_contents( + json.load(response), + default_specification=referencing.jsonschema.DRAFT202012, + ) _REMOTE_WARNING_REGISTRY = SPECIFICATIONS.combine(