I found some link concern with install py3 with Nginx & uwsgi.

https://stackoverflow.com/questions/60115077/is-there-a-proper-way-to-make-web2py-use-python3-instead-of-python2

https://gist.github.com/simoncoulton/2625954

Anyway, I use Apache with libapache2-mod-wsgi-py3. It’s just work fine.

 

Sent from Mail for Windows 10

 

From: pa...@cancamusa.net
Sent: Saturday, September 5, 2020 8:29 AM
To: web2py-users
Subject: [web2py] Re: is there a guide / discussion / hints for migrating apps to python3?

 

If I got it right, it is just fine to run two web2py installs, one with python2, the other with python3, it is only required to edit wsgihandler.py and let it start with

 

#!/usr/bin/env python3

 

instead of

 

#!/usr/bin/env python

 

Regards

El sábado, 5 de septiembre de 2020 a las 12:08:35 UTC+2, pa...@cancamusa.net escribió:

 

Hello:

 

I know I'm late, but I'm migrating my app to python3. The 2to3 library did most of the work. Most of the remaining errors were simple to solve, having to do with string, bytes, encode and decode.

 

I found it odd that web2py returns str objects to the db queries, but the xml() method returns a bytes object. This made a few replacements and regex break, but it wasn't hard to fix. The translation object T() works either way, which is great.

 

Two issues I would like to comment:

  • the gluon.contrib.json module breaks. It can be fixed by 2to3 and a bit of manual tinkering. I guess it is not necessary any more and the job can be done with the standard library json, is it?
  • Can you point me to documentation / google group thread / whatever concerning a standard as-in-the-book install with uwsgi, emperor, nginx, etc. I can't find the right place to tell uwsgi to use python3. I would actually like to switch from python2 to python3 first in a test site, then in production, so for a time, there would be one web2py installation in python2 and other installation, with all its apps, in python3. Is this even possible? I will be researching this guide in the meantime: https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html#bonus-multiple-python-versions-for-the-same-uwsgi-binary

Regards

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/44c90a39-754a-4411-8954-0c5eb9a7e555n%40googlegroups.com.

 

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/A85E9122-B6B8-4E14-B9A0-7C3DA247D0F0%40hxcore.ol.

Reply via email to