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 2024-04-21 20:26:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-asdf (Old) and /work/SRC/openSUSE:Factory/.python-asdf.new.26366 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-asdf" Sun Apr 21 20:26:04 2024 rev:24 rq:1169275 version:3.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-asdf/python-asdf.changes 2024-03-10 20:26:27.378046591 +0100 +++ /work/SRC/openSUSE:Factory/.python-asdf.new.26366/python-asdf.changes 2024-04-21 20:26:58.197236410 +0200 @@ -1,0 +2,9 @@ +Fri Apr 19 20:12:15 UTC 2024 - Ben Greiner <c...@bnavigator.de> + +- Update to 3.2.0 + * Deprecate AsdfFile.version_map [#1745] + * Fix numpy.ma.MaskedArray saving for numpy 2.x [#1769] + * Add float16 support [#1692] + * Removed unused asdf-unit-schemas dependency [#1767] + +------------------------------------------------------------------- Old: ---- asdf-3.1.0.tar.gz New: ---- asdf-3.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-asdf.spec ++++++ --- /var/tmp/diff_new_pack.hmBFYM/_old 2024-04-21 20:26:58.893261947 +0200 +++ /var/tmp/diff_new_pack.hmBFYM/_new 2024-04-21 20:26:58.897262094 +0200 @@ -27,7 +27,7 @@ %{?sle15_python_module_pythons} Name: python-asdf%{psuffix} -Version: 3.1.0 +Version: 3.2.0 Release: 0 Summary: Python tools to handle ASDF files License: BSD-2-Clause AND BSD-3-Clause @@ -42,9 +42,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-PyYAML >= 5.4.1 -Requires: python-asdf-standard >= 1.0.1 +Requires: python-asdf-standard >= 1.1.0 Requires: python-asdf-transform-schemas >= 0.3 -Requires: python-asdf-unit-schemas >= 0.1 Requires: python-attrs >= 20.1 Requires: python-importlib-metadata >= 4.11.4 Requires: python-jmespath >= 0.6.2 @@ -63,7 +62,6 @@ BuildRequires: %{python_module lz4 >= 0.10} BuildRequires: %{python_module psutil} BuildRequires: %{python_module pytest >= 7} -BuildRequires: %{python_module pytest-doctestplus} BuildRequires: %{python_module pytest-remotedata} %endif %python_subpackages @@ -79,7 +77,7 @@ sed -i -e '1{/^#!/d}' $removeshebang chmod a-x $removeshebang asdf/_tests/data/example_schema.json sed -i 's/\r$//' asdf/_tests/data/example_schema.json -sed -i '/addopts/ s/--color=yes//' pyproject.toml +sed -i "/addopts/ s/'--color=yes',//" pyproject.toml find . -name .gitignore -delete %build ++++++ asdf-3.1.0.tar.gz -> asdf-3.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/.github/workflows/ci.yml new/asdf-3.2.0/.github/workflows/ci.yml --- old/asdf-3.1.0/.github/workflows/ci.yml 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/.github/workflows/ci.yml 2024-04-05 18:10:02.000000000 +0200 @@ -70,10 +70,9 @@ envs: | - linux: asdf-standard - linux: asdf-transform-schemas - - linux: asdf-unit-schemas test: - needs: [core, asdf-schemas] + needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: submodules: false @@ -84,7 +83,7 @@ - windows: py39-parallel dev: - needs: [core, asdf-schemas] + needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: submodules: false @@ -99,7 +98,7 @@ - linux: py311-pytestdev-parallel oldest: - needs: [core, asdf-schemas] + needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: submodules: false @@ -109,7 +108,7 @@ - linux: py39-oldestdeps-parallel compatibility: - needs: [core, asdf-schemas] + needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 with: submodules: false @@ -119,7 +118,7 @@ - linux: compatibility package: - needs: [core, asdf-schemas] + needs: [core] uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: python-version: "3.11" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/.github/workflows/s390x.yml new/asdf-3.2.0/.github/workflows/s390x.yml --- old/asdf-3.1.0/.github/workflows/s390x.yml 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/.github/workflows/s390x.yml 2024-04-05 18:10:02.000000000 +0200 @@ -69,7 +69,7 @@ run: | python3 -m venv --system-site-packages tests source tests/bin/activate - pip3 install --upgrade pip setuptools pytest pytest-doctestplus pytest-remotedata + pip3 install --upgrade pip setuptools pytest pytest-remotedata pip3 install -e .[all,tests] pip3 list python3 -m pytest --remote-data diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/CHANGES.rst new/asdf-3.2.0/CHANGES.rst --- old/asdf-3.1.0/CHANGES.rst 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/CHANGES.rst 2024-04-05 18:10:02.000000000 +0200 @@ -1,3 +1,15 @@ +3.2.0 (2024-04-05) +------------------ + +- Deprecate ``AsdfFile.version_map`` [#1745] + +- Fix ``numpy.ma.MaskedArray`` saving for numpy 2.x [#1769] + +- Add ``float16`` support [#1692] + +- Removed unused ``asdf-unit-schemas`` dependency [#1767] + + 3.1.0 (2024-02-27) ------------------ @@ -45,6 +57,7 @@ - Only show ``str`` representation during ``info`` and ``search`` if it contains a single line (and does not fail) [#1748] + 3.0.1 (2023-10-30) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/PKG-INFO new/asdf-3.2.0/PKG-INFO --- old/asdf-3.1.0/PKG-INFO 2024-02-27 21:49:49.780959400 +0100 +++ new/asdf-3.2.0/PKG-INFO 2024-04-05 18:10:13.396895200 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: asdf -Version: 3.1.0 +Version: 3.2.0 Summary: Python implementation of the ASDF Standard Author-email: The ASDF Developers <h...@stsci.edu> License: BSD 3-Clause License @@ -47,9 +47,8 @@ Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: LICENSE -Requires-Dist: asdf-standard>=1.0.1 +Requires-Dist: asdf-standard>=1.1.0 Requires-Dist: asdf-transform-schemas>=0.3 -Requires-Dist: asdf-unit-schemas>=0.1 Requires-Dist: importlib-metadata>=4.11.4 Requires-Dist: jmespath>=0.6.2 Requires-Dist: numpy>=1.22 @@ -69,7 +68,6 @@ Requires-Dist: lz4>=0.10; extra == "tests" Requires-Dist: psutil; extra == "tests" Requires-Dist: pytest>=7; extra == "tests" -Requires-Dist: pytest-doctestplus; extra == "tests" Requires-Dist: pytest-remotedata; extra == "tests" ASDF - Advanced Scientific Data Format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_asdf.py new/asdf-3.2.0/asdf/_asdf.py --- old/asdf-3.1.0/asdf/_asdf.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_asdf.py 2024-04-05 18:10:02.000000000 +0200 @@ -143,6 +143,9 @@ """ self._fname = "" + # make a new AsdfVersion instance here so files don't share the same instance + self._file_format_version = versioning.AsdfVersion(versioning._FILE_FORMAT_VERSION) + # Don't use the version setter here; it tries to access # the extensions, which haven't been assigned yet. if version is None: @@ -167,8 +170,6 @@ # that we've already warned about for this file. self._warned_tag_pairs = set() - self._file_format_version = None - # Context of a call to treeutil.walk_and_modify, needed in the AsdfFile # in case walk_and_modify is re-entered by extension code (via # custom_tree_to_tagged_tree or tagged_tree_to_custom_tree). @@ -258,7 +259,11 @@ @property def version_map(self): - return versioning.get_version_map(self.version_string) + warnings.warn( + "AsdfFile.version_map is deprecated. Please use the extension_manager", + AsdfDeprecationWarning, + ) + return versioning._get_version_map(self.version_string) @property def extensions(self): @@ -470,9 +475,6 @@ @property def file_format_version(self): - if self._file_format_version is None: - return versioning.AsdfVersion(self.version_map["FILE_FORMAT"]) - return self._file_format_version def close(self): @@ -748,6 +750,10 @@ msg = f"Unparsable version in ASDF file: {parts[1]}" raise ValueError(msg) from err + if version != versioning._FILE_FORMAT_VERSION: + msg = f"Unsupported ASDF file format version {version}" + raise ValueError(msg) + return version @classmethod @@ -823,13 +829,15 @@ msg = "Does not appear to be a ASDF file." raise ValueError(msg) from e self._file_format_version = cls._parse_header_line(header_line) - self.version = self._file_format_version self._comments = cls._read_comment_section(fd) version = cls._find_asdf_version_in_comments(self._comments) if version is not None: self.version = version + else: + # If no ASDF_STANDARD comment is found... + self.version = versioning.AsdfVersion("1.0.0") # Now that version is set for good, we can add any additional # extensions, which may have narrow ASDF Standard version @@ -931,7 +939,7 @@ def _write_tree(self, tree, fd, pad_blocks): fd.write(constants.ASDF_MAGIC) fd.write(b" ") - fd.write(self.version_map["FILE_FORMAT"].encode("ascii")) + fd.write(f"{self.file_format_version}".encode("ascii")) fd.write(b"\n") fd.write(b"#") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_core/_converters/ndarray.py new/asdf-3.2.0/asdf/_core/_converters/ndarray.py --- old/asdf-3.1.0/asdf/_core/_converters/ndarray.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_core/_converters/ndarray.py 2024-04-05 18:10:02.000000000 +0200 @@ -10,6 +10,7 @@ ] types = [ np.ndarray, # we use the type here so the extension can find the sub-classes + "numpy.ma.MaskedArray", # in numpy 2.0 "numpy.ma.core.MaskedArray", "asdf.tags.core.ndarray.NDArrayType", "asdf.tags.core.stream.Stream", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_tests/_helpers.py new/asdf-3.2.0/asdf/_tests/_helpers.py --- old/asdf-3.1.0/asdf/_tests/_helpers.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_tests/_helpers.py 2024-04-05 18:10:02.000000000 +0200 @@ -20,21 +20,11 @@ CartesianDifferential = None import numpy as np -import yaml import asdf -from asdf import generic_io, versioning from asdf._asdf import AsdfFile, _get_asdf_library_info -from asdf.constants import YAML_TAG_PREFIX from asdf.exceptions import AsdfConversionWarning from asdf.tags.core import AsdfObject -from asdf.versioning import ( - AsdfVersion, - asdf_standard_development_version, - get_version_map, - split_tag_version, - supported_versions, -) from .httpserver import RangeHTTPServer @@ -48,7 +38,6 @@ "get_test_data_path", "assert_tree_match", "assert_roundtrip_tree", - "yaml_to_asdf", "get_file_sizes", "display_warnings", ] @@ -286,57 +275,6 @@ asdf_check_func(ff) -def yaml_to_asdf(yaml_content, yaml_headers=True, standard_version=None): - """ - Given a string of YAML content, adds the extra pre- - and post-amble to make it an ASDF file. - - Parameters - ---------- - yaml_content : string - - yaml_headers : bool, optional - When True (default) add the standard ASDF YAML headers. - - Returns - ------- - buff : io.BytesIO() - A file-like object containing the ASDF-like content. - """ - if isinstance(yaml_content, str): - yaml_content = yaml_content.encode("utf-8") - - buff = io.BytesIO() - - if standard_version is None: - standard_version = versioning.default_version - - standard_version = AsdfVersion(standard_version) - - vm = get_version_map(standard_version) - file_format_version = vm["FILE_FORMAT"] - yaml_version = vm["YAML_VERSION"] - tree_version = vm["tags"]["tag:stsci.edu:asdf/core/asdf"] - - if yaml_headers: - buff.write( - f"""#ASDF {file_format_version} -#ASDF_STANDARD {standard_version} -%YAML {yaml_version} -%TAG ! tag:stsci.edu:asdf/ ---- !core/asdf-{tree_version} -""".encode( - "ascii", - ), - ) - buff.write(yaml_content) - if yaml_headers: - buff.write(b"\n...\n") - - buff.seek(0) - return buff - - def get_file_sizes(dirname): """ Get the file sizes in a directory. @@ -408,62 +346,3 @@ assert not any(isinstance(w.message, warning_class) for w in recorded_warnings), display_warnings( recorded_warnings, ) - - -def _assert_extension_type_correctness(extension, extension_type, resolver): - __tracebackhide__ = True - - if extension_type.yaml_tag is not None and extension_type.yaml_tag.startswith(YAML_TAG_PREFIX): - return - - if extension_type == asdf.Stream: - # Stream is a special case. It was implemented as a subclass of NDArrayType, - # but shares a tag with that class, so it isn't really a distinct type. - return - - assert extension_type.name is not None, f"{extension_type.__name__} must set the 'name' class attribute" - - # Currently ExtensionType sets a default version of 1.0.0, - # but we want to encourage an explicit version on the subclass. - assert "version" in extension_type.__dict__, f"{extension_type.__name__} must set the 'version' class attribute" - - # check the default version - types_to_check = [extension_type] - - # Adding or updating a schema/type version might involve updating multiple - # packages. This can result in types without schema and schema without types - # for the development version of the asdf-standard. To account for this, - # don't include versioned siblings of types with versions that are not - # in one of the asdf-standard versions in supported_versions (excluding the - # current development version). - asdf_standard_versions = supported_versions.copy() - if asdf_standard_development_version in asdf_standard_versions: - asdf_standard_versions.remove(asdf_standard_development_version) - for sibling in extension_type.versioned_siblings: - tag_base, version = split_tag_version(sibling.yaml_tag) - for asdf_standard_version in asdf_standard_versions: - vm = get_version_map(asdf_standard_version) - if tag_base in vm["tags"] and AsdfVersion(vm["tags"][tag_base]) == version: - types_to_check.append(sibling) - break - - for check_type in types_to_check: - schema_location = resolver(check_type.yaml_tag) - - assert schema_location is not None, ( - f"{extension_type.__name__} supports tag, {check_type.yaml_tag}, " - "but tag does not resolve. Check the tag_mapping and uri_mapping " - f"properties on the related extension ({extension_type.__name__})." - ) - - if schema_location not in asdf.get_config().resource_manager: - try: - with generic_io.get_file(schema_location) as f: - yaml.safe_load(f.read()) - except Exception as err: - msg = ( - f"{extension_type.__name__} supports tag, {check_type.yaml_tag}, " - f"which resolves to schema at {schema_location}, but " - "schema cannot be read." - ) - raise AssertionError(msg) from err diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_tests/tags/core/tests/test_ndarray.py new/asdf-3.2.0/asdf/_tests/tags/core/tests/test_ndarray.py --- old/asdf-3.1.0/asdf/_tests/tags/core/tests/test_ndarray.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_tests/tags/core/tests/test_ndarray.py 2024-04-05 18:10:02.000000000 +0200 @@ -117,9 +117,9 @@ @contextlib.contextmanager -def roundtrip(af, raw=False): +def roundtrip(af, raw=False, standard_version=None): if not isinstance(af, asdf.AsdfFile): - af = asdf.AsdfFile(af) + af = asdf.AsdfFile(af, version=standard_version) b = io.BytesIO() af.write_to(b) b.seek(0) @@ -171,21 +171,14 @@ assert my_tree["little"].dtype.byteorder == "<" -def test_all_dtypes(tmp_path): +@pytest.mark.parametrize("dtype", ndarray._datatype_names.values()) +def test_all_dtypes(dtype): + standard_version = "1.6.0" if dtype == "f2" else None tree = {} for byteorder in (">", "<"): - for dtype in ndarray._datatype_names.values(): - # Python 3 can't expose these dtypes in non-native byte - # order, because it's using the new Python buffer - # interface. - if dtype in ("c32", "f16"): - continue - - arr = np.array([True, False]) if dtype == "b1" else np.arange(0, 10, dtype=str(byteorder + dtype)) - - tree[byteorder + dtype] = arr - - with roundtrip(tree) as af: + arr = np.array([True, False]) if dtype == "b1" else np.arange(0, 10, dtype=str(byteorder + dtype)) + tree[byteorder + dtype] = arr + with roundtrip(tree, standard_version=standard_version) as af: for k in tree: pre = tree[k] post = af[k] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_tests/test_api.py new/asdf-3.2.0/asdf/_tests/test_api.py --- old/asdf-3.1.0/asdf/_tests/test_api.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_tests/test_api.py 2024-04-05 18:10:02.000000000 +0200 @@ -14,8 +14,9 @@ from asdf import config_context, get_config, treeutil, versioning from asdf.exceptions import AsdfDeprecationWarning, AsdfWarning, ValidationError from asdf.extension import ExtensionProxy +from asdf.testing.helpers import yaml_to_asdf -from ._helpers import assert_no_warnings, assert_roundtrip_tree, assert_tree_match, yaml_to_asdf +from ._helpers import assert_no_warnings, assert_roundtrip_tree, assert_tree_match RNG = np.random.default_rng(97) @@ -121,11 +122,11 @@ """ See https://github.com/asdf-format/asdf/issues/364 """ - - version_map = versioning.get_version_map(versioning.default_version) - ff = asdf.AsdfFile() - assert ff.file_format_version == version_map["FILE_FORMAT"] + assert ff.file_format_version == versioning._FILE_FORMAT_VERSION + + # make sure these are different AsdfVersion instances + assert ff.file_format_version is not versioning._FILE_FORMAT_VERSION def test_update_exceptions(tmp_path): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_tests/test_array_blocks.py new/asdf-3.2.0/asdf/_tests/test_array_blocks.py --- old/asdf-3.1.0/asdf/_tests/test_array_blocks.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_tests/test_array_blocks.py 2024-04-05 18:10:02.000000000 +0200 @@ -749,14 +749,13 @@ block_index_start = block_index_header_start + len(constants.INDEX_HEADER) block_index = yaml.load(bs[block_index_start:], yaml.SafeLoader) block_index[block_index_index] -= 4 - yaml_version = tuple(int(x) for x in ff.version_map["YAML_VERSION"].split(".")) buff.seek(block_index_start) yaml.dump( block_index, stream=buff, explicit_start=True, explicit_end=True, - version=yaml_version, + version=asdf.versioning._YAML_VERSION, allow_unicode=True, encoding="utf-8", ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_tests/test_asdf.py new/asdf-3.2.0/asdf/_tests/test_asdf.py --- old/asdf-3.1.0/asdf/_tests/test_asdf.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_tests/test_asdf.py 2024-04-05 18:10:02.000000000 +0200 @@ -5,9 +5,10 @@ from asdf import config_context from asdf._asdf import AsdfFile, open_asdf from asdf._entry_points import get_extensions -from asdf._tests._helpers import assert_no_warnings, assert_tree_match, yaml_to_asdf -from asdf.exceptions import AsdfWarning +from asdf._tests._helpers import assert_no_warnings, assert_tree_match +from asdf.exceptions import AsdfDeprecationWarning, AsdfWarning from asdf.extension import ExtensionProxy +from asdf.testing.helpers import yaml_to_asdf from asdf.versioning import AsdfVersion @@ -103,10 +104,12 @@ af.version = AsdfVersion("2.5.4") af.version = "1.0.0" - assert af.version_map["tags"]["tag:stsci.edu:asdf/core/asdf"] == "1.0.0" + with pytest.warns(AsdfDeprecationWarning, match="AsdfFile.version_map is deprecated"): + assert af.version_map["tags"]["tag:stsci.edu:asdf/core/asdf"] == "1.0.0" af.version = "1.2.0" - assert af.version_map["tags"]["tag:stsci.edu:asdf/core/asdf"] == "1.1.0" + with pytest.warns(AsdfDeprecationWarning, match="AsdfFile.version_map is deprecated"): + assert af.version_map["tags"]["tag:stsci.edu:asdf/core/asdf"] == "1.1.0" def test_asdf_file_extensions(): @@ -213,7 +216,7 @@ # Test missing history: content = """ - foo: bar +foo: bar """ buff = yaml_to_asdf(content) with assert_no_warnings(): @@ -221,24 +224,24 @@ # Test the old history format: content = """ - history: - - !core/history_entry-1.0.0 - description: Once upon a time, there was a carnivorous panda. - - !core/history_entry-1.0.0 - description: This entry intentionally left blank. - foo: bar +history: + - !core/history_entry-1.0.0 + description: Once upon a time, there was a carnivorous panda. + - !core/history_entry-1.0.0 + description: This entry intentionally left blank. +foo: bar """ - buff = yaml_to_asdf(content, standard_version="1.0.0") + buff = yaml_to_asdf(content, version="1.0.0") with assert_no_warnings(): open_asdf(buff) # Test matching by URI: content = """ - history: - extensions: - - !core/extension_metadata-1.0.0 - extension_uri: asdf://somewhere.org/extensions/foo-1.0 - extension_class: some.unrecognized.extension.class.Name +history: + extensions: + - !core/extension_metadata-1.0.0 + extension_uri: asdf://somewhere.org/extensions/foo-1.0 + extension_class: some.unrecognized.extension.class.Name """ buff = yaml_to_asdf(content) with assert_no_warnings(): @@ -246,10 +249,10 @@ # Test matching by legacy class name: content = """ - history: - extensions: - - !core/extension_metadata-1.0.0 - extension_class: some.legacy.class.Name +history: + extensions: + - !core/extension_metadata-1.0.0 + extension_class: some.legacy.class.Name """ buff = yaml_to_asdf(content) with assert_no_warnings(): @@ -258,11 +261,11 @@ # Warn when the URI is missing, even if there's # a class name match: content = f""" - history: - extensions: - - !core/extension_metadata-1.0.0 - extension_uri: some-missing-URI - extension_class: {extension_with_uri.class_name} +history: + extensions: + - !core/extension_metadata-1.0.0 + extension_uri: some-missing-URI + extension_class: {extension_with_uri.class_name} """ buff = yaml_to_asdf(content) with pytest.warns(AsdfWarning, match=r"URI 'some-missing-URI'"): @@ -270,10 +273,10 @@ # Warn when the class name is missing: content = """ - history: - extensions: - - !core/extension_metadata-1.0.0 - extension_class: some.missing.class.Name +history: + extensions: + - !core/extension_metadata-1.0.0 + extension_class: some.missing.class.Name """ buff = yaml_to_asdf(content) with pytest.warns(AsdfWarning, match=r"class 'some.missing.class.Name'"): @@ -281,14 +284,14 @@ # Warn when the package version is older: content = """ - history: - extensions: - - !core/extension_metadata-1.0.0 - extension_uri: asdf://somewhere.org/extensions/foo-1.0 - extension_class: some.class.Name - software: !core/software-1.0.0 - name: foo - version: 9.2.4 +history: + extensions: + - !core/extension_metadata-1.0.0 + extension_uri: asdf://somewhere.org/extensions/foo-1.0 + extension_class: some.class.Name + software: !core/software-1.0.0 + name: foo + version: 9.2.4 """ buff = yaml_to_asdf(content) with pytest.warns(AsdfWarning, match=r"older package"): @@ -296,14 +299,14 @@ # Shouldn't warn when the package version is later: content = """ - history: - extensions: - - !core/extension_metadata-1.0.0 - extension_uri: asdf://somewhere.org/extensions/foo-1.0 - extension_class: some.class.Name - software: !core/software-1.0.0 - name: foo - version: 0.1.2 +history: + extensions: + - !core/extension_metadata-1.0.0 + extension_uri: asdf://somewhere.org/extensions/foo-1.0 + extension_class: some.class.Name + software: !core/software-1.0.0 + name: foo + version: 0.1.2 """ buff = yaml_to_asdf(content) with assert_no_warnings(): @@ -312,14 +315,14 @@ # Shouldn't receive a warning when the package # name changes, even if the version is later: content = """ - history: - extensions: - - !core/extension_metadata-1.0.0 - extension_uri: asdf://somewhere.org/extensions/foo-1.0 - extension_class: some.class.Name - software: !core/software-1.0.0 - name: bar - version: 9.4.5 +history: + extensions: + - !core/extension_metadata-1.0.0 + extension_uri: asdf://somewhere.org/extensions/foo-1.0 + extension_class: some.class.Name + software: !core/software-1.0.0 + name: bar + version: 9.4.5 """ buff = yaml_to_asdf(content) with assert_no_warnings(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_tests/test_deprecated.py new/asdf-3.2.0/asdf/_tests/test_deprecated.py --- old/asdf-3.1.0/asdf/_tests/test_deprecated.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_tests/test_deprecated.py 2024-04-05 18:10:02.000000000 +0200 @@ -117,3 +117,9 @@ pytest.raises(ValidationError), ): asdf.AsdfFile({"history": 42}) + + +def test_asdffile_version_map_deprecation(): + af = asdf.AsdfFile() + with pytest.warns(AsdfDeprecationWarning, match="AsdfFile.version_map is deprecated"): + af.version_map diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_tests/test_file_format.py new/asdf-3.2.0/asdf/_tests/test_file_format.py --- old/asdf-3.1.0/asdf/_tests/test_file_format.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_tests/test_file_format.py 2024-04-05 18:10:02.000000000 +0200 @@ -175,7 +175,7 @@ foo : bar ...""" buff = io.BytesIO(content) - with pytest.raises(ValueError, match=r"ASDF Standard version .* is not supported by asdf==.*"), asdf.open(buff): + with pytest.raises(ValueError, match=r"Unsupported ASDF file format version*"), asdf.open(buff): pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_tests/test_schema.py new/asdf-3.2.0/asdf/_tests/test_schema.py --- old/asdf-3.1.0/asdf/_tests/test_schema.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_tests/test_schema.py 2024-04-05 18:10:02.000000000 +0200 @@ -12,6 +12,7 @@ from asdf._tests import _helpers as helpers from asdf.exceptions import AsdfConversionWarning, AsdfDeprecationWarning, AsdfWarning, ValidationError from asdf.extension import TagDefinition +from asdf.testing.helpers import yaml_to_asdf @contextlib.contextmanager @@ -93,7 +94,7 @@ """ with asdf.config_context() as cfg: cfg.add_extension(ScalarExtension()) - buff = helpers.yaml_to_asdf(yaml) + buff = yaml_to_asdf(yaml) with asdf.open(buff) as ff: assert isinstance(ff.tree["tagged"], Scalar) assert not isinstance(ff.tree["not_tagged"], Scalar) @@ -450,7 +451,7 @@ custom: !<{tag_uri}> foo """ - buff = helpers.yaml_to_asdf(yaml) + buff = yaml_to_asdf(yaml) # This should cause a warning but not an error because without explicitly # providing an extension, our custom type will not be recognized and will # simply be converted to a raw type. @@ -477,7 +478,7 @@ custom: !<{tag_uri}> foo """ - buff = helpers.yaml_to_asdf(yaml) + buff = yaml_to_asdf(yaml) with ( pytest.raises(ValidationError, match=r".* is not of type .*"), asdf.open( @@ -632,7 +633,7 @@ j: l: 362 """ - buff = helpers.yaml_to_asdf(yaml) + buff = yaml_to_asdf(yaml) with asdf.open(buff) as ff: assert "a" in ff.tree["custom"] assert ff.tree["custom"]["a"] == 42 @@ -744,7 +745,7 @@ cfg.add_extension(OneOfExtension()) cfg.add_resource_mapping({schema_uri: tag_schema}) - buff = helpers.yaml_to_asdf(yaml) + buff = yaml_to_asdf(yaml) with asdf.open(buff) as ff: assert ff["one_of"].value == "foo" @@ -759,7 +760,7 @@ """ with tag_reference_extension(): - buff = helpers.yaml_to_asdf(yaml) + buff = yaml_to_asdf(yaml) with asdf.open(buff) as ff: custom = ff.tree["custom"] assert custom.name == "Something" @@ -820,7 +821,7 @@ cfg.add_resource_mapping({schema_uri: tag_schema}) cfg.add_extension(ForeignTagReferenceExtension()) - buff = helpers.yaml_to_asdf(yaml) + buff = yaml_to_asdf(yaml) with asdf.open(buff) as ff: a = ff.tree["custom"].a assert a.name == "Something" @@ -891,14 +892,14 @@ def test_read_large_literal(value): yaml = f"integer: {value}" - buff = helpers.yaml_to_asdf(yaml) + buff = yaml_to_asdf(yaml) with pytest.warns(AsdfWarning, match=r"Invalid integer literal value"), asdf.open(buff) as af: assert af["integer"] == value yaml = f"{value}: foo" - buff = helpers.yaml_to_asdf(yaml) + buff = yaml_to_asdf(yaml) with pytest.warns(AsdfWarning, match=r"Invalid integer literal value"), asdf.open(buff) as af: assert af[value] == "foo" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_tests/test_types.py new/asdf-3.2.0/asdf/_tests/test_types.py --- old/asdf-3.1.0/asdf/_tests/test_types.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_tests/test_types.py 2024-04-05 18:10:02.000000000 +0200 @@ -2,8 +2,7 @@ import asdf from asdf.exceptions import AsdfConversionWarning - -from . import _helpers as helpers +from asdf.testing.helpers import yaml_to_asdf def test_undefined_tag(): @@ -23,7 +22,7 @@ - !core/ndarray-1.0.0 [[7],[8],[9],[10]] - !core/complex-1.0.0 3.14j """ - buff = helpers.yaml_to_asdf(yaml) + buff = yaml_to_asdf(yaml) with pytest.warns(Warning) as warning: afile = asdf.open(buff) missing = afile.tree["undefined_data"] @@ -46,5 +45,4 @@ # Make sure no warning occurs if explicitly ignored buff.seek(0) - with helpers.assert_no_warnings(): - afile = asdf.open(buff, ignore_unrecognized_tag=True) + afile = asdf.open(buff, ignore_unrecognized_tag=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_tests/test_yaml.py new/asdf-3.2.0/asdf/_tests/test_yaml.py --- old/asdf-3.1.0/asdf/_tests/test_yaml.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/_tests/test_yaml.py 2024-04-05 18:10:02.000000000 +0200 @@ -9,6 +9,7 @@ import asdf from asdf import tagged, treeutil, yamlutil from asdf.exceptions import AsdfConversionWarning, AsdfWarning +from asdf.testing.helpers import yaml_to_asdf from . import _helpers as helpers @@ -199,14 +200,15 @@ def test_explicit_tags(): - yaml = f"""#ASDF {asdf.versioning.default_version} + yaml = b"""#ASDF 1.0.0 +#ASDF_STANDARD 1.5.0 %YAML 1.1 --- !<tag:stsci.edu:asdf/core/asdf-1.1.0> foo: !<tag:stsci.edu:asdf/core/ndarray-1.0.0> [1, 2, 3] ...""" # Check that fully qualified explicit tags work - buff = helpers.yaml_to_asdf(yaml, yaml_headers=False) + buff = io.BytesIO(yaml) with asdf.open(buff) as ff: assert all(ff.tree["foo"] == [1, 2, 3]) @@ -320,15 +322,11 @@ ], ) def test_invalid_omap(payload): - test_yaml = f"""#ASDF {asdf.versioning.default_version} -%YAML 1.1 ---- !<tag:stsci.edu:asdf/core/asdf-1.1.0> -od: !!omap -{payload} -...""" + test_yaml = f"""od: !!omap +{payload}""" # Check that fully qualified explicit tags work - buff = helpers.yaml_to_asdf(test_yaml, yaml_headers=False) + buff = yaml_to_asdf(test_yaml) with pytest.raises(yaml.constructor.ConstructorError): with asdf.open(buff) as ff: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/_version.py new/asdf-3.2.0/asdf/_version.py --- old/asdf-3.1.0/asdf/_version.py 2024-02-27 21:49:49.000000000 +0100 +++ new/asdf-3.2.0/asdf/_version.py 2024-04-05 18:10:13.000000000 +0200 @@ -12,5 +12,5 @@ __version_tuple__: VERSION_TUPLE version_tuple: VERSION_TUPLE -__version__ = version = '3.1.0' -__version_tuple__ = version_tuple = (3, 1, 0) +__version__ = version = '3.2.0' +__version_tuple__ = version_tuple = (3, 2, 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/tags/core/ndarray.py new/asdf-3.2.0/asdf/tags/core/ndarray.py --- old/asdf-3.1.0/asdf/tags/core/ndarray.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/tags/core/ndarray.py 2024-04-05 18:10:02.000000000 +0200 @@ -16,6 +16,7 @@ "uint16": "u2", "uint32": "u4", "uint64": "u8", + "float16": "f2", "float32": "f4", "float64": "f8", "complex64": "c8", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/util.py new/asdf-3.2.0/asdf/util.py --- old/asdf-3.1.0/asdf/util.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/util.py 2024-04-05 18:10:02.000000000 +0200 @@ -471,7 +471,7 @@ ... def wiggle(self): ... pass >>> B.wiggle.__doc__ - u'Wiggle the thingamajig' + 'Wiggle the thingamajig' """ def __init__(cls, name, bases, dct): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/versioning.py new/asdf-3.2.0/asdf/versioning.py --- old/asdf-3.1.0/asdf/versioning.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/versioning.py 2024-04-05 18:10:02.000000000 +0200 @@ -33,7 +33,7 @@ _version_map = {} -def get_version_map(version): +def _get_version_map(version): version_map = _version_map.get(version) if version_map is None: @@ -174,3 +174,10 @@ # This library never removed defaults for ASDF Standard versions # later than 1.5.0, so filling them isn't necessary. FILL_DEFAULTS_MAX_VERSION = AsdfVersion("1.5.0") + +# ASDF currently only defined a single file format version +_FILE_FORMAT_VERSION = AsdfVersion("1.0.0") + +# ASDF currently only supports a single yaml version +# use a tuple as that is what yaml expects +_YAML_VERSION = (1, 1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf/yamlutil.py new/asdf-3.2.0/asdf/yamlutil.py --- old/asdf-3.1.0/asdf/yamlutil.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/asdf/yamlutil.py 2024-04-05 18:10:02.000000000 +0200 @@ -10,7 +10,7 @@ from .exceptions import AsdfConversionWarning from .extension._serialization_context import BlockAccess from .tags.core import AsdfObject -from .versioning import _yaml_base_loader +from .versioning import _YAML_VERSION, _yaml_base_loader __all__ = ["custom_tree_to_tagged_tree", "tagged_tree_to_custom_tree"] @@ -396,8 +396,6 @@ tree_finalizer(tree) schema.validate(tree, ctx) - yaml_version = tuple(int(x) for x in ctx.version_map["YAML_VERSION"].split(".")) - # add yaml %TAG definitions from extensions if _serialization_context: for ext in _serialization_context._extensions_used: @@ -411,7 +409,7 @@ Dumper=AsdfDumper, explicit_start=True, explicit_end=True, - version=yaml_version, + version=_YAML_VERSION, allow_unicode=True, encoding="utf-8", tags=tags, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf.egg-info/PKG-INFO new/asdf-3.2.0/asdf.egg-info/PKG-INFO --- old/asdf-3.1.0/asdf.egg-info/PKG-INFO 2024-02-27 21:49:49.000000000 +0100 +++ new/asdf-3.2.0/asdf.egg-info/PKG-INFO 2024-04-05 18:10:13.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: asdf -Version: 3.1.0 +Version: 3.2.0 Summary: Python implementation of the ASDF Standard Author-email: The ASDF Developers <h...@stsci.edu> License: BSD 3-Clause License @@ -47,9 +47,8 @@ Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: LICENSE -Requires-Dist: asdf-standard>=1.0.1 +Requires-Dist: asdf-standard>=1.1.0 Requires-Dist: asdf-transform-schemas>=0.3 -Requires-Dist: asdf-unit-schemas>=0.1 Requires-Dist: importlib-metadata>=4.11.4 Requires-Dist: jmespath>=0.6.2 Requires-Dist: numpy>=1.22 @@ -69,7 +68,6 @@ Requires-Dist: lz4>=0.10; extra == "tests" Requires-Dist: psutil; extra == "tests" Requires-Dist: pytest>=7; extra == "tests" -Requires-Dist: pytest-doctestplus; extra == "tests" Requires-Dist: pytest-remotedata; extra == "tests" ASDF - Advanced Scientific Data Format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf.egg-info/SOURCES.txt new/asdf-3.2.0/asdf.egg-info/SOURCES.txt --- old/asdf-3.1.0/asdf.egg-info/SOURCES.txt 2024-02-27 21:49:49.000000000 +0100 +++ new/asdf-3.2.0/asdf.egg-info/SOURCES.txt 2024-04-05 18:10:13.000000000 +0200 @@ -849,6 +849,7 @@ compatibility_tests/test_file_compatibility.py docs/Makefile docs/conf.py +docs/conftest.py docs/index.rst docs/make.bat docs/rtd_environment.yaml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/asdf.egg-info/requires.txt new/asdf-3.2.0/asdf.egg-info/requires.txt --- old/asdf-3.1.0/asdf.egg-info/requires.txt 2024-02-27 21:49:49.000000000 +0100 +++ new/asdf-3.2.0/asdf.egg-info/requires.txt 2024-04-05 18:10:13.000000000 +0200 @@ -1,6 +1,5 @@ -asdf-standard>=1.0.1 +asdf-standard>=1.1.0 asdf-transform-schemas>=0.3 -asdf-unit-schemas>=0.1 importlib-metadata>=4.11.4 jmespath>=0.6.2 numpy>=1.22 @@ -25,5 +24,4 @@ lz4>=0.10 psutil pytest>=7 -pytest-doctestplus pytest-remotedata diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/compatibility_tests/test_file_compatibility.py new/asdf-3.2.0/compatibility_tests/test_file_compatibility.py --- old/asdf-3.1.0/compatibility_tests/test_file_compatibility.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/compatibility_tests/test_file_compatibility.py 2024-04-05 18:10:02.000000000 +0200 @@ -36,6 +36,11 @@ GENERATE_SCRIPT_PATH = Path(__file__).parent / "generate_file.py" ASSERT_SCRIPT_PATH = Path(__file__).parent / "assert_file_correct.py" +# Starting at this version ndarray tag version 1.1.0 is supported +# this is required for asdf standard 1.6.0 or later +NDARRAY_1_1_0_ASDF_VERSION = Version("2.14.0") +NDARRAY_1_1_0_STANDARD_VERSION = AsdfVersion("1.6.0") + @contextmanager def internet_temporarily_enabled(verbose=False): @@ -185,6 +190,12 @@ assert len(standard_versions) > 0 for standard_version in sorted(standard_versions): + # older versions of asdf reported support for 1.6.0 (the development + # version of the standard) yet did not support the tags in that + # version. + if standard_version >= NDARRAY_1_1_0_STANDARD_VERSION: + if asdf_version < NDARRAY_1_1_0_ASDF_VERSION: + continue # Confirm that a file generated by the current version of the code # can be read by the older version of the library. if asdf_version >= MIN_VERSION_NEW_FILES: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/docs/asdf/extending/schemas.rst new/asdf-3.2.0/docs/asdf/extending/schemas.rst --- old/asdf-3.1.0/docs/asdf/extending/schemas.rst 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/docs/asdf/extending/schemas.rst 2024-04-05 18:10:02.000000000 +0200 @@ -49,7 +49,7 @@ required: [value, unit] ... -This is similar to the quantity schema, found :ref:`here <asdf-standard:unit-schema>`, of the ASDF Standard, but +This is similar to the quantity schema, found :ref:`here <asdf-standard:stsci.edu/asdf/unit/quantity-1.1.0>`, of the ASDF Standard, but has been updated to reflect current recommendations regarding schemas. Let's walk through this schema line by line. @@ -303,4 +303,4 @@ - `Understanding JSON Schema <https://json-schema.org/understanding-json-schema/>`_ -- :ref:`Unit Schemas <asdf-standard:unit-schema>` +- :ref:`Unit Schemas <asdf-standard:stsci.edu/asdf/unit/quantity-1.1.0>` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/docs/asdf/features.rst new/asdf-3.2.0/docs/asdf/features.rst --- old/asdf-3.1.0/docs/asdf/features.rst 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/docs/asdf/features.rst 2024-04-05 18:10:02.000000000 +0200 @@ -223,12 +223,19 @@ In general, forward compatibility with newer versions of the ASDF Standard and ASDF file format is not supported by the software. -When creating new ASDF files, it is possible to control the version of the file -format that is used. This can be specified by passing the ``version`` argument to +When creating new ASDF files, it is possible to control the version of the ASDF +standard that is used. This can be specified by passing the ``version`` argument to either the `AsdfFile` constructor when the file object is created, or to the -`AsdfFile.write_to` method when it is written. By default, the latest version -of the file format will be used. Note that this option has no effect on the -versions of tags from custom extensions. +`AsdfFile.write_to` method when it is written. By default, the latest stable +version of the ASDF standard will be used. + +.. warning:: + Take care when providing ``version`` to `AsdfFile.write_to` to select a version + that is stable. Writing files with a ``development`` (unstable) version may + produce files that will become unreadable as that version evolves. The default + version will always be stable and is often the best choice unless you are trying + to write out a file that is readable by older software (where you will want to + use an older, stable version). External References =================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/docs/conftest.py new/asdf-3.2.0/docs/conftest.py --- old/asdf-3.1.0/docs/conftest.py 1970-01-01 01:00:00.000000000 +0100 +++ new/asdf-3.2.0/docs/conftest.py 2024-04-05 18:10:02.000000000 +0200 @@ -0,0 +1 @@ +collect_ignore = ["conf.py"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/pyproject.toml new/asdf-3.2.0/pyproject.toml --- old/asdf-3.1.0/pyproject.toml 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/pyproject.toml 2024-04-05 18:10:02.000000000 +0200 @@ -19,9 +19,8 @@ 'version', ] dependencies = [ - "asdf-standard>=1.0.1", - "asdf-transform-schemas>=0.3", - "asdf-unit-schemas>=0.1", + "asdf-standard>=1.1.0", + "asdf-transform-schemas>=0.3", # required for asdf-1.0.0 schema "importlib-metadata>=4.11.4", "jmespath>=0.6.2", "numpy>=1.22", @@ -47,7 +46,6 @@ "lz4>=0.10", "psutil", "pytest>=7", - "pytest-doctestplus", "pytest-remotedata", ] [project.urls] @@ -79,7 +77,7 @@ 'asdf.tests.data' = ["*"] [tool.setuptools_scm] -write_to = "asdf/_version.py" +version_file = "asdf/_version.py" [tool.black] line-length = 120 @@ -101,18 +99,15 @@ [tool.pytest.ini_options] testpaths = ['asdf', 'docs'] minversion = 4.6 -norecursedirs = ['build', 'docs/_build', 'docs/sphinxext'] -doctest_plus = 'enabled' remote_data_strict = true filterwarnings = [ 'error', 'ignore:numpy.ndarray size changed:RuntimeWarning', ] -# Configuration for pytest-doctestplus -text_file_format = 'rst' addopts = [ + '--doctest-modules', + '--doctest-glob=*.rst', '--color=yes', - '--doctest-rst', '-rsxfE', '-p no:legacypath', ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/pytest_asdf/plugin.py new/asdf-3.2.0/pytest_asdf/plugin.py --- old/asdf-3.1.0/pytest_asdf/plugin.py 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/pytest_asdf/plugin.py 2024-04-05 18:10:02.000000000 +0200 @@ -211,11 +211,11 @@ def runtest(self): from asdf import AsdfFile, _block, generic_io, util - from asdf._tests import _helpers as helpers + from asdf.testing.helpers import yaml_to_asdf # Make sure that the examples in the schema files (and thus the # ASDF standard document) are valid. - buff = helpers.yaml_to_asdf("example: " + self.example.example.strip(), standard_version=self.example.version) + buff = yaml_to_asdf("example: " + self.example.example.strip(), version=self.example.version) ff = AsdfFile( uri=util.filepath_to_url(os.path.abspath(self.filename)), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/requirements-dev.txt new/asdf-3.2.0/requirements-dev.txt --- old/asdf-3.1.0/requirements-dev.txt 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/requirements-dev.txt 2024-04-05 18:10:02.000000000 +0200 @@ -1,8 +1,5 @@ -git+https://github.com/asdf-format/asdf-coordinates-schemas git+https://github.com/asdf-format/asdf-standard git+https://github.com/asdf-format/asdf-transform-schemas -git+https://github.com/asdf-format/asdf-unit-schemas.git -git+https://github.com/asdf-format/asdf-wcs-schemas git+https://github.com/yaml/pyyaml.git numpy>=0.0.dev0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asdf-3.1.0/tox.ini new/asdf-3.2.0/tox.ini --- old/asdf-3.1.0/tox.ini 2024-02-27 21:49:34.000000000 +0100 +++ new/asdf-3.2.0/tox.ini 2024-04-05 18:10:02.000000000 +0200 @@ -25,8 +25,6 @@ oldestdeps: minimum_dependencies parallel: pytest-xdist pytestdev: git+https://github.com/pytest-dev/pytest -# released versions of doctestplus aren't compatible with pytest-dev - pytestdev: git+https://github.com/scientific-python/pytest-doctestplus extras = all,tests # astropy will complain if the home directory is missing pass_env = HOME @@ -117,21 +115,6 @@ commands = pytest asdf-transform-schemas -[testenv:asdf-unit-schemas] -change_dir = {env_tmp_dir} -allowlist_externals = - git - bash -extras = -commands_pre = - bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt" - git clone https://github.com/asdf-format/asdf-unit-schemas.git - pip install -e asdf-unit-schemas[test] - pip install -r {env_tmp_dir}/requirements.txt - pip freeze -commands = - pytest asdf-unit-schemas - [testenv:asdf-wcs-schemas] change_dir = {env_tmp_dir} allowlist_externals =