Commit Graph
3 Commits
Author SHA1 Message Date
Christophe Monniez eec563c2f1 [FIX] packaging: include _vendor in packaging
Since a0f9ef56, a _vendor module was added without `__init__.py` file,
following the PEP 420 specifications.

Unfortunately, as the `setuptools.find_packages()` only recognize
packages if they have such an init file, the _vendor module is not
packaged. This leads to an import error when running Odoo from the
src,deb and rpm packages.

The `setuptools.find_namespace_packages()`, which is compliant with PEP
420, could have been used instead. But this function does not exists in
setuptools 39.0.1 which is the one packaged in Ubuntu Bionic.

Finally, this commit simply adds the missing dunder init file.

closes odoo/odoo#50051

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-04-24 07:43:14 +00:00
Xavier Morel 9d4ee88263 [FIX] core: vendored sessions.py so it actually works
* remove SessionMiddleware we don't need as it's responsible for most
  imports
* fix relative imports to absolute imports from werkzeug
* remove py2/py3 compatibility imports, shims and conditions as we're
  P3 only
* remove deprecation warning (duh)
2020-04-22 09:28:14 +00:00
Xavier Morel 39fb7f9d31 [ADD] core: vendor werkzeug 0.16's sessions.py
In Werkzeug 1.0, sessions support was moved out and into a separate
package (secure-cookies). Issue is distros are already starting to
update werkzeug to 1.0, without necessarily adding
secure-cookies (e.g. arch, debian experimental). Plus secure-cookies
has some changes e.g. different filename & al. So just vendor the
"continuity" version which is the last werkzeug before removal.

This commit copies the original file as-is so we can track eventual
changes if necessary.
2020-04-22 09:28:14 +00:00