diff --git a/CHANGELOG.md b/CHANGELOG.md index e7838a4..51995f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## v1.0.0 - 2024-??-?? - ??? + +Noteworthy Changes: + +* Complete removal of SPF record support, records should be transitioned to TXT + values before updating to this version. + +Changes: + +* Address pending octoDNS 2.x deprecations, require minimum of 1.5.x + ## v0.0.3 - 2024-02-19 - TLSA record support - Add support for TLSA records diff --git a/octodns_gandi/__init__.py b/octodns_gandi/__init__.py index 0a1f828..1751ba0 100644 --- a/octodns_gandi/__init__.py +++ b/octodns_gandi/__init__.py @@ -131,7 +131,6 @@ class GandiProvider(BaseProvider): 'MX', 'NS', 'PTR', - 'SPF', 'SRV', 'SSHFP', 'TLSA', @@ -162,7 +161,6 @@ def _data_for_multiple(self, _type, records): _data_for_A = _data_for_multiple _data_for_AAAA = _data_for_multiple _data_for_TXT = _data_for_multiple - _data_for_SPF = _data_for_multiple _data_for_NS = _data_for_multiple def _data_for_CAA(self, _type, records): @@ -315,7 +313,6 @@ def _params_for_multiple(self, record): _params_for_AAAA = _params_for_multiple _params_for_NS = _params_for_multiple _params_for_TXT = _params_for_multiple - _params_for_SPF = _params_for_multiple def _params_for_CAA(self, record): return { diff --git a/pyproject.toml b/pyproject.toml index 6343164..0d25b0c 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 6923135..0a1610f 100755 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ def version(): ), 'test': tests_require, }, - install_requires=('octodns>=0.9.17', 'requests>=2.27.0'), + install_requires=('octodns>=1.5.0', 'requests>=2.27.0'), license='MIT', long_description=long_description, long_description_content_type='text/markdown', diff --git a/tests/config/unit.tests.yaml b/tests/config/unit.tests.yaml index 5646679..b9d3fb6 100644 --- a/tests/config/unit.tests.yaml +++ b/tests/config/unit.tests.yaml @@ -1,19 +1,6 @@ --- ? '' -: - geo: - AF: - - 2.2.3.4 - - 2.2.3.5 - AS-JP: - - 3.2.3.4 - - 3.2.3.5 - NA-US: - - 4.2.3.4 - - 4.2.3.5 - NA-US-CA: - - 5.2.3.4 - - 5.2.3.5 - ttl: 300 +: - ttl: 300 type: A values: - 1.2.3.4 @@ -163,10 +150,6 @@ ptr: ttl: 300 type: PTR values: [foo.bar.com.] -spf: - ttl: 600 - type: SPF - value: v=spf1 ip4:192.168.0.1/16-all sub: type: 'NS' values: diff --git a/tests/test_octodns_provider_gandi.py b/tests/test_octodns_provider_gandi.py index 81c5a9b..bba39a2 100644 --- a/tests/test_octodns_provider_gandi.py +++ b/tests/test_octodns_provider_gandi.py @@ -31,7 +31,7 @@ class TestGandiProvider(TestCase): # We remove this record from the test zone as Gandi API reject it # (rightfully). - expected._remove_record( + expected.remove_record( Record.new( expected, 'sub', @@ -132,7 +132,7 @@ def test_populate(self): zone = Zone('unit.tests.', []) provider.populate(zone) - self.assertEqual(18, len(zone.records)) + self.assertEqual(17, len(zone.records)) changes = self.expected.changes(zone, provider) self.assertEqual(0, len(changes)) @@ -150,7 +150,7 @@ def test_populate(self): provider.populate(zone) self.assertEqual(13, len(zone.records)) changes = self.expected.changes(zone, provider) - self.assertEqual(26, len(changes)) + self.assertEqual(25, len(changes)) # 2nd populate makes no network calls/all from cache again = Zone('unit.tests.', []) @@ -392,16 +392,6 @@ def test_apply(self): 'rrset_values': ['foo.bar.com.'], }, ), - call( - 'POST', - '/livedns/domains/unit.tests/records', - data={ - 'rrset_name': 'spf', - 'rrset_ttl': 600, - 'rrset_type': 'SPF', - 'rrset_values': ['v=spf1 ip4:192.168.0.1/16-all'], - }, - ), call( 'POST', '/livedns/domains/unit.tests/records', @@ -440,7 +430,7 @@ def test_apply(self): ] ) # expected number of total calls - self.assertEqual(21, provider._client._request.call_count) + self.assertEqual(20, provider._client._request.call_count) provider._client._request.reset_mock()