[FIX] tools: vendor werkzeug.urls

In latest versions of werkzeug, the `werkzeug.urls` module has been
reduced to remove feature present in urllib.parse. This commit vendored
the old version to avoid breaking compatibility with older versions of
odoo on ubuntu Noble, without adapting the whole codebase. This
should/may be removed in stable by adaptaing eveything to urlib.

This version of the lib was minimalized to avoid redondunce with feature
still present in werkzeug.urls. Some unused features in odoo are still
vendored for ease but are not exposed on the werkzeug.urls for now.

Part-of: odoo/odoo#160842
This commit is contained in:
Xavier-Do
2024-04-07 10:03:48 +00:00
parent 8daf517639
commit 0dc85a2200
2 changed files with 1052 additions and 0 deletions
+7
View File
@@ -1,6 +1,13 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import _monkeypatches
from werkzeug import urls
if not hasattr(urls, 'url_join'):
# see https://github.com/pallets/werkzeug/compare/2.3.0..3.0.0
# see https://github.com/pallets/werkzeug/blob/2.3.0/src/werkzeug/urls.py for replacement
from . import _monkeypatches_urls
from . import appdirs
from . import cloc
from . import constants
File diff suppressed because it is too large Load Diff