Tryton - Issues

 

Issue9042

Title Trytond 5.0 compatibility with werkzeug 0.16
Priority bug Status chatting
Superseder Nosy List ced, 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 reviewbot.

Messages
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-02-11 09:19:53reviewbotsetnosy: + reviewbot
messages: + msg55311
2020-02-11 09:19:51reviewbotsetreviews: 280851002
keyword: + review
2020-02-10 09:31:41smnsetmessages: + msg55287
2020-02-07 18:46:20pokolisetmessages: + msg55272
2020-02-06 17:37:08lukiosetnosy: + lukio
2020-02-06 11:41:18pokolisetmessages: + msg55245
2020-02-06 11:38:25smnsetmessages: + msg55244
2020-02-06 11:28:06cedsetstatus: need-eg -> chatting
messages: + msg55243
2020-02-06 10:44:22smnsetmessages: + msg55242
2020-02-06 10:32:06smnsetmessages: + msg55241

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