csparpa / pyowm

A Python wrapper around the OpenWeatherMap web API
https://pyowm.readthedocs.io
MIT License
789 stars 171 forks source link

pyowm 3.x is not available for Python 3.6 #317

Closed craigmaloney closed 3 years ago

craigmaloney commented 4 years ago

I have a situation where Python 3.6 is the version that I'm using, but it seems that PyOWM 3.x is only available for Python 3.7 and higher.

Would it be possible to support Python 3.6?

csparpa commented 4 years ago

Hi, PyOWM support for Python 3.7+ was decided by-design

Anyway, fear not! I am pretty sure that PyOWM runs smoothly on Python 3.5 and 3.6, as no version-dependent language construct is actually used (anyway I might be wrong, will check it out)

You can give it a try - but you won't be able to install PyOWM via pip, what you need to do is:

  1. clone the repo with Git: git clone https://github.com/csparpa/pyowm.git
  2. modify the setup.py in the root folder as follows:
# ....
 python_requires='>=3.5',  # remove 3.7 and replace with 3.5
# ....
  1. install with: python3.6 setup.py install

If you're super-zealant, you could also try to run unit tests between steps 2 and 3

Let me try if that works out (as I haven't actually tested out these steps)

craigmaloney commented 4 years ago

I opted for using PyOWM 2.x as it was simpler for me to get started, once I realized that all of the examples were written for PyOWM 3.x. It was frustrating, which is why I was hoping others might not have to go through this pain.

csparpa commented 4 years ago

Please, no! :-( NEVER opt in for a dead technology!!!

Would you help me with testing the above solution? I will test it on Py35 and Py36 on my side as well and if no issues arise then support could be extended to those versions

craigmaloney commented 4 years ago

You left me no choice but to opt for dead technology.

I'll be happy to test with a beta release, but at the moment I don't have the bandwidth to rewrite the code that I created. I'll try it later on.

csparpa commented 4 years ago

OK, I'm sorry about that Let me know if you come up with anything - I'll do the same gig on my side

Jsiewierski11 commented 4 years ago

Is there anywhere to find examples written for PyOWM 2.x? I am in the same situation as @craigmaloney

csparpa commented 4 years ago

Hi @Jsiewierski11 yes you can find examples for PyOWM 2.10 at this section of the documentation: https://pyowm.readthedocs.io/en/2.10/