[packages/python-pytz] close file opened in zoneinfo.patch; rel 3

atler atler at pld-linux.org
Wed May 21 14:13:19 CEST 2025


commit ea9138765a3547937de1ab1652c3e2cdd84111bd
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed May 21 13:24:36 2025 +0200

    close file opened in zoneinfo.patch; rel 3

 python-pytz.spec | 12 ++++++------
 zoneinfo.patch   | 33 +++++++++++++++++----------------
 2 files changed, 23 insertions(+), 22 deletions(-)
---
diff --git a/python-pytz.spec b/python-pytz.spec
index 8ac0819..5469d07 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -15,7 +15,7 @@ Summary:	pytz - Olson timezone database in Python
 Summary(pl.UTF-8):	pytz - baza stref czasowych Olsona w Pythonie
 Name:		python-%{module}
 Version:	2024.1
-Release:	2
+Release:	3
 License:	MIT or ZPL v2.1
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/pytz/
@@ -26,29 +26,29 @@ URL:		http://pytz.sourceforge.net/
 BuildRequires:	rpmbuild(macros) >= 1.714
 BuildRequires:	sed >= 4.0
 %if %{with python2}
-BuildRequires:	python >= 1:2.4
-BuildRequires:	python-devel >= 1:2.4
+BuildRequires:	python >= 1:2.5
+BuildRequires:	python-devel >= 1:2.5
 BuildRequires:	python-setuptools
 %endif
 %if %{with python3}
 BuildRequires:	python3-devel >= 1:3.2
 BuildRequires:	python3-setuptools
 %endif
-Requires:	python-modules >= 1:2.4
+Requires:	python-modules >= 1:2.5
 Requires:	tzdata-zoneinfo >= %{olsonver}
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 pytz brings the Olson tz database into Python. This library allows
-accurate and cross platform timezone calculations using Python 2.3 or
+accurate and cross platform timezone calculations using Python 2.5 or
 higher.
 
 %description -l pl.UTF-8
 pytz dodaje do Pythona moduł umożliwiający odpytywanie bazy stref
 czasowych Olsona. Moduł ten umożliwia przeprowadzanie dokładnych,
 niezależnych od platformy obliczeń uwzględniających strefy czasowe
-przy użyciu Pythona w wersji co najmniej 2.3.
+przy użyciu Pythona w wersji co najmniej 2.5.
 
 %package -n python3-%{module}
 Summary:	pytz - Olson timezone database in Python 3.x
diff --git a/zoneinfo.patch b/zoneinfo.patch
index 4a31cdb..fd05dd9 100644
--- a/zoneinfo.patch
+++ b/zoneinfo.patch
@@ -47,7 +47,7 @@
      return _all_timezones_lower_to_standard.get(zone.lower()) or zone  # noqa
  
  
-@@ -514,608 +503,37 @@ def _test():
+@@ -514,608 +503,38 @@ def _test():
  
  if __name__ == '__main__':
      _test()
@@ -668,21 +668,22 @@
 -common_timezones = LazyList(
 -            tz for tz in common_timezones if tz in all_timezones)
 +
-+common_timezones = [
-+    l.split()[2]
-+    for l in open(os.path.join(_tzinfo_dir, "zone.tab"))
-+    if l != "" and l[0] != "#"
-+] + [
-+    "GMT",
-+    "US/Alaska",
-+    "US/Arizona",
-+    "US/Central",
-+    "US/Eastern",
-+    "US/Hawaii",
-+    "US/Mountain",
-+    "US/Pacific",
-+    "UTC",
-+]
++with open(os.path.join(_tzinfo_dir, "zone.tab")) as ztf:
++    common_timezones = [
++        l.split()[2]
++        for l in ztf
++        if l != "" and l[0] != "#"
++    ] + [
++        "GMT",
++        "US/Alaska",
++        "US/Arizona",
++        "US/Central",
++        "US/Eastern",
++        "US/Hawaii",
++        "US/Mountain",
++        "US/Pacific",
++        "UTC",
++    ]
 +common_timezones.sort()
          
  common_timezones_set = LazySet(common_timezones)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pytz.git/commitdiff/ea9138765a3547937de1ab1652c3e2cdd84111bd



More information about the pld-cvs-commit mailing list