From 04d20cc01ce936c8320d6524b2beff13c36c567a Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Sat, 16 Mar 2024 18:41:46 +0000 Subject: Adding metadata --- .../python-dateutil-2.8.1-no-pytest-cov.patch | 18 ---- .../python-dateutil-2.8.2-system-tzdata.patch | 104 --------------------- 2 files changed, 122 deletions(-) delete mode 100644 dev-python/python-dateutil/files/python-dateutil-2.8.1-no-pytest-cov.patch delete mode 100644 dev-python/python-dateutil/files/python-dateutil-2.8.2-system-tzdata.patch (limited to 'dev-python/python-dateutil/files') diff --git a/dev-python/python-dateutil/files/python-dateutil-2.8.1-no-pytest-cov.patch b/dev-python/python-dateutil/files/python-dateutil-2.8.1-no-pytest-cov.patch deleted file mode 100644 index 84adb944548e..000000000000 --- a/dev-python/python-dateutil/files/python-dateutil-2.8.1-no-pytest-cov.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/dateutil/test/conftest.py b/dateutil/test/conftest.py -index 78ed70a..4bb4c0a 100644 ---- a/dateutil/test/conftest.py -+++ b/dateutil/test/conftest.py -@@ -14,10 +14,11 @@ def pytest_collection_modifyitems(items): - - marker = marker_getter('xfail') - -+ # requires pytest-cov - # Need to query the args because conditional xfail tests still have - # the xfail mark even if they are not expected to fail -- if marker and (not marker.args or marker.args[0]): -- item.add_marker(pytest.mark.no_cover) -+ #if marker and (not marker.args or marker.args[0]): -+ # item.add_marker(pytest.mark.no_cover) - - - def set_tzpath(): diff --git a/dev-python/python-dateutil/files/python-dateutil-2.8.2-system-tzdata.patch b/dev-python/python-dateutil/files/python-dateutil-2.8.2-system-tzdata.patch deleted file mode 100644 index 3790a29b4213..000000000000 --- a/dev-python/python-dateutil/files/python-dateutil-2.8.2-system-tzdata.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 907459c6f632a87fce5729f6eebd2adf5b94e577 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Tue, 3 Apr 2018 22:03:32 +0200 -Subject: [PATCH] zoneinfo: Get timezone data from system tzdata - ---- - dateutil/test/test_imports.py | 3 +-- - dateutil/zoneinfo/__init__.py | 25 ++++++++++++++----------- - 2 files changed, 15 insertions(+), 13 deletions(-) - -diff --git a/dateutil/test/test_imports.py b/dateutil/test/test_imports.py -index 60b8600..b9f517c 100644 ---- a/dateutil/test/test_imports.py -+++ b/dateutil/test/test_imports.py -@@ -168,9 +168,8 @@ def test_import_zone_info_from(): - def test_import_zone_info_star(): - from dateutil.zoneinfo import gettz - from dateutil.zoneinfo import gettz_db_metadata -- from dateutil.zoneinfo import rebuild - -- zi_all = (gettz, gettz_db_metadata, rebuild) -+ zi_all = (gettz, gettz_db_metadata) - - for var in zi_all: - assert var is not None -diff --git a/dateutil/zoneinfo/__init__.py b/dateutil/zoneinfo/__init__.py -index 34f11ad..e3f0f94 100644 ---- a/dateutil/zoneinfo/__init__.py -+++ b/dateutil/zoneinfo/__init__.py -@@ -1,6 +1,7 @@ - # -*- coding: utf-8 -*- - import warnings - import json -+import os - - from tarfile import TarFile - from pkgutil import get_data -@@ -10,7 +11,7 @@ from dateutil.tz import tzfile as _tzfile - - __all__ = ["get_zonefile_instance", "gettz", "gettz_db_metadata"] - --ZONEFILENAME = "dateutil-zoneinfo.tar.gz" -+ZONEDIRECTORY = "/usr/share/zoneinfo" - METADATA_FN = 'METADATA' - - -@@ -19,12 +20,14 @@ class tzfile(_tzfile): - return (gettz, (self._filename,)) - - --def getzoneinfofile_stream(): -- try: -- return BytesIO(get_data(__name__, ZONEFILENAME)) -- except IOError as e: # TODO switch to FileNotFoundError? -- warnings.warn("I/O error({0}): {1}".format(e.errno, e.strerror)) -- return None -+def iter_zones(topdir): -+ for dirpath, dirnames, filenames in os.walk(topdir): -+ for f in filenames: -+ if f.endswith(('.list', '.tab', '.zi', 'leapseconds')): -+ continue -+ fpath = os.path.join(dirpath, f) -+ relpath = os.path.relpath(fpath, topdir) -+ yield (relpath, tzfile(fpath, filename=relpath)) - - - class ZoneInfoFile(object): -@@ -48,7 +51,7 @@ class ZoneInfoFile(object): - # no metadata in tar file - self.metadata = None - else: -- self.zones = {} -+ self.zones = dict(iter_zones(ZONEDIRECTORY)) - self.metadata = None - - def get(self, name, default=None): -@@ -99,7 +102,7 @@ def get_zonefile_instance(new_instance=False): - zif = getattr(get_zonefile_instance, '_cached_instance', None) - - if zif is None: -- zif = ZoneInfoFile(getzoneinfofile_stream()) -+ zif = ZoneInfoFile() - - get_zonefile_instance._cached_instance = zif - -@@ -140,7 +143,7 @@ def gettz(name): - DeprecationWarning) - - if len(_CLASS_ZONE_INSTANCE) == 0: -- _CLASS_ZONE_INSTANCE.append(ZoneInfoFile(getzoneinfofile_stream())) -+ _CLASS_ZONE_INSTANCE.append(ZoneInfoFile()) - return _CLASS_ZONE_INSTANCE[0].zones.get(name) - - -@@ -163,5 +166,5 @@ def gettz_db_metadata(): - DeprecationWarning) - - if len(_CLASS_ZONE_INSTANCE) == 0: -- _CLASS_ZONE_INSTANCE.append(ZoneInfoFile(getzoneinfofile_stream())) -+ _CLASS_ZONE_INSTANCE.append(ZoneInfoFile()) - return _CLASS_ZONE_INSTANCE[0].metadata --- -2.32.0 - -- cgit v1.3.1