Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-asdf for openSUSE:Factory checked in at 2022-10-22 17:33:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-asdf (Old) and /work/SRC/openSUSE:Factory/.python-asdf.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-asdf" Sat Oct 22 17:33:25 2022 rev:18 rq:1030520 version:2.13.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-asdf/python-asdf.changes 2022-04-30 22:52:09.588193566 +0200 +++ /work/SRC/openSUSE:Factory/.python-asdf.new.2275/python-asdf.changes 2022-10-22 17:33:26.387571170 +0200 @@ -1,0 +2,24 @@ +Sat Oct 22 10:00:12 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Update to 2.13.0 + * The ASDF Standard is at v1.6.0 + * Add ability to pull information from schema about asdf file + data, using ~asdf.AsdfFile.schema_info method. [#1167] +- Release 2.12.1 + * Overhaul of the ASDF documentation to make it more consistent + and readable. [#1142, #1152] + * Update deprecated instances of abstractproperty to + abstractmethod [#1148] + * Move build configuration into pyproject.toml [#1149, #1155] + * Pin jsonschema to below 4.10.0. [#1171] +- Release 2.12.0 + * Added ability to display title as a comment in using the info() + functionality. [#1138] + * Add ability to set asdf-standard version for schema example + items. [#1143] +- Add asdf-pr1185+pr1203-fix-jsonschema.patch + * gh#asdf-format/asdf#1185, gh#asdf-format/asdf#1203 +- Add asdf-pr1214-installed-packages.patch + * gh#asdf-format/asdf#1214 + +------------------------------------------------------------------- Old: ---- asdf-2.11.1.tar.gz New: ---- asdf-2.13.0.tar.gz asdf-pr1185+pr1203-fix-jsonschema.patch asdf-pr1214-installed-packages.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-asdf.spec ++++++ --- /var/tmp/diff_new_pack.M7sb7L/_old 2022-10-22 17:33:27.007572130 +0200 +++ /var/tmp/diff_new_pack.M7sb7L/_new 2022-10-22 17:33:27.015572142 +0200 @@ -25,19 +25,22 @@ %bcond_with test %endif -%{?!python_module:%define python_module() python3-%{**}} -%define skip_python2 1 Name: python-asdf%{psuffix} -Version: 2.11.1 +Version: 2.13.0 Release: 0 Summary: Python tools to handle ASDF files License: BSD-2-Clause AND BSD-3-Clause URL: https://github.com/asdf-format/asdf Source0: https://files.pythonhosted.org/packages/source/a/asdf/asdf-%{version}.tar.gz -BuildRequires: %{python_module base >= 3.7} -BuildRequires: %{python_module packaging >= 16.0} -BuildRequires: %{python_module setuptools >= 30.3.0} -BuildRequires: %{python_module setuptools_scm} +# PATCH-FIX-UPSTREAM asdf-pr1185+pr1203-fix-jsonschema.patch gh#asdf-format/asdf#1185, gh#asdf-format/asdf#1203 +Patch0: asdf-pr1185+pr1203-fix-jsonschema.patch +# PATCH-FIX-UPSTREAM asdf-pr1214-installed-packages.patch gh#asdf-format/asdf#1214 +Patch1: asdf-pr1214-installed-packages.patch +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 42} +BuildRequires: %{python_module setuptools_scm >= 3.4} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-PyYAML >= 3.10 @@ -82,14 +85,14 @@ chmod a-x asdf/extern/RangeHTTPServer.py sed -i 's/\r$//' asdf/tests/data/example_schema.json chmod a-x asdf/tests/data/example_schema.json -sed -i '/addopts/ s/--color=yes//' setup.cfg +sed -i '/addopts/ s/--color=yes//' pyproject.toml %build -%python_build +%pyproject_wheel %install %if !%{with test} -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/asdftool %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif ++++++ asdf-2.11.1.tar.gz -> asdf-2.13.0.tar.gz ++++++ ++++ 6158 lines of diff (skipped) ++++++ asdf-pr1185+pr1203-fix-jsonschema.patch ++++++ >From ee83878f7bd5072da21928ebcf4c586997767c97 Mon Sep 17 00:00:00 2001 From: William Jamieson <wjamie...@stsci.edu> Date: Wed, 31 Aug 2022 10:47:21 -0400 Subject: [PATCH 1/5] Fix subclass using a patch --- asdf/schema.py | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/asdf/schema.py b/asdf/schema.py index f62e2b84..7a6ee123 100644 --- a/asdf/schema.py +++ b/asdf/schema.py @@ -7,7 +7,6 @@ from functools import lru_cache from numbers import Integral -import attr import numpy as np import yaml from jsonschema import validators as mvalidators @@ -253,15 +252,25 @@ def _create_validator(validators=YAML_VALIDATORS, visit_repeat_nodes=False): } ) id_of = mvalidators.Draft4Validator.ID_OF - base_cls = mvalidators.create( + ASDFValidator = mvalidators.create( meta_schema=meta_schema, validators=validators, type_checker=type_checker, id_of=id_of ) - @attr.s - class ASDFValidator(base_cls): - _context = attr.ib(factory=lambda: _ValidationContext()) - ctx = attr.ib(default=None) - serialization_context = attr.ib(default=None) + def _patch_init(cls): + original_init = cls.__init__ + + def __init__(self, *args, **kwargs): + self.ctx = kwargs.pop("ctx", None) + self.serialization_context = kwargs.pop("serialization_context", None) + + original_init(self, *args, **kwargs) + + cls.__init__ = __init__ + + def _patch_iter_errors(cls): + original_iter_errors = cls.iter_errors + + cls._context = _ValidationContext() def iter_errors(self, instance, *args, **kwargs): # We can't validate anything that looks like an external reference, @@ -308,7 +317,12 @@ def iter_errors(self, instance, *args, **kwargs): for val in instance: yield from self.iter_errors(val) else: - yield from super().iter_errors(instance) + yield from original_iter_errors(self, instance) + + cls.iter_errors = iter_errors + + _patch_init(ASDFValidator) + _patch_iter_errors(ASDFValidator) return ASDFValidator >From 8feecb596e967a46d3d65d83f6cfaf5f92502d1d Mon Sep 17 00:00:00 2001 From: William Jamieson <wjamie...@stsci.edu> Date: Wed, 31 Aug 2022 10:53:36 -0400 Subject: [PATCH 2/5] Unpin jsonschema --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index bf47ae5b..535fc73d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dependencies = [ 'asdf-transform-schemas >=0.2.2', 'importlib_resources >=3; python_version <"3.9"', 'jmespath >=0.6.2', - 'jsonschema >=4.0.1, <4.10.0', + 'jsonschema >=4.0.1', 'numpy >=1.10', 'packaging >=16.0', 'pyyaml >=3.10', >From fce1a58be0e1bd16c7ce6b3b3602d78887eca584 Mon Sep 17 00:00:00 2001 From: William Jamieson <wjamie...@stsci.edu> Date: Tue, 11 Oct 2022 11:12:17 -0400 Subject: [PATCH 3/5] Fix bug in docs --- docs/asdf/config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/asdf/config.rst b/docs/asdf/config.rst index 85b1a7d2..f89ee1fa 100644 --- a/docs/asdf/config.rst +++ b/docs/asdf/config.rst @@ -151,7 +151,7 @@ a schema, which can then be used to validate a file: ... type: object ... properties: ... foo: - ... type: string + ... type: string ... required: [foo] ... ... ... """ >From 6f79f620b4632e20178d9bd53528702605d3e976 Mon Sep 17 00:00:00 2001 From: Brett Graham <bgra...@stsci.edu> Date: Mon, 3 Oct 2022 17:35:04 -0400 Subject: [PATCH 1/5] Unpin jsonschema, fix default validation Add custom default validator to 'applicable_validators' argument to jsonschema.validators.create Tested locally with jsonschema 4.16 update changelog [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CHANGES.rst | 1 + asdf/schema.py | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/asdf/schema.py b/asdf/schema.py index 7a6ee123..dd787659 100644 --- a/asdf/schema.py +++ b/asdf/schema.py @@ -6,6 +6,7 @@ from collections.abc import Mapping from functools import lru_cache from numbers import Integral +from operator import methodcaller import numpy as np import yaml @@ -749,6 +750,14 @@ def _validate_default(validator, default, instance, schema): validators.update({"default": _validate_default}) + def applicable_validators(schema): + items = list(schema.items()) + items.append(("default", "")) + return items + + else: + applicable_validators = methodcaller("items") + meta_schema_id = schema.get("$schema", YAML_SCHEMA_METASCHEMA_ID) meta_schema = _load_schema_cached(meta_schema_id, extension.get_default_resolver(), False, False) @@ -759,6 +768,7 @@ def _validate_default(validator, default, instance, schema): validators=validators, type_checker=mvalidators.Draft4Validator.TYPE_CHECKER, id_of=mvalidators.Draft4Validator.ID_OF, + applicable_validators=applicable_validators, ) validator = cls(meta_schema, resolver=resolver) validator.validate(schema) ++++++ asdf-pr1214-installed-packages.patch ++++++ >From 0e576f3f922f8659c6b36184480c9db8e4d3b802 Mon Sep 17 00:00:00 2001 From: Ben Greiner <c...@bnavigator.de> Date: Sat, 22 Oct 2022 12:18:54 +0200 Subject: [PATCH 1/2] restrict setuptools.packages.find --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 00587b43..576ac7e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,7 @@ build-backend = 'setuptools.build_meta' write_to = "asdf/_version.py" [tool.setuptools.packages.find] +include = ['asdf*', 'pytest_asdf*'] [tool.setuptools.package-data] 'asdf.commands.tests.data' = ["*"]