Closed danrademacher closed 4 years ago
@danrademacher There is not much involved in the upgrade as we are using the default libraries of python. So we need to do the following steps for the upgrade. No changes involved in the code.
sudo yum install python3
pip install -r requirements.txt
python3 main.py
Well, that's easy. I think we might also need to upgrade the Heroku instance, since those I believe come with specific python versions installed. Probably also a good thing that Heroku would demand eventually anyway
Updated runtime.txt
to use Python 3.8
Found some minor instances of Python code needing updates, notably iterating over XXX.keys()
which is no longer supported unless one explicitly casts it using list()
Removed the verify=False
workaround when making requests to SODA API, as Python 3.8 (at least, on my Mac) seems to validate the certificates just fine whereas 2.7 did not.
The script ran perfectly from CLI.
I have deployed this to Heroku, confirming that the instance now uses Python 3.8, installed packages successfully, and gave no warnings. Tomorrow's run should be smooth.
Over in #26 @fahadkirmani recommended we upgrade to Python 3. Seems reasonable, but what's involved?