Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #57 from goshippo/v2.0.0
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
Matt Hwang authored Jan 10, 2020
2 parents 38f9b88 + e7a634e commit be6a4b9
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 20 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
language: python
python:
- "2.6"
- "2.7"
- "pypy"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
install:
- python setup.py install
script:
Expand Down
9 changes: 8 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Release History
---------------
2.0.0rc1 (2017-03-29)

2.0.0 (2020-01-10)

**Behavioural Changes**

- Update default API version to 2018-02-08. For more information on versioning and upgrading your version, please refer to https://goshippo.com/docs/versioning

2.0.0rc1 (2019-05-06)
+++++++++++++++++++

**Behavioural Changes**
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2014 Shippo (http://goshippo.com)
Copyright (c) 2020 Shippo (http://goshippo.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Configurable variables previously available in the main module (ex: `shippo.api_
import shippo

shippo.config.api_key = "<API-KEY>"
shippo.config.api_version = "2017-03-29"
shippo.config.api_version = "2018-02-08"
shippo.config.verify_ssl_certs = True
shippo.config.rates_req_timeout = 30.0
```
Expand Down
2 changes: 2 additions & 0 deletions contributors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ Eyoel Asfaw <[email protected]>
Subhi Beidas <[email protected]>
Matthieu Nowicki <[email protected]>
Steve Byerly <[email protected]>
Malcolm Rebughini <[email protected]>
Matthew Hwang <[email protected]>
4 changes: 2 additions & 2 deletions examples/filter-by-delivery-time.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@

# filter rates by max. transit time, then select cheapest
eligible_rate = (
rate for rate in rates if rate['days'] <= MAX_TRANSIT_TIME_DAYS)
rate for rate in rates if rate['estimated_days'] <= MAX_TRANSIT_TIME_DAYS)
rate = min(eligible_rate, key=lambda x: float(x['amount']))
print("Picked service %s %s for %s %s with est. transit time of %s days" %
(rate['provider'], rate['servicelevel']['name'], rate['currency'], rate['amount'], rate['days']))
(rate['provider'], rate['servicelevel']['name'], rate['currency'], rate['amount'], rate['estimated_days']))

# Purchase the desired rate. asynchronous=False indicates that the function will wait until the
# carrier returns a shipping label before it returns
Expand Down
4 changes: 2 additions & 2 deletions examples/purchase-fastest-service.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@

# Find the fastest possible transite time
eligible_rates = (
rate for rate in rates if rate['days'] <= MAX_TRANSIT_TIME_DAYS)
rate for rate in rates if rate['estimated_days'] <= MAX_TRANSIT_TIME_DAYS)
rate = min(eligible_rates, key=lambda x: float(x['amount']))
print("Picked service %s %s for %s %s with est. transit time of %s days" %
(rate['provider'], rate['servicelevel']['name'], rate['currency'], rate['amount'], rate['days']))
(rate['provider'], rate['servicelevel']['name'], rate['currency'], rate['amount'], rate['estimated_days']))

# Purchase the desired rate. asynchronous=False indicates that the function will wait until the
# carrier returns a shipping label before it returns
Expand Down
6 changes: 3 additions & 3 deletions shippo/api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def request_raw(self, method, url, params=None):
if my_api_key is None:
raise error.AuthenticationError(
'No API key provided. (HINT: set your API key using '
'"shippo.api_key = shippo_test_d90f00698a0a8def0495fddb4212bb08051469d3"). You can generate API keys '
'"shippo.config.api_key = shippo_test_d90f00698a0a8def0495fddb4212bb08051469d3"). You can generate API keys '
'from the Shippo web interface. See https://goshippo.com/api '
'for details, or email support@goshippo.comom if you have any '
'for details, or email support@goshippo.com if you have any '
'questions.')

token_type = 'ShippoToken'
Expand All @@ -122,7 +122,7 @@ def request_raw(self, method, url, params=None):
else:
raise error.APIConnectionError(
'Unrecognized HTTP method %r. This may indicate a bug in the '
'Shippo bindings. Please contact [email protected].com for '
'Shippo bindings. Please contact [email protected] for '
'assistance.' % (method,))

ua = {
Expand Down
2 changes: 1 addition & 1 deletion shippo/certificate_blacklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def verify(hostname, certificate):
"connect to a server that has a revoked "
"SSL certificate, which means we cannot "
"securely send data to that server. "
"Please email support@goshippo.comom if you "
"Please email support@goshippo.com if you "
"need help connecting to the correct API "
"server.")
return True
2 changes: 1 addition & 1 deletion shippo/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configurable variables
api_key = None
api_base = 'https://api.goshippo.com/'
api_version = None
api_version = '2018-02-08'
verify_ssl_certs = True
rates_req_timeout = 20.0
2 changes: 1 addition & 1 deletion shippo/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self, message=None, http_body=None, http_status=None,
http_body = http_body.decode('utf-8')
except:
http_body = ('<Could not decode body as utf-8. '
'Please report to support@goshippo.comom>')
'Please report to support@goshippo.com>')

self.http_body = http_body

Expand Down
2 changes: 1 addition & 1 deletion shippo/test/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def setUp(self):
shippo.config.api_key = os.environ.get(
'SHIPPO_API_KEY', '51895b669caa45038110fd4074e61e0d')
shippo.config.api_version = os.environ.get(
'SHIPPO_API_VERSION', '2017-03-29')
'SHIPPO_API_VERSION', '2018-02-08')

def tearDown(self):
super(ShippoTestCase, self).tearDown()
Expand Down
2 changes: 1 addition & 1 deletion shippo/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '2.0.0rc1'
VERSION = '2.0.0'

0 comments on commit be6a4b9

Please sign in to comment.