Skip to content

Commit

Permalink
Try dropping jsonschema dependency (#59)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Steven Silvester <[email protected]>
  • Loading branch information
3 people authored Jan 10, 2023
1 parent 8eaf90c commit 41abf33
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion jupyter_events/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
from typing import Type, Union

from jsonschema import FormatChecker, validators
from jsonschema.protocols import Validator

try:
from jsonschema.protocols import Validator
except ImportError:
from typing import Any

Validator = Any # type:ignore

from . import yaml
from .validators import draft7_format_checker, validate_schema
Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ classifiers = [
"Programming Language :: Python :: 3",
]
dependencies = [
"jsonschema[format-nongpl,format_nongpl]>=4.3.0",
"jsonschema[format-nongpl,format_nongpl]>=3.2.0,<4",
"python-json-logger>=2.0.4",
"pyyaml>=6.0",
"traitlets>=5.3",
# The following are necessary to address an issue where pyproject.toml normalizes extra dependencies
# such that 'format_nongpl' is normalized to 'format-nongpl' which prevents these two validators from
# from being installed when jsonschema is <= 4.9 because jsonschema uses 'format_nongpl' in those releases.
"rfc3339-validator",
"rfc3986-validator>=0.1.1",
]
dynamic = [
"version",
Expand Down

0 comments on commit 41abf33

Please sign in to comment.