Skip to content

Commit

Permalink
Merge pull request #1596 from braingram/load_custom_schema
Browse files Browse the repository at this point in the history
Remove deprecated load_custom_schema
  • Loading branch information
braingram committed Aug 7, 2023
2 parents 0ff03d5 + 977ebe4 commit b1540cd
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 19 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The ASDF Standard is at v1.6.0
- 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]

2.15.1 (2023-08-07)
-------------------
Expand Down
1 change: 0 additions & 1 deletion asdf/_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def _clear_schema_cache():
yield
schema._load_schema.cache_clear()
schema._load_schema_cached.cache_clear()
schema.load_custom_schema.cache_clear()


@pytest.fixture()
Expand Down
7 changes: 0 additions & 7 deletions asdf/_tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,13 +1035,6 @@ def test_custom_validation_with_external_ref_bad(tmp_path):
pass


def test_load_custom_schema_deprecated():
custom_schema_path = helpers.get_test_data_path("custom_schema.yaml")

with pytest.deprecated_call():
schema.load_custom_schema(custom_schema_path)


def test_load_schema_resolve_local_refs_deprecated():
custom_schema_path = helpers.get_test_data_path("custom_schema_definitions.yaml")

Expand Down
9 changes: 0 additions & 9 deletions asdf/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,15 +389,6 @@ def get_schema(url):
)


@lru_cache
def load_custom_schema(url):
warnings.warn(
"The 'load_custom_schema(...)' function is deprecated. Use 'load_schema' instead.",
AsdfDeprecationWarning,
)
return load_schema(url, resolve_references=True)


def load_schema(url, resolver=None, resolve_references=False, resolve_local_refs=False):
"""
Load a schema from the given URL.
Expand Down
2 changes: 0 additions & 2 deletions docs/asdf/developer_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,6 @@ schema loader.

**_load_draft4_metaschema:**

**load_custom_schema:** Deals with custom schemas.

**load_schema:** Loads a schema from the specified location (this is cached).
Called for every tag encountered (uses resolver machinery). Most of the
complexity is in resolving json references. Calls ``_make_schema_loader,
Expand Down

0 comments on commit b1540cd

Please sign in to comment.