Tryton - Issues

 

Issue9042

Title Trytond 5.0 compatibility with werkzeug 0.16
Priority bug Status resolved
Superseder Nosy List ced, coogor, lukio, pokoli, reviewbot, smn
Type crash Components trytond
Assigned To Keywords review
Reviews 280851002
View: 280851002

Created on 2020-02-06.00:03:38 by smn, last changed by pokoli.

Messages
msg56057 (view) Author: [hidden] (coogor) Date: 2020-03-04.21:41:49
Just for the record: https://build.opensuse.org/package/view_file/Application:ERP:GNUHealth:3.6/trytond/fix_werkzeug.patch?expand=1
msg55623 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-02-27.13:38:16
This discussion is closed. We do not make adaptation for major release of dependencies on old series.
msg55622 (view) Author: [hidden] (coogor) Date: 2020-02-27.13:29:25
Am Mittwoch, 26. Februar 2020, 16:34:48 CET schrieb Sergi Almacellas Abellana:
> Sergi Almacellas Abellana <sergi@koolpi.com> added the comment:
>
> El 26/2/20 a les 16:24, Axel ha escrit:
> >> As Tumbleweed is a rolling release I think you should upgrade your tryton
> >> packages to latest release (5.4) which works well with new werkzeug
> >> releases.
> >
> > 5.4 is not really an option, as it has a too short support cycle (you may
> > remember that I voted against the 'new' support model)
>
> As you are a rolling release you should always update to latest tryton
> series (as you have done with werkzeug). So you will be always supported.

I agree with you that this is an option for a word processor or a mail program
- but not for an ERP system, that requires some work around a version upgrade.

Isn't that the reason why there is a LTS version?
.
> Otherwise, you should use a LTS version of your SO which will probably do
> not use 1.0 series of werkzeug.

It will at some point in time. Even though Leap 15 resp SLE 15 is maintained
until 2028 it will receive some upgrades in between, including major changes
(like kernel 4.12 -> 5.3 as in Leap 15.2).

So better have Tryton 5.0 ready for recent software.
msg55603 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-02-26.16:34:48
El 26/2/20 a les 16:24, Axel ha escrit:
>> As Tumbleweed is a rolling release I think you should upgrade your tryton
>> packages to latest release (5.4) which works well with new werkzeug
>> releases.
> 5.4 is not really an option, as it has a too short support cycle (you may
> remember that I voted against the 'new' support model)

As you are a rolling release you should always update to latest tryton series (as you have done with werkzeug). So you will be always supported. 

Otherwise, you should use a LTS version of your SO which will probably do not use 1.0 series of werkzeug.
msg55602 (view) Author: [hidden] (coogor) Date: 2020-02-26.16:24:34
Am Mittwoch, 26. Februar 2020, 16:07:33 CET schrieb Sergi Almacellas Abellana:
> Sergi Almacellas Abellana <sergi@koolpi.com> added the comment:
>
> We already fixed in changeset 7e1081cd7a76 it be requiring werkzeug <1.0 for
> 5.0 series.

This is not a fix, this is a workaround

> As Tumbleweed is a rolling release I think you should upgrade your tryton
> packages to latest release (5.4) which works well with new werkzeug
> releases.

5.4 is not really an option, as it has a too short support cycle (you may
remember that I voted against the 'new' support model)
msg55601 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-02-26.16:07:33
We already fixed in changeset 7e1081cd7a76 it be requiring werkzeug <1.0 for 5.0 series. 

As Tumbleweed is a rolling release I think you should upgrade your tryton packages to latest release (5.4) which works well with new werkzeug releases.
msg55600 (view) Author: [hidden] (coogor) Date: 2020-02-26.16:03:46
I jump on that thread as we just have the problem in Tumbleweed, as werkzeug 1.0 arrived there.

> I will prefer this solution as I do no think we should support new major version of dependencies (otherwise it can be a nightmare)

Considering the fact that 5.0 should be around 4 more years in maintenance, we will have to deal with new releases. Otherwise Tryton will not run on a more or less up-to-date software stack.

>For the docker image we use the debian package for werkzeug [1] which contains 0.14 version [2], so I do not see any issue on it.

0.14 is already more than 2 years old...and not everyone runs Tryton in a container
New review280851002 at https://codereview.tryton.org/280851002/#ps282951003
msg55287 (view) Author: [hidden] (smn) Date: 2020-02-10.09:31:40
The review:
https://codereview.tryton.org/280851002
msg55272 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-02-07.18:46:20
Version 1.0 from werkzeug has been released https://pypi.org/project/Werkzeug/1.0.0/

So this is no more a "pre-release"
msg55245 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-02-06.11:41:17
El 6/2/20 a les 11:28, C├ędric Krier ha escrit:
> we could limit the dependency to werkzeug<1.0 (this may be a problem on Docker build as we use the Debian package for werkzeug without version limitation).

I will prefer this solution as I do no think we should support new major version of dependencies (otherwise it can be a nightmare)

For the docker image we use the debian package for werkzeug [1] which contains 0.14 version [2], so I do not see any issue on it.


[1] https://hg.tryton.org/tryton-docker/file/2236510ea1c5/5.0/Dockerfile#l38

[2] https://packages.debian.org/buster/python3-werkzeug
msg55244 (view) Author: [hidden] (smn) Date: 2020-02-06.11:38:25
> Indeed werkzeug pre-released 1.0.0rc1 and as tox install with --pre option, it picks up the pre-release.
> I have mix feeling about how to solve this. We could backport issue8235 but that send the message that we will support new major versions of dependencies for old series. Or we could limit the dependency to werkzeug<1.0 (this may be a problem on Docker build as we use the Debian package for werkzeug without version limitation).

I see your doubts. IMHO I would choose the second option and limit version in docker build as well (if it is possible).
msg55243 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-02-06.11:28:05
Indeed werkzeug pre-released 1.0.0rc1 and as tox install with --pre option, it picks up the pre-release.
I have mix feeling about how to solve this. We could backport issue8235 but that send the message that we will support new major versions of dependencies for old series. Or we could limit the dependency to werkzeug<1.0 (this may be a problem on Docker build as we use the Debian package for werkzeug without version limitation).
msg55242 (view) Author: [hidden] (smn) Date: 2020-02-06.10:44:21
> - if I run tox for a foundation module it installs werkzeug 0.16.1. 

That's not true, the module had dependencies already downloaded. Cleaning tox files an re-running it install Werkzeug 1.0.0rc

Sorry for the noise ...
msg55241 (view) Author: [hidden] (smn) Date: 2020-02-06.10:32:06
> Reviewing the log, I see the system is installling Werkzeug==1.0.0rc1.

FYI:
- if I create a fresh virtualenv and install trytond 5.0 it installs werkzeug 0.16.1. 
- if I run tox for a foundation module it installs werkzeug 0.16.1. 
- if I run tox for an own module it installs werkzeug 1.0.0rc
msg55240 (view) Author: [hidden] (smn) Date: 2020-02-06.10:23:10
Sorry, my test on local was failing by an obsolete version of module timesheet that was using werkzeug.exceptions.Response

This is the traceback of drone server:

from trytond.wsgi import app
File "/drone/src/.tox/py36-sqlite/lib/python3.6/site-packages/trytond/wsgi.py", line 12, in <module>
from werkzeug.contrib.fixers import ProxyFix
ModuleNotFoundError: No module named 'werkzeug.contrib' 


Reviewing the log, I see the system is installling Werkzeug==1.0.0rc1.

+ tox -e "py36-sqlite"
GLOB sdist-make: /drone/src/setup.py
py36-sqlite create: /drone/src/.tox/py36-sqlite
py36-sqlite installdeps: sqlitebck
py36-sqlite inst: /drone/src/.tox/.tmp/package/1/datalife_account_invoice_report_per_party-5.0.0.zip
py36-sqlite installed: datalife-account-invoice-report-per-party==5.0.0,Genshi==0.7.3,lxml==4.5.0,passlib==1.7.2,polib==1.1.0,python-dateutil==2.8.1,python-magic==0.4.15,python-sql==1.1.0,python-stdnum==1.13,relatorio==0.9.1,simpleeval==0.9.10,six==1.14.0,sqlitebck==1.4,trytond==5.0.18,trytond-account==5.0.10,trytond-account-invoice==5.0.7,trytond-account-product==5.0.3,trytond-company==5.0.1,trytond-country==5.0.1,trytond-currency==5.0.3,trytond-party==5.0.2,trytond-product==5.0.2,Werkzeug==1.0.0rc1,wrapt==1.11.2
msg55239 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-02-06.10:09:04
Well this does not show us what is the breakage nor why werkzeug version would be the problem.
msg55238 (view) Author: [hidden] (smn) Date: 2020-02-06.09:52:40
Indeed our CI is broken due to this issue and I tested on local to update werkzeug from 0.14 to 0.16 and after that I cannot run trytond for import errors.
msg55237 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-02-06.09:49:05
For me, it is working with this version.
The deprecation warning talk about breaking in version 1.0 not in version 0.16. As far as I see there is still backward compatibility.
msg55236 (view) Author: [hidden] (smn) Date: 2020-02-06.00:03:37
Trytond 5.0 series does not work with last version of werzeug.
IMHO The changeset https://hg.tryton.org/trytond/rev/691d0ad1b947 should be backported.
History
Date User Action Args
2020-03-04 21:43:26pokolisetstatus: chatting -> resolved
2020-03-04 21:41:50coogorsetstatus: resolved -> chatting
messages: + msg56057
2020-02-27 13:38:16cedsetstatus: chatting -> resolved
messages: + msg55623
2020-02-27 13:29:25coogorsetstatus: resolved -> chatting
messages: + msg55622
2020-02-26 16:34:48pokolisetstatus: chatting -> resolved
messages: + msg55603
2020-02-26 16:24:35coogorsetstatus: resolved -> chatting
messages: + msg55602
2020-02-26 16:07:33pokolisetstatus: chatting -> resolved
messages: + msg55601
2020-02-26 16:03:47coogorsetnosy: + coogor
messages: + msg55600
2020-02-11 09:19:53reviewbotsetnosy: + reviewbot
messages: + msg55311
2020-02-11 09:19:51reviewbotsetreviews: 280851002
keyword: + review

Showing 10 items. Show all history (warning: this could be VERY long)