Add Python3 support

issue3211
review24831003
This commit is contained in:
Jonathan Levy committed 2016-02-27 00:33:06 +01:00
1 parent f9e496b319
commit 8ccee661ed
6 files changed
+21 -9

No files matched your search

+2 -2
View File
@@ -1,9 +1,9 @@
image: python2.7
image: python:all
env:
- POSTGRESQL_URI=postgresql://postgres@127.0.0.1:5432/
- MYSQL_URI=mysql://root@127.0.0.1:3306/
script:
- pip install tox
- tox -e "py27-{sqlite,postgresql}"
- tox -e "{py27,py33,py34,py35}-{sqlite,postgresql}" --skip-missing-interpreters
services:
- postgres
+2
View File
@@ -1,3 +1,5 @@
* Add Python3 support
Version 3.8.0 - 2015-11-02
* Bug fixes (see mercurial logs for details)
* Store cost price on timesheet line
+1 -1
View File
@@ -9,13 +9,13 @@ from trytond import backend
from trytond.config import config
__all__ = ['Employee', 'EmployeeCostPrice', 'price_digits']
__metaclass__ = PoolMeta
price_digits = (16, config.getint(
'timesheet_cost', 'price_decimal', default=4))
class Employee:
__metaclass__ = PoolMeta
__name__ = 'company.employee'
cost_price = fields.Function(fields.Numeric('Cost Price',
digits=price_digits,
+13 -3
View File
@@ -5,11 +5,17 @@
from setuptools import setup
import re
import os
import ConfigParser
import io
try:
from configparser import ConfigParser
except ImportError:
from ConfigParser import ConfigParser
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
return io.open(
os.path.join(os.path.dirname(__file__), fname),
'r', encoding='utf-8').read()
def get_require_version(name):
@@ -21,7 +27,7 @@ def get_require_version(name):
major_version, minor_version + 1)
return require
config = ConfigParser.ConfigParser()
config = ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
@@ -89,6 +95,9 @@ setup(name=name,
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
@@ -102,4 +111,5 @@ setup(name=name,
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
use_2to3=True,
)
+1 -1
View File
@@ -10,10 +10,10 @@ from trytond import backend
from .company import price_digits
__all__ = ['TimesheetLine']
__metaclass__ = PoolMeta
class TimesheetLine:
__metaclass__ = PoolMeta
__name__ = 'timesheet.line'
cost_price = fields.Numeric('Cost Price',
+2 -2
View File
@@ -1,10 +1,10 @@
[tox]
envlist = py27-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
[testenv]
commands = {envpython} setup.py test
deps =
py27-postgresql: psycopg2 >= 2.0
{py27,py33,py34,py35}-postgresql: psycopg2 >= 2.0
pypy-postgresql: psycopg2cffi >= 2.5
mysql: MySQL-python
setenv =