From a1c090eeb78a86039f0b71cb932863d9a8c19d0c Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 9 Apr 2019 22:20:22 +0200 Subject: [PATCH 1/2] fix logging crash, fixes #424 --- src/nsupdate/api/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nsupdate/api/views.py b/src/nsupdate/api/views.py index ed8d4c0..9715fe7 100644 --- a/src/nsupdate/api/views.py +++ b/src/nsupdate/api/views.py @@ -134,7 +134,8 @@ def basic_authenticate(auth): return username, password -def check_api_auth(username, password): +@log.logger(__name__) +def check_api_auth(username, password, logger=None): """ Check username and password against our database. From 9a416fc6aaf440c783c02b8920701f061d1c6ce6 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 9 Apr 2019 22:26:07 +0200 Subject: [PATCH 2/2] fix setuptools_scm usage related crash, fixes #423 --- setup.py | 4 +++- src/nsupdate/__init__.py | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 6aba432..73e98ec 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,9 @@ with open('README.rst') as f: setup( name='nsupdate', - use_scm_version=True, + use_scm_version={ + 'write_to': 'src/nsupdate/_version.py', + }, url='http://github.com/nsupdate-info/nsupdate.info/', license='BSD', author='The nsupdate.info Team (see AUTHORS)', diff --git a/src/nsupdate/__init__.py b/src/nsupdate/__init__.py index de68a22..1e6875b 100644 --- a/src/nsupdate/__init__.py +++ b/src/nsupdate/__init__.py @@ -4,7 +4,7 @@ nsupdate - dynamic DNS service import re -from setuptools_scm import get_version +from ._version import version class Version(tuple): # pragma: no cover @@ -62,6 +62,3 @@ class Version(tuple): # pragma: no cover if self.additional != 'd0': version_str += self.additional return version_str - - -version = get_version()