From 9b7341fee2c32138563143c919648709a860c57e Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 11 Nov 2023 09:32:21 -0800 Subject: [PATCH 1/4] Add preferred __version__, per pep-8 --- CHANGELOG.md | 11 +++++++++-- octodns/__init__.py | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dde47b..a1b59b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,16 @@ ## v1.3.0 - 2023-??-?? - ??? +#### Noteworthy changes + +* Added octodns.__version__ to replace octodns.__VERSION__ as the former is more + of a standard, per pep-8. __VERSION__ is deprecated and will go away in 2.x +* Fixed issues with handling of chunking large TXT values for providers that use + the in-built `rrs` method + +#### Stuff + * Added ZoneNameFilter processor to enable ignoring/alerting on type-os like octodns.com.octodns.com -* Fixed issues with handling of chunking large TXT values for providers that use - the in-built `rrs` method * ExcludeRootNsChanges processor that will error (or warn) if plan includes a change to root NS records * Include the octodns special section info in Record __repr__, makes it easier diff --git a/octodns/__init__.py b/octodns/__init__.py index e106d6c..1ae31b0 100644 --- a/octodns/__init__.py +++ b/octodns/__init__.py @@ -1,3 +1,4 @@ 'OctoDNS: DNS as code - Tools for managing DNS across multiple providers' -__VERSION__ = '1.2.1' +# TODO: remove __VERSION__ w/2.x +__version__ = __VERSION__ = '1.2.1' From c9a2c8f72bb81eb81573eea5d21381c5f88aeeb4 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 11 Nov 2023 09:33:48 -0800 Subject: [PATCH 2/4] Simplify versioning, just use __version__ --- CHANGELOG.md | 2 ++ setup.py | 15 ++------------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1b59b1..efa7ba5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ of a standard, per pep-8. __VERSION__ is deprecated and will go away in 2.x * Fixed issues with handling of chunking large TXT values for providers that use the in-built `rrs` method +* Removed code that included sha in module version number when installing from + repo a it caused problems with non-binary installs. #### Stuff diff --git a/setup.py b/setup.py index aa02a1a..c75618d 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,7 @@ #!/usr/bin/env python from io import StringIO -from os import environ from os.path import dirname, join -from subprocess import CalledProcessError, check_output import octodns @@ -50,16 +48,7 @@ def long_description(): def version(): - # pep440 style public & local version numbers - if environ.get('OCTODNS_RELEASE', False): - # public - return octodns.__VERSION__ - try: - sha = check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8')[:8] - except (CalledProcessError, FileNotFoundError): - sha = 'unknown' - # local - return f'{octodns.__VERSION__}+{sha}' + return octodns.__VERSION__ tests_require = ('pytest>=6.2.5', 'pytest-cov>=3.0.0', 'pytest-network>=0.0.1') @@ -102,5 +91,5 @@ setup( python_requires='>=3.8', tests_require=tests_require, url='https://github.com/octodns/octodns', - version=version(), + version=octodns.__version__, ) From 44499a996e6198c1765f9a5d9cfe36768114889f Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 11 Nov 2023 12:38:10 -0800 Subject: [PATCH 3/4] Remove dead version function --- setup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.py b/setup.py index c75618d..a3e9ec5 100644 --- a/setup.py +++ b/setup.py @@ -47,10 +47,6 @@ def long_description(): return buf.getvalue() -def version(): - return octodns.__VERSION__ - - tests_require = ('pytest>=6.2.5', 'pytest-cov>=3.0.0', 'pytest-network>=0.0.1') setup( From 45900a861dc99ef3cc0a756c0ebbe84843defd69 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 11 Nov 2023 13:57:04 -0800 Subject: [PATCH 4/4] Correct a it -> as it type-o in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efa7ba5..8ec139a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ * Fixed issues with handling of chunking large TXT values for providers that use the in-built `rrs` method * Removed code that included sha in module version number when installing from - repo a it caused problems with non-binary installs. + repo as it caused problems with non-binary installs. #### Stuff