summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Brox <tobias@redpill-linpro.com>2022-05-08 18:33:21 +0200
committerTobias Brox <tobias@redpill-linpro.com>2022-05-08 18:33:21 +0200
commita82cb81d02fe207106951cdecd49fefc8146155a (patch)
tree823ea54bb83e2a550b9e8f3825acd3fc3d9f38a6
parentea4fb0845343436fd5f4cb65852ee1437505ae58 (diff)
downloadpython-caldav-a82cb81d02fe207106951cdecd49fefc8146155a.zip
Trying to maintain compatibility with elder python versions. Changing a new-style f'string' with 'string' % (var1, var2)
-rw-r--r--caldav/lib/error.py4
-rw-r--r--changelog-0.9.md6
-rwxr-xr-xsetup.py2
3 files changed, 9 insertions, 3 deletions
diff --git a/caldav/lib/error.py b/caldav/lib/error.py
index 739ab95..a63ec12 100644
--- a/caldav/lib/error.py
+++ b/caldav/lib/error.py
@@ -12,7 +12,7 @@ except:
## The default debugmode should be PRODUCTION in official releases,
## and DEVELOPMENT when doing beta testing.
## TODO: find some way to automate this.
- debugmode = 'PRODUCTION'
+ debugmode = 'DEVELOPMENT'
log = logging.getLogger('caldav')
if debugmode.startswith('DEBUG'):
@@ -45,7 +45,7 @@ class DAVError(Exception):
self.reason = reason
def __str__(self):
- return f"{self.__class__.__name__} at '{self.url}', reason '{self.reason}'"
+ return "%s at '%s', reason %s" % (self.__class__.__name__, self.url, self.reason)
class AuthorizationError(DAVError):
"""
diff --git a/changelog-0.9.md b/changelog-0.9.md
index 1a11ab1..d38f809 100644
--- a/changelog-0.9.md
+++ b/changelog-0.9.md
@@ -1,3 +1,9 @@
+# Changelog v0.9.0 -> v0.9.1
+
+## Bugfixes
+
+v0.9.0 broke on elder python versions due to an f"string". The f-format was introduced in python 3.6. Anything below is actually End of Life versions, but still ... it's a very small effort here to preserve compatibility with elder python versions.
+
# Changelog v0.8.2 -> v0.9
## API changes
diff --git a/setup.py b/setup.py
index bda5fc5..4de49dc 100755
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ import sys
## ATTENTION! when doing releases, the default debugmode in lib/error.py should be set to PRODUCTION.
## (TODO: any nicer ways than doing this manually? Make a "releases" branch, maybe?)
-version = '0.9.0'
+version = '0.9.1dev'
if __name__ == '__main__':
## For python 2.7 and 3.5 we depend on pytz and tzlocal. For 3.6 and up, batteries are included. Same with mock. (But unfortunately the icalendar library only support pytz timezones, so we'll keep pytz around for a bit longer).