From 91db5b9ce73f7c110ad4383a79a1a7ef03b84699 Mon Sep 17 00:00:00 2001 From: Jj Date: Thu, 2 Sep 2021 12:17:16 -0500 Subject: [PATCH 1/2] Remove Path() char validation, #377 --- scrunch/order.py | 10 ---------- scrunch/tests/test_utilities.py | 4 ---- 2 files changed, 14 deletions(-) diff --git a/scrunch/order.py b/scrunch/order.py index 77d49ddc..7c5cd84e 100644 --- a/scrunch/order.py +++ b/scrunch/order.py @@ -17,16 +17,6 @@ def __init__(self, path): if not isinstance(path, six.string_types): raise TypeError('The path must be a string object') - if six.PY2: - regex_match = re.match(NAME_REGEX, path.decode('utf-8')) - else: - regex_match = re.match(NAME_REGEX, path) - - if not regex_match: - raise InvalidPathError( - 'Invalid path %s: it contains invalid characters.' % path - ) - self.path = path @property diff --git a/scrunch/tests/test_utilities.py b/scrunch/tests/test_utilities.py index 918cc57f..0f845284 100644 --- a/scrunch/tests/test_utilities.py +++ b/scrunch/tests/test_utilities.py @@ -296,10 +296,6 @@ def test_path(self): Path(1234) assert str(excinfo.value) == 'The path must be a string object' - with pytest.raises(InvalidPathError) as excinfo: - Path('|If Skadeförsäkring') - assert str(excinfo.value) == 'Invalid path |If Skadeförsäkring: it contains invalid characters.' - Path('|If Skadeförsäkring') Path('|æøå') From 2993e7699e4ded069d9618605f83407767fd1cd9 Mon Sep 17 00:00:00 2001 From: Jj Date: Thu, 2 Sep 2021 14:08:40 -0500 Subject: [PATCH 2/2] Pin cr.cube to 2.3.9 for Py2.7 compat --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 23e5a2f8..41077217 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ 'pycrunch>=0.4.11', 'requests', 'six', - 'cr.cube', + 'cr.cube==2.3.9', 'importlib_metadata', ], extras_require={