Closed JetUni closed 4 years ago
async is a keyword in later python versions. So:
@classmethod
def get_rates(cls, object_id, async_=False, api_key=None, currency=None, **params):
"""
Given a valid shipment object_id, all possible rates are calculated and returned.
"""
if 'sync' in params:
warnings.warn('The `sync` parameter is deprecated. '
'Use `async` while creating a shipment instead.', DeprecationWarning)
# will be removed in the next major version
if params.get('sync') is not None:
async_ = not params['sync']
if not async_:
timeout = time.time() + rates_req_timeout
while cls.retrieve(object_id, api_key=api_key).status in ("QUEUED", "WAITING") and time.time() < timeout:
continue
shipment_id = urllib.parse.quote_plus(object_id)
url = cls.class_url() + shipment_id + '/rates/'
if currency:
url = url + '' + urllib.parse.quote_plus(currency)
requestor = api_requestor.APIRequestor(api_key)
response, api_key = requestor.request('get', url)
return convert_to_shippo_object(response, api_key)
doesn't work unless async is repaced out (as I have done there).
https://github.com/goshippo/shippo-python-client/pull/47 addresses this. Any chance we can get that merged sometime soon?
any timeline on this? this is the furthest behind of all the packages in our app
Shippo 2019 OKR: Shippo is the leading shipping software As measured by... having a Python client that supports the latest version of Python.
This will help you meet your 2019 OKR!
@zowen I'll try to review and merge #47 and release the new version by today.
Any chance this will get merged and fixed soon? Looking to evaluate if we might be able to utilize the python wrapper for our use cases running v. 3.7.3.
Hi everyone, just got around to making a release. It is version 2.0.0rc1
since there are multiple breaking changes (dropping support for some python versions, some config changes detailed in the readme, and the async param removal).
You can follow #51 for more info. I'll keep this issue around until 2.0.0
is released.
Hi @malcolmrebughini Any update?
+1, this is important for us too.
Version 2.0.0 has been released today with support up to Python 3.7. Thanks everyone for their patience on this
From what I can see, this project only supports up to Python 3.3, but as you can see from [1], this version is past its EOL. Could you update this package to be compatible with Python 3.6 which has support until 2021-12-23?
[1] https://devguide.python.org/#branchstatus