From 4de4b5249892e62dffb778b37a69f28508a91008 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Tue, 17 Dec 2024 09:55:31 -0800 Subject: [PATCH] Bump required octodns >= 1.5, address pending deprecations --- CHANGELOG.md | 7 +++++++ octodns_ovh/__init__.py | 3 --- pyproject.toml | 2 -- setup.py | 2 +- tests/test_provider_octodns_ovh.py | 29 ----------------------------- 5 files changed, 8 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f764012..e44f19a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v1.0.0 - 2024-??-?? - ??? + +### Notedworthy Changes: + +* `SPF` record support removed, records should be migrated to `TXT` before + upgrading. + ## v0.0.2 - 2022-11-20 - Less dots * Remove extra . on the end of SRV record targets diff --git a/octodns_ovh/__init__.py b/octodns_ovh/__init__.py index 870e406..5da9bc7 100644 --- a/octodns_ovh/__init__.py +++ b/octodns_ovh/__init__.py @@ -36,7 +36,6 @@ class OvhProvider(BaseProvider): 'NAPTR', 'NS', 'PTR', - 'SPF', 'SRV', 'SSHFP', 'TXT', @@ -241,7 +240,6 @@ def _data_for_DKIM(_type, records): _data_for_AAAA = _data_for_multiple _data_for_NS = _data_for_multiple _data_for_TXT = _data_for_multiple - _data_for_SPF = _data_for_multiple _data_for_PTR = _data_for_single _data_for_CNAME = _data_for_single @@ -336,7 +334,6 @@ def _params_for_TXT(self, record): _params_for_A = _params_for_multiple _params_for_AAAA = _params_for_multiple _params_for_NS = _params_for_multiple - _params_for_SPF = _params_for_multiple _params_for_CNAME = _params_for_single _params_for_PTR = _params_for_single diff --git a/pyproject.toml b/pyproject.toml index 5744e05..36bbb56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,5 @@ sections="FUTURE,STDLIB,THIRDPARTY,OCTODNS,FIRSTPARTY,LOCALFOLDER" [tool.pytest.ini_options] filterwarnings = [ 'error', - # TODO: remove once octodns 2.0 has been released - 'ignore:.*DEPRECATED.*2.0', ] pythonpath = "." diff --git a/setup.py b/setup.py index 6f0cc7b..c31eff7 100755 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ def version(): ), 'test': tests_require, }, - install_requires=('octodns>=0.9.14', 'ovh>=0.5.0'), + install_requires=('octodns>=1.5.0', 'ovh>=0.5.0'), license='MIT', long_description=long_description, long_description_content_type='text/markdown', diff --git a/tests/test_provider_octodns_ovh.py b/tests/test_provider_octodns_ovh.py index 7b27bb2..4dce6ee 100644 --- a/tests/test_provider_octodns_ovh.py +++ b/tests/test_provider_octodns_ovh.py @@ -247,28 +247,6 @@ class TestOvhProvider(TestCase): ) ) - # SPF - api_record.append( - { - 'fieldType': 'SPF', - 'ttl': 1000, - 'target': 'v=spf1 include:unit.texts.redirect ~all', - 'subDomain': '', - 'id': 13, - } - ) - expected.add( - Record.new( - zone, - '', - { - 'ttl': 1000, - 'type': 'SPF', - 'value': 'v=spf1 include:unit.texts.redirect ~all', - }, - ) - ) - # SSHFP api_record.append( { @@ -537,13 +515,6 @@ def test_apply(self, client_mock): target='10 mx1.unit.tests.', ttl=400, ), - call( - '/domain/zone/unit.tests/record', - fieldType='SPF', - subDomain='', - target='v=spf1 include:unit.texts.redirect ~all', - ttl=1000, - ), call( '/domain/zone/unit.tests/record', fieldType='SSHFP',