From 5c82bd6ca99a5e161ed0939a30ffb4a4128404b1 Mon Sep 17 00:00:00 2001 From: sww1235 Date: Fri, 8 Mar 2019 11:25:30 -0700 Subject: [PATCH] removed python 2.6 dependancy and updated arrow version. Aimed to fix #551 --- .travis.yml | 1 - appveyor.yml | 3 --- b2/b2http.py | 6 ++---- requirements.txt | 2 +- setup.py | 1 - 5 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3f7320628..c0fb098a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ notifications: language: python python: - - 2.6 - 2.7 - 3.4 - 3.5 diff --git a/appveyor.yml b/appveyor.yml index 1fc982d40..cd9bf6876 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,9 +11,6 @@ environment: # Python names come from: https://www.appveyor.com/docs/build-environment/#python - # Python 2.6 does not work any more. It gets errors installing arrow. - # I'm not going to take the time right now to figure out why. - - PYTHON: "C://Python27" PYTHON_VERSION: "2.7" PYTHON_ARCH: "32" diff --git a/b2/b2http.py b/b2/b2http.py index ab699c8a7..55dca09fa 100644 --- a/b2/b2http.py +++ b/b2/b2http.py @@ -191,12 +191,10 @@ def post_request(self, method, url, headers, http_response): # Get the local time local_time = arrow.utcnow() - # Check the difference. The timedelta.total_seconds() method is not available - # in Python 2.6, so we'll compute it using the formula from the Python docs. + # Check the difference. max_allowed = 10 * 60 # ten minutes, in seconds skew = local_time - server_time - skew_seconds = int( - (skew.microseconds + (skew.seconds + skew.days * 24 * 3600) * 1000000) / 1000000 + skew_seconds = skew.total_seconds() ) if max_allowed < abs(skew_seconds): raise ClockSkew(skew_seconds) diff --git a/requirements.txt b/requirements.txt index 877496f4f..d966271fe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -arrow>=0.8.0,<0.12.1 +arrow>=0.8.0,<0.13.1 logfury>=0.1.2 requests>=2.9.1 six>=1.10 diff --git a/setup.py b/setup.py index 31a431547..c3549814a 100644 --- a/setup.py +++ b/setup.py @@ -91,7 +91,6 @@ # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4',