Skip to content

Commit

Permalink
Make code compatible between Python 2 and 3
Browse files Browse the repository at this point in the history
  • Loading branch information
anxodio committed Nov 19, 2018
1 parent 8289f5c commit 3aeb6ff
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def get_require_version(name):
major_version = int(major_version)
minor_version = int(minor_version)

requires = []
requires = [
'future',
]
for dep in info.get('depends', []):
if not re.match(r'(ir|res)(\W|$)', dep):
prefix = MODULE2PREFIX.get(dep, 'trytond')
Expand Down
2 changes: 1 addition & 1 deletion tryton.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tryton]
version=4.2.0
version=4.2.1
depends:
ir
res
Expand Down
5 changes: 3 additions & 2 deletions user.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from future.utils import with_metaclass

from trytond.pool import PoolMeta

__all__ = ['User']


class User:
__metaclass__ = PoolMeta
class User(with_metaclass(PoolMeta)):
__name__ = 'res.user'

@classmethod
Expand Down

0 comments on commit 3aeb6ff

Please sign in to comment.