Skip to content

Commit 9b61e11

Browse files
authored
Merge pull request #613 from dcs4cop/pont-612-rfc3339
Update rfc3339-related dependencies
2 parents 23dceb8 + 310a532 commit 9b61e11

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
### Other
88

9+
* Replace the dependency on the rfc3339-validator PyPI package with a
10+
dependency on its recently created conda-forge package.
11+
12+
* Remove unneeded dependency on the no longer used strict-rfc3339 package.
13+
914
## Changes in 0.10.1
1015

1116
### Fixes

environment.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ dependencies:
3131
- rasterio >=1.2
3232
- requests >=2.25
3333
- requests-oauthlib >=1.3
34+
- rfc3339-validator >=0.1.4 # for python-jsonschema date-time format validation
3435
- s3fs >=2021.6
3536
- scipy >=1.6.0
3637
- setuptools >=41.0
3738
- shapely >=1.6
38-
- strict-rfc3339 >=0.7 # for python-jsonschema date-time format validation
3939
- tornado >=6.0
4040
- urllib3 >=1.26
4141
- xarray >=0.19
@@ -46,6 +46,3 @@ dependencies:
4646
- pytest >=4.4
4747
- pytest-cov >=2.6
4848
- requests-mock >=1.8.0
49-
- pip
50-
- pip:
51-
- rfc3339-validator

xcube/util/jsonschema.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@
2121

2222
import collections.abc
2323
from abc import ABC, abstractmethod
24-
from typing import Dict, Any, Callable, Mapping, Sequence, Union, Tuple, Optional
24+
from typing import Dict, Any, Callable, Mapping, Sequence, Union, Tuple, \
25+
Optional
2526

26-
# Make sure strict-rfc3339 package is installed. The package jsonschema uses it for validating
27-
# instances of the JsonDateSchema and JsonDatetimeSchema.
28-
from xcube.util.assertions import assert_true
2927
from xcube.util.assertions import assert_instance
28+
from xcube.util.assertions import assert_true
29+
30+
# Make sure rfc3339-validator package is installed : jsonschema uses it for
31+
# validating instances of JsonDateSchema and JsonDatetimeSchema.
32+
# Use of __import__ avoids "unused package" warnings.
33+
__import__('rfc3339_validator')
3034

31-
__import__('strict_rfc3339')
3235
import jsonschema
3336

3437
from xcube.util.ipython import register_json_formatter

0 commit comments

Comments
 (0)