goshippo / shippo-python-client

Shipping API Python library (USPS, FedEx, UPS and more)
https://goshippo.com/docs
MIT License
123 stars 70 forks source link

Supported Python version is out of date #45

Closed JetUni closed 4 years ago

JetUni commented 6 years ago

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

lucqui commented 6 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).

zimventures commented 5 years ago

https://github.com/goshippo/shippo-python-client/pull/47 addresses this. Any chance we can get that merged sometime soon?

zowen commented 5 years ago

any timeline on this? this is the furthest behind of all the packages in our app

zowen commented 5 years ago

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!

see: https://github.com/goshippo/about-us

malcolmrebughini commented 5 years ago

@zowen I'll try to review and merge #47 and release the new version by today.

andessen commented 5 years ago

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.

malcolmrebughini commented 5 years ago

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.

daxaxelrod commented 5 years ago

Hi @malcolmrebughini Any update?

vsoch commented 5 years ago

+1, this is important for us too.

hwangm commented 4 years ago

Version 2.0.0 has been released today with support up to Python 3.7. Thanks everyone for their patience on this