I am currently running an experiment which I originally wrote in otree 3, and therefore have kept in the old format since it is so far has been working well. However, today after I tried to deploy a very minor bugfix via otreehub, I got the following message:
-----> Building on the Heroku-18 stack
-----> Using buildpack: heroku/python
-----> Python app detected
-----> Using Python version specified in runtime.txt
! Python has released a security update! Please consider upgrading to python-3.9.7
Learn More:
https://devcenter.heroku.com/articles/python-runtimes-----> Requirements file has been changed, clearing cached dependencies
-----> Installing python-3.9.2
-----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting otree<3.9
Downloading otree-3.4.0.tar.gz (321 kB)
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_w0gxgqk/otree/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_w0gxgqk/otree/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-7qtiveog
cwd: /tmp/pip-install-_w0gxgqk/otree/
Complete output (1 lines):
This version of oTree is not compatible with Python 3.9.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
! Push rejected, failed to compile Python app.
! Push failed
I have tride to specify python-3.8.12 or python-3.7.12 in a file runtime.txt, but it seems like the otree zip command deletes that file when I run it. I completely understand that it is not a priority to include python 3.9 support for older otree versions, but would greatly appreciate any help with how to specify an older compatible python version on heroku.