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

Python 3.8/9/10 Support #76

Open Sbacon017 opened 2 years ago

Sbacon017 commented 2 years ago

Are there plans to support the most recent versions of Python? Right now the only supported version of Python that hasn't reached it's end-of-life is 3.7. If these plans exist, is there a timeline? What sort of work needs to be done to enable support for more recent versions of Python?

Opening this thread both as a question and a place for discussion.

jfriedr commented 2 years ago

@Sbacon017 great question. A plan does not exist and I'm not entirely sure how much additional work will be required to get this working if our current suite of tests do not pass. That being said I will go ahead and start incrementing the python versions + running our current test suite to see what fails (and report back here with my findings).

To use the tests do the following:

python setup.py test

3 tests will fail if the local env variable SHIPPO_API_KEY is set and being used. To use this set the env variable:

$ export SHIPPO_API_KEY="shippo_live_<shippo live token>"

jfriedr commented 2 years ago

Using python 3.10 the basic shipment example was able to retrieve rates.

Sbacon017 commented 2 years ago

@jfriedr Thanks for getting back to me! This is great news, I'm not whether or not you take this to mean you officially support up to Python 3.10, but it seems like it will be enough to unblock us from upgrading.

JerryMartinsonLeviti commented 1 year ago

There does appear to be some problems with the new async keyword that was introduced into latter python versions. This only seems to happen when the code is using async APIs i.e. async=True Not sure if there are any plans for this or not. I would suggest that this is kind of important to python implementations that need to be performant.

cnr91 commented 1 year ago

There does appear to be some problems with the new async keyword that was introduced into latter python versions. This only seems to happen when the code is using async APIs i.e. async=True Not sure if there are any plans for this or not. I would suggest that this is kind of important to python implementations that need to be performant.

I have the same problem with python 3.8.5. How can we eliminate this problem?