diff options
| author | xmo-odoo <xmo@odoo.com> | 2017-04-28 09:06:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-28 09:06:53 +0200 |
| commit | b4429c2a91889bf60b56e0c7909c844d357363f7 (patch) | |
| tree | 1ae879a60a34454b4a93425f0ebe7d5ccd029c03 /odoo/sql_db.py | |
| parent | c5579ef89e2a595893d0959bef6fddfdbfb6d697 (diff) | |
[FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is
Warning: only supported from debian Stretch (current testing)?
https://packages.debian.org/search?searchon=names&keywords=pyldap
* implicitly relative imports
* imports of moved or removed stdlib modules
issue #8530
Diffstat (limited to 'odoo/sql_db.py')
| -rw-r--r-- | odoo/sql_db.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/odoo/sql_db.py b/odoo/sql_db.py index 214dbfca96c..9a438d387de 100644 --- a/odoo/sql_db.py +++ b/odoo/sql_db.py @@ -12,8 +12,12 @@ from contextlib import contextmanager from functools import wraps import logging import time -import urlparse import uuid +try: + from urllib import parse as urlparse +except ImportError: + #pylint: disable=bad-python3-import + import urlparse import psycopg2 import psycopg2.extras @@ -48,8 +52,8 @@ for name, typeoid in types_mapping.items(): psycopg2.extensions.register_type(psycopg2.extensions.new_type((700, 701, 1700,), 'float', undecimalize)) -import tools -from tools.func import frame_codeinfo +from . import tools +from .tools.func import frame_codeinfo from datetime import timedelta import threading from inspect import currentframe |
