Remove reference to jsonschema.compat now removed upstream.
Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
This commit is contained in:
parent
1b55d25fec
commit
c6ec71b6de
1
AUTHORS
1
AUTHORS
@ -82,6 +82,7 @@ Thank you!
|
|||||||
* Luke Slater
|
* Luke Slater
|
||||||
* Manuel Urbano Santos
|
* Manuel Urbano Santos
|
||||||
* Marcel van der Boom
|
* Marcel van der Boom
|
||||||
|
* Marco Pessotto
|
||||||
* Mark Holmquist
|
* Mark Holmquist
|
||||||
* Mats Sjöberg
|
* Mats Sjöberg
|
||||||
* Matt Lee
|
* Matt Lee
|
||||||
|
@ -48,6 +48,7 @@ This chapter has important information about our current and previous releases.
|
|||||||
**Bug fixes:**
|
**Bug fixes:**
|
||||||
|
|
||||||
- Fix test suite on Debian 11 (Ben Sturmfels)
|
- Fix test suite on Debian 11 (Ben Sturmfels)
|
||||||
|
- Remove reference to jsonschema.compat no longer available upstream (Marco Pessotto)
|
||||||
|
|
||||||
|
|
||||||
0.11.0
|
0.11.0
|
||||||
|
@ -24,7 +24,6 @@ from pkg_resources import resource_filename
|
|||||||
import dateutil.parser
|
import dateutil.parser
|
||||||
from pyld import jsonld
|
from pyld import jsonld
|
||||||
from jsonschema import validate, FormatChecker, draft4_format_checker
|
from jsonschema import validate, FormatChecker, draft4_format_checker
|
||||||
from jsonschema.compat import str_types
|
|
||||||
|
|
||||||
from mediagoblin.tools.pluginapi import hook_handle
|
from mediagoblin.tools.pluginapi import hook_handle
|
||||||
|
|
||||||
@ -42,7 +41,7 @@ def is_uri(instance):
|
|||||||
"""
|
"""
|
||||||
jsonschema uri validator
|
jsonschema uri validator
|
||||||
"""
|
"""
|
||||||
if not isinstance(instance, str_types):
|
if not isinstance(instance, str):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return URL_REGEX.match(instance)
|
return URL_REGEX.match(instance)
|
||||||
@ -51,7 +50,7 @@ def is_datetime(instance):
|
|||||||
"""
|
"""
|
||||||
Is a date or datetime readable string.
|
Is a date or datetime readable string.
|
||||||
"""
|
"""
|
||||||
if not isinstance(instance, str_types):
|
if not isinstance(instance, str):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return dateutil.parser.parse(instance)
|
return dateutil.parser.parse(instance)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user