Skip to content

Commit 7ecdbcd

Browse files
committed
format_nongpl docs, and style fixes
1 parent 10f8a3e commit 7ecdbcd

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

docs/spelling-wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ HD
3939

4040
Berman
4141
Freenode
42+
GPL

docs/validate.rst

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,26 @@ to validate. Their names can be viewed by inspecting the
321321
`FormatChecker.checkers` attribute. Certain checkers will only be
322322
available if an appropriate package is available for use. The easiest way to
323323
ensure you have what is needed is to install ``jsonschema`` using the
324-
``format`` setuptools extra -- i.e.
324+
``format`` or ``format_nongpl`` setuptools extra -- i.e.
325325

326326
.. code-block:: sh
327327
328328
$ pip install jsonschema[format]
329329
330-
which will install all of the below dependencies for all formats. The
331-
more specific list of available checkers, along with their requirement
330+
which will install all of the below dependencies for all formats.
331+
332+
Or if you want to install MIT-license compatible dependencies only:
333+
334+
.. code-block:: sh
335+
336+
$ pip install jsonschema[format_nongpl]
337+
338+
The non-GPL extra is intended to not install any direct dependencies
339+
that are GPL (but that of course end-users should do their own verification).
340+
At the moment, it supports all the available checkers except for ``iri`` and
341+
``iri-reference``.
342+
343+
The more specific list of available checkers, along with their requirement
332344
(if any,) are listed below.
333345

334346
.. note::
@@ -342,7 +354,7 @@ Checker Notes
342354
========================= ====================
343355
``color`` requires webcolors_
344356
``date``
345-
``date-time`` requires strict-rfc3339_
357+
``date-time`` requires strict-rfc3339_ or rfc3339-validator_
346358
``email``
347359
``hostname``
348360
``idn-hostname`` requires idna_
@@ -353,9 +365,9 @@ Checker Notes
353365
``json-pointer`` requires jsonpointer_
354366
``regex``
355367
``relative-json-pointer`` requires jsonpointer_
356-
``time`` requires strict-rfc3339_
357-
``uri`` requires rfc3987_
358-
``uri-reference`` requires rfc3987_
368+
``time`` requires strict-rfc3339_ or rfc3339-validator_
369+
``uri`` requires rfc3987_ or rfc3986-validator_
370+
``uri-reference`` requires rfc3987_ or rfc3986-validator_
359371
========================= ====================
360372

361373

@@ -365,7 +377,8 @@ Checker Notes
365377
.. _rfc5322: https://tools.ietf.org/html/rfc5322#section-3.4.1
366378
.. _strict-rfc3339: https://pypi.org/pypi/strict-rfc3339/
367379
.. _webcolors: https://pypi.org/pypi/webcolors/
368-
380+
.. _rfc3339-validator: https://pypi.org/project/rfc3339-validator/
381+
.. _rfc3986-validator: https://pypi.org/project/rfc3986-validator/
369382

370383
.. note::
371384

jsonschema/_format.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,12 @@ def is_idn_host_name(instance):
248248
try:
249249
import rfc3987
250250
except ImportError:
251-
252251
try:
253252
from rfc3986_validator import validate_rfc3986
254253
except ImportError:
255254
pass
256255
else:
257-
@_checks_drafts(name="uri",)
256+
@_checks_drafts(name="uri")
258257
def is_uri(instance):
259258
if not isinstance(instance, str_types):
260259
return True

0 commit comments

Comments
 (0)