forked from pool/python-rfc3339-validator
Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| c0fc6bc687 | |||
| 8d59b6903a | |||
| d12250bec3 | |||
| 8ad3bd3925 |
68
python-rfc3339-validator-no-six.patch
Normal file
68
python-rfc3339-validator-no-six.patch
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
Index: rfc3339_validator-0.1.4/rfc3339_validator.egg-info/requires.txt
|
||||||
|
===================================================================
|
||||||
|
--- rfc3339_validator-0.1.4.orig/rfc3339_validator.egg-info/requires.txt
|
||||||
|
+++ rfc3339_validator-0.1.4/rfc3339_validator.egg-info/requires.txt
|
||||||
|
@@ -1 +0,0 @@
|
||||||
|
-six
|
||||||
|
Index: rfc3339_validator-0.1.4/rfc3339_validator.py
|
||||||
|
===================================================================
|
||||||
|
--- rfc3339_validator-0.1.4.orig/rfc3339_validator.py
|
||||||
|
+++ rfc3339_validator-0.1.4/rfc3339_validator.py
|
||||||
|
@@ -6,11 +6,9 @@ __version__ = '0.1.4'
|
||||||
|
|
||||||
|
import re
|
||||||
|
import calendar
|
||||||
|
-import six
|
||||||
|
|
||||||
|
RFC3339_REGEX_FLAGS = 0
|
||||||
|
-if six.PY3:
|
||||||
|
- RFC3339_REGEX_FLAGS |= re.ASCII
|
||||||
|
+RFC3339_REGEX_FLAGS |= re.ASCII
|
||||||
|
|
||||||
|
RFC3339_REGEX = re.compile(r"""
|
||||||
|
^
|
||||||
|
Index: rfc3339_validator-0.1.4/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- rfc3339_validator-0.1.4.orig/setup.py
|
||||||
|
+++ rfc3339_validator-0.1.4/setup.py
|
||||||
|
@@ -8,9 +8,7 @@ from setuptools import setup, find_packa
|
||||||
|
with open('README.md') as readme_file:
|
||||||
|
readme = readme_file.read()
|
||||||
|
|
||||||
|
-requirements = [
|
||||||
|
- 'six',
|
||||||
|
-]
|
||||||
|
+requirements = []
|
||||||
|
|
||||||
|
setup_requirements = []
|
||||||
|
|
||||||
|
Index: rfc3339_validator-0.1.4/tests/test_rfc3339_validator.py
|
||||||
|
===================================================================
|
||||||
|
--- rfc3339_validator-0.1.4.orig/tests/test_rfc3339_validator.py
|
||||||
|
+++ rfc3339_validator-0.1.4/tests/test_rfc3339_validator.py
|
||||||
|
@@ -8,7 +8,6 @@ from rfc3339_validator import validate_r
|
||||||
|
import strict_rfc3339
|
||||||
|
from hypothesis import given, settings, example
|
||||||
|
import hypothesis.strategies as st
|
||||||
|
-import six
|
||||||
|
|
||||||
|
# It is supposed to be used to generate both valid and invalid dates
|
||||||
|
RFC3339_REGEX = r"""
|
||||||
|
@@ -30,16 +29,11 @@ RFC3339_REGEX = r"""
|
||||||
|
)
|
||||||
|
$
|
||||||
|
"""
|
||||||
|
-if six.PY3:
|
||||||
|
- RFC3339_REGEX_FLAG = re.X | re.A
|
||||||
|
-else:
|
||||||
|
- RFC3339_REGEX_FLAG = re.X
|
||||||
|
+RFC3339_REGEX_FLAG = re.X | re.A
|
||||||
|
RFC3339_REGEX_ASCII = re.compile(RFC3339_REGEX, RFC3339_REGEX_FLAG)
|
||||||
|
RFC3339_REGEX_UNICODE = re.compile(RFC3339_REGEX, re.X)
|
||||||
|
|
||||||
|
|
||||||
|
-@pytest.mark.skipif(six.PY2, reason="Requires python3 or higher, because strftime on python 2 only supports dates "
|
||||||
|
- "newer than 1900")
|
||||||
|
@given(datetime_str=st.datetimes().filter(lambda d: d.year > 1000).map(lambda d: d.strftime("%Y-%m-%dT%H:%M:%SZ")))
|
||||||
|
def test_valid_dates(datetime_str):
|
||||||
|
assert validate_rfc3339(datetime_str)
|
||||||
@@ -1,4 +1,16 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 11 13:18:42 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to pip-based build
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 5 09:53:54 UTC 2023 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- do not require six
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/naimetti/rfc3339-validator/issues/11
|
||||||
|
+ python-rfc3339-validator-no-six.patch
|
||||||
|
|
||||||
Fri Apr 21 12:33:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Fri Apr 21 12:33:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
- add sle15_python_module_pythons (jsc#PED-68)
|
- add sle15_python_module_pythons (jsc#PED-68)
|
||||||
@@ -6,4 +18,4 @@ Fri Apr 21 12:33:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 5 07:08:11 UTC 2022 - John Vandenberg <jayvdb@gmail.com>
|
Mon Sep 5 07:08:11 UTC 2022 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
- Initial spec for v0.1.4
|
- Initial spec for v0.1.4
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-rfc3339-validator
|
# spec file for package python-rfc3339-validator
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-rfc3339-validator
|
Name: python-rfc3339-validator
|
||||||
Version: 0.1.4
|
Version: 0.1.4
|
||||||
@@ -25,15 +24,17 @@ Summary: A pure python RFC3339 validator
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/naimetti/rfc3339-validator
|
URL: https://github.com/naimetti/rfc3339-validator
|
||||||
Source: https://files.pythonhosted.org/packages/source/r/rfc3339_validator/rfc3339_validator-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/r/rfc3339_validator/rfc3339_validator-%{version}.tar.gz
|
||||||
|
# https://github.com/naimetti/rfc3339-validator/issues/11
|
||||||
|
Patch0: python-rfc3339-validator-no-six.patch
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-six
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module hypothesis}
|
BuildRequires: %{python_module hypothesis}
|
||||||
BuildRequires: %{python_module pytest >= 3}
|
BuildRequires: %{python_module pytest >= 3}
|
||||||
BuildRequires: %{python_module six}
|
|
||||||
BuildRequires: %{python_module strict-rfc3339}
|
BuildRequires: %{python_module strict-rfc3339}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@@ -42,13 +43,13 @@ BuildRequires: %{python_module strict-rfc3339}
|
|||||||
A pure python RFC3339 validator
|
A pure python RFC3339 validator
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n rfc3339_validator-%{version}
|
%autosetup -p1 -n rfc3339_validator-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -56,7 +57,7 @@ A pure python RFC3339 validator
|
|||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%{python_sitelib}/rfc3339_validator.py
|
%{python_sitelib}/rfc3339_validator.py
|
||||||
%pycache_only %{python_sitelib}/__pycache__/
|
%pycache_only %{python_sitelib}/__pycache__/rfc3339_validator*
|
||||||
%{python_sitelib}/rfc3339_validator-*.egg-info/
|
%{python_sitelib}/rfc3339_validator-%{version}*-info/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user