-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python3 support or workaround #1353
Comments
Hi @jamesbroadshaw , nice issue you found out !
While the second option may seem easier to implement, I'm not sure yet what would be best. |
Thanks for taking a look @tomparle (and all the other fixes you've contributed to keep play working with modern Java!) python2 is only present during the build stage (slug compiler) of the app, the actual runtime when the slug is deployed to the dyno does not have it (see yellow highlights here: https://devcenter.heroku.com/articles/stack-packages). I made a new app (replacing the top of the play python script of #!/usr/bin/env python with python2 to get it to build), and on the startup of the dyno: 2021-04-15T01:04:13.320317+00:00 app[web.1]: [heroku-exec] Starting If you then do a 'heroku run bash' to explore the runtime of heroku-20: ~ $ which python2 Here's what I found works with no changes needed in play or the buildpack:
heroku buildpacks:add --index 1 heroku-community/apt Create an 'Aptfile' in the root and add the following:
|
Ho, I did not see that python2 was not available on runtime. No wonder you could not find in with Heroku bash. Congratulations for your Aptfile workaround ! |
Hi all,
Some things to consider :
Here's my work in progress : https://github.com/tomparle/play1/tree/python3 |
Update : I fixed the modulesrepo error by upgrading the |
New update : I fixed some imports (which causes some errors in some pure Python3 environments), and could make this build works in the new cedar stack (heroku-20), so I'm getting quite confident in this upgrade @jamesbroadshaw ! |
Update : I did not notice that Python tests failed. |
As macOS 12.3 finally removed Python 2 which makes using Play 1.x impossible -- what's the status for the Python 3 migration? :) |
The PR works and is in the process of being merged this week :-) |
Sounds great, thank you! |
Yes the python3 should be the last feature to merge before releasing the 1.7.0, it expect to do it soon |
Hi, When is the python3 support expected to be online |
@liccoCode I encountered some issues when merging with the master codebase, and spent these two last days quite some time to fix new issues, with the help of @xael-fry. We're closer than ever, and we only have to fix the build process for some reason. Stay tuned ! |
@tomparle great! |
Regretted upgrading my macOS to Monterey. Currently using @tomparle's branch on my local |
Any idea on how to make it work on heroku-22? I get this error at the final line: |
Are you looking for help?
I have an app I am deploying to heroku and with the latest heroku-20 stack, support for python2 has been removed. I took a quick stab at trying to update play using 2to3 but ran into a bunch of issues (not being a python developer). Perhaps porting to python3 is too much work but is it possible to bundle in the python2 runtime locally for linux as it's done for Windows and use that by default? Open to any ideas and happy to put up a PR that's mostly broken for suggestions.
Play Version (1.5.x / etc)
1.6.0 (python2)
Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)
heroku-20 stack based on Ubuntu 20.04 LTS (without python2)
JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)
openjdk 16 2021-03-16
Library Dependencies
heroku-20
Expected Behavior
Please describe the expected behavior of the issue, starting from the first action.
Actual Behavior
python2 has been removed from heroku-20 stack and running the initial 'play' command gets a syntax error as it is being run with python3 instead.
The text was updated successfully, but these errors were encountered: