From c3dde8dbb430b239dcee24eedfab7af460a023dc Mon Sep 17 00:00:00 2001 From: Jonathan Wright Date: Wed, 28 Feb 2024 23:05:16 -0600 Subject: [PATCH 01/18] update build version for epel9 --- disable-poetry-light.patch | 85 ++++++++++++++++++++++++++++++++++++++ python-dns-lexicon.spec | 12 +++++- 2 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 disable-poetry-light.patch diff --git a/disable-poetry-light.patch b/disable-poetry-light.patch new file mode 100644 index 0000000..1b71fb8 --- /dev/null +++ b/disable-poetry-light.patch @@ -0,0 +1,85 @@ +diff -uNr lexicon-3.17.0/pyproject.toml lexicon-3.17.0.mod/pyproject.toml +--- lexicon-3.17.0/pyproject.toml 2023-11-06 16:21:46.000000000 -0600 ++++ lexicon-3.17.0.mod/pyproject.toml 2024-02-01 04:28:53.861285119 -0600 +@@ -61,32 +61,6 @@ + # Extra "full" list must contain all other extras + full = ["boto3", "localzone", "softlayer", "zeep", "oci"] + +-[tool.poetry.group.dev.dependencies] +-esbonio = "*" +-packaging = "*" +-pytest = "*" +-pytest-cov = "*" +-pytest-xdist = "*" +-vcrpy = "*" +-# We add flake8 conditionally to recent Python version to get modern versions +-# of flake8 cleaned of several issues. It just means that linting cannot be done +-# on the initial release of Python 3.8 (version 3.8.0). This is a decent constraint. +-flake8 = { version = "*", python = ">=3.8.1" } +-isort = "*" +-tox = ">=4" +-black = "*" +-mypy = "*" +-toml = "*" +-types-PyYAML = "*" +-types-pytz = "*" +-types-requests = "*" +-types-toml = "*" +- +-[tool.poetry.group.docs.dependencies] +-sphinx = "*" +-sphinx_rtd_theme = "*" +-toml = "*" +- + [tool.poetry.scripts] + lexicon = "lexicon._private.cli:main" + +diff -uNr lexicon-3.17.0/setup.cfg lexicon-3.17.0.mod/setup.cfg +--- lexicon-3.17.0/setup.cfg 2023-11-06 16:21:46.000000000 -0600 ++++ lexicon-3.17.0.mod/setup.cfg 2024-02-01 04:05:39.191101574 -0600 +@@ -5,45 +5,3 @@ + [tox:tox] + envlist = cover,lint,mypy + isolated_build = true +- +-# Standard env will run all test available for all providers. +-[testenv] +-allowlist_externals = poetry +-extras = +- full +-setenv = +- PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:--numprocesses auto} +- PYTHONHASHSEED = 0 +-commands_pre = +- poetry install --extras full --no-root --sync +-commands = +- poetry run pytest tests/ \ +- --junitxml=junit/test-results.xml --dist=loadfile +- +-# Cover env will run all test available for all providers with coverage enabled. +-[testenv:cover] +-commands = +- poetry run pytest tests/ \ +- --junitxml=junit/test-results.xml --dist=loadfile \ +- --cov=lexicon --cov-report=term-missing --cov-report=xml +- +-# Light env will run all tests except for providers with optional dependencies. +-[testenv:light] +-extras = +-commands_pre = +- poetry install --no-root --sync +-commands = +- poetry run pytest tests/ \ +- --junitxml=junit/test-results.xml --dist=loadfile \ +- --xfail-providers-with-missing-deps +- +-# Lint env will check for code quality and errors, and fails if it does not match the minimal requirements. +-[testenv:lint] +-commands = +- poetry run flake8 src tests +- +- +-# Mypy env will check for types in the Lexicon codebase. +-[testenv:mypy] +-commands = +- poetry run mypy src tests diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 689aec4..89b6f53 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -16,7 +16,7 @@ Version: 3.17.0 %endif Name: python-%{pypi_name} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT @@ -27,6 +27,11 @@ BuildArch: noarch BuildRequires: python3-devel +# epel is missing full poetry and light packages needed for tests +%if 0%{?rhel >= 8} +#Patch: disable-poetry-light.patch +%endif + # required to run the test suite %if %{with tests} BuildRequires: python3-pytest @@ -137,7 +142,7 @@ rm -rf %{pypi_name}.egg-info %if %{with extras} %pyproject_buildrequires -r -t -e light -x gransy,localzone,oci,route53 %else -%pyproject_buildrequires -r -t -e light +%pyproject_buildrequires -r %endif @@ -211,6 +216,9 @@ rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests # }}} %changelog +* Thu Feb 29 2024 Jonathan Wright - 3.17.0-4 +- Update spec for building on epel9 + * Fri Jan 26 2024 Fedora Release Engineering - 3.17.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From f6d9375c480e09cae1862a9fa61125f0694a45c1 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Thu, 27 Jun 2024 19:37:28 +0200 Subject: [PATCH 02/18] Rebuilt for Python 3.13 --- python-dns-lexicon.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 89b6f53..4b4622b 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -16,7 +16,7 @@ Version: 3.17.0 %endif Name: python-%{pypi_name} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT @@ -216,6 +216,9 @@ rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests # }}} %changelog +* Thu Jun 27 2024 Python Maint - 3.17.0-5 +- Rebuilt for Python 3.13 + * Thu Feb 29 2024 Jonathan Wright - 3.17.0-4 - Update spec for building on epel9 From 11f7c31776fd09c09d26070deaaf69d5d759518b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 11:10:38 +0000 Subject: [PATCH 03/18] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- python-dns-lexicon.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 4b4622b..c224e93 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -16,7 +16,7 @@ Version: 3.17.0 %endif Name: python-%{pypi_name} -Release: 5%{?dist} +Release: 6%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT @@ -216,6 +216,9 @@ rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests # }}} %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 3.17.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jun 27 2024 Python Maint - 3.17.0-5 - Rebuilt for Python 3.13 From d5eb57c3dede9e61c07717fae23f4d825603493b Mon Sep 17 00:00:00 2001 From: Ben Maconi Date: Sat, 23 Nov 2024 09:56:30 -0600 Subject: [PATCH 04/18] Updated to 3.18.0 --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 31f2a59..b93aa32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (lexicon-3.17.0.tar.gz) = 1bc182f5881d6acfac72b84331ba50da1219178d274c92e532ed11e73aa79696681d28a002cd1e23f48590953f48e50b62c2ef2db020a07ecf88547717508c0c +SHA512 (lexicon-3.18.0.tar.gz) = da2804caeef6cd96eb53f7414833757905afa269f328271fccbdb06d988fb46695a0cb917b8dbdfb66579b01cc98d07de8eb7e1cb132c47d49fe05e2ebe18127 From 7ff4c68fbe632900f3d0aae3ff449a0fe17b416b Mon Sep 17 00:00:00 2001 From: Ben Maconi Date: Sat, 23 Nov 2024 11:18:17 -0600 Subject: [PATCH 05/18] added global forgeversion --- python-dns-lexicon.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index c224e93..b12d638 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -1,6 +1,7 @@ %global forgeurl https://github.com/AnalogJ/lexicon -Version: 3.17.0 +%global forgeversion 3.18.0 +Version: 3.18.0 %forgemeta %global pypi_name dns-lexicon @@ -16,7 +17,7 @@ Version: 3.17.0 %endif Name: python-%{pypi_name} -Release: 6%{?dist} +Release: 1%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT @@ -216,6 +217,9 @@ rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests # }}} %changelog +* Sat Nov 23 2024 Ben Maconi - 3.18.0-1 +- Updated to 3.18.0 + * Fri Jul 19 2024 Fedora Release Engineering - 3.17.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 5bd84d818f8a53846cd3263c447a3ee757f06493 Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Sat, 23 Nov 2024 11:33:21 -0600 Subject: [PATCH 06/18] Try fix by excluding GoDaddyProviderTests --- python-dns-lexicon.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index b12d638..078930d 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -165,7 +165,7 @@ sed -i '1d' src/lexicon/_private/cli.py # With tldextract 3.3.0+ we can use Fedora's public suffix list by running # tldextract --update --suffix_list_url "file:///usr/share/publicsuffix/public_suffix_list.dat" # prior to running the tests -TEST_SELECTOR="not AutoProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not Route53Provider and not AliyunProviderTests and not AuroraProviderTests and not Route53ProviderTests" +TEST_SELECTOR="not AutoProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not Route53Provider and not AliyunProviderTests and not AuroraProviderTests and not Route53ProviderTests and not GoDaddyProviderTests" # lexicon providers which do not work in Fedora due to missing dependencies: # - SoftLayerProviderTests From 8f77d4b3d532b4ed8bf15d03f6a93d669faea248 Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Sat, 23 Nov 2024 11:48:28 -0600 Subject: [PATCH 07/18] Disable tests for now --- python-dns-lexicon.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 078930d..38fa41f 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -16,6 +16,9 @@ Version: 3.18.0 %bcond_without extras %endif +# disable tests for now +%bcond_without tests + Name: python-%{pypi_name} Release: 1%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way From bf63b51a3c948190fc79f60d87479516c9d5320e Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Sat, 23 Nov 2024 12:00:08 -0600 Subject: [PATCH 08/18] Disable tests more --- python-dns-lexicon.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 38fa41f..8fa6769 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -180,7 +180,8 @@ TEST_SELECTOR+=" and not DDNSProviderTests and not DuckdnsProviderTests and not # Miro Hrončok, 2020-09-11: # > I am afraid the %%tox macro can only work with "static" deps declaration, # > not with arbitrary installers invoked as commands, sorry about that. -%pytest -v -k "${TEST_SELECTOR}" +# %pytest -v -k "${TEST_SELECTOR}" +# disable tests because it keeps wanting to download the public suffix list %endif %install From 0b0ac66461e1dc0f3c22cf55b3a87c6270895bce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 13:49:07 +0000 Subject: [PATCH 09/18] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- python-dns-lexicon.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 8fa6769..c93837a 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -20,7 +20,7 @@ Version: 3.18.0 %bcond_without tests Name: python-%{pypi_name} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT @@ -221,6 +221,9 @@ rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests # }}} %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 3.18.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sat Nov 23 2024 Ben Maconi - 3.18.0-1 - Updated to 3.18.0 From 23bd76152a569093eb477cdbcd0192a75a0638c1 Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Sat, 4 Jan 2025 09:49:20 +0100 Subject: [PATCH 10/18] update to 3.20.1 --- python-dns-lexicon.spec | 14 +++++++++----- sources | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index c93837a..91bbde6 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -1,14 +1,14 @@ -%global forgeurl https://github.com/AnalogJ/lexicon -%global forgeversion 3.18.0 -Version: 3.18.0 +%global forgeurl https://github.com/dns-lexicon/dns-lexicon +%global forgeversion 3.20.1 +Version: 3.20.1 %forgemeta %global pypi_name dns-lexicon %if 0%{?rhel} >= 8 # EPEL is currently missing dependencies used by the extras metapackages -# EPEL is currently missing dependancies used by the tests +# EPEL is currently missing dependencies used by the tests %bcond_with tests %bcond_with extras %else @@ -138,9 +138,10 @@ dependencies necessary to use the Route 53 provider. %prep -%autosetup -n lexicon-%{version} -p1 +%autosetup -n %{pypi_name}-%{version} -p1 # Remove bundled egg-info rm -rf %{pypi_name}.egg-info +rm -f uv.lock %generate_buildrequires %if %{with extras} @@ -221,6 +222,9 @@ rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests # }}} %changelog +* Thu Jan 23 2025 Felix Schwarz - 3.20.1-1 +- update to 3.20.1 + * Sat Jan 18 2025 Fedora Release Engineering - 3.18.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index b93aa32..305f6a1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (lexicon-3.18.0.tar.gz) = da2804caeef6cd96eb53f7414833757905afa269f328271fccbdb06d988fb46695a0cb917b8dbdfb66579b01cc98d07de8eb7e1cb132c47d49fe05e2ebe18127 +SHA512 (dns-lexicon-3.20.1.tar.gz) = 98a29bc67596e58ada43373fd1dfa2a5c35512dd33924969df0d16c10cf2e53cf2bc564488c9f7a1b682b63a7959cd2073207a8d77435aa62a04f408024d85fd From 74a28a626206b7b9f4e7f651e90d59d61716c127 Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Sun, 5 Jan 2025 16:42:19 +0100 Subject: [PATCH 11/18] re-enable (most) tests --- python-dns-lexicon-tox-config.patch | 14 ++++++++++++++ python-dns-lexicon.spec | 7 ++++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 python-dns-lexicon-tox-config.patch diff --git a/python-dns-lexicon-tox-config.patch b/python-dns-lexicon-tox-config.patch new file mode 100644 index 0000000..dd22740 --- /dev/null +++ b/python-dns-lexicon-tox-config.patch @@ -0,0 +1,14 @@ +diff --git a/pyproject.toml b/pyproject.toml +index d17fecc..be0c6e6 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -126,8 +126,7 @@ extend-ignore = [ "E203", "E501" ] + envlist = [ "cover", "lint" , "mypy" ] + + [tool.tox.env_run_base] +-runner = "uv-venv-lock-runner" +-with_dev = true ++with_dev = false + uv_sync_flags = [ "--python={env_python}" ] # Fix until https://github.com/tox-dev/tox-uv/issues/110 is fixed + extras = [ "full" ] + setenv.PYTEST_ADDOPTS = "--numprocesses auto" diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 91bbde6..f9337bf 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -27,6 +27,7 @@ License: MIT URL: %{forgeurl} # pypi releases don't contain necessary data to run the tests Source0: %{forgesource} +Patch: python-dns-lexicon-tox-config.patch BuildArch: noarch BuildRequires: python3-devel @@ -40,6 +41,7 @@ BuildRequires: python3-devel %if %{with tests} BuildRequires: python3-pytest BuildRequires: python3-pytest-vcr +BuildRequires: python3-pytest-xdist %endif @@ -169,7 +171,7 @@ sed -i '1d' src/lexicon/_private/cli.py # With tldextract 3.3.0+ we can use Fedora's public suffix list by running # tldextract --update --suffix_list_url "file:///usr/share/publicsuffix/public_suffix_list.dat" # prior to running the tests -TEST_SELECTOR="not AutoProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not Route53Provider and not AliyunProviderTests and not AuroraProviderTests and not Route53ProviderTests and not GoDaddyProviderTests" +TEST_SELECTOR="not AutoProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not Route53Provider and not AliyunProviderTests and not AuroraProviderTests and not Route53ProviderTests and not GoDaddyProviderTests and not test_client and not test_library" # lexicon providers which do not work in Fedora due to missing dependencies: # - SoftLayerProviderTests @@ -181,8 +183,7 @@ TEST_SELECTOR+=" and not DDNSProviderTests and not DuckdnsProviderTests and not # Miro Hrončok, 2020-09-11: # > I am afraid the %%tox macro can only work with "static" deps declaration, # > not with arbitrary installers invoked as commands, sorry about that. -# %pytest -v -k "${TEST_SELECTOR}" -# disable tests because it keeps wanting to download the public suffix list +%pytest -x -v -k "${TEST_SELECTOR}" -n auto --dist=loadfile --xfail-providers-with-missing-deps tests/ %endif %install From 1a6298755927b707f2da0c719c7071092ff2e1cd Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Sun, 5 Jan 2025 17:04:01 +0100 Subject: [PATCH 12/18] rework %check so that most tests are run --- create-local-tld-cache.py | 38 +++++++++++++++++++++++++++++++++++ python-dns-lexicon.spec | 42 +++++++++++++++++++++------------------ 2 files changed, 61 insertions(+), 19 deletions(-) create mode 100644 create-local-tld-cache.py diff --git a/create-local-tld-cache.py b/create-local-tld-cache.py new file mode 100644 index 0000000..c57a6c6 --- /dev/null +++ b/create-local-tld-cache.py @@ -0,0 +1,38 @@ +#!/usr/bin/python3 + +from pathlib import Path +import json +import os +import subprocess +import sys + +if len(sys.argv) != 2: + sys.stderr.write('usage: %s \n' % sys.argv[0]) + +buildroot_sitelib_dir = sys.argv[1] +sys.path.insert(0, buildroot_sitelib_dir) + +from tldextract.cache import get_cache_dir, DiskCache + +if 'TLDEXTRACT_CACHE' not in os.environ: + raise ValueError('must set "TLDEXTRACT_CACHE" environment variable') + +local_cache = Path('/usr/share/publicsuffix/public_suffix_list.dat') +if not local_cache.exists(): + raise FileNotFoundError(local_cache) + +url_local_cache = f'file://{local_cache}' +subprocess.run(['/usr/bin/tldextract', '--update', f'--suffix_list_url={url_local_cache}'], check=True) + +cache = DiskCache(cache_dir=get_cache_dir()) +namespace = 'publicsuffix.org-tlds' +cache_with_local_data = cache._key_to_cachefile_path(namespace, {'urls': (url_local_cache,), 'fallback_to_snapshot': True}) +func = lambda **kwargs: json.loads(Path(cache_with_local_data).read_text()) + +kwargs = { + 'cache': cache, + 'urls': ('https://publicsuffix.org/list/public_suffix_list.dat', 'https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat'), + 'fallback_to_snapshot': True, +} +cache.run_and_cache(func, namespace=namespace, kwargs=kwargs, hashed_argnames=('urls', 'fallback_to_snapshot')) + diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index f9337bf..6fc6779 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -27,6 +27,7 @@ License: MIT URL: %{forgeurl} # pypi releases don't contain necessary data to run the tests Source0: %{forgesource} +Source1: create-local-tld-cache.py Patch: python-dns-lexicon-tox-config.patch BuildArch: noarch @@ -42,6 +43,8 @@ BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: python3-pytest-vcr BuildRequires: python3-pytest-xdist +BuildRequires: publicsuffix-list +BuildRequires: python3-tldextract %endif @@ -160,30 +163,32 @@ sed -i '1d' src/lexicon/_private/cli.py %if %{with tests} %check -# The following tests use tldextract which tries to fetch -# https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat -# on first invocation +export TLDEXTRACT_CACHE=%{_builddir}/tldextract-cache + +# tldextract tries to fetch "public_suffix_list.dat" from the internet on first +# invocation. # (see https://github.com/john-kurkowski/tldextract/tree/master#note-about-caching) -# - AutoProviderTests -# - NamecheapProviderTests -# - NamecheapManagedProviderTests -# Disabling those until tldextract 3.3.0+ is available on Fedora. -# With tldextract 3.3.0+ we can use Fedora's public suffix list by running -# tldextract --update --suffix_list_url "file:///usr/share/publicsuffix/public_suffix_list.dat" -# prior to running the tests -TEST_SELECTOR="not AutoProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not Route53Provider and not AliyunProviderTests and not AuroraProviderTests and not Route53ProviderTests and not GoDaddyProviderTests and not test_client and not test_library" +# The "publicsuffix-list" package provides that data however we need to use +# that to populate a local cache directory.Most of the work is done via: +# $ tldextract --update --suffix_list_url "file:///usr/share/publicsuffix/public_suffix_list.dat" +# +# However tldextract uses the "file://" url as cache key while the tests use +# "https://publicsuffix.org/list/public_suffix_list.dat". I did not find a way +# get tldextract to use the https url so a small Python script will handle that. +/usr/bin/python3 %{SOURCE1} %{buildroot}%{python3_sitelib} # lexicon providers which do not work in Fedora due to missing dependencies: # - SoftLayerProviderTests -TEST_SELECTOR+=" and not SoftLayerProviderTests" +TEST_SELECTOR="not SoftLayerProviderTests" + %if %{without extras} -TEST_SELECTOR+=" and not DDNSProviderTests and not DuckdnsProviderTests and not GransyProviderTests and not LocalzoneProviderTests and not OciProviderTests and not OciInstancePrincipalProviderTests and not Route53ProviderTests" +TEST_SELECTOR+=" and not GransyProviderTests and not LocalzoneProviderTests and not OciProviderTests and not OciInstancePrincipalProviderTests and not Route53ProviderTests" %endif -# The %%tox macro lacks features so we need to use pytest directly: -# Miro Hrončok, 2020-09-11: -# > I am afraid the %%tox macro can only work with "static" deps declaration, -# > not with arbitrary installers invoked as commands, sorry about that. -%pytest -x -v -k "${TEST_SELECTOR}" -n auto --dist=loadfile --xfail-providers-with-missing-deps tests/ + +# We do not use "--xfail-providers-with-missing-deps" because we want to detect +# missing dependencies unless we already know that a certain provider will not +# work. +%pytest -v -k "${TEST_SELECTOR}" -n auto --dist=loadfile tests/ %endif %install @@ -191,7 +196,6 @@ TEST_SELECTOR+=" and not DDNSProviderTests and not DuckdnsProviderTests and not install -pm 0755 %{buildroot}/%{_bindir}/lexicon %{buildroot}/%{_bindir}/lexicon-%{python3_version} cd %{buildroot}/%{_bindir} ln -s lexicon-%{python3_version} lexicon-3 -rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests %files -n python3-%{pypi_name} From 29a0225dc0d66e369deeb48a43b9d9c897240969 Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Sat, 19 Apr 2025 11:39:28 +0200 Subject: [PATCH 13/18] update to 3.21.0 --- python-dns-lexicon-findall.patch | 44 +++++++++++++++++++++++++++++ python-dns-lexicon-tox-config.patch | 4 +-- python-dns-lexicon.spec | 11 ++++++-- sources | 2 +- 4 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 python-dns-lexicon-findall.patch diff --git a/python-dns-lexicon-findall.patch b/python-dns-lexicon-findall.patch new file mode 100644 index 0000000..39f6497 --- /dev/null +++ b/python-dns-lexicon-findall.patch @@ -0,0 +1,44 @@ +diff --git a/src/lexicon/_private/providers/easyname.py b/src/lexicon/_private/providers/easyname.py +index 827b9cf..3e6dbb4 100644 +--- a/src/lexicon/_private/providers/easyname.py ++++ b/src/lexicon/_private/providers/easyname.py +@@ -273,7 +273,7 @@ class Provider(BaseProvider): + rec["priority"] = (columns[3].contents[1].string or "").strip() + rec["ttl"] = (columns[4].contents[1].string or "").strip() + rec["id"] = "" +- for a in columns[5].findAll( ++ for a in columns[5].find_all( + "a", class_="button button--transparent" + ): + rec["id"] = int(a["href"].rsplit("/", 1)[-1]) +@@ -367,7 +367,7 @@ class Provider(BaseProvider): + def _is_zone_tr(elm): + return elm.name.lower() == "tr" and (elm.has_attr("class")) + +- rows = dns_table.findAll(_is_zone_tr) ++ rows = dns_table.find_all(_is_zone_tr) + assert rows is not None and rows, "Could not find any DNS entries" + return rows + +diff --git a/src/lexicon/_private/providers/henet.py b/src/lexicon/_private/providers/henet.py +index aed38ec..28e5afa 100644 +--- a/src/lexicon/_private/providers/henet.py ++++ b/src/lexicon/_private/providers/henet.py +@@ -144,7 +144,7 @@ class Provider(BaseProvider): + def is_dns_tr_type(klass): + return klass and re.compile("dns_tr").search(klass) + +- records = html.findAll("tr", class_=is_dns_tr_type) ++ records = html.find_all("tr", class_=is_dns_tr_type) + + # If the tag couldn't be found, error, otherwise, return the value of the tag + if records is None or not records: +@@ -153,7 +153,7 @@ class Provider(BaseProvider): + + new_records = [] + for dns_tr in records: +- tds = dns_tr.findAll("td") ++ tds = dns_tr.find_all("td") + # Process HTML in the TR children to derive each object + rec = {} + rec["zone_id"] = tds[0].string diff --git a/python-dns-lexicon-tox-config.patch b/python-dns-lexicon-tox-config.patch index dd22740..039c798 100644 --- a/python-dns-lexicon-tox-config.patch +++ b/python-dns-lexicon-tox-config.patch @@ -1,5 +1,5 @@ diff --git a/pyproject.toml b/pyproject.toml -index d17fecc..be0c6e6 100644 +index 4122ff9..936bbdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -126,8 +126,7 @@ extend-ignore = [ "E203", "E501" ] @@ -9,6 +9,6 @@ index d17fecc..be0c6e6 100644 -runner = "uv-venv-lock-runner" -with_dev = true +with_dev = false - uv_sync_flags = [ "--python={env_python}" ] # Fix until https://github.com/tox-dev/tox-uv/issues/110 is fixed extras = [ "full" ] setenv.PYTEST_ADDOPTS = "--numprocesses auto" + setenv.PYTHONHASHSEED = "0" diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 6fc6779..3767c2a 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -1,7 +1,7 @@ %global forgeurl https://github.com/dns-lexicon/dns-lexicon -%global forgeversion 3.20.1 -Version: 3.20.1 +%global forgeversion 3.21.0 +Version: %{forgeversion} %forgemeta %global pypi_name dns-lexicon @@ -20,7 +20,7 @@ Version: 3.20.1 %bcond_without tests Name: python-%{pypi_name} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT @@ -29,6 +29,8 @@ URL: %{forgeurl} Source0: %{forgesource} Source1: create-local-tld-cache.py Patch: python-dns-lexicon-tox-config.patch +# submitted upstream as https://github.com/dns-lexicon/dns-lexicon/pull/29 +Patch2: python-dns-lexicon-findall.patch BuildArch: noarch BuildRequires: python3-devel @@ -227,6 +229,9 @@ ln -s lexicon-%{python3_version} lexicon-3 # }}} %changelog +* Sat Apr 19 2025 Felix Schwarz - 3.21.0-1 +- update to 3.21.0 + * Thu Jan 23 2025 Felix Schwarz - 3.20.1-1 - update to 3.20.1 diff --git a/sources b/sources index 305f6a1..cec2b9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dns-lexicon-3.20.1.tar.gz) = 98a29bc67596e58ada43373fd1dfa2a5c35512dd33924969df0d16c10cf2e53cf2bc564488c9f7a1b682b63a7959cd2073207a8d77435aa62a04f408024d85fd +SHA512 (dns-lexicon-3.21.0.tar.gz) = 1b132fae2741d8cf505c0779724b5e0d518683226099c796f1b77b4ceb07e1fbecccb4d82869be090f2c379b3d17f19766857e49f83760d793a0934f520bc8ed From fb10e373de1b03511419fb3f890a0aa6de0ce876 Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Mon, 28 Apr 2025 21:36:13 +0200 Subject: [PATCH 14/18] update to 3.21.1 --- python-dns-lexicon-findall.patch | 44 -------------------------------- python-dns-lexicon.spec | 7 ++--- sources | 2 +- 3 files changed, 5 insertions(+), 48 deletions(-) delete mode 100644 python-dns-lexicon-findall.patch diff --git a/python-dns-lexicon-findall.patch b/python-dns-lexicon-findall.patch deleted file mode 100644 index 39f6497..0000000 --- a/python-dns-lexicon-findall.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/src/lexicon/_private/providers/easyname.py b/src/lexicon/_private/providers/easyname.py -index 827b9cf..3e6dbb4 100644 ---- a/src/lexicon/_private/providers/easyname.py -+++ b/src/lexicon/_private/providers/easyname.py -@@ -273,7 +273,7 @@ class Provider(BaseProvider): - rec["priority"] = (columns[3].contents[1].string or "").strip() - rec["ttl"] = (columns[4].contents[1].string or "").strip() - rec["id"] = "" -- for a in columns[5].findAll( -+ for a in columns[5].find_all( - "a", class_="button button--transparent" - ): - rec["id"] = int(a["href"].rsplit("/", 1)[-1]) -@@ -367,7 +367,7 @@ class Provider(BaseProvider): - def _is_zone_tr(elm): - return elm.name.lower() == "tr" and (elm.has_attr("class")) - -- rows = dns_table.findAll(_is_zone_tr) -+ rows = dns_table.find_all(_is_zone_tr) - assert rows is not None and rows, "Could not find any DNS entries" - return rows - -diff --git a/src/lexicon/_private/providers/henet.py b/src/lexicon/_private/providers/henet.py -index aed38ec..28e5afa 100644 ---- a/src/lexicon/_private/providers/henet.py -+++ b/src/lexicon/_private/providers/henet.py -@@ -144,7 +144,7 @@ class Provider(BaseProvider): - def is_dns_tr_type(klass): - return klass and re.compile("dns_tr").search(klass) - -- records = html.findAll("tr", class_=is_dns_tr_type) -+ records = html.find_all("tr", class_=is_dns_tr_type) - - # If the tag couldn't be found, error, otherwise, return the value of the tag - if records is None or not records: -@@ -153,7 +153,7 @@ class Provider(BaseProvider): - - new_records = [] - for dns_tr in records: -- tds = dns_tr.findAll("td") -+ tds = dns_tr.find_all("td") - # Process HTML in the TR children to derive each object - rec = {} - rec["zone_id"] = tds[0].string diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 3767c2a..a282e72 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -1,6 +1,6 @@ %global forgeurl https://github.com/dns-lexicon/dns-lexicon -%global forgeversion 3.21.0 +%global forgeversion 3.21.1 Version: %{forgeversion} %forgemeta @@ -29,8 +29,6 @@ URL: %{forgeurl} Source0: %{forgesource} Source1: create-local-tld-cache.py Patch: python-dns-lexicon-tox-config.patch -# submitted upstream as https://github.com/dns-lexicon/dns-lexicon/pull/29 -Patch2: python-dns-lexicon-findall.patch BuildArch: noarch BuildRequires: python3-devel @@ -229,6 +227,9 @@ ln -s lexicon-%{python3_version} lexicon-3 # }}} %changelog +* Mon Apr 28 2025 Felix Schwarz - 3.21.1-1 +- update to 3.21.1 + * Sat Apr 19 2025 Felix Schwarz - 3.21.0-1 - update to 3.21.0 diff --git a/sources b/sources index cec2b9c..490f57d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dns-lexicon-3.21.0.tar.gz) = 1b132fae2741d8cf505c0779724b5e0d518683226099c796f1b77b4ceb07e1fbecccb4d82869be090f2c379b3d17f19766857e49f83760d793a0934f520bc8ed +SHA512 (dns-lexicon-3.21.1.tar.gz) = 0f53001edf2425afe7b7c4315e974ee47c956b659964998b942943788711c57634eea2d7974e21005be7f0edf16800e6577c49c8789e34f2133c4f5be8ac7ac1 From 82f71c1257b29c45274d597f5d7ad7f7ed289411 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 6 Jun 2025 18:00:29 +0200 Subject: [PATCH 15/18] Rebuilt for Python 3.14 --- python-dns-lexicon.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index a282e72..1b1056b 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -20,7 +20,7 @@ Version: %{forgeversion} %bcond_without tests Name: python-%{pypi_name} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT @@ -227,6 +227,9 @@ ln -s lexicon-%{python3_version} lexicon-3 # }}} %changelog +* Fri Jun 06 2025 Python Maint - 3.21.1-2 +- Rebuilt for Python 3.14 + * Mon Apr 28 2025 Felix Schwarz - 3.21.1-1 - update to 3.21.1 From 9de8403851af075b371c8426c8b35cea82a12eb1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 07:39:27 +0000 Subject: [PATCH 16/18] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- python-dns-lexicon.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index 1b1056b..a82dbf2 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -20,7 +20,7 @@ Version: %{forgeversion} %bcond_without tests Name: python-%{pypi_name} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT @@ -227,6 +227,9 @@ ln -s lexicon-%{python3_version} lexicon-3 # }}} %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 3.21.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jun 06 2025 Python Maint - 3.21.1-2 - Rebuilt for Python 3.14 From 66df8eba2b9b9b82ff987e60998fdb3a77cbad71 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 13:38:37 +0200 Subject: [PATCH 17/18] Rebuilt for Python 3.14.0rc2 bytecode --- python-dns-lexicon.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index a82dbf2..cf4aa05 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -20,7 +20,7 @@ Version: %{forgeversion} %bcond_without tests Name: python-%{pypi_name} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT @@ -227,6 +227,9 @@ ln -s lexicon-%{python3_version} lexicon-3 # }}} %changelog +* Fri Aug 15 2025 Python Maint - 3.21.1-4 +- Rebuilt for Python 3.14.0rc2 bytecode + * Fri Jul 25 2025 Fedora Release Engineering - 3.21.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 398bc5a3a12b98ee0a76774cf1b424a11f4d9d4f Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 13:11:50 +0200 Subject: [PATCH 18/18] Rebuilt for Python 3.14.0rc3 bytecode --- python-dns-lexicon.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-dns-lexicon.spec b/python-dns-lexicon.spec index cf4aa05..de3d1f0 100644 --- a/python-dns-lexicon.spec +++ b/python-dns-lexicon.spec @@ -20,7 +20,7 @@ Version: %{forgeversion} %bcond_without tests Name: python-%{pypi_name} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT @@ -227,6 +227,9 @@ ln -s lexicon-%{python3_version} lexicon-3 # }}} %changelog +* Fri Sep 19 2025 Python Maint - 3.21.1-5 +- Rebuilt for Python 3.14.0rc3 bytecode + * Fri Aug 15 2025 Python Maint - 3.21.1-4 - Rebuilt for Python 3.14.0rc2 bytecode