diff --git a/CHANGES.rst b/CHANGES.rst
index 809ddc44b..3edd1b945 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -20,6 +20,8 @@
- Improve warning message when falling back to an older schema,
and note that fallback behavior will be removed in 3.0. [#806]
+- Drop support for jsonschema 2.x. [#807]
+
2.6.1 (unreleased)
------------------
diff --git a/asdf/compat/jsonschemacompat.py b/asdf/compat/jsonschemacompat.py
deleted file mode 100644
index fa4c171f5..000000000
--- a/asdf/compat/jsonschemacompat.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from ..util import minversion
-
-
-__all__ = ['JSONSCHEMA_LT_3']
-
-
-JSONSCHEMA_LT_3 = not minversion('jsonschema', '3.0.0')
diff --git a/asdf/schema.py b/asdf/schema.py
index 4d7d56809..4aacbd2fe 100644
--- a/asdf/schema.py
+++ b/asdf/schema.py
@@ -21,7 +21,6 @@
from . import reference
from . import treeutil
from . import util
-from .compat.jsonschemacompat import JSONSCHEMA_LT_3
from . import extension
from .exceptions import AsdfDeprecationWarning, AsdfWarning
@@ -249,29 +248,20 @@ def _make_seen_key(self, instance, schema):
def _create_validator(validators=YAML_VALIDATORS, visit_repeat_nodes=False):
meta_schema = _load_schema_cached(YAML_SCHEMA_METASCHEMA_ID, extension.get_default_resolver(), False, False)
- if JSONSCHEMA_LT_3:
- base_cls = mvalidators.create(meta_schema=meta_schema, validators=validators)
- else:
- type_checker = mvalidators.Draft4Validator.TYPE_CHECKER.redefine_many({
- 'array': lambda checker, instance: isinstance(instance, list) or isinstance(instance, tuple),
- 'integer': lambda checker, instance: not isinstance(instance, bool) and isinstance(instance, Integral),
- 'string': lambda checker, instance: isinstance(instance, (str, np.str_)),
- })
- id_of = mvalidators.Draft4Validator.ID_OF
- base_cls = mvalidators.create(
- meta_schema=meta_schema,
- validators=validators,
- type_checker=type_checker,
- id_of=id_of
- )
+ type_checker = mvalidators.Draft4Validator.TYPE_CHECKER.redefine_many({
+ 'array': lambda checker, instance: isinstance(instance, list) or isinstance(instance, tuple),
+ 'integer': lambda checker, instance: not isinstance(instance, bool) and isinstance(instance, Integral),
+ 'string': lambda checker, instance: isinstance(instance, (str, np.str_)),
+ })
+ id_of = mvalidators.Draft4Validator.ID_OF
+ base_cls = mvalidators.create(
+ meta_schema=meta_schema,
+ validators=validators,
+ type_checker=type_checker,
+ id_of=id_of
+ )
class ASDFValidator(base_cls):
- if JSONSCHEMA_LT_3:
- DEFAULT_TYPES = base_cls.DEFAULT_TYPES.copy()
- DEFAULT_TYPES['array'] = (list, tuple)
- DEFAULT_TYPES['integer'] = (Integral)
- DEFAULT_TYPES['string'] = (str, np.str_)
-
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._context = _ValidationContext()
diff --git a/docs/asdf/install.rst b/docs/asdf/install.rst
index bf045a46e..3dab6efdb 100644
--- a/docs/asdf/install.rst
+++ b/docs/asdf/install.rst
@@ -12,15 +12,15 @@ Requirements
The ``asdf`` package has the following dependencies:
-- `python `__ 3.3 or later
+- `python `__ 3.5 or later
-- `numpy `__ 1.8 or later
+- `numpy `__ 1.10 or later
-- `jsonschema `__ 2.3.0 or later
+- `jsonschema `__ 3.0.2 or later
- `pyyaml `__ 3.10 or later
-- `semantic_version `__ 2.3.1 or later
+- `semantic_version `__ 2.8 or later
Support for units, time, transform, wcs, or running the tests also
requires:
@@ -32,10 +32,6 @@ compression is provided by:
- `lz4 `__ 0.10 or later
-Also required for running the tests:
-
-- `pytest-astropy `__
-
Installing with pip
===================
diff --git a/setup.cfg b/setup.cfg
index d71700369..c69052304 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -31,8 +31,8 @@ include_package_data = True
install_requires =
semantic_version>=2.8
pyyaml>=3.10
- jsonschema>=2.3,<4
- numpy>=1.8
+ jsonschema>=3.0.2,<4
+ numpy>=1.10
[options.extras_require]
all =
diff --git a/tox.ini b/tox.ini
index dc3cb008b..f166e673b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,9 +15,9 @@ deps=
# isn't compatible with the older versions of numpy
# that we test with.
py35,py36: gwcs==0.9.1
- legacy: semantic_version==2.3.1
+ legacy: semantic_version==2.8
legacy: pyyaml==3.10
- legacy: jsonschema==2.3
+ legacy: jsonschema==3.0.2
legacy: numpy~=1.10.0
numpy11,numpy12,legacy: astropy~=3.0.0
numpy11: numpy==1.11