Compare commits
No commits in common. "c10" and "c8" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
python-dateutil-2.8.2.tar.gz
|
SOURCES/dateutil-2.6.1.tar.gz
|
||||||
|
1
.python-dateutil.metadata
Normal file
1
.python-dateutil.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
33b66da1a9118550d4ef5350b0cfdb72e1f7774a SOURCES/dateutil-2.6.1.tar.gz
|
@ -1,46 +0,0 @@
|
|||||||
From 2bdd63158b7f981fc6d70a869680451bdfd8d848 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Jakub=20Kul=C3=ADk?= <kulikjak@gmail.com>
|
|
||||||
Date: Thu, 10 Feb 2022 10:28:42 +0100
|
|
||||||
Subject: [PATCH] Remove deprecated pytest.warns(None) from test_internals.py
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/test_internals.py | 14 +++++++-------
|
|
||||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/test_internals.py b/tests/test_internals.py
|
|
||||||
index 530813147..b32e6723f 100644
|
|
||||||
--- a/tests/test_internals.py
|
|
||||||
+++ b/tests/test_internals.py
|
|
||||||
@@ -9,6 +9,7 @@
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import pytest
|
|
||||||
+import warnings
|
|
||||||
|
|
||||||
from dateutil.parser._parser import _ymd
|
|
||||||
from dateutil import tz
|
|
||||||
@@ -65,18 +66,17 @@ def test_parser_parser_private_not_warns():
|
|
||||||
from dateutil.parser._parser import _timelex, _tzparser
|
|
||||||
from dateutil.parser._parser import _parsetz
|
|
||||||
|
|
||||||
- with pytest.warns(None) as recorder:
|
|
||||||
+ with warnings.catch_warnings():
|
|
||||||
+ warnings.simplefilter("error")
|
|
||||||
_tzparser()
|
|
||||||
- assert len(recorder) == 0
|
|
||||||
|
|
||||||
- with pytest.warns(None) as recorder:
|
|
||||||
+ with warnings.catch_warnings():
|
|
||||||
+ warnings.simplefilter("error")
|
|
||||||
_timelex('2014-03-03')
|
|
||||||
|
|
||||||
- assert len(recorder) == 0
|
|
||||||
-
|
|
||||||
- with pytest.warns(None) as recorder:
|
|
||||||
+ with warnings.catch_warnings():
|
|
||||||
+ warnings.simplefilter("error")
|
|
||||||
_parsetz('+05:00')
|
|
||||||
- assert len(recorder) == 0
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.tzstr
|
|
@ -1,62 +1,37 @@
|
|||||||
%global modname dateutil
|
%global modname dateutil
|
||||||
|
|
||||||
Name: python-%{modname}
|
Name: python-%{modname}
|
||||||
Version: 2.8.2
|
Version: 2.6.1
|
||||||
Release: 15%{?dist}
|
Release: 6%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: Powerful extensions to the standard datetime module
|
Summary: Powerful extensions to the standard datetime module
|
||||||
|
|
||||||
# According to the LICENSE file:
|
Group: Development/Languages
|
||||||
# - Apache-2.0 applies to all contributions after 2017-12-01, as well as
|
License: BSD
|
||||||
# all contributions that have been re-licensed.
|
|
||||||
# - BSD-3-Clause applies to all code, even that also covered by Apache-2.0
|
|
||||||
License: (Apache-2.0 AND BSD-3-Clause) OR BSD-3-Clause
|
|
||||||
|
|
||||||
URL: https://github.com/dateutil/dateutil
|
URL: https://github.com/dateutil/dateutil
|
||||||
Source: %{pypi_source}
|
Source0: https://github.com/dateutil/dateutil/archive/%{version}/%{modname}-%{version}.tar.gz
|
||||||
|
|
||||||
# Remove deprecated pytest.warns(None) from test_internals.py
|
|
||||||
#
|
|
||||||
# Fixes:
|
|
||||||
# python-dateutil fails to build with pytest 7
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2059950
|
|
||||||
Patch1: %{url}/commit/2bdd63158b7f981fc6d70a869680451bdfd8d848.patch
|
|
||||||
|
|
||||||
# Backport the replacement for the deprecated in Python 3.12
|
|
||||||
# datetime.datetime.utcfromtimestamp()
|
|
||||||
Patch2: %{url}/commit/f2293200747fb03d56c6c5997bfebeabe703576f.patch
|
|
||||||
|
|
||||||
# when bootstrapping dateutil-freezegun, we cannot run tests
|
|
||||||
# on RHEL, we do not have or want all test dependencies
|
|
||||||
%bcond tests %{undefined rhel}
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: make
|
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
BuildRequires: python3-sphinx_rtd_theme
|
|
||||||
|
|
||||||
%global _description \
|
%description
|
||||||
The dateutil module provides powerful extensions to the standard datetime\
|
The dateutil module provides powerful extensions to the standard datetime
|
||||||
module available in Python.
|
module available in Python.
|
||||||
|
|
||||||
%description %_description
|
|
||||||
|
|
||||||
%package -n python3-%{modname}
|
%package -n python3-%{modname}
|
||||||
Summary: %summary
|
Summary: Powerful extensions to the standard datetime module
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: python3-setuptools
|
|
||||||
BuildRequires: python3-setuptools_scm
|
|
||||||
# Runtime deps
|
|
||||||
BuildRequires: python3-six
|
|
||||||
%if %{with tests}
|
|
||||||
BuildRequires: python3-freezegun
|
|
||||||
BuildRequires: python3-hypothesis
|
|
||||||
BuildRequires: python3-pytest
|
|
||||||
%endif
|
|
||||||
Requires: tzdata
|
|
||||||
%{?python_provide:%python_provide python3-%{modname}}
|
%{?python_provide:%python_provide python3-%{modname}}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-six
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
Requires: tzdata
|
||||||
|
Requires: python3-six
|
||||||
|
|
||||||
%description -n python3-%{modname} %_description
|
%description -n python3-dateutil
|
||||||
|
The dateutil module provides powerful extensions to the standard datetime
|
||||||
|
module available in Python.
|
||||||
|
|
||||||
|
This is the version for Python 3.
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: API documentation for python-dateutil
|
Summary: API documentation for python-dateutil
|
||||||
@ -64,13 +39,7 @@ Summary: API documentation for python-dateutil
|
|||||||
This package contains %{summary}.
|
This package contains %{summary}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -N
|
%autosetup -p0 -n %{modname}-%{version}
|
||||||
# the tests were moved outside of %%{modname} directory upstream after 2.8.2
|
|
||||||
# so we apply the patch with new paths from within it
|
|
||||||
pushd %{modname}/test
|
|
||||||
%patch -P1 -p2
|
|
||||||
popd
|
|
||||||
%patch -P2 -p2
|
|
||||||
iconv --from=ISO-8859-1 --to=UTF-8 NEWS > NEWS.new
|
iconv --from=ISO-8859-1 --to=UTF-8 NEWS > NEWS.new
|
||||||
mv NEWS.new NEWS
|
mv NEWS.new NEWS
|
||||||
|
|
||||||
@ -82,11 +51,7 @@ make -C docs html
|
|||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with tests}
|
%{__python3} setup.py test
|
||||||
%{__python3} -m pytest -W ignore::pytest.PytestUnknownMarkWarning
|
|
||||||
%else
|
|
||||||
%py3_check_import dateutil dateutil.easter dateutil.parser dateutil.relativedelta dateutil.rrule dateutil.tz dateutil.utils dateutil.zoneinfo
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n python3-%{modname}
|
%files -n python3-%{modname}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@ -99,126 +64,14 @@ make -C docs html
|
|||||||
%doc docs/_build/html
|
%doc docs/_build/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:2.8.2-15
|
* Mon Jul 16 2018 Honza Horak <hhorak@redhat.com> - 1:2.6.1-6
|
||||||
- Bump release for October 2024 mass rebuild:
|
- Change license to BSD
|
||||||
Resolves: RHEL-64018
|
|
||||||
|
|
||||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:2.8.2-14
|
* Wed Jun 13 2018 Petr Viktorin <pviktori@redhat.com> - 1:2.6.1-5
|
||||||
- Bump release for June 2024 mass rebuild
|
- Drop the python2 subpackage
|
||||||
|
|
||||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.2-13
|
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 1:2.6.1-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
- Use Python 3 Sphinx
|
||||||
|
|
||||||
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.2-12
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Nov 05 2023 Miro Hrončok <mhroncok@redhat.com> - 1:2.8.2-11
|
|
||||||
- Clarify the SPDX License tag
|
|
||||||
|
|
||||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.2-10
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jul 04 2023 Karolina Surma <ksurma@redhat.com> - 1:2.8.2-9
|
|
||||||
- Backport replacement for deprecated datetime.datetime.utcfromtimestamp()
|
|
||||||
|
|
||||||
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 1:2.8.2-8
|
|
||||||
- Rebuilt for Python 3.12
|
|
||||||
|
|
||||||
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 1:2.8.2-7
|
|
||||||
- Bootstrap for Python 3.12
|
|
||||||
|
|
||||||
* Wed Mar 01 2023 Gwyn Ciesla <gwync@protonmail.com> - 1:2.8.2-6
|
|
||||||
- migrated to SPDX license
|
|
||||||
|
|
||||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.2-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.2-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:2.8.2-3
|
|
||||||
- Rebuilt for Python 3.11
|
|
||||||
|
|
||||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:2.8.2-2
|
|
||||||
- Bootstrap for Python 3.11
|
|
||||||
|
|
||||||
* Thu Mar 10 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1:2.8.2-1
|
|
||||||
- Update to 3.8.2 (fix RHBZ#1982169)
|
|
||||||
- Backport 2bdd631: remove deprecated pytest.warns(None) (fix RHBZ#2059950)
|
|
||||||
|
|
||||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.1-8
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.1-7
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1:2.8.1-6
|
|
||||||
- Rebuilt for Python 3.10
|
|
||||||
|
|
||||||
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 1:2.8.1-5
|
|
||||||
- Bootstrap for Python 3.10
|
|
||||||
|
|
||||||
* Wed Jun 02 2021 Petr Viktorin <pviktori@redhat.com> - 1:2.8.1-4
|
|
||||||
- Add the ASL 2.0 license
|
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.1-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.1-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun May 31 2020 Gwyn Ciesla <gwync@protonmail.com> - 1:2.8.1-1
|
|
||||||
- 2.8.1
|
|
||||||
|
|
||||||
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1:2.8.0-10
|
|
||||||
- Rebuilt for Python 3.9
|
|
||||||
|
|
||||||
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1:2.8.0-9
|
|
||||||
- Bootstrap for Python 3.9
|
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.0-8
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jan 16 2020 Miro Hrončok <mhroncok@redhat.com> - 1:2.8.0-7
|
|
||||||
- Subpackage python2-dateutil has been removed
|
|
||||||
See https://fedoraproject.org/wiki/Changes/RetirePython2
|
|
||||||
|
|
||||||
* Fri Sep 13 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.8.0-6
|
|
||||||
- Reduce Python 2 build dependencies on Fedora 32
|
|
||||||
|
|
||||||
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.8.0-5
|
|
||||||
- Rebuilt for Python 3.8
|
|
||||||
|
|
||||||
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.8.0-4
|
|
||||||
- Bootstrap for Python 3.8
|
|
||||||
|
|
||||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.8.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Mar 06 2019 Petr Viktorin <pviktori@redhat.com> - 1:2.8.0-2
|
|
||||||
- Enable tests (but keep a few skipped on Python 2)
|
|
||||||
- Add explicit dependency on python3-sphinx_rtd_theme
|
|
||||||
- Remove test dependency on python2-hypothesis
|
|
||||||
|
|
||||||
* Wed Feb 06 2019 Gwyn Ciesla <limburgher@gmail.com> - 1:2.8.0-1
|
|
||||||
- 2.8.0
|
|
||||||
|
|
||||||
* Thu Jan 31 2019 Gwyn Ciesla <limburgher@gmail.com> - 1:2.7.5-1
|
|
||||||
- 2.7.5
|
|
||||||
|
|
||||||
* Sat Sep 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:2.7.3-1
|
|
||||||
- Update to 2.7.3
|
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.7.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 1:2.7.0-2
|
|
||||||
- Rebuilt for Python 3.7
|
|
||||||
|
|
||||||
* Mon Mar 12 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1:2.7.0-1
|
|
||||||
- Fix license tag (should be BSD)
|
|
||||||
- Update to latest version (#1469314)
|
|
||||||
See https://github.com/dateutil/dateutil/blob/master/NEWS for details.
|
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.6.1-3
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.6.1-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
@ -1,23 +0,0 @@
|
|||||||
From f2293200747fb03d56c6c5997bfebeabe703576f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Grainger <tagrain@gmail.com>
|
|
||||||
Date: Fri, 2 Jun 2023 14:06:41 +0100
|
|
||||||
Subject: [PATCH] avoid deprecated utcfromtimestamp
|
|
||||||
|
|
||||||
Fixes #1284
|
|
||||||
---
|
|
||||||
src/dateutil/tz/tz.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/dateutil/tz/tz.py b/src/dateutil/tz/tz.py
|
|
||||||
index c67f56d46..617591446 100644
|
|
||||||
--- a/src/dateutil/tz/tz.py
|
|
||||||
+++ b/src/dateutil/tz/tz.py
|
|
||||||
@@ -34,7 +34,7 @@
|
|
||||||
from warnings import warn
|
|
||||||
|
|
||||||
ZERO = datetime.timedelta(0)
|
|
||||||
-EPOCH = datetime.datetime.utcfromtimestamp(0)
|
|
||||||
+EPOCH = datetime.datetime(1970, 1, 1, 0, 0)
|
|
||||||
EPOCHORDINAL = EPOCH.toordinal()
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user