From 21322eb51cd2e5f472b7664093a619a3eda3cf2b Mon Sep 17 00:00:00 2001 From: Nicolas Mussat Date: Wed, 13 Jan 2021 13:06:15 +0100 Subject: [PATCH] Fix SyntaxWarning with Python 3.8+ New warning introduced in Python 3.8 (see https://docs.python.org/3/whatsnew/3.8.html#changes-in-python-behavior) --- CHANGELOG.md | 6 ++++++ delighted/__init__.py | 2 +- delighted/resource.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ba7c95..0d420b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 4.0.1 (2021-01-13) + +Bugfixes: + +- Fix incorrect usage of `is not`, emiting SyntaxWarning in Python 3.8+ + ## 4.0.0 (2020-03-18) Features: diff --git a/delighted/__init__.py b/delighted/__init__.py index 683126f..db111b8 100644 --- a/delighted/__init__.py +++ b/delighted/__init__.py @@ -1,5 +1,5 @@ __title__ = 'delighted' -__version__ = '4.0.0' +__version__ = '4.0.1' __author__ = 'Ben Turner' __license__ = 'MIT' diff --git a/delighted/resource.py b/delighted/resource.py index f1bc7d1..4e745a5 100644 --- a/delighted/resource.py +++ b/delighted/resource.py @@ -31,7 +31,7 @@ def __setattr__(self, k, v): self[k] = v def __getattr__(self, k): - if k[0] == '_' and k is not '_attrs': + if k[0] == '_' and k != '_attrs': raise AttributeError(k) try: