Thanks Simon! Py 3.12 indeed works.

simon...@gmail.com schrieb am Freitag, 13. Dezember 2024 um 15:12:47 UTC+1:

> cgi is removed in python 3.13. Web2Py was only tested in python 3.12, as 
> fas as I know.
>
> There is a legacy-cgi package on pypy that might help you:
>
> https://stackoverflow.com/questions/78635741/drop-in-replacement-for-the-cgi-module
>
>
> spamf...@gmail.com schrieb am Donnerstag, 12. Dezember 2024 um 14:32:25 
> UTC+1:
>
>> I've downloaded the latest source release (3.0.9) and installed it on 
>> macos. When I run it with Python 3.13.0, I get the ModuleNotFoundError 
>> below. Apparently cgi was removed in Py 3.8. 
>>
>> When I run it with Python 3.7, the error does not occur, and my app (that 
>> I've just ported from Python 2) seems to work by and large, although the 
>> local webserver at times stalls for up to half a minute (no errors; have 
>> not yet spent much time investigating).
>>
>> However, the website says "Future versions of web2py will require 3.9 or 
>> greater.". Which Python version am I supposed to use for the time being? 
>>
>> Traceback (most recent call last):
>>   File "/Users/sfx/dev/mdb/web2py-3.0.9/web2py.py", line 58, in <module>
>>     main()
>>     ~~~~^^
>>   File "/Users/sfx/dev/mdb/web2py-3.0.9/web2py.py", line 41, in main
>>     import gluon.widget
>>   File "/Users/sfx/dev/mdb/web2py-3.0.9/gluon/__init__.py", line 150, in 
>> <module>
>>     from .compileapp import LOAD
>>   File "/Users/sfx/dev/mdb/web2py-3.0.9/gluon/compileapp.py", line 35, in 
>> <module>
>>     from gluon.dal import DAL, Field
>>   File "/Users/sfx/dev/mdb/web2py-3.0.9/gluon/dal.py", line 17, in 
>> <module>
>>     from gluon import sqlhtml
>>   File "/Users/sfx/dev/mdb/web2py-3.0.9/gluon/sqlhtml.py", line 36, in 
>> <module>
>>     from gluon.globals import current
>>   File "/Users/sfx/dev/mdb/web2py-3.0.9/gluon/globals.py", line 15, in 
>> <module>
>>     import cgi
>> ModuleNotFoundError: No module named 'cgi'
>>
>>
>> jimka...@yahoo.com schrieb am Dienstag, 3. Dezember 2024 um 19:48:25 
>> UTC+1:
>>
>>> Hi Massimo,
>>>
>>> Started moving to 3.08 literally a few minutes ago. The only change so 
>>> far in what I downloaded from the web2py site is that I added my 
>>> application to the application list. I'm trying Python3.12 on macOS Sequoia.
>>> When I try to run my app, the following error appears immediately - 
>>> File ".../web2py/applications/admin/controllers/default.py", line 1774, in 
>>> make_link
>>> return to_native(A('"' + tryFile + '"',
>>> ^^^^^^^^^
>>> NameError: name 'to_native' is not defined
>>>
>>>
>>> If I try to go to  "list by exceptions", the list of exceptions comes 
>>> up, but if I try to click on one, web2py raises another exception and seems 
>>> to hang
>>>
>>> Does that give you enough info at this point?
>>> On Monday, December 2, 2024 at 2:52:24 AM UTC-8 simon...@gmail.com 
>>> wrote:
>>>
>>>> Hi Massimo,
>>>>
>>>> I am testing with Python 3.11 and so far, I found one bug in the 
>>>> admin-application: the view on todolist.load uses reduce() which is 
>>>> undefined:
>>>> <class 'NameError'> name 'reduce' is not defined
>>>> Version
>>>> web2py™ Version 3.0.8-stable+timestamp.2024.12.01.23.08.05
>>>> Python Python 3.11.2: /home/web2py/myappenv/bin/uwsgi (prefix: 
>>>> /home/web2py/myappenv)
>>>> Traceback (most recent call last):
>>>>   File "/home/web2py/myapp/gluon/restricted.py", line 214, in restricted
>>>>     exec(ccode, environment)
>>>>   File 
>>>> "/home/web2py/myapp/applications/admin/views/default/todolist.load", line 
>>>> 2, in <module>
>>>>     <!--div class="page-header"-->
>>>>            ^^^^^^
>>>> NameError: name 'reduce' is not defined
>>>>
>>>> Massimo Di Pierro schrieb am Montag, 2. Dezember 2024 um 08:29:45 UTC+1:
>>>>
>>>>> Found a lot of bugs introduced in the port from 2.7 to 3.9+.
>>>>>
>>>>> All known bugs introduced in porting from Python 2.7 to 3.9 have been 
>>>>> fixed but one. The window binary (based on python 3.12) does not include 
>>>>> Tk 
>>>>> and therefore only provides a console, not a GUI.
>>>>>
>>>>> I could use more help in testing existing apps. Please report anything 
>>>>> that seems broken.
>>>>> Many thanks to everybody how has already helped and pushed for this 
>>>>> overdue work.
>>>>>
>>>>> Massimo
>>>>>
>>>>>
>>>>>

-- 
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 visit 
https://groups.google.com/d/msgid/web2py/e256896c-c88e-4ff9-bab6-4c576cf79825n%40googlegroups.com.

Reply via email to