Hello,
I'm trying to convert my web2py apps to Ubuntu 20.4 / apache2/wsgi using
python 3.8.5, and as I'm not an IT expert, the only way I found was to
change the import instructions in a series of modules. I am aware I
shouldn't do this, but I couldn't find any alternative...
I would apreciate getting any feedback with another solution, and/or
corrections of my 'durty coding'.
Action 1:
- usr/lib/python3/dist-packages/yaml___init.py - line 399:
replace def class YAMLObject(metaclass=YAMLObjectMetaclass):
by
def class YAMLObject:
__metaclass__=YAMLObjectMetaclass
Action 2:
create /etc/securetty file (there was an example of content of this file in
/usr/share/doc/util-linux/examples/securetty)
Action 3:
add following line in
/homr/www-data/web2py/gulon/packages/dal/pydal/adapters/base.py, line 16:
if not '/usr/lib/python3/dist-packages' in sys.path:
sys.path.append(''/usr/lib/python3/dist-packages')
Action 4:
This 'import' instrunction of python is incompatible with the previous
version. In each module (for instance gluon), the import of 'brother
modules' (modules in the same folder than gluon) are done with the
following type of instruction: 'from gluon import xxx'
This doesn't work in my configuration, because import instructions starting
with a 'from' are supposed to refer to the relative path of the module, and
not the absolute path (which scans sys.path).
=> this instrunction must be changed (for instance by 'from .gluon import
xxx')
I am still working to get my system running, but at least, I can start
web2py...
I do not want to enter into phylosophical discussion about what I am
authorized to do or not, and I hope that in early 2021, the evolution of
ubuntu, python, web2py and other usefull packages will take care to keep
harmony in the strategy of their evolution.
Le vendredi 29 novembre 2019 à 21:20:38 UTC+1, [email protected] a écrit :
> Maybe, it wasn't on the radar of the django developers either and had to
> be fixed in the framework after python3 was released.
>
> Happens sometimes I suppose, hard to keep up with depreciation of
> functions and the impact on a framework.
>
> Anyways, I suppose we juar have to file the bug reports and fix each
> function step by step until all deprecated functions are removed and
> replaced with the ones that need to be used for python 3.8 and forward.
>
>
>
>
>
> On Fri, 29 Nov 2019, 20:44 Woody, <[email protected]> wrote:
>
>> Shouldn't that be done before the release rather than afterward?
>>
>> --
>> 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 [email protected].
>>
> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/web2py/cbb87866-f170-4338-ba3f-e93dfc3861f3%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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/ba7511c0-ef8e-480e-ab2b-4ad90e64b395n%40googlegroups.com.