summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-03-25 17:30:24 +0100
committerMichał Górny <mgorny@gentoo.org>2023-03-25 17:30:24 +0100
commit895f647b3b4e748fac730036d6e9067f327bcadf (patch)
tree1bda5c067840cad502db33c688f88154cdfda84f /dev-python/pytz
parentdev-python/pytz: Update remote-id (diff)
downloadgentoo-895f647b3b4e748fac730036d6e9067f327bcadf.tar.gz
gentoo-895f647b3b4e748fac730036d6e9067f327bcadf.tar.bz2
gentoo-895f647b3b4e748fac730036d6e9067f327bcadf.zip
dev-python/pytz: Rename our allzones() to private _allzones()
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pytz')
-rw-r--r--dev-python/pytz/files/pytz-2023.2-system-tzinfo.patch6
1 files changed, 4 insertions, 2 deletions
diff --git a/dev-python/pytz/files/pytz-2023.2-system-tzinfo.patch b/dev-python/pytz/files/pytz-2023.2-system-tzinfo.patch
index 4ce04416dc83..1e64f1bd2fa4 100644
--- a/dev-python/pytz/files/pytz-2023.2-system-tzinfo.patch
+++ b/dev-python/pytz/files/pytz-2023.2-system-tzinfo.patch
@@ -1,6 +1,8 @@
Inspired by the Fedora patch:
https://src.fedoraproject.org/rpms/pytz/blob/rawhide/f/pytz-zoneinfo.patch
+_allzones() is based on code in gen_tzinfo.py in upstream repo.
+
diff --git a/pytz/__init__.py b/pytz/__init__.py
index f89d0eb..d00f3bb 100644
--- a/pytz/__init__.py
@@ -9,7 +11,7 @@ index f89d0eb..d00f3bb 100644
return s.encode('ASCII')
-+def allzones():
++def _allzones():
+ for dirpath, dirnames, filenames in os.walk(_PYTZ_TZDATADIR):
+ for f in filenames:
+ p = os.path.join(dirpath, f)
@@ -18,7 +20,7 @@ index f89d0eb..d00f3bb 100644
+
+
+_PYTZ_TZDATADIR = os.environ.get('PYTZ_TZDATADIR', '/usr/share/zoneinfo')
-+_all_timezones_unchecked = LazyList(x for x in allzones())
++_all_timezones_unchecked = LazyList(x for x in _allzones())
+all_timezones = _all_timezones_unchecked
+all_timezones_set = LazySet(all_timezones)
+