Skip to content

Commit

Permalink
removed python 2.6 dependancy and updated arrow version.
Browse files Browse the repository at this point in the history
Aimed to fix Backblaze#551
  • Loading branch information
sww1235 committed Mar 8, 2019
1 parent 6e9bcc0 commit 5c82bd6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ notifications:
language: python

python:
- 2.6
- 2.7
- 3.4
- 3.5
Expand Down
3 changes: 0 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 2 additions & 4 deletions b2/b2http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 5c82bd6

Please sign in to comment.