Re: [web2py] shell.py, unqualified exec is not allowed

2024-02-29 Thread Dave S
On Tuesday, February 6, 2024 at 11:40:00 AM UTC-8 apinho wrote:

Hi,

Thank you. 

I was under the impression that web2py was only compatible with Python2.7, 
and that py4web was for Python3x.
I now understand that py2web has been modified and is also compatible with 
Python3, up to 3.11.

That definitely opens new horizons for me. I might try to install Python3 
alongside, and use it's venv.
I think that might be less confusing than trying to install a newer 
Python2.7 version, on this system, do you agree ?

Is migrating an web2py from Python2.7 to Python 3x a straightforward task ? 
Or might it need some code refactoring ?

Alexandre


I would say that >90% is straightforward.   Clean up all your "print" 
statements to "print()" calls, and that will get most of it.  There are a 
couple of other syntactical changes, but not very many.  Depending on your 
needs, though, there may be some standard library that is no longer 
standard library.  I encountered this around some special cases for needing 
to use urllib2.

Good luck!

/dps


On Tuesday 6 February 2024 at 17:25:31 UTC Massimiliano wrote:

Take a look to pyenv or nix to install a python version apart from the 
system

On Mon, Feb 5, 2024 at 5:37 PM apinho  wrote:

Hello everyone,

I just migrated an old (2017-ish) web2py app, which was still hosted on a 
user machine, running on Rocket HTTP server.

The app is now on a CentOS 7 VM, under nginx/uwsgi using HTTPS.
Web2py version is 2.27.1, over Python 2.7.5, in a virtualenv.

All is OK as for the app itself, but now I as trying to setup cron to to 
delete old sessions, and I'm stuck with this :
*$ python web2py.py -S  -M -R scripts/sessions2trash.py -A -o -X 
3600 -f -v*
Traceback (most recent call last):
  File "web2py.py", line 44, in 
import gluon.widget
  File "/home/apinho/web2py/web2py/gluon/widget.py", line 28, in 
from gluon.console import console, is_appdir
  File "/home/apinho/web2py/web2py/gluon/console.py", line 53, in 
from gluon.shell import die
  File "/home/apinho/web2py/web2py/gluon/shell.py", line 305
exec(read_pyc(pycfile), _env)
SyntaxError: unqualified exec is not allowed in function 'run' it contains 
a nested function with free variables

I really have no clue what to do. There is little help online. The only one 
I could find says that upgrading to Python 2.7.18 would do the trick, but 
that would most probably wreck Centos7 (Which I am stuck with, for it is my 
company's mandatory Linux distro for production environments).

Any help would be much appreciated.
Alexandre

-- 
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+un...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/575fdca2-1b6d-4107-8b99-9c5e5a30n%40googlegroups.com
 

.



-- 
Massimiliano

-- 
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/27edec30-7eb4-4293-90c1-1ca5758623f7n%40googlegroups.com.


[web2py] Re: 2.19.0 vs 2.27.1

2024-02-29 Thread Dave S
On Monday, February 12, 2024 at 8:12:05 AM UTC-8 gaelpri...@gmail.com wrote:

Hello everybody.

I've actually some instances of web2py running with the 2.19.0 version.
0 problems, thank you web2py.

One of these is this one:
https://www.hydrover.it/ 

It uses the web2py grid, Bootstrap 2.3.2.

I must install a new web2py instance, where I'll copy the 
https://www.hydrover.it/  app, that'll be modified for fitting to another 
company.

Can I use the 2.27.1 without problems?

Thanks.



Backward compatibility is still quite good.  If you've already changed over 
to Python 3.x, you're probably in good shape.  Caveat:  I'm still on 
2.22.5., I use SQLFORM() rather than the grid, and haven't done much with 
the scheduler recently.

/dps
 

-- 
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/e9e95fd6-5bde-425a-9a15-c46cec275ef4n%40googlegroups.com.


[web2py] Re: web2py website

2024-02-29 Thread Dave S

On Wednesday, February 21, 2024 at 11:29:07 AM UTC-8 syna...@gmail.com 
wrote:

Will the web2py website be getting a refresh anytime? That award badge - 
it's from 14 years ago.


web2py is in maintenance mode.  Spiffing up the website  isn't an important 
sales tool.  Here's hoping py4web gets some new award badges as it takes 
over the world.

/dps

-- 
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/fda20135-7b2e-454e-aa10-b6600df4275dn%40googlegroups.com.


Re: [web2py] web2py AWS cognito authentication

2024-02-29 Thread Silvian Cedru
You still know how you did it ? 

Best Regards 


kryto...@gmail.com schrieb am Dienstag, 18. September 2018 um 22:32:15 
UTC+7:

> Hi, yes the pool has been created successfully in AWS. When I use test 
> units to test the code on the class the authentication works correctly and 
> AWS responds with a Token.
>
>
>
>
>

-- 
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/8faa70f2-7408-4d08-96f0-7fe9a616ae23n%40googlegroups.com.