Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

asdf

Package Overview
Dependencies
Maintainers
8
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asdf - npm Package Compare versions

Comparing version
3.4.0
to
3.5.0
changes/.gitkeep

Sorry, the diff of this file is not supported yet

+9
-2

@@ -32,4 +32,11 @@ <!---

- [ ] tests ran successfully
- [ ] for a public change, a changelog entry was added
- [ ] for a public change, documentation was updated
- [ ] for a public change, added a [towncrier news fragment](https://towncrier.readthedocs.io/en/stable/tutorial.html#creating-news-fragments) <details><summary>`changes/<PR#>.<changetype>.rst`</summary>
- ``changes/<PR#>.feature.rst``: new feature
- ``changes/<PR#>.bugfix.rst``: bug fix
- ``changes/<PR#>.doc.rst``: documentation change
- ``changes/<PR#>.removal.rst``: deprecation or removal of public API
- ``changes/<PR#>.general.rst``: infrastructure or miscellaneous change
</details>
- [ ] for a public change, updated documentation
- [ ] for any new features, unit tests were added
+17
-13

@@ -1,11 +0,12 @@

name: Changelog
name: changelog
on:
pull_request:
types: [labeled, unlabeled, opened, synchronize, reopened]
types:
- labeled
- unlabeled
- opened
- synchronize
- reopened
# Only cancel in-progress jobs or runs for the current workflow
# This cancels the already triggered workflows for a specific PR without canceling
# other instances of this workflow (other PRs, scheduled triggers, etc) when something
# within that PR re-triggers this CI
concurrency:

@@ -16,12 +17,15 @@ group: ${{ github.workflow }}-${{ github.ref }}

jobs:
changelog:
name: Confirm changelog entry
check:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Grep for PR number in CHANGES.rst
run: grep -P '\[[^\]]*#${{github.event.number}}[,\]]' CHANGES.rst
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }}
- run: pip install .
- run: pip install towncrier
- run: towncrier check
- run: towncrier build --draft | grep -P '#${{ github.event.number }}'

@@ -15,3 +15,9 @@ name: CI

pull_request:
# We also want this workflow triggered if the `jsonschema` label is
# added or present when PR is updated
types:
- synchronize
- labeled
# Only cancel in-progress jobs or runs for the current workflow

@@ -41,2 +47,5 @@ # This cancels the already triggered workflows for a specific PR without canceling

- linux: coverage
name: Python 3.13 coverage
python-version: 3.13-dev
- linux: coverage
name: Python 3.12 coverage

@@ -82,6 +91,6 @@ python-version: 3.12

# Any env name which does not start with `pyXY` will use this Python version.
default_python: '3.9'
default_python: '3.11'
envs: |
- macos: py39-parallel
- windows: py39-parallel
- macos: py311-parallel
- windows: py311-parallel

@@ -94,5 +103,4 @@ dev:

# Any env name which does not start with `pyXY` will use this Python version.
default_python: '3.9'
default_python: '3.11'
envs: |
- linux: py39-devdeps-parallel
- linux: py310-devdeps-parallel

@@ -121,4 +129,4 @@ - linux: py311-devdeps-parallel

# Any env name which does not start with `pyXY` will use this Python version.
default_python: '3.9'
default_python: '3.11'
envs: |
- linux: compatibility
Metadata-Version: 2.1
Name: asdf
Version: 3.4.0
Version: 3.5.0
Summary: Python implementation of the ASDF Standard

@@ -82,6 +82,2 @@ Author-email: The ASDF Developers <help@stsci.edu>

.. image:: https://github.com/asdf-format/asdf/workflows/s390x/badge.svg
:target: https://github.com/asdf-format/asdf/actions
:alt: s390x Status
.. image:: https://github.com/asdf-format/asdf/workflows/Downstream/badge.svg

@@ -265,2 +261,9 @@ :target: https://github.com/asdf-format/asdf/actions

.. warning::
The ``copy_arrays`` argument of `asdf.open()` and `AsdfFile` is deprecated,
and will be removed in ASDF 4.0. It is replaced by ``memmap``, which
is the opposite of ``copy_arrays`` (``memmap == not copy_arrays``).
In ASDF 4.0, ``memmap`` will default to ``False``, which means arrays
will no longer be memory-mapped by default.
To get a quick overview of the data stored in the file, use the top-level

@@ -326,3 +329,3 @@ `AsdfFile.info()` method:

By default, uncompressed data blocks are memory mapped for efficient
access. Memory mapping can be disabled by using the ``copy_arrays``
access. Memory mapping can be disabled by using the ``memmap``
option of `open` when reading:

@@ -332,3 +335,3 @@

af = asdf.open("example.asdf", copy_arrays=True)
af = asdf.open("example.asdf", memmap=False)

@@ -335,0 +338,0 @@ .. _end-read-file-text:

@@ -20,3 +20,2 @@ CHANGES.rst

.github/workflows/downstream.yml
.github/workflows/s390x.yml
asdf/__init__.py

@@ -722,3 +721,2 @@ asdf/_asdf.py

asdf/_tests/test_reference.py
asdf/_tests/test_reference_files.py
asdf/_tests/test_resource.py

@@ -850,2 +848,3 @@ asdf/_tests/test_schema.py

benchmarks/yamlutil.py
changes/.gitkeep
compatibility_tests/README.md

@@ -852,0 +851,0 @@ compatibility_tests/assert_file_correct.py

@@ -0,1 +1,3 @@

import gc
import pytest

@@ -38,2 +40,3 @@

del blks
gc.collect(2)

@@ -40,0 +43,0 @@ with pytest.raises(OSError, match="Attempt to read block data from missing block"):

import copy
import gc

@@ -44,2 +45,3 @@ from asdf._block.key import Key

del f
gc.collect(2)
assert not bk._is_valid()

@@ -52,2 +54,3 @@

del f
gc.collect(2)
f2 = Foo()

@@ -97,2 +100,3 @@ assert not bk._is_valid()

del f
gc.collect(2)
assert k1 != k2

@@ -119,2 +123,3 @@

del f
gc.collect(2)
assert k1 != k2

@@ -0,1 +1,3 @@

import gc
import numpy as np

@@ -17,2 +19,3 @@ import pytest

del arr1
gc.collect(2)
options.set_options(arr2, Options("streamed"))

@@ -19,0 +22,0 @@

@@ -0,1 +1,2 @@

import gc
from unittest.mock import patch

@@ -111,2 +112,3 @@

del f
gc.collect(2)
f2 = Foo()

@@ -130,2 +132,3 @@

del f
gc.collect(2)
f2 = Foo()

@@ -151,2 +154,3 @@

del f
gc.collect(2)
s._cleanup()

@@ -178,1 +182,2 @@ assert s.lookup_by_object(k, None) is None

del returned_objects, objs
gc.collect(2)

@@ -18,5 +18,5 @@ import numpy as np

with asdf.open(fn, copy_arrays=False) as af:
with asdf.open(fn, memmap=True) as af:
v = af["a"][:5]
assert np.all(v == 1)

@@ -7,4 +7,4 @@ import numpy as np

@pytest.mark.parametrize("copy_arrays", [True, False])
def test_external_blocks_always_lazy_loaded_and_memmapped(tmp_path, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_external_blocks_always_lazy_loaded_and_memmapped(tmp_path, memmap):
"""

@@ -22,3 +22,3 @@ External blocks are always lazy loaded and memmapped

with asdf.open(fn, copy_arrays=copy_arrays) as af:
with asdf.open(fn, memmap=memmap) as af:
# check that block is external

@@ -29,5 +29,5 @@ source = af["arr"]._source

# check if block is memmapped
if copy_arrays:
if not memmap:
assert not isinstance(af["arr"].base, np.memmap)
else:
assert isinstance(af["arr"].base, np.memmap)

@@ -23,3 +23,3 @@ import numpy as np

with asdf.open(fn, mode="rw", copy_arrays=False) as af:
with asdf.open(fn, mode="rw", memmap=True) as af:
va = af["a"][:3]

@@ -26,0 +26,0 @@ np.testing.assert_array_equal(a, af["a"])

@@ -19,3 +19,3 @@ import weakref

with asdf.open(fn, copy_arrays=True, lazy_load=False) as af:
with asdf.open(fn, memmap=False, lazy_load=False) as af:
array_weakref = weakref.ref(af["a"])

@@ -22,0 +22,0 @@ array_ref = af["b"]

@@ -983,3 +983,3 @@ import contextlib

with asdf.open(tmpfile, mode="rw", copy_arrays=False) as af:
with asdf.open(tmpfile, mode="rw", memmap=True) as af:
data = af["data"]

@@ -990,6 +990,6 @@ assert data.flags.writeable is True

with asdf.open(tmpfile, mode="rw", copy_arrays=False) as af:
with asdf.open(tmpfile, mode="rw", memmap=True) as af:
assert af["data"][0] == 42
with asdf.open(tmpfile, mode="r", copy_arrays=False) as af:
with asdf.open(tmpfile, mode="r", memmap=True) as af:
assert af["data"][0] == 42

@@ -1013,3 +1013,3 @@

# Forcing memmap, the array should still be readonly
with asdf.open(tmpfile, copy_arrays=False) as af:
with asdf.open(tmpfile, memmap=True) as af:
assert af["data"].flags.writeable is False

@@ -1025,3 +1025,3 @@ with pytest.raises(ValueError, match=r"assignment destination is read-only"):

# Copying the arrays makes it safe to write to the underlying array
with asdf.open(tmpfile, mode="r", copy_arrays=True) as af:
with asdf.open(tmpfile, mode="r", memmap=False) as af:
assert af["data"].flags.writeable is True

@@ -1028,0 +1028,0 @@ af["data"][0] = 42

@@ -139,3 +139,3 @@ import copy

with (
asdf.open(path, mode="r", copy_arrays=True) as ff,
asdf.open(path, mode="r", memmap=False) as ff,
pytest.raises(

@@ -504,3 +504,3 @@ IOError,

# the array data should still persist in memory after close:
with asdf.open(path, lazy_load=False, copy_arrays=True) as af:
with asdf.open(path, lazy_load=False, memmap=False) as af:
tree = af.tree

@@ -507,0 +507,0 @@ assert_array_equal(tree["data"], data)

@@ -112,4 +112,4 @@ import io

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_expand_tree(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_expand_tree(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -126,3 +126,3 @@ testpath = os.path.join(tmp_path, "test.asdf")

ff.write_to(testpath, pad_blocks=True)
with asdf.open(testpath, lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(testpath, lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
assert len(list(ff._blocks.blocks)) == 2

@@ -142,3 +142,3 @@ assert_array_equal(ff.tree["arrays"][0], my_array)

ff.write_to(os.path.join(tmp_path, "test2.asdf"), pad_blocks=True)
with asdf.open(os.path.join(tmp_path, "test2.asdf"), lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(os.path.join(tmp_path, "test2.asdf"), lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
ff.tree["extra"] = [0] * 2

@@ -154,4 +154,4 @@ ff.update()

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_all_external(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_all_external(tmp_path, lazy_load, memmap):
fn = tmp_path / "test.asdf"

@@ -169,3 +169,3 @@

cfg.all_array_storage = "external"
with asdf.open(fn, lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as af:
with asdf.open(fn, lazy_load=lazy_load, memmap=memmap, mode="rw") as af:
af.update()

@@ -178,4 +178,4 @@

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_some_external(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_some_external(tmp_path, lazy_load, memmap):
fn = tmp_path / "test.asdf"

@@ -190,3 +190,3 @@

with asdf.open(fn, lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as af:
with asdf.open(fn, lazy_load=lazy_load, memmap=memmap, mode="rw") as af:
af.set_array_storage(af["arrays"][0], "external")

@@ -204,4 +204,4 @@ af.update()

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_delete_first_array(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_delete_first_array(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -218,3 +218,3 @@ path = os.path.join(tmp_path, "test.asdf")

with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
del ff.tree["arrays"][0]

@@ -231,4 +231,4 @@ ff.update()

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_delete_last_array(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_delete_last_array(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -245,3 +245,3 @@ path = os.path.join(tmp_path, "test.asdf")

with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
del ff.tree["arrays"][-1]

@@ -258,4 +258,4 @@ ff.update()

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_delete_middle_array(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_delete_middle_array(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -272,3 +272,3 @@ path = os.path.join(tmp_path, "test.asdf")

with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
del ff.tree["arrays"][1]

@@ -287,4 +287,4 @@ ff.update()

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_replace_first_array(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_replace_first_array(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -301,3 +301,3 @@ path = os.path.join(tmp_path, "test.asdf")

with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
ff.tree["arrays"][0] = np.arange(32)

@@ -315,4 +315,4 @@ ff.update()

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_replace_last_array(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_replace_last_array(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -329,3 +329,3 @@ path = os.path.join(tmp_path, "test.asdf")

with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
ff.tree["arrays"][2] = np.arange(32)

@@ -343,4 +343,4 @@ ff.update()

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_replace_middle_array(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_replace_middle_array(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -357,3 +357,3 @@ path = os.path.join(tmp_path, "test.asdf")

with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
ff.tree["arrays"][1] = np.arange(32)

@@ -371,4 +371,4 @@ ff.update()

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_add_array(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_add_array(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -383,3 +383,3 @@ path = os.path.join(tmp_path, "test.asdf")

with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
ff.tree["arrays"].append(np.arange(32))

@@ -396,4 +396,4 @@ ff.update()

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_add_array_at_end(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_add_array_at_end(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -410,3 +410,3 @@ path = os.path.join(tmp_path, "test.asdf")

with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
ff.tree["arrays"].append(np.arange(65536, dtype="<i8"))

@@ -426,4 +426,4 @@ ff.update()

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_replace_all_arrays(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_replace_all_arrays(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -441,3 +441,3 @@ testpath = os.path.join(tmp_path, "test.asdf")

with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(os.path.join(tmp_path, "test.asdf"), lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
assert_array_equal(ff.tree["my_array"], np.ones((64, 64)) * 1)

@@ -452,4 +452,4 @@ ff.tree["my_array"] = np.ones((64, 64)) * 2

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_array_in_place(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_array_in_place(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -467,3 +467,3 @@ testpath = os.path.join(tmp_path, "test.asdf")

with asdf.open(testpath, lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(testpath, lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
array = np.asarray(ff.tree["my_array"])

@@ -478,4 +478,4 @@ array *= 2

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_update_compressed_blocks(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_update_compressed_blocks(tmp_path, lazy_load, memmap):
"""

@@ -504,3 +504,3 @@ This test was originally constructed to test an issue where

with asdf.open(fn, lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as af:
with asdf.open(fn, lazy_load=lazy_load, memmap=memmap, mode="rw") as af:
# now make the data are difficult to compress

@@ -579,4 +579,4 @@ for i in range(n_arrays):

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_checksum_update(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_checksum_update(tmp_path, lazy_load, memmap):
tmp_path = str(tmp_path)

@@ -591,3 +591,3 @@ path = os.path.join(tmp_path, "test.asdf")

with asdf.open(path, lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as ff:
with asdf.open(path, lazy_load=lazy_load, memmap=memmap, mode="rw") as ff:
ff.tree["my_array"][7, 7] = 0.0

@@ -846,6 +846,6 @@ # update() should update the checksum, even if the data itself

({}, True),
({"memmap": True}, True),
({"memmap": False}, False),
({"copy_arrays": True}, False),
({"copy_arrays": False}, True),
({"memmap": True}, True),
({"memmap": False}, False),
({"copy_arrays": True, "memmap": True}, True),

@@ -857,2 +857,3 @@ ({"copy_arrays": False, "memmap": True}, True),

)
@pytest.mark.filterwarnings("ignore:copy_arrays is deprecated")
def test_open_no_memmap(filename_with_array, open_kwargs, should_memmap):

@@ -865,2 +866,3 @@ """

memmap (overwrites copy_arrays)
memmap
"""

@@ -963,4 +965,4 @@ with asdf.open(filename_with_array, lazy_load=False, **open_kwargs) as af:

@pytest.mark.parametrize("lazy_load", [True, False])
@pytest.mark.parametrize("copy_arrays", [True, False])
def test_remove_blocks(tmp_path, lazy_load, copy_arrays):
@pytest.mark.parametrize("memmap", [True, False])
def test_remove_blocks(tmp_path, lazy_load, memmap):
fn1 = tmp_path / "test.asdf"

@@ -976,3 +978,3 @@ fn2 = tmp_path / "test2.asdf"

with asdf.open(fn1, lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as af:
with asdf.open(fn1, lazy_load=lazy_load, memmap=memmap, mode="rw") as af:
assert len(af._blocks.blocks) == 2

@@ -982,3 +984,3 @@ af[key] = None

with asdf.open(fn1, lazy_load=lazy_load, copy_arrays=copy_arrays, mode="rw") as af:
with asdf.open(fn1, lazy_load=lazy_load, memmap=memmap, mode="rw") as af:
assert len(af._blocks.blocks) == 2

@@ -1008,3 +1010,3 @@ af[key] = None

with asdf.open(fn, lazy_load=True, copy_arrays=False) as af:
with asdf.open(fn, lazy_load=True, memmap=False) as af:
# load the base so we can test if accessing the view after the

@@ -1037,3 +1039,3 @@ # file is closed will trigger an error

with asdf.open(fn, copy_arrays=True) as af:
with asdf.open(fn, memmap=True) as af:
base = af["v"].base

@@ -1040,0 +1042,0 @@ if save_base or (save_base is None and default_array_save_base):

import contextlib
import gc

@@ -293,2 +294,3 @@ import numpy as np

del b
gc.collect(2)
af.update()

@@ -295,0 +297,0 @@ with asdf.open(fn) as af:

@@ -9,3 +9,3 @@ import sys

import asdf.testing.helpers
from asdf.exceptions import AsdfDeprecationWarning, ValidationError
from asdf.exceptions import AsdfDeprecationWarning, AsdfWarning, ValidationError

@@ -150,1 +150,19 @@

asdf.treeutil.walk_and_modify({}, lambda obj: obj, ignore_implicit_conversion=value)
@pytest.mark.parametrize("copy_arrays", [True, False])
@pytest.mark.parametrize("memmap", [True, False, asdf._asdf.NotSet])
def test_copy_arrays_deprecation(copy_arrays, memmap, tmp_path):
fn = tmp_path / "test.asdf"
af = asdf.AsdfFile()
af["a"] = 1
af.write_to(fn)
with pytest.warns(AsdfWarning, match="copy_arrays is deprecated; use memmap instead"):
with asdf.open(fn, copy_arrays=copy_arrays, memmap=memmap) as af:
pass
@pytest.mark.parametrize("value", [True, False])
def test_ignore_version_mismatch_deprecation(value):
with pytest.warns(AsdfDeprecationWarning, match="ignore_version_mismatch is deprecated"):
asdf.AsdfFile({}, ignore_version_mismatch=value)

@@ -25,3 +25,2 @@ import io

buff.seek(0)
fd = generic_io.InputStream(buff, "r")
with pytest.raises(ValueError, match=r"End of YAML marker not found"), asdf.open(buff):

@@ -28,0 +27,0 @@ pass

@@ -122,3 +122,3 @@ import collections

node = NodeClass()
assert type(node.tagged) == base
assert type(node.tagged) is base

@@ -185,2 +185,3 @@

del af
gc.collect(2)

@@ -220,6 +221,10 @@ with pytest.raises(asdf.exceptions.AsdfLazyReferenceError, match="Failed to resolve"):

_resolve_af_ref(None)
af = asdf.AsdfFile()
af_ref = weakref.ref(af)
assert _resolve_af_ref(af_ref) is af
del af
gc.collect(2)
with pytest.raises(asdf.exceptions.AsdfLazyReferenceError, match="Failed to resolve"):

@@ -291,3 +296,3 @@ _resolve_af_ref(af_ref)

# trigger garbage collection
gc.collect()
gc.collect(2)
# check that the weakref fails to resolve (so the list was freed)

@@ -310,3 +315,3 @@ assert lref() is None

del obj
gc.collect()
gc.collect(2)
assert cache_item.custom_object == complex(1, 1)

@@ -313,0 +318,0 @@

@@ -46,3 +46,3 @@ from copy import copy, deepcopy

assert not isinstance(value.base, TaggedList)
assert value.base.__class__ == list
assert value.base.__class__ is list

@@ -87,3 +87,3 @@

assert not isinstance(value.base, TaggedDict)
assert value.base.__class__ == dict
assert value.base.__class__ is dict

@@ -121,3 +121,3 @@

assert not isinstance(value.base, TaggedString)
assert value.base.__class__ == str
assert value.base.__class__ is str

@@ -124,0 +124,0 @@

@@ -148,1 +148,15 @@ import contextlib

assert not isinstance(tree["a"], asdf.tagged.TaggedDict)
@pytest.mark.parametrize("tagged", [True, False])
def test_load_yaml_recursion(tmp_path, tagged):
fn = tmp_path / "test.asdf"
tree = {}
tree["d"] = {}
tree["d"]["d"] = tree["d"]
tree["l"] = []
tree["l"].append(tree["l"])
asdf.AsdfFile(tree).write_to(fn)
tree = util.load_yaml(fn, tagged=tagged)
assert tree["d"]["d"] is tree["d"]
assert tree["l"][0] is tree["l"]

@@ -44,3 +44,3 @@ import contextlib

"lazy_load": False,
"copy_arrays": True,
"memmap": False,
}

@@ -47,0 +47,0 @@

@@ -15,3 +15,3 @@ # file generated by setuptools_scm

__version__ = version = '3.4.0'
__version_tuple__ = version_tuple = (3, 4, 0)
__version__ = version = '3.5.0'
__version_tuple__ = version_tuple = (3, 5, 0)

@@ -85,3 +85,3 @@ import sys

# we adopt a strategy of checking class paths and only
# registering those that have already been imported. Thiss
# registering those that have already been imported. This
# is ok because asdf will only use the converter type

@@ -88,0 +88,0 @@ # when attempting to serialize an object in memory (so the

@@ -89,3 +89,3 @@ import enum

from .generic_io import get_file
from .yamlutil import AsdfLoader
from .yamlutil import AsdfLoader, _IgnoreCustomTagsLoader

@@ -95,3 +95,3 @@ if tagged:

else:
loader = yaml.CBaseLoader if getattr(yaml, "__with_libyaml__", None) else yaml.BaseLoader
loader = _IgnoreCustomTagsLoader

@@ -98,0 +98,0 @@ with get_file(init, "r") as gf:

@@ -140,2 +140,25 @@ import warnings

class _IgnoreCustomTagsLoader(_yaml_base_loader):
"""
A specialized YAML loader that ignores tags unknown to the
base (safe) loader. This is used by `asdf.util.load_yaml`
to read the ASDF tree as "basic" objects, ignoring the
custom tags.
"""
def construct_undefined(self, node):
if isinstance(node, yaml.MappingNode):
return self.construct_mapping(node)
elif isinstance(node, yaml.SequenceNode):
return self.construct_sequence(node)
elif isinstance(node, yaml.ScalarNode):
return self.construct_scalar(node)
return super().construct_undefined(node)
# pyyaml will invoke the constructor associated with None when a node's
# tag is not explicitly handled by another constructor.
_IgnoreCustomTagsLoader.add_constructor(None, _IgnoreCustomTagsLoader.construct_undefined)
class AsdfLoader(_yaml_base_loader):

@@ -142,0 +165,0 @@ """

+497
-467

@@ -1,10 +0,39 @@

3.5.0 (unreleased)
------------------
3.5.0 (2024-10-02)
==================
-
Bugfix
------
- Allow ``asdf.util.load_yaml`` to handle recursive objects (`#1825
<https://github.com/asdf-format/asdf/pull/1825>`_)
Doc
---
- added issue links to changelog entries (`#1827
<https://github.com/asdf-format/asdf/pull/1827>`_)
- Change asdf standard changelog entries to notes to ease transition to
towncrier (`#1830 <https://github.com/asdf-format/asdf/pull/1830>`_)
General
-------
- fix changelog checker to remove brackets (`#1828
<https://github.com/asdf-format/asdf/pull/1828>`_)
Removal
-------
- Deprecate ``ignore_version_mismatch``. This option has done nothing since
asdf 3.0.0 and will be removed in an upcoming asdf version (`#1819
<https://github.com/asdf-format/asdf/pull/1819>`_)
3.4.0 (2024-08-04)
------------------
==================
- Fix issue where roundtripping a masked array with no masked values removes the mask [#1803]
- Fix issue where roundtripping a masked array with no masked values removes the mask [`#1803 <https://github.com/asdf-format/asdf/issues/1803>`_]

@@ -15,33 +44,33 @@ - Use a custom exception ``AsdfSerializationError`` to indicate when an object in the

this inheritance may be dropped in a future asdf version. Please migrate to the new
``AsdfSerializationError``. [#1809]
``AsdfSerializationError``. [`#1809 <https://github.com/asdf-format/asdf/issues/1809>`_]
- Drop ``importlib_metadata`` as a dependency on Python 3.12 and newer [#1810]
- Drop ``importlib_metadata`` as a dependency on Python 3.12 and newer [`#1810 <https://github.com/asdf-format/asdf/issues/1810>`_]
- Bumped minimal requirement on ``attrs`` from ``20.1.0`` to ``22.2.0`` [#1815]
- Bumped minimal requirement on ``attrs`` from ``20.1.0`` to ``22.2.0`` [`#1815 <https://github.com/asdf-format/asdf/issues/1815>`_]
3.3.0 (2024-07-12)
------------------
==================
- Fix ``__asdf_traverse__`` for non-tagged objects [#1739]
- Fix ``__asdf_traverse__`` for non-tagged objects [`#1739 <https://github.com/asdf-format/asdf/issues/1739>`_]
- Deprecate ``asdf.testing.helpers.format_tag`` [#1774]
- Deprecate ``asdf.testing.helpers.format_tag`` [`#1774 <https://github.com/asdf-format/asdf/issues/1774>`_]
- Deprecate ``asdf.versioning.AsdfSpec`` [#1774]
- Deprecate ``asdf.versioning.AsdfSpec`` [`#1774 <https://github.com/asdf-format/asdf/issues/1774>`_]
- Deprecate ``asdf.util.filepath_to_url`` use ``pathlib.Path.to_uri`` [#1735]
- Deprecate ``asdf.util.filepath_to_url`` use ``pathlib.Path.to_uri`` [`#1735 <https://github.com/asdf-format/asdf/issues/1735>`_]
- Record package providing manifest for extensions used to write
a file and ``AsdfPackageVersionWarning`` when installed extension/manifest
package does not match that used to write the file [#1758]
package does not match that used to write the file [`#1758 <https://github.com/asdf-format/asdf/issues/1758>`_]
- Fix bug where a dictionary containing a key ``id`` caused
any contained references to fail to resolve [#1716]
any contained references to fail to resolve [`#1716 <https://github.com/asdf-format/asdf/issues/1716>`_]
- Issue a ``AsdfManifestURIMismatchWarning`` during write if a used
extension was created from a manifest registered with a uri that
does not match the id in the manifest [#1785]
does not match the id in the manifest [`#1785 <https://github.com/asdf-format/asdf/issues/1785>`_]
- Allow converters to provide types as strings that can
resolve to public classes (even if the class is implemented
in a private module). [#1654]
in a private module). [`#1654 <https://github.com/asdf-format/asdf/issues/1654>`_]

@@ -51,45 +80,46 @@ - Add options to control saving the base array when saving array views

``AsdfFile.set_array_save_base`` and
``SerializationContext.set_array_save_base`` [#1753]
``SerializationContext.set_array_save_base`` [`#1753 <https://github.com/asdf-format/asdf/issues/1753>`_]
- Deprecate ``ignore_implicit_conversion`` and "implicit conversion" [#1724]
- Deprecate ``ignore_implicit_conversion`` and "implicit conversion" [`#1724 <https://github.com/asdf-format/asdf/issues/1724>`_]
- Add ``lazy_tree`` option to ``asdf.open`` and ``asdf.config``
to allow lazy deserialization of ASDF tagged tree nodes to
custom objects. [#1733]
custom objects. [`#1733 <https://github.com/asdf-format/asdf/issues/1733>`_]
- Deprecate ``copy_arrays`` in favor of ``memmap`` [`#1797 <https://github.com/asdf-format/asdf/issues/1797>`_]
3.2.0 (2024-04-05)
------------------
==================
- Deprecate ``AsdfFile.version_map`` [#1745]
- Deprecate ``AsdfFile.version_map`` [`#1745 <https://github.com/asdf-format/asdf/issues/1745>`_]
- Fix ``numpy.ma.MaskedArray`` saving for numpy 2.x [#1769]
- Fix ``numpy.ma.MaskedArray`` saving for numpy 2.x [`#1769 <https://github.com/asdf-format/asdf/issues/1769>`_]
- Add ``float16`` support [#1692]
- Add ``float16`` support [`#1692 <https://github.com/asdf-format/asdf/issues/1692>`_]
- Removed unused ``asdf-unit-schemas`` dependency [#1767]
- Removed unused ``asdf-unit-schemas`` dependency [`#1767 <https://github.com/asdf-format/asdf/issues/1767>`_]
3.1.0 (2024-02-27)
------------------
==================
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Cleanup ``asdf.util`` including deprecating: ``human_list``
``resolve_name`` ``minversion`` and ``iter_subclasses`` [#1688]
``resolve_name`` ``minversion`` and ``iter_subclasses`` [`#1688 <https://github.com/asdf-format/asdf/issues/1688>`_]
- Deprecate validation on ``AsdfFile.tree`` assignment. Please
use ``AsdfFile.validate`` to validate the tree [#1691]
use ``AsdfFile.validate`` to validate the tree [`#1691 <https://github.com/asdf-format/asdf/issues/1691>`_]
- Deprecate validation during ``AsdfFile.resolve_references``. Please
use ``AsdfFile.validate`` to validate the tree [#1691]
use ``AsdfFile.validate`` to validate the tree [`#1691 <https://github.com/asdf-format/asdf/issues/1691>`_]
- Deprecate ``asdf.asdf`` and ``AsdfFile.resolve_and_inline`` [#1690]
- Deprecate ``asdf.asdf`` and ``AsdfFile.resolve_and_inline`` [`#1690 <https://github.com/asdf-format/asdf/issues/1690>`_]
- Deprecate automatic calling of ``AsdfFile.find_references`` during
``AsdfFile.__init__`` and ``asdf.open`` [#1708]
``AsdfFile.__init__`` and ``asdf.open`` [`#1708 <https://github.com/asdf-format/asdf/issues/1708>`_]
- Allow views of memmapped arrays to keep the backing mmap
open to avoid segfaults [#1668]
open to avoid segfaults [`#1668 <https://github.com/asdf-format/asdf/issues/1668>`_]

@@ -100,13 +130,13 @@ - Introduce ``memmap`` argument to ``asdf.open`` that

is removed in an upcoming asdf release will be ``False`` and
asdf will no longer by-default memory map arrays. [#1667]
asdf will no longer by-default memory map arrays. [`#1667 <https://github.com/asdf-format/asdf/issues/1667>`_]
- Introduce ``asdf.util.load_yaml`` to load just the YAML contents
of an ASDF file (with the option ``tagged`` to load the contents
as a tree of ``asdf.tagged.Tagged`` instances to preserve tags) [#1700]
as a tree of ``asdf.tagged.Tagged`` instances to preserve tags) [`#1700 <https://github.com/asdf-format/asdf/issues/1700>`_]
- Require pytest 7+ and update asdf pytest plugin to be compatible
with the current development version of pytest (8.1) [#1731]
with the current development version of pytest (8.1) [`#1731 <https://github.com/asdf-format/asdf/issues/1731>`_]
- Eliminate the use of the legacy ``tmpdir`` fixture in favor of
the new ``tmp_path`` fixture for temporary directory creation. [#1759]
the new ``tmp_path`` fixture for temporary directory creation. [`#1759 <https://github.com/asdf-format/asdf/issues/1759>`_]

@@ -116,261 +146,261 @@ - Remove conversion of warnings to errors in asdf pytest plugin. This

from working. If you want these warnings to produce errors you can
now add your own warning filter [#1757]
now add your own warning filter [`#1757 <https://github.com/asdf-format/asdf/issues/1757>`_]
- Only show ``str`` representation during ``info`` and ``search``
if it contains a single line (and does not fail) [#1748]
if it contains a single line (and does not fail) [`#1748 <https://github.com/asdf-format/asdf/issues/1748>`_]
3.0.1 (2023-10-30)
------------------
==================
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Fix bug in ``asdftool diff`` for arrays within a list [#1672]
- Fix bug in ``asdftool diff`` for arrays within a list [`#1672 <https://github.com/asdf-format/asdf/issues/1672>`_]
- For ``info`` and ``search`` show ``str`` representation of childless
(leaf) nodes if ``show_values`` is enabled [#1687]
- Deprecate ``asdf.util.is_primitive`` [#1687]
(leaf) nodes if ``show_values`` is enabled [`#1687 <https://github.com/asdf-format/asdf/issues/1687>`_]
- Deprecate ``asdf.util.is_primitive`` [`#1687 <https://github.com/asdf-format/asdf/issues/1687>`_]
3.0.0 (2023-10-16)
------------------
==================
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Drop support for ASDF-in-FITS. [#1288]
- Drop support for ASDF-in-FITS. [`#1288 <https://github.com/asdf-format/asdf/issues/1288>`_]
- Add ``all_array_storage``, ``all_array_compression`` and
``all_array_compression_kwargs`` to ``asdf.config.AsdfConfig`` [#1468]
- Move built-in tags to converters (except ndarray and integer). [#1474]
- Add block storage support to Converter [#1508]
- Remove deprecated legacy extension API [#1464]
- Fix issue opening files that don't support ``fileno`` [#1557]
``all_array_compression_kwargs`` to ``asdf.config.AsdfConfig`` [`#1468 <https://github.com/asdf-format/asdf/issues/1468>`_]
- Move built-in tags to converters (except ndarray and integer). [`#1474 <https://github.com/asdf-format/asdf/issues/1474>`_]
- Add block storage support to Converter [`#1508 <https://github.com/asdf-format/asdf/issues/1508>`_]
- Remove deprecated legacy extension API [`#1464 <https://github.com/asdf-format/asdf/issues/1464>`_]
- Fix issue opening files that don't support ``fileno`` [`#1557 <https://github.com/asdf-format/asdf/issues/1557>`_]
- Allow Converters to defer conversion to other Converters
by returning ``None`` in ``Converter.select_tag`` [#1561]
- Remove deprecated tests.helpers [#1597]
- Remove deprecated load_custom_schema [#1596]
- Remove deprecated TagDefinition.schema_uri [#1595]
by returning ``None`` in ``Converter.select_tag`` [`#1561 <https://github.com/asdf-format/asdf/issues/1561>`_]
- Remove deprecated tests.helpers [`#1597 <https://github.com/asdf-format/asdf/issues/1597>`_]
- Remove deprecated load_custom_schema [`#1596 <https://github.com/asdf-format/asdf/issues/1596>`_]
- Remove deprecated TagDefinition.schema_uri [`#1595 <https://github.com/asdf-format/asdf/issues/1595>`_]
- Removed deprecated AsdfFile.open and deprecated asdf.open
AsdfFile.write_to and AsdfFile.update kwargs [#1592]
- Fix ``AsdfFile.info`` loading all array data [#1572]
- Blank out AsdfFile.tree on close [#1575]
AsdfFile.write_to and AsdfFile.update kwargs [`#1592 <https://github.com/asdf-format/asdf/issues/1592>`_]
- Fix ``AsdfFile.info`` loading all array data [`#1572 <https://github.com/asdf-format/asdf/issues/1572>`_]
- Blank out AsdfFile.tree on close [`#1575 <https://github.com/asdf-format/asdf/issues/1575>`_]
- Move ndarray to a converter, add ``convert_unknown_ndarray_subclasses``
to ``asdf.config.AsdfConfig``, move ``asdf.Stream`` to
``asdf.tags.core.Stream``, update block storage support for
Converter and update internal block API [#1537]
- Remove deprecated resolve_local_refs argument to load_schema [#1623]
- Move IntegerType to converter and drop cache of converted values. [#1527]
- Remove legacy extension API [#1637]
Converter and update internal block API [`#1537 <https://github.com/asdf-format/asdf/issues/1537>`_]
- Remove deprecated resolve_local_refs argument to load_schema [`#1623 <https://github.com/asdf-format/asdf/issues/1623>`_]
- Move IntegerType to converter and drop cache of converted values. [`#1527 <https://github.com/asdf-format/asdf/issues/1527>`_]
- Remove legacy extension API [`#1637 <https://github.com/asdf-format/asdf/issues/1637>`_]
- Fix bug that left out the name of the arrays that differed
for ``asdftool diff`` comparisons [#1652]
for ``asdftool diff`` comparisons [`#1652 <https://github.com/asdf-format/asdf/issues/1652>`_]
2.15.2 (2023-09-29)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Add support for python 3.12 [#1641]
- Add support for python 3.12 [`#1641 <https://github.com/asdf-format/asdf/issues/1641>`_]
2.15.1 (2023-08-07)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Drop Python 3.8 support [#1556]
- Drop NumPy 1.20, 1.21 support [#1568]
- Drop Python 3.8 support [`#1556 <https://github.com/asdf-format/asdf/issues/1556>`_]
- Drop NumPy 1.20, 1.21 support [`#1568 <https://github.com/asdf-format/asdf/issues/1568>`_]
- Convert numpy scalars to python types during yaml encoding
to handle NEP51 changes for numpy 2.0 [#1605]
- Vendorize jsonschema 4.17.3 [#1591]
- Drop jsonschema as a dependency [#1614]
to handle NEP51 changes for numpy 2.0 [`#1605 <https://github.com/asdf-format/asdf/issues/1605>`_]
- Vendorize jsonschema 4.17.3 [`#1591 <https://github.com/asdf-format/asdf/issues/1591>`_]
- Drop jsonschema as a dependency [`#1614 <https://github.com/asdf-format/asdf/issues/1614>`_]
2.15.0 (2023-03-28)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Require numpy<1.25 for python 3.8 [#1327]
- Require numpy<1.25 for python 3.8 [`#1327 <https://github.com/asdf-format/asdf/issues/1327>`_]
- Add AsdfProvisionalAPIWarning to warn developers of new features that
may undergo breaking changes but are likely to be included as stable
features (without this warning) in a future version of ASDF [#1295]
- Add AsdfDeprecationWarning to AsdfFile.blocks [#1336]
features (without this warning) in a future version of ASDF [`#1295 <https://github.com/asdf-format/asdf/issues/1295>`_]
- Add AsdfDeprecationWarning to AsdfFile.blocks [`#1336 <https://github.com/asdf-format/asdf/issues/1336>`_]
- Document policy for ASDF release cycle including when support for ASDF versions
end. Also document dependency support policy. [#1323]
end. Also document dependency support policy. [`#1323 <https://github.com/asdf-format/asdf/issues/1323>`_]
- Update lower pins on ``numpy`` (per release policy), ``packaging``, and ``pyyaml`` to
ones that we can successfully build and test against. [#1360]
- Provide more informative filename when failing to open a file [#1357]
- Add new plugin type for custom schema validators. [#1328]
- Add AsdfDeprecationWarning to ``asdf.types.CustomType`` [#1359]
ones that we can successfully build and test against. [`#1360 <https://github.com/asdf-format/asdf/issues/1360>`_]
- Provide more informative filename when failing to open a file [`#1357 <https://github.com/asdf-format/asdf/issues/1357>`_]
- Add new plugin type for custom schema validators. [`#1328 <https://github.com/asdf-format/asdf/issues/1328>`_]
- Add AsdfDeprecationWarning to ``asdf.types.CustomType`` [`#1359 <https://github.com/asdf-format/asdf/issues/1359>`_]
- Throw more useful error when provided with a path containing an
extra leading slash [#1356]
extra leading slash [`#1356 <https://github.com/asdf-format/asdf/issues/1356>`_]
- Add AsdfDeprecationWarning to AsdfInFits. Support for reading and
writing ASDF in fits files is being moved to `stdatamodels
<https://github.com/spacetelescope/stdatamodels>`_. [#1337]
- Add AsdfDeprecationWarning to asdf.resolver [#1362]
- Add AsdfDeprecationWarning to asdf.tests.helpers.assert_extension_correctness [#1388]
- Add AsdfDeprecationWarning to asdf.type_index [#1403]
<https://github.com/spacetelescope/stdatamodels>`_. [`#1337 <https://github.com/asdf-format/asdf/issues/1337>`_]
- Add AsdfDeprecationWarning to asdf.resolver [`#1362 <https://github.com/asdf-format/asdf/issues/1362>`_]
- Add AsdfDeprecationWarning to asdf.tests.helpers.assert_extension_correctness [`#1388 <https://github.com/asdf-format/asdf/issues/1388>`_]
- Add AsdfDeprecationWarning to asdf.type_index [`#1403 <https://github.com/asdf-format/asdf/issues/1403>`_]
- Add warning to use of asdftool extract and remove-hdu about deprecation
and impending removal [#1411]
- Deprecate AsdfFile attributes that use the legacy extension api [#1417]
- Add AsdfDeprecationWarning to asdf.types [#1401]
and impending removal [`#1411 <https://github.com/asdf-format/asdf/issues/1411>`_]
- Deprecate AsdfFile attributes that use the legacy extension api [`#1417 <https://github.com/asdf-format/asdf/issues/1417>`_]
- Add AsdfDeprecationWarning to asdf.types [`#1401 <https://github.com/asdf-format/asdf/issues/1401>`_]
- deprecate default_extensions, get_default_resolver and
get_cached_asdf_extension_list in asdf.extension [#1409]
- move asdf.types.format_tag to asdf.testing.helpers.format_tag [#1433]
- Deprecate AsdfExtenion, AsdfExtensionList, BuiltinExtension [#1429]
- Add AsdfDeprecationWarning to asdf_extensions entry point [#1361]
- Deprecate asdf.tests.helpers [#1440]
- respect umask when determining file permissions for written files [#1451]
- rename master branch to main [#1479]
get_cached_asdf_extension_list in asdf.extension [`#1409 <https://github.com/asdf-format/asdf/issues/1409>`_]
- move asdf.types.format_tag to asdf.testing.helpers.format_tag [`#1433 <https://github.com/asdf-format/asdf/issues/1433>`_]
- Deprecate AsdfExtenion, AsdfExtensionList, BuiltinExtension [`#1429 <https://github.com/asdf-format/asdf/issues/1429>`_]
- Add AsdfDeprecationWarning to asdf_extensions entry point [`#1361 <https://github.com/asdf-format/asdf/issues/1361>`_]
- Deprecate asdf.tests.helpers [`#1440 <https://github.com/asdf-format/asdf/issues/1440>`_]
- respect umask when determining file permissions for written files [`#1451 <https://github.com/asdf-format/asdf/issues/1451>`_]
- rename master branch to main [`#1479 <https://github.com/asdf-format/asdf/issues/1479>`_]
2.14.4 (2022-03-17)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- require jsonschema<4.18 [#1487]
- require jsonschema<4.18 [`#1487 <https://github.com/asdf-format/asdf/issues/1487>`_]
2.14.3 (2022-12-15)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Use importlib_metadata for all python versions [#1260]
- Fix issue #1268, where update could fail to clear memmaps for some files [#1269]
- Bump asdf-transform-schemas version [#1278]
- Use importlib_metadata for all python versions [`#1260 <https://github.com/asdf-format/asdf/issues/1260>`_]
- Fix issue #1268, where update could fail to clear memmaps for some files [`#1269 <https://github.com/asdf-format/asdf/issues/1269>`_]
- Bump asdf-transform-schemas version [`#1278 <https://github.com/asdf-format/asdf/issues/1278>`_]
2.14.2 (2022-12-05)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Fix issue #1256, where ``enum`` could not be used on tagged objects. [#1257]
- Fix issue #1256, where ``enum`` could not be used on tagged objects. [`#1257 <https://github.com/asdf-format/asdf/issues/1257>`_]
2.14.1 (2022-11-23)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Fix issue #1239, close memmap with asdf file context [#1241]
- Add ndarray-1.1.0 and integer-1.1.0 support [#1250]
- Fix issue #1239, close memmap with asdf file context [`#1241 <https://github.com/asdf-format/asdf/issues/1241>`_]
- Add ndarray-1.1.0 and integer-1.1.0 support [`#1250 <https://github.com/asdf-format/asdf/issues/1250>`_]
2.14.0 (2022-11-22)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Update citation. [#1184]
- Add search support to `~asdf.AsdfFile.schema_info`. [#1187]
- Update citation. [`#1184 <https://github.com/asdf-format/asdf/issues/1184>`_]
- Add search support to `~asdf.AsdfFile.schema_info`. [`#1187 <https://github.com/asdf-format/asdf/issues/1187>`_]
- Add `asdf.search.AsdfSearchResult` support for `~asdf.AsdfFile.schema_info` and
`~asdf.search.AsdfSearchResult.schema_info` method. [#1197]
- Use forc ndarray flag to correctly test for fortran array contiguity [#1206]
- Unpin ``jsonschema`` version and fix ``jsonschema`` deprecation warnings. [#1185]
- Replace ``pkg_resources`` with ``importlib.metadata``. [#1199]
- Fix default validation for jsonschema 4.10+ [#1203]
- Add ``asdf-unit-schemas`` as a dependency, for backwards compatibility. [#1210]
- Remove stray toplevel packages ``docker`` ``docs`` and ``compatibility_tests`` from wheel [#1214]
- Close files opened during a failed call to asdf.open [#1221]
- Modify generic_file for fsspec compatibility [#1226]
- Add fsspec http filesystem support [#1228]
- Memmap whole file instead of each array [#1230]
- Fix issue #1232 where array data was duplicated during resaving of a fits file [#1234]
`~asdf.search.AsdfSearchResult.schema_info` method. [`#1197 <https://github.com/asdf-format/asdf/issues/1197>`_]
- Use forc ndarray flag to correctly test for fortran array contiguity [`#1206 <https://github.com/asdf-format/asdf/issues/1206>`_]
- Unpin ``jsonschema`` version and fix ``jsonschema`` deprecation warnings. [`#1185 <https://github.com/asdf-format/asdf/issues/1185>`_]
- Replace ``pkg_resources`` with ``importlib.metadata``. [`#1199 <https://github.com/asdf-format/asdf/issues/1199>`_]
- Fix default validation for jsonschema 4.10+ [`#1203 <https://github.com/asdf-format/asdf/issues/1203>`_]
- Add ``asdf-unit-schemas`` as a dependency, for backwards compatibility. [`#1210 <https://github.com/asdf-format/asdf/issues/1210>`_]
- Remove stray toplevel packages ``docker`` ``docs`` and ``compatibility_tests`` from wheel [`#1214 <https://github.com/asdf-format/asdf/issues/1214>`_]
- Close files opened during a failed call to asdf.open [`#1221 <https://github.com/asdf-format/asdf/issues/1221>`_]
- Modify generic_file for fsspec compatibility [`#1226 <https://github.com/asdf-format/asdf/issues/1226>`_]
- Add fsspec http filesystem support [`#1228 <https://github.com/asdf-format/asdf/issues/1228>`_]
- Memmap whole file instead of each array [`#1230 <https://github.com/asdf-format/asdf/issues/1230>`_]
- Fix issue #1232 where array data was duplicated during resaving of a fits file [`#1234 <https://github.com/asdf-format/asdf/issues/1234>`_]
2.13.0 (2022-08-19)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
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]
method. [`#1167 <https://github.com/asdf-format/asdf/issues/1167>`_]
2.12.1 (2022-08-17)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- 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]
- Overhaul of the ASDF documentation to make it more consistent and readable. [`#1142 <https://github.com/asdf-format/asdf/issues/1142>`_, `#1152 <https://github.com/asdf-format/asdf/issues/1152>`_]
- Update deprecated instances of ``abstractproperty`` to ``abstractmethod`` [`#1148 <https://github.com/asdf-format/asdf/issues/1148>`_]
- Move build configuration into ``pyproject.toml`` [`#1149 <https://github.com/asdf-format/asdf/issues/1149>`_, `#1155 <https://github.com/asdf-format/asdf/issues/1155>`_]
- Pin ``jsonschema`` to below ``4.10.0``. [`#1171 <https://github.com/asdf-format/asdf/issues/1171>`_]
2.12.0 (2022-06-06)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.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]
``info()`` functionality. [`#1138 <https://github.com/asdf-format/asdf/issues/1138>`_]
- Add ability to set asdf-standard version for schema example items. [`#1143 <https://github.com/asdf-format/asdf/issues/1143>`_]
2.11.2 (2022-08-17)
-------------------
==================-
- Backport ``jsonschema`` pin to strictly less than 4.10.1. [#1175]
- Backport ``jsonschema`` pin to strictly less than 4.10.1. [`#1175 <https://github.com/asdf-format/asdf/issues/1175>`_]
2.11.1 (2022-04-15)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Update minimum astropy version to 5.0.4. [#1133]
- Update minimum astropy version to 5.0.4. [`#1133 <https://github.com/asdf-format/asdf/issues/1133>`_]
2.11.0 (2022-03-15)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Update minimum jsonschema version to 4.0.1. [#1105]
- Update minimum jsonschema version to 4.0.1. [`#1105 <https://github.com/asdf-format/asdf/issues/1105>`_]
2.10.1 (2022-03-02)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Bugfix for circular build dependency for asdf. [#1094]
- Bugfix for circular build dependency for asdf. [`#1094 <https://github.com/asdf-format/asdf/issues/1094>`_]
- Fix small bug with handling multiple schema uris per tag. [#1095]
- Fix small bug with handling multiple schema uris per tag. [`#1095 <https://github.com/asdf-format/asdf/issues/1095>`_]
2.10.0 (2022-02-17)
-------------------
==================-
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Replace asdf-standard submodule with pypi package. [#1079]
- Replace asdf-standard submodule with pypi package. [`#1079 <https://github.com/asdf-format/asdf/issues/1079>`_]
2.9.2 (2022-02-07)
------------------
==================
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Fix deprecation warnings stemming from the release of pytest 7.0.0. [#1075]
- Fix deprecation warnings stemming from the release of pytest 7.0.0. [`#1075 <https://github.com/asdf-format/asdf/issues/1075>`_]
- Fix bug in pytest plugin when schemas are not in a directory named "schemas". [#1076]
- Fix bug in pytest plugin when schemas are not in a directory named "schemas". [`#1076 <https://github.com/asdf-format/asdf/issues/1076>`_]
2.9.1 (2022-02-03)
------------------
==================
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Fix typo in testing module ``__init__.py`` name. [#1071]
- Fix typo in testing module ``__init__.py`` name. [`#1071 <https://github.com/asdf-format/asdf/issues/1071>`_]
2.9.0 (2022-02-02)
------------------
==================
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0

@@ -380,88 +410,88 @@ - Added the capability for tag classes to provide an interface

class attributes rather than appear as an opaque class object.
[#1052 #1055]
[`#1052 <https://github.com/asdf-format/asdf/issues/1052>`_ `#1055 <https://github.com/asdf-format/asdf/issues/1055>`_]
- Fix tag listing when extension is not fully implemented. [#1034]
- Fix tag listing when extension is not fully implemented. [`#1034 <https://github.com/asdf-format/asdf/issues/1034>`_]
- Drop support for Python 3.6. [#1054]
- Drop support for Python 3.6. [`#1054 <https://github.com/asdf-format/asdf/issues/1054>`_]
- Adjustments to compression plugin tests and documentation. [#1053]
- Adjustments to compression plugin tests and documentation. [`#1053 <https://github.com/asdf-format/asdf/issues/1053>`_]
- Update setup.py to raise error if "git submodule update --init" has
not been run. [#1057]
not been run. [`#1057 <https://github.com/asdf-format/asdf/issues/1057>`_]
- Add ability for tags to correspond to multiple schema_uri, with an
implied allOf among the schema_uris. [#1058, #1069]
implied allOf among the schema_uris. [`#1058 <https://github.com/asdf-format/asdf/issues/1058>`_, `#1069 <https://github.com/asdf-format/asdf/issues/1069>`_]
- Add the URL of the file being parsed to ``SerializationContext``. [#1065]
- Add the URL of the file being parsed to ``SerializationContext``. [`#1065 <https://github.com/asdf-format/asdf/issues/1065>`_]
- Add ``asdf.testing.helpers`` module with simplified versions of test
helpers previously available in ``asdf.tests.helpers``. [#1067]
helpers previously available in ``asdf.tests.helpers``. [`#1067 <https://github.com/asdf-format/asdf/issues/1067>`_]
2.8.3 (2021-12-13)
------------------
==================
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Fix more use of 'python' where 'python3' is intended. [#1033]
- Fix more use of 'python' where 'python3' is intended. [`#1033 <https://github.com/asdf-format/asdf/issues/1033>`_]
2.8.2 (2021-12-06)
------------------
==================
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Update documentation to reflect new 2.8 features. [#998]
- Update documentation to reflect new 2.8 features. [`#998 <https://github.com/asdf-format/asdf/issues/998>`_]
- Fix array compression for non-native byte order [#1010]
- Fix array compression for non-native byte order [`#1010 <https://github.com/asdf-format/asdf/issues/1010>`_]
- Fix use of 'python' where 'python3' is intended. [#1026]
- Fix use of 'python' where 'python3' is intended. [`#1026 <https://github.com/asdf-format/asdf/issues/1026>`_]
- Fix schema URI resolving when the URI prefix is also
claimed by a legacy extension. [#1029]
claimed by a legacy extension. [`#1029 <https://github.com/asdf-format/asdf/issues/1029>`_]
- Remove 'name' and 'version' attributes from NDArrayType
instances. [#1031]
instances. [`#1031 <https://github.com/asdf-format/asdf/issues/1031>`_]
2.8.1 (2021-06-09)
------------------
==================
- Fix bug in block manager when a new block is added to an existing
file without a block index. [#1000]
file without a block index. [`#1000 <https://github.com/asdf-format/asdf/issues/1000>`_]
2.8.0 (2021-05-12)
------------------
==================
The ASDF Standard is at v1.6.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.6.0
- Add ``yaml_tag_handles`` property to allow definition of custom yaml
``%TAG`` handles in the asdf file header. [#963]
``%TAG`` handles in the asdf file header. [`#963 <https://github.com/asdf-format/asdf/issues/963>`_]
- Add new resource mapping API for extending asdf with additional
schemas. [#819, #828, #843, #846]
schemas. [`#819 <https://github.com/asdf-format/asdf/issues/819>`_, `#828 <https://github.com/asdf-format/asdf/issues/828>`_, `#843 <https://github.com/asdf-format/asdf/issues/843>`_, `#846 <https://github.com/asdf-format/asdf/issues/846>`_]
- Add global configuration mechanism. [#819, #839, #844, #847]
- Add global configuration mechanism. [`#819 <https://github.com/asdf-format/asdf/issues/819>`_, `#839 <https://github.com/asdf-format/asdf/issues/839>`_, `#844 <https://github.com/asdf-format/asdf/issues/844>`_, `#847 <https://github.com/asdf-format/asdf/issues/847>`_]
- Drop support for automatic serialization of subclass
attributes. [#825]
attributes. [`#825 <https://github.com/asdf-format/asdf/issues/825>`_]
- Support asdf:// as a URI scheme. [#854, #855]
- Support asdf:// as a URI scheme. [`#854 <https://github.com/asdf-format/asdf/issues/854>`_, `#855 <https://github.com/asdf-format/asdf/issues/855>`_]
- Include only extensions used during serialization in
a file's metadata. [#848, #864]
a file's metadata. [`#848 <https://github.com/asdf-format/asdf/issues/848>`_, `#864 <https://github.com/asdf-format/asdf/issues/864>`_]
- Drop support for Python 3.5. [#856]
- Drop support for Python 3.5. [`#856 <https://github.com/asdf-format/asdf/issues/856>`_]
- Add new extension API to support versioned extensions.
[#850, #851, #853, #857, #874]
[`#850 <https://github.com/asdf-format/asdf/issues/850>`_, `#851 <https://github.com/asdf-format/asdf/issues/851>`_, `#853 <https://github.com/asdf-format/asdf/issues/853>`_, `#857 <https://github.com/asdf-format/asdf/issues/857>`_, `#874 <https://github.com/asdf-format/asdf/issues/874>`_]
- Permit wildcard in tag validator URIs. [#858, #865]
- Permit wildcard in tag validator URIs. [`#858 <https://github.com/asdf-format/asdf/issues/858>`_, `#865 <https://github.com/asdf-format/asdf/issues/865>`_]
- Implement support for ASDF Standard 1.6.0. This version of
the standard limits mapping keys to string, integer, or
boolean. [#866]
boolean. [`#866 <https://github.com/asdf-format/asdf/issues/866>`_]
- Stop removing schema defaults for all ASDF Standard versions,
and automatically fill defaults only for versions <= 1.5.0. [#860]
and automatically fill defaults only for versions <= 1.5.0. [`#860 <https://github.com/asdf-format/asdf/issues/860>`_]

@@ -474,186 +504,186 @@ - Stop removing keys with ``None`` values from the tree on write. This

the tree (or modify the schema to permit nulls, if that is the
intention). [#863]
intention). [`#863 <https://github.com/asdf-format/asdf/issues/863>`_]
- Deprecated the ``auto_inline`` argument to ``AsdfFile.write_to`` and
``AsdfFile.update`` and added ``AsdfConfig.array_inline_threshold``. [#882, #991]
``AsdfFile.update`` and added ``AsdfConfig.array_inline_threshold``. [`#882 <https://github.com/asdf-format/asdf/issues/882>`_, `#991 <https://github.com/asdf-format/asdf/issues/991>`_]
- Add ``edit`` subcommand to asdftool for efficient editing of
the YAML portion of an ASDF file. [#873, #922]
the YAML portion of an ASDF file. [`#873 <https://github.com/asdf-format/asdf/issues/873>`_, `#922 <https://github.com/asdf-format/asdf/issues/922>`_]
- Increase limit on integer literals to signed 64-bit. [#894]
- Increase limit on integer literals to signed 64-bit. [`#894 <https://github.com/asdf-format/asdf/issues/894>`_]
- Remove the ``asdf.test`` method and ``asdf.__githash__`` attribute. [#943]
- Remove the ``asdf.test`` method and ``asdf.__githash__`` attribute. [`#943 <https://github.com/asdf-format/asdf/issues/943>`_]
- Add support for custom compression via extensions. [#931]
- Add support for custom compression via extensions. [`#931 <https://github.com/asdf-format/asdf/issues/931>`_]
- Remove unnecessary ``.tree`` from search result paths. [#954]
- Remove unnecessary ``.tree`` from search result paths. [`#954 <https://github.com/asdf-format/asdf/issues/954>`_]
- Drop support for bugs in older operating systems and Python versions. [#955]
- Drop support for bugs in older operating systems and Python versions. [`#955 <https://github.com/asdf-format/asdf/issues/955>`_]
- Add argument to ``asdftool diff`` that ignores tree nodes that match
a JMESPath expression. [#956]
a JMESPath expression. [`#956 <https://github.com/asdf-format/asdf/issues/956>`_]
- Fix behavior of ``exception`` argument to ``GenericFile.seek_until``. [#980]
- Fix behavior of ``exception`` argument to ``GenericFile.seek_until``. [`#980 <https://github.com/asdf-format/asdf/issues/980>`_]
- Fix issues in file type detection to allow non-seekable input and
filenames without recognizable extensions. Remove the ``asdf.asdf.is_asdf_file``
function. [#978]
function. [`#978 <https://github.com/asdf-format/asdf/issues/978>`_]
- Update ``asdftool extensions`` and ``asdftool tags`` to incorporate
the new extension API. [#988]
the new extension API. [`#988 <https://github.com/asdf-format/asdf/issues/988>`_]
- Add ``AsdfSearchResult.replace`` method for assigning new values to
search results. [#981]
search results. [`#981 <https://github.com/asdf-format/asdf/issues/981>`_]
- Search for block index starting from end of file. Fixes rare bug when
a data block contains a block index. [#990]
a data block contains a block index. [`#990 <https://github.com/asdf-format/asdf/issues/990>`_]
- Update asdf-standard to 1.6.0 tag. [#993]
- Update asdf-standard to 1.6.0 tag. [`#993 <https://github.com/asdf-format/asdf/issues/993>`_]
2.7.5 (2021-06-09)
------------------
==================
The ASDF Standard is at v1.5.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.5.0
- Fix bug in ``asdf.schema.check_schema`` causing relative references in
metaschemas to be resolved incorrectly. [#987]
metaschemas to be resolved incorrectly. [`#987 <https://github.com/asdf-format/asdf/issues/987>`_]
- Fix bug in block manager when a new block is added to an existing
file without a block index. [#1000]
file without a block index. [`#1000 <https://github.com/asdf-format/asdf/issues/1000>`_]
2.7.4 (2021-04-30)
------------------
==================
The ASDF Standard is at v1.5.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.5.0
- Fix pytest plugin failure under older versions of pytest. [#934]
- Fix pytest plugin failure under older versions of pytest. [`#934 <https://github.com/asdf-format/asdf/issues/934>`_]
- Copy array views when the base array is non-contiguous. [#949]
- Copy array views when the base array is non-contiguous. [`#949 <https://github.com/asdf-format/asdf/issues/949>`_]
- Prohibit views over FITS arrays that change dtype. [#952]
- Prohibit views over FITS arrays that change dtype. [`#952 <https://github.com/asdf-format/asdf/issues/952>`_]
- Add support for HTTPS URLs and following redirects. [#971]
- Add support for HTTPS URLs and following redirects. [`#971 <https://github.com/asdf-format/asdf/issues/971>`_]
- Prevent astropy warnings in tests when opening known bad files. [#977]
- Prevent astropy warnings in tests when opening known bad files. [`#977 <https://github.com/asdf-format/asdf/issues/977>`_]
2.7.3 (2021-02-25)
------------------
==================
The ASDF Standard is at v1.5.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.5.0
- Add pytest plugin options to skip and xfail individual tests
and xfail the unsupported ndarray-1.0.0 example. [#929]
and xfail the unsupported ndarray-1.0.0 example. [`#929 <https://github.com/asdf-format/asdf/issues/929>`_]
- Fix bug resulting in invalid strides values for views over
FITS arrays. [#930]
FITS arrays. [`#930 <https://github.com/asdf-format/asdf/issues/930>`_]
2.7.2 (2021-01-15)
------------------
==================
The ASDF Standard is at v1.5.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.5.0
- Fix bug causing test collection failures in some environments. [#889]
- Fix bug causing test collection failures in some environments. [`#889 <https://github.com/asdf-format/asdf/issues/889>`_]
- Fix bug when decompressing arrays with numpy 1.20. [#901, #909]
- Fix bug when decompressing arrays with numpy 1.20. [`#901 <https://github.com/asdf-format/asdf/issues/901>`_, `#909 <https://github.com/asdf-format/asdf/issues/909>`_]
2.7.1 (2020-08-18)
------------------
==================
The ASDF Standard is at v1.5.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.5.0
- Fix bug preventing access to copied array data after
``AsdfFile`` is closed. [#869]
``AsdfFile`` is closed. [`#869 <https://github.com/asdf-format/asdf/issues/869>`_]
2.7.0 (2020-07-23)
------------------
==================
The ASDF Standard is at v1.5.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.5.0
- Fix bug preventing diff of files containing ndarray-1.0.0
objects in simplified form. [#786]
objects in simplified form. [`#786 <https://github.com/asdf-format/asdf/issues/786>`_]
- Fix bug causing duplicate elements to appear when calling
``copy.deepcopy`` on a ``TaggedList``. [#788]
``copy.deepcopy`` on a ``TaggedList``. [`#788 <https://github.com/asdf-format/asdf/issues/788>`_]
- Improve validator performance by skipping unnecessary step of
copying schema objects. [#784]
copying schema objects. [`#784 <https://github.com/asdf-format/asdf/issues/784>`_]
- Fix bug with ``auto_inline`` option where inline blocks
are not converted to internal when they exceed the threshold. [#802]
are not converted to internal when they exceed the threshold. [`#802 <https://github.com/asdf-format/asdf/issues/802>`_]
- Fix misinterpretation of byte order of blocks stored
in FITS files. [#810]
in FITS files. [`#810 <https://github.com/asdf-format/asdf/issues/810>`_]
- Improve read performance by skipping unnecessary rebuild
of tagged tree. [#787]
of tagged tree. [`#787 <https://github.com/asdf-format/asdf/issues/787>`_]
- Add option to ``asdf.open`` and ``fits_embed.AsdfInFits.open``
that disables validation on read. [#792]
that disables validation on read. [`#792 <https://github.com/asdf-format/asdf/issues/792>`_]
- Fix bugs and code style found by adding F and W ``flake8`` checks. [#797]
- Fix bugs and code style found by adding F and W ``flake8`` checks. [`#797 <https://github.com/asdf-format/asdf/issues/797>`_]
- Eliminate warnings in pytest plugin by using ``from_parent``
when available. [#799]
when available. [`#799 <https://github.com/asdf-format/asdf/issues/799>`_]
- Prevent validation of empty tree when ``AsdfFile`` is
initialized. [#794]
initialized. [`#794 <https://github.com/asdf-format/asdf/issues/794>`_]
- All warnings now subclass ``asdf.exceptions.AsdfWarning``. [#804]
- All warnings now subclass ``asdf.exceptions.AsdfWarning``. [`#804 <https://github.com/asdf-format/asdf/issues/804>`_]
- Improve warning message when falling back to an older schema,
and note that fallback behavior will be removed in 3.0. [#806]
and note that fallback behavior will be removed in 3.0. [`#806 <https://github.com/asdf-format/asdf/issues/806>`_]
- Drop support for jsonschema 2.x. [#807]
- Drop support for jsonschema 2.x. [`#807 <https://github.com/asdf-format/asdf/issues/807>`_]
- Stop traversing oneOf and anyOf combiners when filling
or removing default values. [#811]
or removing default values. [`#811 <https://github.com/asdf-format/asdf/issues/811>`_]
- Fix bug in version map caching that caused incompatible
tags to be written under ASDF Standard 1.0.0. [#821]
tags to be written under ASDF Standard 1.0.0. [`#821 <https://github.com/asdf-format/asdf/issues/821>`_]
- Fix bug that corrupted ndarrays when the underlying block
array was converted to C order on write. [#827]
array was converted to C order on write. [`#827 <https://github.com/asdf-format/asdf/issues/827>`_]
- Fix bug that produced unreadable ASDF files when an
ndarray in the tree was both offset and broadcasted. [#827]
ndarray in the tree was both offset and broadcasted. [`#827 <https://github.com/asdf-format/asdf/issues/827>`_]
- Fix bug preventing validation of default values in
``schema.check_schema``. [#785]
``schema.check_schema``. [`#785 <https://github.com/asdf-format/asdf/issues/785>`_]
- Add option to disable validation of schema default values
in the pytest plugin. [#831]
in the pytest plugin. [`#831 <https://github.com/asdf-format/asdf/issues/831>`_]
- Prevent errors when extension metadata contains additional
properties. [#832]
properties. [`#832 <https://github.com/asdf-format/asdf/issues/832>`_]
2.6.0 (2020-04-22)
------------------
==================
The ASDF Standard is at v1.5.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.5.0
- AsdfDeprecationWarning now subclasses DeprecationWarning. [#710]
- AsdfDeprecationWarning now subclasses DeprecationWarning. [`#710 <https://github.com/asdf-format/asdf/issues/710>`_]
- Resolve external references in custom schemas, and deprecate
asdf.schema.load_custom_schema. [#738]
asdf.schema.load_custom_schema. [`#738 <https://github.com/asdf-format/asdf/issues/738>`_]
- Add ``asdf.info`` for displaying a summary of a tree, and
``AsdfFile.search`` for searching a tree. [#736]
``AsdfFile.search`` for searching a tree. [`#736 <https://github.com/asdf-format/asdf/issues/736>`_]
- Add pytest plugin option to skip warning when a tag is
unrecognized. [#771]
unrecognized. [`#771 <https://github.com/asdf-format/asdf/issues/771>`_]
- Fix generic_io ``read_blocks()`` reading past the requested size [#773]
- Fix generic_io ``read_blocks()`` reading past the requested size [`#773 <https://github.com/asdf-format/asdf/issues/773>`_]
- Add support for ASDF Standard 1.5.0, which includes several new
transform schemas. [#776]
transform schemas. [`#776 <https://github.com/asdf-format/asdf/issues/776>`_]
- Enable validation and serialization of previously unhandled numpy
scalar types. [#778]
scalar types. [`#778 <https://github.com/asdf-format/asdf/issues/778>`_]

@@ -663,136 +693,136 @@ - Fix handling of trees containing implicit internal references and

and ``yamlutil.tagged_tree_to_custom_tree`` from extension code,
and allow ``ExtensionType`` subclasses to return generators. [#777]
and allow ``ExtensionType`` subclasses to return generators. [`#777 <https://github.com/asdf-format/asdf/issues/777>`_]
- Fix bug preventing history entries when a file was previously
saved without them. [#779]
saved without them. [`#779 <https://github.com/asdf-format/asdf/issues/779>`_]
- Update developer overview documentation to describe design of changes
to handle internal references and reference cycles. [#781]
to handle internal references and reference cycles. [`#781 <https://github.com/asdf-format/asdf/issues/781>`_]
2.5.2 (2020-02-28)
------------------
==================
The ASDF Standard is at v1.4.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.4.0
- Add a developer overview document to help understand how ASDF works
internally. Still a work in progress. [#730]
internally. Still a work in progress. [`#730 <https://github.com/asdf-format/asdf/issues/730>`_]
- Remove unnecessary dependency on six. [#739]
- Remove unnecessary dependency on six. [`#739 <https://github.com/asdf-format/asdf/issues/739>`_]
- Add developer documentation on schema versioning, additional
schema and extension-related tests, and fix a variety of
issues in ``AsdfType`` subclasses. [#750]
issues in ``AsdfType`` subclasses. [`#750 <https://github.com/asdf-format/asdf/issues/750>`_]
- Update asdf-standard to include schemas that were previously
missing from 1.4.0 version maps. [#767]
missing from 1.4.0 version maps. [`#767 <https://github.com/asdf-format/asdf/issues/767>`_]
- Simplify example in README.rst [#763]
- Simplify example in README.rst [`#763 <https://github.com/asdf-format/asdf/issues/763>`_]
2.5.1 (2020-01-07)
------------------
==================
The ASDF Standard is at v1.4.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.4.0
- Fix bug in test causing failure when test suite is run against
an installed asdf package. [#732]
an installed asdf package. [`#732 <https://github.com/asdf-format/asdf/issues/732>`_]
2.5.0 (2019-12-23)
------------------
==================
The ASDF Standard is at v1.4.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.4.0
- Added asdf-standard 1.4.0 to the list of supported versions. [#704]
- Fix load_schema LRU cache memory usage issue [#682]
- Add convenience method for fetching the default resolver [#682]
- Added asdf-standard 1.4.0 to the list of supported versions. [`#704 <https://github.com/asdf-format/asdf/issues/704>`_]
- Fix load_schema LRU cache memory usage issue [`#682 <https://github.com/asdf-format/asdf/issues/682>`_]
- Add convenience method for fetching the default resolver [`#682 <https://github.com/asdf-format/asdf/issues/682>`_]
- ``SpecItem`` and ``Spec`` were deprecated in ``semantic_version``
and were replaced with ``SimpleSpec``. [#715]
and were replaced with ``SimpleSpec``. [`#715 <https://github.com/asdf-format/asdf/issues/715>`_]
- Pinned the minimum required ``semantic_version`` to 2.8. [#715]
- Pinned the minimum required ``semantic_version`` to 2.8. [`#715 <https://github.com/asdf-format/asdf/issues/715>`_]
- Fix bug causing segfault after update of a memory-mapped file. [#716]
- Fix bug causing segfault after update of a memory-mapped file. [`#716 <https://github.com/asdf-format/asdf/issues/716>`_]
2.4.2 (2019-08-29)
------------------
==================
The ASDF Standard is at v1.3.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.3.0
- Limit the version of ``semantic_version`` to <=2.6.0 to work
around a Deprecation warning. [#700]
around a Deprecation warning. [`#700 <https://github.com/asdf-format/asdf/issues/700>`_]
2.4.1 (2019-08-27)
------------------
==================
The ASDF Standard is at v1.3.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.3.0
- Define the ``in`` operator for top-level ``AsdfFile`` objects. [#623]
- Define the ``in`` operator for top-level ``AsdfFile`` objects. [`#623 <https://github.com/asdf-format/asdf/issues/623>`_]
- Overhaul packaging infrastructure. Remove use of ``astropy_helpers``. [#670]
- Overhaul packaging infrastructure. Remove use of ``astropy_helpers``. [`#670 <https://github.com/asdf-format/asdf/issues/670>`_]
- Automatically register schema tester plugin. Do not enable schema tests by
default. Add configuration setting and command line option to enable schema
tests. [#676]
tests. [`#676 <https://github.com/asdf-format/asdf/issues/676>`_]
- Enable handling of subclasses of known custom types by using decorators for
convenience. [#563]
convenience. [`#563 <https://github.com/asdf-format/asdf/issues/563>`_]
- Add support for jsonschema 3.x. [#684]
- Add support for jsonschema 3.x. [`#684 <https://github.com/asdf-format/asdf/issues/684>`_]
- Fix bug in ``NDArrayType.__len__``. It must be a method, not a
property. [#673]
property. [`#673 <https://github.com/asdf-format/asdf/issues/673>`_]
2.3.3 (2019-04-02)
------------------
==================
The ASDF Standard is at v1.3.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.3.0
- Pass ``ignore_unrecognized_tag`` setting through to ASDF-in-FITS. [#650]
- Pass ``ignore_unrecognized_tag`` setting through to ASDF-in-FITS. [`#650 <https://github.com/asdf-format/asdf/issues/650>`_]
- Use ``$schema`` keyword if available to determine meta-schema to use when
testing whether schemas themselves are valid. [#654]
testing whether schemas themselves are valid. [`#654 <https://github.com/asdf-format/asdf/issues/654>`_]
- Take into account resolvers from installed extensions when loading schemas
for validation. [#655]
for validation. [`#655 <https://github.com/asdf-format/asdf/issues/655>`_]
- Fix compatibility issue with new release of ``pyyaml`` (version 5.1). [#662]
- Fix compatibility issue with new release of ``pyyaml`` (version 5.1). [`#662 <https://github.com/asdf-format/asdf/issues/662>`_]
- Allow use of ``pathlib.Path`` objects for ``custom_schema`` option. [#663]
- Allow use of ``pathlib.Path`` objects for ``custom_schema`` option. [`#663 <https://github.com/asdf-format/asdf/issues/663>`_]
2.3.2 (2019-02-19)
------------------
==================
The ASDF Standard is at v1.3.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.3.0
- Fix bug that occurs when comparing installed extension version with that
found in file. [#641]
found in file. [`#641 <https://github.com/asdf-format/asdf/issues/641>`_]
2.3.1 (2018-12-20)
------------------
==================
The ASDF Standard is at v1.3.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.3.0
- Provide source information for ``AsdfDeprecationWarning`` that come from
extensions from external packages. [#629]
extensions from external packages. [`#629 <https://github.com/asdf-format/asdf/issues/629>`_]
- Ensure that top-level accesses to the tree outside a closed context handler
result in an ``OSError``. [#628]
result in an ``OSError``. [`#628 <https://github.com/asdf-format/asdf/issues/628>`_]
- Fix the way ``generic_io`` handles URIs and paths on Windows. [#632]
- Fix the way ``generic_io`` handles URIs and paths on Windows. [`#632 <https://github.com/asdf-format/asdf/issues/632>`_]
- Fix bug in ``asdftool`` that prevented ``extract`` command from being
visible. [#633]
visible. [`#633 <https://github.com/asdf-format/asdf/issues/633>`_]
2.3.0 (2018-11-28)
------------------
==================
The ASDF Standard is at v1.3.0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
The ASDF Standard is at v1.3.0

@@ -803,11 +833,11 @@ - Storage of arbitrary precision integers is now provided by

provide backwards compatibility for files that were created with a buggy
version of ASDF (see #553 below). [#566]
version of ASDF (see #553 below). [`#566 <https://github.com/asdf-format/asdf/issues/566>`_]
- Remove WCS tags. These are now provided by the `gwcs package
<https://github.com/spacetelescope/gwcs>`_. [#593]
<https://github.com/spacetelescope/gwcs>`_. [`#593 <https://github.com/asdf-format/asdf/issues/593>`_]
- Deprecate the ``asdf.asdftypes`` module in favor of ``asdf.types``. [#611]
- Deprecate the ``asdf.asdftypes`` module in favor of ``asdf.types``. [`#611 <https://github.com/asdf-format/asdf/issues/611>`_]
- Support use of ``pathlib.Path`` with ``asdf.open`` and ``AsdfFile.write_to``.
[#617]
[`#617 <https://github.com/asdf-format/asdf/issues/617>`_]

@@ -817,9 +847,9 @@ - Update ASDF Standard submodule to version 1.3.0.

2.2.1 (2018-11-15)
------------------
==================
- Fix an issue with the README that caused sporadic installation failures and
also prevented the long description from being rendered on pypi. [#607]
also prevented the long description from being rendered on pypi. [`#607 <https://github.com/asdf-format/asdf/issues/607>`_]
2.2.0 (2018-11-14)
------------------
==================

@@ -832,126 +862,126 @@ - Add new parameter ``lazy_load`` to ``AsdfFile.open``. It is ``True`` by

is still effective and the active memory maps may still require the file
to stay open in case ``copy_arrays`` is ``False``. [#573]
to stay open in case ``copy_arrays`` is ``False``. [`#573 <https://github.com/asdf-format/asdf/issues/573>`_]
- Add ``AsdfConversionWarning`` for failures to convert ASDF tree into custom
types. This warning is converted to an error when using
``assert_roundtrip_tree`` for tests. [#583]
``assert_roundtrip_tree`` for tests. [`#583 <https://github.com/asdf-format/asdf/issues/583>`_]
- Deprecate ``asdf.AsdfFile.open`` in favor of ``asdf.open``. [#579]
- Deprecate ``asdf.AsdfFile.open`` in favor of ``asdf.open``. [`#579 <https://github.com/asdf-format/asdf/issues/579>`_]
- Add readonly protection to memory mapped arrays when the underlying file
handle is readonly. [#579]
handle is readonly. [`#579 <https://github.com/asdf-format/asdf/issues/579>`_]
2.1.2 (2018-11-13)
------------------
==================
- Make sure that all types corresponding to core tags are added to the type
index before any others. This fixes a bug that was related to the way that
subclass tags were overwritten by external extensions. [#598]
subclass tags were overwritten by external extensions. [`#598 <https://github.com/asdf-format/asdf/issues/598>`_]
2.1.1 (2018-11-01)
------------------
==================
- Make sure extension metadata is written even when constructing the ASDF tree
on-the-fly. [#549]
on-the-fly. [`#549 <https://github.com/asdf-format/asdf/issues/549>`_]
- Fix large integer validation when storing `numpy` integer literals in the
tree. [#553]
tree. [`#553 <https://github.com/asdf-format/asdf/issues/553>`_]
- Fix bug that caused subclass of external type to be serialized by the wrong
tag. [#560]
tag. [`#560 <https://github.com/asdf-format/asdf/issues/560>`_]
- Fix bug that occurred when attempting to open invalid file but Astropy import
fails while checking for ASDF-in-FITS. [#562]
fails while checking for ASDF-in-FITS. [`#562 <https://github.com/asdf-format/asdf/issues/562>`_]
- Fix bug that caused tree creation to fail when unable to locate a schema file
for an unknown tag. This now simply causes a warning, and the offending node
is converted to basic Python data structures. [#571]
is converted to basic Python data structures. [`#571 <https://github.com/asdf-format/asdf/issues/571>`_]
2.1.0 (2018-09-25)
------------------
==================
- Add API function for retrieving history entries. [#501]
- Add API function for retrieving history entries. [`#501 <https://github.com/asdf-format/asdf/issues/501>`_]
- Store ASDF-in-FITS data inside a 1x1 BINTABLE HDU. [#519]
- Store ASDF-in-FITS data inside a 1x1 BINTABLE HDU. [`#519 <https://github.com/asdf-format/asdf/issues/519>`_]
- Allow implicit conversion of ``namedtuple`` into serializable types. [#534]
- Allow implicit conversion of ``namedtuple`` into serializable types. [`#534 <https://github.com/asdf-format/asdf/issues/534>`_]
- Fix bug that prevented use of ASDF-in-FITS with HDUs that have names with
underscores. [#543]
underscores. [`#543 <https://github.com/asdf-format/asdf/issues/543>`_]
- Add option to ``generic_io.get_file`` to close underlying file handle. [#544]
- Add option to ``generic_io.get_file`` to close underlying file handle. [`#544 <https://github.com/asdf-format/asdf/issues/544>`_]
- Add top-level ``keys`` method to ``AsdfFile`` to access tree keys. [#545]
- Add top-level ``keys`` method to ``AsdfFile`` to access tree keys. [`#545 <https://github.com/asdf-format/asdf/issues/545>`_]
2.0.3 (2018-09-06)
------------------
==================
- Update asdf-standard to reflect more stringent (and, consequently, more
correct) requirements on the formatting of complex numbers. [#526]
correct) requirements on the formatting of complex numbers. [`#526 <https://github.com/asdf-format/asdf/issues/526>`_]
- Fix bug with dangling file handle when using ASDF-in-FITS. [#533]
- Fix bug with dangling file handle when using ASDF-in-FITS. [`#533 <https://github.com/asdf-format/asdf/issues/533>`_]
- Fix bug that prevented fortran-order arrays from being serialized properly.
[#539]
[`#539 <https://github.com/asdf-format/asdf/issues/539>`_]
2.0.2 (2018-07-27)
------------------
==================
- Allow serialization of broadcasted ``numpy`` arrays. [#507]
- Allow serialization of broadcasted ``numpy`` arrays. [`#507 <https://github.com/asdf-format/asdf/issues/507>`_]
- Fix bug that caused result of ``set_array_compression`` to be overwritten by
``all_array_compression`` argument to ``write_to``. [#510]
``all_array_compression`` argument to ``write_to``. [`#510 <https://github.com/asdf-format/asdf/issues/510>`_]
- Add workaround for Python OSX write limit bug
(see https://bugs.python.org/issue24658). [#521]
(see https://bugs.python.org/issue24658). [`#521 <https://github.com/asdf-format/asdf/issues/521>`_]
- Fix bug with custom schema validation when using out-of-line definitions in
schema file. [#522]
schema file. [`#522 <https://github.com/asdf-format/asdf/issues/522>`_]
2.0.1 (2018-05-08)
------------------
==================
- Allow test suite to run even when package is not installed. [#502]
- Allow test suite to run even when package is not installed. [`#502 <https://github.com/asdf-format/asdf/issues/502>`_]
2.0.0 (2018-04-19)
------------------
==================
- Astropy-specific tags have moved to Astropy core package. [#359]
- Astropy-specific tags have moved to Astropy core package. [`#359 <https://github.com/asdf-format/asdf/issues/359>`_]
- ICRSCoord tag has moved to Astropy core package. [#401]
- ICRSCoord tag has moved to Astropy core package. [`#401 <https://github.com/asdf-format/asdf/issues/401>`_]
- Remove support for Python 2. [#409]
- Remove support for Python 2. [`#409 <https://github.com/asdf-format/asdf/issues/409>`_]
- Create ``pytest`` plugin to be used for testing schema files. [#425]
- Create ``pytest`` plugin to be used for testing schema files. [`#425 <https://github.com/asdf-format/asdf/issues/425>`_]
- Add metadata about extensions used to create a file to the history section of
the file itself. [#475]
the file itself. [`#475 <https://github.com/asdf-format/asdf/issues/475>`_]
- Remove hard dependency on Astropy. It is still required for testing, and for
processing ASDF-in-FITS files. [#476]
processing ASDF-in-FITS files. [`#476 <https://github.com/asdf-format/asdf/issues/476>`_]
- Add command for extracting ASDF extension from ASDF-in-FITS file and
converting it to a pure ASDF file. [#477]
converting it to a pure ASDF file. [`#477 <https://github.com/asdf-format/asdf/issues/477>`_]
- Add command for removing ASDF extension from ASDF-in-FITS file. [#480]
- Add command for removing ASDF extension from ASDF-in-FITS file. [`#480 <https://github.com/asdf-format/asdf/issues/480>`_]
- Add an ``ExternalArrayReference`` type for referencing arrays in external
files. [#400]
files. [`#400 <https://github.com/asdf-format/asdf/issues/400>`_]
- Improve the way URIs are detected for ASDF-in-FITS files in order to fix bug
with reading gzipped ASDF-in-FITS files. [#416]
with reading gzipped ASDF-in-FITS files. [`#416 <https://github.com/asdf-format/asdf/issues/416>`_]
- Explicitly disallow access to entire tree for ASDF file objects that have
been closed. [#407]
been closed. [`#407 <https://github.com/asdf-format/asdf/issues/407>`_]
- Install and load extensions using ``setuptools`` entry points. [#384]
- Install and load extensions using ``setuptools`` entry points. [`#384 <https://github.com/asdf-format/asdf/issues/384>`_]
- Automatically initialize ``asdf-standard`` submodule in ``setup.py``. [#398]
- Automatically initialize ``asdf-standard`` submodule in ``setup.py``. [`#398 <https://github.com/asdf-format/asdf/issues/398>`_]
- Allow foreign tags to be resolved in schemas and files. Deprecate
``tag_to_schema_resolver`` property for ``AsdfFile`` and
``AsdfExtensionList``. [#399]
``AsdfExtensionList``. [`#399 <https://github.com/asdf-format/asdf/issues/399>`_]
- Fix bug that caused serialized FITS tables to be duplicated in embedded ASDF
HDU. [#411]
HDU. [`#411 <https://github.com/asdf-format/asdf/issues/411>`_]

@@ -961,53 +991,53 @@ - Create and use a new non-standard FITS extension instead of ImageHDU for

``.update`` method of ``AsdfInFits``, even though it didn't appear to be
working previously. [#412]
working previously. [`#412 <https://github.com/asdf-format/asdf/issues/412>`_]
- Allow package to be imported and used from source directory and builds in
development mode. [#420]
development mode. [`#420 <https://github.com/asdf-format/asdf/issues/420>`_]
- Add command to ``asdftool`` for querying installed extensions. [#418]
- Add command to ``asdftool`` for querying installed extensions. [`#418 <https://github.com/asdf-format/asdf/issues/418>`_]
- Implement optional top-level validation pass using custom schema. This can be
used to ensure that particular ASDF files follow custom conventions beyond
those enforced by the standard. [#442]
those enforced by the standard. [`#442 <https://github.com/asdf-format/asdf/issues/442>`_]
- Remove restrictions affecting top-level attributes ``data``, ``wcs``, and
``fits``. Bump top-level ASDF schema version to v1.1.0. [#444]
``fits``. Bump top-level ASDF schema version to v1.1.0. [`#444 <https://github.com/asdf-format/asdf/issues/444>`_]
1.3.3 (2018-03-01)
------------------
==================
- Update test infrastructure to rely on new Astropy v3.0 plugins. [#461]
- Update test infrastructure to rely on new Astropy v3.0 plugins. [`#461 <https://github.com/asdf-format/asdf/issues/461>`_]
- Disable use of 2to3. This was causing test failures on Debian builds. [#463]
- Disable use of 2to3. This was causing test failures on Debian builds. [`#463 <https://github.com/asdf-format/asdf/issues/463>`_]
1.3.2 (2018-02-22)
------------------
==================
- Updates to allow this version of ASDF to be compatible with Astropy v3.0.
[#450]
[`#450 <https://github.com/asdf-format/asdf/issues/450>`_]
- Remove tests that are no longer relevant due to latest updates to Astropy's
testing infrastructure. [#458]
testing infrastructure. [`#458 <https://github.com/asdf-format/asdf/issues/458>`_]
1.3.1 (2017-11-02)
------------------
==================
- Relax requirement on ``semantic_version`` version to 2.3.1. [#361]
- Relax requirement on ``semantic_version`` version to 2.3.1. [`#361 <https://github.com/asdf-format/asdf/issues/361>`_]
- Fix bug when retrieving file format version from new ASDF file. [#365]
- Fix bug when retrieving file format version from new ASDF file. [`#365 <https://github.com/asdf-format/asdf/issues/365>`_]
- Fix bug when duplicating inline arrays. [#370]
- Fix bug when duplicating inline arrays. [`#370 <https://github.com/asdf-format/asdf/issues/370>`_]
- Allow tag references using the tag URI scheme to be resolved in schema files.
[#371]
[`#371 <https://github.com/asdf-format/asdf/issues/371>`_]
1.3.0 (2017-10-24)
------------------
==================
- Fixed a bug in reading data from an "http:" url. [#231]
- Fixed a bug in reading data from an "http:" url. [`#231 <https://github.com/asdf-format/asdf/issues/231>`_]
- Implements v 1.1.0 of the asdf schemas. [#233]
- Implements v 1.1.0 of the asdf schemas. [`#233 <https://github.com/asdf-format/asdf/issues/233>`_]
- Added a function ``is_asdf_file`` which inspects the input and
returns ``True`` or ``False``. [#239]
returns ``True`` or ``False``. [`#239 <https://github.com/asdf-format/asdf/issues/239>`_]

@@ -1017,3 +1047,3 @@ - The ``open`` method of ``AsdfInFits`` now accepts URIs and open file handles

parse the given URI or file handle as ``AsdfInFits`` if it is not obviously a
regular ASDF file. [#241]
regular ASDF file. [`#241 <https://github.com/asdf-format/asdf/issues/241>`_]

@@ -1025,8 +1055,8 @@ - Updated WCS frame fields ``obsgeoloc`` and ``obsgeovel`` to reflect recent

support for new field ``galcen_v_sun``. Added support for required module
versions for tag classes. [#244]
versions for tag classes. [`#244 <https://github.com/asdf-format/asdf/issues/244>`_]
- Added support for ``lz4`` compression algorithm [#258]. Also added support
- Added support for ``lz4`` compression algorithm [`#258 <https://github.com/asdf-format/asdf/issues/258>`_]. Also added support
for using a different compression algorithm for writing out a file than the
one that was used for reading the file (e.g. to convert blocks to use a
different compression algorithm) [#257]
different compression algorithm) [`#257 <https://github.com/asdf-format/asdf/issues/257>`_]

@@ -1041,23 +1071,23 @@ - Tag classes may now use an optional ``supported_versions`` attribute to

object fails with an exception, a raw Python data structure will be returned.
[#272]
[`#272 <https://github.com/asdf-format/asdf/issues/272>`_]
- Added option to ``AsdfFile.open`` to allow suppression of warning messages
when mismatched schema versions are encountered. [#294]
when mismatched schema versions are encountered. [`#294 <https://github.com/asdf-format/asdf/issues/294>`_]
- Added a diff tool to ``asdftool`` to allow for visual comparison of pairs of
ASDF files. [#286]
ASDF files. [`#286 <https://github.com/asdf-format/asdf/issues/286>`_]
- Added command to ``asdftool`` to display available tags. [#303]
- Added command to ``asdftool`` to display available tags. [`#303 <https://github.com/asdf-format/asdf/issues/303>`_]
- When possible, display name of ASDF file that caused version mismatch
warning. [#306]
warning. [`#306 <https://github.com/asdf-format/asdf/issues/306>`_]
- Issue a warning when an unrecognized tag is encountered. [#295] This warning
- Issue a warning when an unrecognized tag is encountered. [`#295 <https://github.com/asdf-format/asdf/issues/295>`_] This warning
is silenced by default, but can be enabled with a parameter to the
``AsdfFile`` constructor, or to ``AsdfFile.open``. Also added an option for
ignoring warnings from unrecognized schema tags. [#319]
ignoring warnings from unrecognized schema tags. [`#319 <https://github.com/asdf-format/asdf/issues/319>`_]
- Fix bug with loading JSON schemas in Python 3.5. [#317]
- Fix bug with loading JSON schemas in Python 3.5. [`#317 <https://github.com/asdf-format/asdf/issues/317>`_]
- Remove all remnants of support for Python 2.6. [#333]
- Remove all remnants of support for Python 2.6. [`#333 <https://github.com/asdf-format/asdf/issues/333>`_]

@@ -1067,64 +1097,64 @@ - Fix issues with the type index used for writing out ASDF files. This ensures

versions of the same type. It also makes sure that schema example tests run
against the correct version of the ASDF standard. [#350]
against the correct version of the ASDF standard. [`#350 <https://github.com/asdf-format/asdf/issues/350>`_]
- Update time schema to reflect changes in astropy. This fixes an outstanding
bug. [#343]
bug. [`#343 <https://github.com/asdf-format/asdf/issues/343>`_]
- Add ``copy_arrays`` option to ``asdf.open`` to control whether or not
underlying array data should be memory mapped, if possible. [#355]
underlying array data should be memory mapped, if possible. [`#355 <https://github.com/asdf-format/asdf/issues/355>`_]
- Allow the tree to be accessed using top-level ``__getitem__`` and
``__setitem__``. [#352]
``__setitem__``. [`#352 <https://github.com/asdf-format/asdf/issues/352>`_]
1.2.1 (2016-11-07)
------------------
==================
- Make asdf conditionally dependent on the version of astropy to allow
running it with older versions of astropy. [#228]
running it with older versions of astropy. [`#228 <https://github.com/asdf-format/asdf/issues/228>`_]
1.2.0 (2016-10-04)
------------------
==================
- Added Tabular model. [#214]
- Added Tabular model. [`#214 <https://github.com/asdf-format/asdf/issues/214>`_]
- Forced new blocks to be contiguous [#221]
- Forced new blocks to be contiguous [`#221 <https://github.com/asdf-format/asdf/issues/221>`_]
- Rewrote code which tags complex objects [#223]
- Rewrote code which tags complex objects [`#223 <https://github.com/asdf-format/asdf/issues/223>`_]
- Fixed version error message [#224]
- Fixed version error message [`#224 <https://github.com/asdf-format/asdf/issues/224>`_]
1.0.5 (2016-06-28)
------------------
==================
- Fixed a memory leak when reading wcs that grew memory to over 10 Gb. [#200]
- Fixed a memory leak when reading wcs that grew memory to over 10 Gb. [`#200 <https://github.com/asdf-format/asdf/issues/200>`_]
1.0.4 (2016-05-25)
------------------
==================
- Added wrapper class for astropy.core.Time, TaggedTime. [#198]
- Added wrapper class for astropy.core.Time, TaggedTime. [`#198 <https://github.com/asdf-format/asdf/issues/198>`_]
1.0.2 (2016-02-29)
------------------
==================
- Renamed package to ASDF. [#190]
- Renamed package to ASDF. [`#190 <https://github.com/asdf-format/asdf/issues/190>`_]
- Stopped support for Python 2.6 [#191]
- Stopped support for Python 2.6 [`#191 <https://github.com/asdf-format/asdf/issues/191>`_]
1.0.1 (2016-01-08)
------------------
==================
- Fixed installation from the source tarball on Python 3. [#187]
- Fixed installation from the source tarball on Python 3. [`#187 <https://github.com/asdf-format/asdf/issues/187>`_]
- Fixed error handling when opening ASDF files not supported by the current
version of asdf. [#178]
version of asdf. [`#178 <https://github.com/asdf-format/asdf/issues/178>`_]
- Fixed parse error that could occur sometimes when YAML data was read from
a stream. [#183]
a stream. [`#183 <https://github.com/asdf-format/asdf/issues/183>`_]
1.0.0 (2015-09-18)
------------------
==================
- Initial release.

@@ -56,1 +56,11 @@ We welcome feedback and contributions of all kinds. Contributions of code,

pull request, please use the "Rebase and merge" option.
.. note::
When making a public change, add a news fragment to ``changes/`` with the
filename ``<PR#>.<changetype>.rst``. The change types are as follows:
- ``feature``: new feature
- ``bugfix``: bug fix
- ``doc``: documentation change
- ``removal``: deprecation or removal of public API
- ``general``: infrastructure or miscellaneous change

@@ -295,4 +295,3 @@ .. currentmodule:: asdf

It may sometimes be useful to copy array data into memory instead of using
memory maps. This can be controlled by passing the ``copy_arrays`` parameter to
either the `AsdfFile` constructor or `asdf.open`. By default,
``copy_arrays=False``.
memory maps. This can be controlled by passing ``memmap=False`` to either
the `AsdfFile` constructor or `asdf.open`. By default, ``memmap=True``.

@@ -10,1 +10,2 @@ name: rtd311

- sphinx_rtd_theme>1.2.0
- towncrier
Metadata-Version: 2.1
Name: asdf
Version: 3.4.0
Version: 3.5.0
Summary: Python implementation of the ASDF Standard

@@ -82,6 +82,2 @@ Author-email: The ASDF Developers <help@stsci.edu>

.. image:: https://github.com/asdf-format/asdf/workflows/s390x/badge.svg
:target: https://github.com/asdf-format/asdf/actions
:alt: s390x Status
.. image:: https://github.com/asdf-format/asdf/workflows/Downstream/badge.svg

@@ -265,2 +261,9 @@ :target: https://github.com/asdf-format/asdf/actions

.. warning::
The ``copy_arrays`` argument of `asdf.open()` and `AsdfFile` is deprecated,
and will be removed in ASDF 4.0. It is replaced by ``memmap``, which
is the opposite of ``copy_arrays`` (``memmap == not copy_arrays``).
In ASDF 4.0, ``memmap`` will default to ``False``, which means arrays
will no longer be memory-mapped by default.
To get a quick overview of the data stored in the file, use the top-level

@@ -326,3 +329,3 @@ `AsdfFile.info()` method:

By default, uncompressed data blocks are memory mapped for efficient
access. Memory mapping can be disabled by using the ``copy_arrays``
access. Memory mapping can be disabled by using the ``memmap``
option of `open` when reading:

@@ -332,3 +335,3 @@

af = asdf.open("example.asdf", copy_arrays=True)
af = asdf.open("example.asdf", memmap=False)

@@ -335,0 +338,0 @@ .. _end-read-file-text:

@@ -196,1 +196,16 @@ [project]

"""
[tool.towncrier]
filename = "CHANGES.rst"
directory = "changes"
package = "asdf"
title_format = "{version} ({project_date})"
ignore = [".gitkeep"]
wrap = true
issue_format = "`#{issue} <https://github.com/asdf-format/asdf/pull/{issue}>`_"
[tool.towncrier.fragment.feature]
[tool.towncrier.fragment.bugfix]
[tool.towncrier.fragment.doc]
[tool.towncrier.fragment.removal]
[tool.towncrier.fragment.general]
import io
import os
import pathlib
import warnings
from dataclasses import dataclass

@@ -46,4 +47,4 @@

"Set to true to disable warnings when missing explicit support for a tag",
type="bool",
default=True,
type="string",
default="",
)

@@ -63,3 +64,2 @@ parser.addoption("--asdf-tests", action="store_true", help="Enable ASDF schema tests")

ignore_unrecognized_tag=False,
ignore_version_mismatch=False,
skip_tests=None,

@@ -80,3 +80,2 @@ xfail_tests=None,

result.ignore_unrecognized_tag = ignore_unrecognized_tag
result.ignore_version_mismatch = ignore_version_mismatch
result.skip_tests = [] if skip_tests is None else skip_tests

@@ -107,3 +106,2 @@ result.xfail_tests = [] if xfail_tests is None else xfail_tests

ignore_unrecognized_tag=self.ignore_unrecognized_tag,
ignore_version_mismatch=self.ignore_version_mismatch,
name=name,

@@ -201,3 +199,2 @@ )

ignore_unrecognized_tag=False,
ignore_version_mismatch=False,
**kwargs,

@@ -214,3 +211,2 @@ ):

result.ignore_unrecognized_tag = ignore_unrecognized_tag
result.ignore_version_mismatch = ignore_version_mismatch
return result

@@ -229,3 +225,2 @@

ignore_unrecognized_tag=self.ignore_unrecognized_tag,
ignore_version_mismatch=self.ignore_version_mismatch,
)

@@ -298,3 +293,10 @@

ignore_version_mismatch = parent.config.getini("asdf_schema_ignore_version_mismatch")
if ignore_version_mismatch != "":
from asdf.exceptions import AsdfDeprecationWarning
warnings.warn(
"asdf_schema_ignore_version_mismatch is deprecated and has done nothing since asdf 3.0.0",
AsdfDeprecationWarning,
)
skip_tests = _parse_test_list(parent.config.getini("asdf_schema_skip_tests"))

@@ -326,3 +328,2 @@ xfail_tests = _parse_test_list(parent.config.getini("asdf_schema_xfail_tests"))

ignore_unrecognized_tag=ignore_unrecognized_tag,
ignore_version_mismatch=ignore_version_mismatch,
skip_tests=schema_skip_tests,

@@ -329,0 +330,0 @@ xfail_tests=schema_xfail_tests,

@@ -10,6 +10,2 @@ ASDF - Advanced Scientific Data Format

.. image:: https://github.com/asdf-format/asdf/workflows/s390x/badge.svg
:target: https://github.com/asdf-format/asdf/actions
:alt: s390x Status
.. image:: https://github.com/asdf-format/asdf/workflows/Downstream/badge.svg

@@ -193,2 +189,9 @@ :target: https://github.com/asdf-format/asdf/actions

.. warning::
The ``copy_arrays`` argument of `asdf.open()` and `AsdfFile` is deprecated,
and will be removed in ASDF 4.0. It is replaced by ``memmap``, which
is the opposite of ``copy_arrays`` (``memmap == not copy_arrays``).
In ASDF 4.0, ``memmap`` will default to ``False``, which means arrays
will no longer be memory-mapped by default.
To get a quick overview of the data stored in the file, use the top-level

@@ -254,3 +257,3 @@ `AsdfFile.info()` method:

By default, uncompressed data blocks are memory mapped for efficient
access. Memory mapping can be disabled by using the ``copy_arrays``
access. Memory mapping can be disabled by using the ``memmap``
option of `open` when reading:

@@ -260,3 +263,3 @@

af = asdf.open("example.asdf", copy_arrays=True)
af = asdf.open("example.asdf", memmap=False)

@@ -263,0 +266,0 @@ .. _end-read-file-text:

git+https://github.com/asdf-format/asdf-standard
git+https://github.com/asdf-format/asdf-transform-schemas
git+https://github.com/yaml/pyyaml.git
git+https://github.com/python-attrs/attrs
numpy>=0.0.dev0
# although we don't use scipy, we include it here so that any dependency
# that uses it during these tests will use the development version
# which is more likely to work with the above development version of numpy
scipy>=0.0.dev0

@@ -325,3 +325,3 @@ [tox]

# https://github.com/sunpy/sunpy/pull/7432
pytest dkist \
pytest dkist --benchmark-skip \
-W "ignore::asdf.exceptions.AsdfManifestURIMismatchWarning"
name: s390x
on:
workflow_dispatch:
schedule:
- cron: '0 8 * * 1' # Every Monday at 6am UTC
pull_request:
# We also want this workflow triggered if the `s390x` label is
# added or present when PR is updated
types:
- synchronize
- labeled
push:
tags:
- '*'
# Only cancel in-progress jobs or runs for the current workflow
# This cancels the already triggered workflows for a specific PR without canceling
# other instances of this workflow (other PRs, scheduled triggers, etc) when something
# within that PR re-triggers this CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
exotic_architechtures:
runs-on: ubuntu-20.04
name: Python 3.9
if: (github.repository == 'asdf-format/asdf' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 's390x')))
env:
ARCH_ON_CI: ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64
- arch: s390x
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: uraimo/run-on-arch-action@v2
name: Run tests
id: build
with:
arch: ${{ matrix.arch }}
distro: ubuntu_rolling
shell: /bin/bash
install: |
apt-get update -q -y
apt-get install -q -y git \
g++ \
pkg-config \
python3 \
python3-astropy \
python3-lz4 \
python3-numpy \
python3-scipy \
python3-venv \
python3-wheel
run: |
python3 -m venv --system-site-packages tests
source tests/bin/activate
pip3 install --upgrade pip setuptools pytest pytest-remotedata
pip3 install -e .[all,tests]
pip3 list
python3 -m pytest --remote-data
import os
import sys
import pytest
from asdf import open as asdf_open
from asdf import versioning
from ._helpers import assert_tree_match
_REFFILE_PATH = os.path.join(os.path.dirname(__file__), "..", "..", "asdf-standard", "reference_files")
def get_test_id(reference_file_path):
"""Helper function to return the informative part of a schema path"""
path = os.path.normpath(str(reference_file_path))
return os.path.sep.join(path.split(os.path.sep)[-3:])
def collect_reference_files():
"""Function used by pytest to collect ASDF reference files for testing."""
for version in versioning.supported_versions:
version_dir = os.path.join(_REFFILE_PATH, str(version))
if os.path.exists(version_dir):
for filename in os.listdir(version_dir):
if filename.endswith(".asdf"):
filepath = os.path.join(version_dir, filename)
basename, _ = os.path.splitext(filepath)
if os.path.exists(basename + ".yaml"):
yield filepath
def _compare_trees(name_without_ext, expect_warnings=False):
asdf_path = name_without_ext + ".asdf"
yaml_path = name_without_ext + ".yaml"
with asdf_open(asdf_path) as af_handle:
af_handle.resolve_references()
with asdf_open(yaml_path) as ref:
def _compare_func():
assert_tree_match(af_handle.tree, ref.tree, funcname="assert_allclose")
if expect_warnings:
# Make sure to only suppress warnings when they are expected.
# However, there's still a chance of missing warnings that we
# actually care about here.
with pytest.warns(RuntimeWarning):
_compare_func()
else:
_compare_func()
@pytest.mark.parametrize("reference_file", collect_reference_files(), ids=get_test_id)
def test_reference_file(reference_file):
basename = os.path.basename(reference_file)
name_without_ext, _ = os.path.splitext(reference_file)
known_fail = False
expect_warnings = "complex" in reference_file
if sys.maxunicode <= 65535:
known_fail = known_fail or (basename in ("unicode_spp.asdf"))
try:
_compare_trees(name_without_ext, expect_warnings=expect_warnings)
except Exception:
if known_fail:
pytest.xfail()
else:
raise

Sorry, the diff of this file is too big to display