Replace whole repo with latest content from branch stream-2017.2-rhel-8.8.0
Content corresponds with RHEL dist-git commit 52425bb
This commit is contained in:
parent
6b854d7837
commit
d01fc73f8e
@ -1 +0,0 @@
|
|||||||
1
|
|
10
.gitignore
vendored
10
.gitignore
vendored
@ -1 +1,9 @@
|
|||||||
SOURCES/pytz-2017.2.zip
|
pytz-2010h.tar.gz
|
||||||
|
/pytz-2012d.tar.gz
|
||||||
|
/pytz-2015.4.tar.gz
|
||||||
|
/pytz-2015.7.tar.gz
|
||||||
|
/pytz-2016.4.tar.gz
|
||||||
|
/pytz-2016.6.1.tar.gz
|
||||||
|
/pytz-2016.7.tar.gz
|
||||||
|
/pytz-2016.10.tar.gz
|
||||||
|
/pytz-2017.2.zip
|
||||||
|
21
Makefile
Normal file
21
Makefile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Makefile for source rpm: pytz
|
||||||
|
# $Id$
|
||||||
|
NAME := pytz
|
||||||
|
SPECFILE = $(firstword $(wildcard *.spec))
|
||||||
|
|
||||||
|
define find-makefile-common
|
||||||
|
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||||
|
|
||||||
|
ifeq ($(MAKEFILE_COMMON),)
|
||||||
|
# attept a checkout
|
||||||
|
define checkout-makefile-common
|
||||||
|
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(MAKEFILE_COMMON)
|
@ -1,6 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-9
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
|
@ -1,16 +0,0 @@
|
|||||||
--- a/pytz/tests/test_tzinfo.py~ 2019-07-26 08:38:47.000000000 -0500
|
|
||||||
+++ b/pytz/tests/test_tzinfo.py 2019-07-26 08:40:12.751754602 -0500
|
|
||||||
@@ -184,8 +184,11 @@
|
|
||||||
# Python 3 introduced a new pickle protocol where numbers are stored in
|
|
||||||
# hexadecimal representation. Here we extract the pickle
|
|
||||||
# representation of the number for the current Python version.
|
|
||||||
- old_pickle_pattern = pickle.dumps(tz._utcoffset.seconds)[3:-1]
|
|
||||||
- new_pickle_pattern = pickle.dumps(new_utcoffset)[3:-1]
|
|
||||||
+ #
|
|
||||||
+ # Test protocol 3 on Python 3 and protocol 0 on Python 2.
|
|
||||||
+ protocol = (3 if sys.version_info >= (3,) else 0)
|
|
||||||
+ old_pickle_pattern = pickle.dumps(tz._utcoffset.seconds, protocol)[3:-1]
|
|
||||||
+ new_pickle_pattern = pickle.dumps(new_utcoffset, protocol)[3:-1]
|
|
||||||
hacked_p = p.replace(old_pickle_pattern, new_pickle_pattern)
|
|
||||||
|
|
||||||
self.assertNotEqual(p, hacked_p)
|
|
11
pytz.spec
11
pytz.spec
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
Name: pytz
|
Name: pytz
|
||||||
Version: 2017.2
|
Version: 2017.2
|
||||||
Release: 13%{?dist}
|
Release: 12%{?dist}
|
||||||
Summary: World Timezone Definitions for Python
|
Summary: World Timezone Definitions for Python
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -18,10 +18,6 @@ Source0: https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.zip
|
|||||||
Patch0: pytz-zoneinfo.patch
|
Patch0: pytz-zoneinfo.patch
|
||||||
# https://bugzilla.redhat.com/1497572
|
# https://bugzilla.redhat.com/1497572
|
||||||
Patch1: remove_tzinfo_test.patch
|
Patch1: remove_tzinfo_test.patch
|
||||||
# Remove tests failing due to changes in the handling of an ancient timezone
|
|
||||||
# See: https://bugzilla.redhat.com/show_bug.cgi?id=2176127
|
|
||||||
# Upstream commit: https://github.com/stub42/pytz/commit/07aa4d962dae5cb7ced4f61fe85a9001a01676df
|
|
||||||
Patch2: remove_amsterdam_pre_1937_tests.patch
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
@ -69,7 +65,6 @@ Almost all (over 540) of the Olson timezones are supported.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .zoneinfo
|
%patch0 -p1 -b .zoneinfo
|
||||||
%patch1 -p1 -b .removeTest
|
%patch1 -p1 -b .removeTest
|
||||||
%patch2 -p1 -b .disableTests
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -121,10 +116,6 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Mar 07 2023 Tomas Orsava <torsava@redhat.com> - 2017.2-13
|
|
||||||
- Remove tests for the AMT timezone from the first half of the 20th century
|
|
||||||
- Resolves: rhbz#2176127
|
|
||||||
|
|
||||||
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 2017.2-12
|
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 2017.2-12
|
||||||
- Bumping due to problems with modular RPM upgrade path
|
- Bumping due to problems with modular RPM upgrade path
|
||||||
- Resolves: rhbz#1695587
|
- Resolves: rhbz#1695587
|
||||||
|
@ -1,82 +0,0 @@
|
|||||||
From cf731c62ff7580ee96b6967671a4f2ada3a71b21 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Orsava <torsava@redhat.com>
|
|
||||||
Date: Tue, 7 Mar 2023 14:22:18 +0100
|
|
||||||
Subject: [PATCH] Remove tests failing due to changes in the handling of an
|
|
||||||
ancient timezone
|
|
||||||
|
|
||||||
See: https://bugzilla.redhat.com/show_bug.cgi?id=2176127
|
|
||||||
See also: https://github.com/stub42/pytz/commit/07aa4d962dae5cb7ced4f61fe85a9001a01676df
|
|
||||||
---
|
|
||||||
pytz/tests/test_tzinfo.py | 49 ---------------------------------------
|
|
||||||
1 file changed, 49 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pytz/tests/test_tzinfo.py b/pytz/tests/test_tzinfo.py
|
|
||||||
index beb0490..9472dce 100644
|
|
||||||
--- a/pytz/tests/test_tzinfo.py
|
|
||||||
+++ b/pytz/tests/test_tzinfo.py
|
|
||||||
@@ -601,35 +601,6 @@ class ReferenceUSEasternDSTEndTestCase(USEasternDSTEndTestCase):
|
|
||||||
|
|
||||||
class LocalTestCase(unittest.TestCase):
|
|
||||||
def testLocalize(self):
|
|
||||||
- loc_tz = pytz.timezone('Europe/Amsterdam')
|
|
||||||
-
|
|
||||||
- loc_time = loc_tz.localize(datetime(1930, 5, 10, 0, 0, 0))
|
|
||||||
- # Actually +00:19:32, but Python datetime rounds this
|
|
||||||
- self.assertEqual(loc_time.strftime('%Z%z'), 'AMT+0020')
|
|
||||||
-
|
|
||||||
- loc_time = loc_tz.localize(datetime(1930, 5, 20, 0, 0, 0))
|
|
||||||
- # Actually +00:19:32, but Python datetime rounds this
|
|
||||||
- self.assertEqual(loc_time.strftime('%Z%z'), 'NST+0120')
|
|
||||||
-
|
|
||||||
- loc_time = loc_tz.localize(datetime(1940, 5, 10, 0, 0, 0))
|
|
||||||
- # pre-2017a, abbreviation was NCT
|
|
||||||
- self.assertEqual(loc_time.strftime('%Z%z'), '+0020+0020')
|
|
||||||
-
|
|
||||||
- loc_time = loc_tz.localize(datetime(1940, 5, 20, 0, 0, 0))
|
|
||||||
- self.assertEqual(loc_time.strftime('%Z%z'), 'CEST+0200')
|
|
||||||
-
|
|
||||||
- loc_time = loc_tz.localize(datetime(2004, 2, 1, 0, 0, 0))
|
|
||||||
- self.assertEqual(loc_time.strftime('%Z%z'), 'CET+0100')
|
|
||||||
-
|
|
||||||
- loc_time = loc_tz.localize(datetime(2004, 4, 1, 0, 0, 0))
|
|
||||||
- self.assertEqual(loc_time.strftime('%Z%z'), 'CEST+0200')
|
|
||||||
-
|
|
||||||
- tz = pytz.timezone('Europe/Amsterdam')
|
|
||||||
- loc_time = loc_tz.localize(datetime(1943, 3, 29, 1, 59, 59))
|
|
||||||
- self.assertEqual(loc_time.strftime('%Z%z'), 'CET+0100')
|
|
||||||
-
|
|
||||||
-
|
|
||||||
- # Switch to US
|
|
||||||
loc_tz = pytz.timezone('US/Eastern')
|
|
||||||
|
|
||||||
# End of DST ambiguity check
|
|
||||||
@@ -700,26 +671,6 @@ class LocalTestCase(unittest.TestCase):
|
|
||||||
'2004-04-04 01:50:00 EST-0500'
|
|
||||||
)
|
|
||||||
|
|
||||||
- def testPartialMinuteOffsets(self):
|
|
||||||
- # utcoffset in Amsterdam was not a whole minute until 1937
|
|
||||||
- # However, we fudge this by rounding them, as the Python
|
|
||||||
- # datetime library
|
|
||||||
- tz = pytz.timezone('Europe/Amsterdam')
|
|
||||||
- utc_dt = datetime(1914, 1, 1, 13, 40, 28, tzinfo=UTC) # correct
|
|
||||||
- utc_dt = utc_dt.replace(second=0) # But we need to fudge it
|
|
||||||
- loc_dt = utc_dt.astimezone(tz)
|
|
||||||
- self.assertEqual(
|
|
||||||
- loc_dt.strftime('%Y-%m-%d %H:%M:%S %Z%z'),
|
|
||||||
- '1914-01-01 14:00:00 AMT+0020'
|
|
||||||
- )
|
|
||||||
-
|
|
||||||
- # And get back...
|
|
||||||
- utc_dt = loc_dt.astimezone(UTC)
|
|
||||||
- self.assertEqual(
|
|
||||||
- utc_dt.strftime('%Y-%m-%d %H:%M:%S %Z%z'),
|
|
||||||
- '1914-01-01 13:40:00 UTC+0000'
|
|
||||||
- )
|
|
||||||
-
|
|
||||||
def no_testCreateLocaltime(self):
|
|
||||||
# It would be nice if this worked, but it doesn't.
|
|
||||||
tz = pytz.timezone('Europe/Amsterdam')
|
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (pytz-2017.2.zip) = d67d64a64b4c21e0bd41da56020fc7b016aec9da7f3243f79b65704119f70b8a9cd4f5f905631b6761e06ecef93830e5e479e16c7b1611ac70e0cd2b39d5b916
|
f89bde8a811c8a1a5bac17eaaa94383c pytz-2017.2.zip
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
test: python3 -c 'import pytz; assert str(pytz.utc.zone) == "UTC"'
|
|
||||||
framework: shell
|
|
||||||
require:
|
|
||||||
- python3-pytz
|
|
||||||
- python3
|
|
Loading…
Reference in New Issue
Block a user