Hello community,
here is the log from the commit of package python-python-jsonschema-objects for
openSUSE:Leap:15.2 checked in at 2020-03-23 07:14:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-python-jsonschema-objects (Old)
and
/work/SRC/openSUSE:Leap:15.2/.python-python-jsonschema-objects.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-jsonschema-objects"
Mon Mar 23 07:14:07 2020 rev:2 rq:787278 version:0.3.12
Changes:
--------
---
/work/SRC/openSUSE:Leap:15.2/python-python-jsonschema-objects/python-python-jsonschema-objects.changes
2020-02-22 17:50:59.197594935 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.python-python-jsonschema-objects.new.3160/python-python-jsonschema-objects.changes
2020-03-23 07:15:01.274539171 +0100
@@ -1,0 +2,9 @@
+Fri Mar 20 11:53:16 UTC 2020 - [email protected]
+
+- version update to 0.3.12
+ * Going forward, this library will no longer test on or support Python 2.7
because it's EOL
+ * Fixes formatting of supported schema versions (#184)
+ * Removes some confusing code related to ArrayWrapper initialization (#188)
+ * ProtocolBase objects (most objects) now support deepcopy. (#185)
+
+-------------------------------------------------------------------
Old:
----
python_jsonschema_objects-0.3.11.tar.gz
New:
----
python_jsonschema_objects-0.3.12.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-jsonschema-objects.spec ++++++
--- /var/tmp/diff_new_pack.txdpD5/_old 2020-03-23 07:15:01.670539409 +0100
+++ /var/tmp/diff_new_pack.txdpD5/_new 2020-03-23 07:15:01.670539409 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-python-jsonschema-objects
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,8 +17,10 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+# python2-Markdown missing
+%define skip_python2 1
Name: python-python-jsonschema-objects
-Version: 0.3.11
+Version: 0.3.12
Release: 0
Summary: An object wrapper for JSON Schema definitions
License: MIT
++++++ python_jsonschema_objects-0.3.11.tar.gz ->
python_jsonschema_objects-0.3.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python_jsonschema_objects-0.3.11/PKG-INFO
new/python_jsonschema_objects-0.3.12/PKG-INFO
--- old/python_jsonschema_objects-0.3.11/PKG-INFO 2019-08-17
23:00:48.000000000 +0200
+++ new/python_jsonschema_objects-0.3.12/PKG-INFO 2020-01-27
04:29:55.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python_jsonschema_objects
-Version: 0.3.11
+Version: 0.3.12
Summary: An object wrapper for JSON Schema definitions
Home-page: http://python-jsonschema-objects.readthedocs.org/
Author: Chris Wacek
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects/__init__.py
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects/__init__.py
--- old/python_jsonschema_objects-0.3.11/python_jsonschema_objects/__init__.py
2019-08-17 23:00:30.000000000 +0200
+++ new/python_jsonschema_objects-0.3.12/python_jsonschema_objects/__init__.py
2020-01-27 04:29:38.000000000 +0100
@@ -1,32 +1,31 @@
-import jsonschema
-from jsonschema import Draft4Validator
-from jsonschema.compat import iteritems
-import re
-import json
import codecs
-import warnings
import copy
+import json
+import logging
import os.path
+import warnings
+
import inflection
+import jsonschema
import six
-
-import logging
-
-logger = logging.getLogger(__name__)
-
+from jsonschema import Draft4Validator
+from jsonschema.compat import iteritems
import python_jsonschema_objects.classbuilder as classbuilder
-from python_jsonschema_objects.validators import ValidationError
-import python_jsonschema_objects.util
import python_jsonschema_objects.markdown_support
+import python_jsonschema_objects.util
+from python_jsonschema_objects.validators import ValidationError
+
+
+logger = logging.getLogger(__name__)
__all__ = ["ObjectBuilder", "markdown_support", "ValidationError"]
FILE = __file__
SUPPORTED_VERSIONS = (
- "http://json-schema.org/draft-03/schema",
- "http://json-schema.org/draft-04/schema",
+ "http://json-schema.org/draft-03/schema#",
+ "http://json-schema.org/draft-04/schema#",
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects/_version.py
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects/_version.py
--- old/python_jsonschema_objects-0.3.11/python_jsonschema_objects/_version.py
2019-08-17 23:00:48.000000000 +0200
+++ new/python_jsonschema_objects-0.3.12/python_jsonschema_objects/_version.py
2020-01-27 04:29:55.000000000 +0100
@@ -11,8 +11,8 @@
{
"dirty": false,
"error": null,
- "full-revisionid": "0918fc5b24d30a2a92226f0299c5c0c1901f1852",
- "version": "0.3.11"
+ "full-revisionid": "3f3cb9090c34016499b183cb14ca01d3cce4d46f",
+ "version": "0.3.12"
}
''' # END VERSION_JSON
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects/classbuilder.py
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects/classbuilder.py
---
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects/classbuilder.py
2019-08-17 23:00:30.000000000 +0200
+++
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects/classbuilder.py
2020-01-27 04:29:38.000000000 +0100
@@ -127,6 +127,9 @@
obj.validate()
return obj
+ def __deepcopy__(self, memo):
+ return self.__class__(**self.as_dict())
+
def __new__(cls, **props):
""" Overridden to support oneOf, where we need to
instantiate a different class depending on what
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects/markdown_support.py
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects/markdown_support.py
---
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects/markdown_support.py
2019-08-17 23:00:30.000000000 +0200
+++
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects/markdown_support.py
2020-01-27 04:29:38.000000000 +0100
@@ -45,9 +45,16 @@
""" Add FencedBlockPreprocessor to the Markdown instance. """
md.registerExtension(self)
- md.preprocessors.add(
- "fenced_code_block", SpecialFencePreprocessor(md),
">normalize_whitespace"
- )
+ if markdown.version_info[0] >= 3:
+ md.preprocessors.register(
+ SpecialFencePreprocessor(md), "fenced_code_block", 10
+ )
+ else:
+ md.preprocessors.add(
+ "fenced_code_block",
+ SpecialFencePreprocessor(md),
+ ">normalize_whitespace",
+ )
class SpecialFencePreprocessor(Preprocessor):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects/wrapper_types.py
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects/wrapper_types.py
---
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects/wrapper_types.py
2019-08-17 23:00:30.000000000 +0200
+++
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects/wrapper_types.py
2020-01-27 04:29:38.000000000 +0100
@@ -66,8 +66,6 @@
if isinstance(ary, (list, tuple, collections.Sequence)):
self.data = ary
- elif isinstance(ary, ArrayWrapper):
- self.data = ary.data
else:
raise TypeError("Invalid value given to array validator:
{0}".format(ary))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects.egg-info/PKG-INFO
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects.egg-info/PKG-INFO
---
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects.egg-info/PKG-INFO
2019-08-17 23:00:48.000000000 +0200
+++
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects.egg-info/PKG-INFO
2020-01-27 04:29:55.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-jsonschema-objects
-Version: 0.3.11
+Version: 0.3.12
Summary: An object wrapper for JSON Schema definitions
Home-page: http://python-jsonschema-objects.readthedocs.org/
Author: Chris Wacek
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects.egg-info/SOURCES.txt
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects.egg-info/SOURCES.txt
---
old/python_jsonschema_objects-0.3.11/python_jsonschema_objects.egg-info/SOURCES.txt
2019-08-17 23:00:48.000000000 +0200
+++
new/python_jsonschema_objects-0.3.12/python_jsonschema_objects.egg-info/SOURCES.txt
2020-01-27 04:29:55.000000000 +0100
@@ -46,6 +46,7 @@
test/test_regression_156.py
test/test_regression_165.py
test/test_regression_17.py
+test/test_regression_185.py
test/test_regression_49.py
test/test_regression_8.py
test/test_regression_87.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python_jsonschema_objects-0.3.11/test/test_pytest.py
new/python_jsonschema_objects-0.3.12/test/test_pytest.py
--- old/python_jsonschema_objects-0.3.11/test/test_pytest.py 2019-08-17
23:00:30.000000000 +0200
+++ new/python_jsonschema_objects-0.3.12/test/test_pytest.py 2020-01-27
04:29:38.000000000 +0100
@@ -15,10 +15,10 @@
"version, warn",
[
("http://json-schema.org/schema#", True),
- ("http://json-schema.org/draft-03/schema", False),
- ("http://json-schema.org/draft-04/schema", False),
- ("http://json-schema.org/draft-06/schema", True),
- ("http://json-schema.org/draft-07/schema", True),
+ ("http://json-schema.org/draft-03/schema#", False),
+ ("http://json-schema.org/draft-04/schema#", False),
+ ("http://json-schema.org/draft-06/schema#", True),
+ ("http://json-schema.org/draft-07/schema#", True),
],
)
def test_warnings_on_schema_version(version, warn):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python_jsonschema_objects-0.3.11/test/test_regression_185.py
new/python_jsonschema_objects-0.3.12/test/test_regression_185.py
--- old/python_jsonschema_objects-0.3.11/test/test_regression_185.py
1970-01-01 01:00:00.000000000 +0100
+++ new/python_jsonschema_objects-0.3.12/test/test_regression_185.py
2020-01-27 04:29:38.000000000 +0100
@@ -0,0 +1,45 @@
+import pytest
+import python_jsonschema_objects as pjs
+import jsonschema
+
+import json
+import copy
+import pprint
+
+pp = pprint.PrettyPrinter(indent=2)
+
+lpid_class_schema = {
+ "$id": "https://example.com/schema-repository/lpid",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "title": "Logical Process ID",
+ "properties": {"lpid_str": {"type": "string"}},
+ "required": ["lpid_str"],
+ "additionalProperties": True,
+}
+
+
+class A(object):
+ a_str = None
+
+ def __init__(self, a_str):
+ self.a_str = a_str
+
+
+def test_regression_185_deepcopy():
+ # Class building and instantiation work great and round-trip.
+ lpid_class_builder = pjs.ObjectBuilder(lpid_class_schema)
+ LPID = lpid_class_builder.classes.LogicalProcessId
+ lpid = LPID(lpid_str="foobaz")
+ instance = json.loads(lpid.serialize())
+ jsonschema.validate(lpid_class_schema, instance)
+
+ # Deep-copying seems to work with instances of normal popos.
+ a = A(a_str="barqux")
+ assert a
+ a_2 = copy.deepcopy(a)
+ assert a_2
+
+ # But deep-copying with objects of generated classes doesn't terminate.
+ lpid_2 = copy.deepcopy(lpid)
+ assert repr(lpid_2) == repr(lpid)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python_jsonschema_objects-0.3.11/tox.ini
new/python_jsonschema_objects-0.3.12/tox.ini
--- old/python_jsonschema_objects-0.3.11/tox.ini 2019-08-17
23:00:30.000000000 +0200
+++ new/python_jsonschema_objects-0.3.12/tox.ini 2020-01-27
04:29:38.000000000 +0100
@@ -1,6 +1,7 @@
[tox]
-envlist = py{27,35,36,37}-jsonschema{23,24,25,26,30}-markdown{2,3}
+envlist = py{35,36,37}-jsonschema{23,24,25,26,30}-markdown{2,3}
+skip_missing_interpreters = true
[testenv]
;install_command = pip install {opts} {packages}