Skip to content
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

Migrate to Python 3 runtime of Google App Engine #154

Merged
merged 14 commits into from Jun 12, 2020
Merged

Migrate to Python 3 runtime of Google App Engine #154

merged 14 commits into from Jun 12, 2020

Conversation

aktech
Copy link
Member

@aktech aktech commented Jun 4, 2020

This migrates the application to Python3 runtime of Google App Engine.

  • Remove submodules
  • Remove vendor requirements
  • Use requirements.txt
  • Add .gcloudignore
  • Make application compatible with Python 3.7
  • Run app directly instead of Docker compose.

Further cleanups will happen in later Pull requests.

@aktech aktech requested a review from asmeurer June 4, 2020 01:17
@aktech aktech added this to Progress in GAE Python 3 Jun 4, 2020
@asmeurer
Copy link
Member

asmeurer commented Jun 4, 2020

So the submodules aren't needed anymore?

@aktech
Copy link
Member Author

aktech commented Jun 4, 2020

Yes, they aren't needed anymore. We install everything via requirements.txt

@asmeurer
Copy link
Member

asmeurer commented Jun 4, 2020

I see. IIRC we were pinned to some commit between versions. We should make sure 0.7.5 doesn't break anything.

@aktech
Copy link
Member Author

aktech commented Jun 4, 2020

Yes, correct. I tried to break, but everything seems to work of what I tried: https://py3-runtime-dot-sympy-gamma-hrd.appspot.com/

@aktech
Copy link
Member Author

aktech commented Jun 10, 2020

I have tried all the possible cases I can think of and the tests passes as well. I'll merge this in next 48 hours if no objections.

@asmeurer
Copy link
Member

We can still do a quick revert in the deploy if this ends up breaking, right?

@aktech
Copy link
Member Author

aktech commented Jun 10, 2020

Yup, quite easily.

@asmeurer
Copy link
Member

OK. I wasn't sure if switching the runtime had an effect on that.

@aktech aktech merged commit 17b9f0e into master Jun 12, 2020
3 checks passed
GAE Python 3 automation moved this from Progress to Done Jun 12, 2020
@aktech aktech deleted the py3-runtime branch June 12, 2020 10:14
@WaleedSaleh
Copy link

I would really thank you for this perfect work
but when running the app it is plain HTML there are no styles, whereas the styles respond with 200 status code.

@aktech
Copy link
Member Author

aktech commented Jun 12, 2020

@WaleedSaleh It could be a caching issue, can you try doing a Hard refresh on your browser (you can Google for your browser on how to do that.). Also just to confirm, can you share the command you are using to run the app?

@aktech
Copy link
Member Author

aktech commented Jun 13, 2020

@WaleedSaleh I see why you're seeing that error, you need to set Debug=True in settings.py for serving static files locally:

DEBUG = False

I have created a PR for mentioning this in the README: #158 Thanks for pointing this out.

@WaleedSaleh
Copy link

You're welcome, I used docker-compose up for running the app because when using "python mange.py runserver" this error occurs:

File "C:\Users\walee\OneDrive\Desktop\Freelance\sympy_gamma\venv\lib\site-packages\grpc_init_.py", line 23, in
from grpc._cython import cygrpc as _cygrpc
File "src\python\grpcio\grpc_cython\cygrpc.pyx", line 27, in init grpc.cython.cygrpc
File "C:\Users\walee\AppData\Local\Programs\Python\Python37\lib\asyncio_init
.py", line 39, in
from .windows_events import *
File "C:\Users\walee\AppData\Local\Programs\Python\Python37\lib\asyncio\windows_events.py", line 19, in
from . import windows_utils
File "C:\Users\walee\AppData\Local\Programs\Python\Python37\lib\asyncio\windows_utils.py", line 126, in
class Popen(subprocess.Popen):
TypeError: NoneType takes no arguments

@aktech
Copy link
Member Author

aktech commented Jun 13, 2020

@WaleedSaleh docker-compose up is the correct command. If you make the change suggested above it's should work.

@WaleedSaleh
Copy link

@aktech thank you, it worked with docker-compose up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
GAE Python 3
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants