Add Python3 support
issue3211
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
* Add Python3 support
|
||||
|
||||
Version 3.8.0 - 2015-11-02
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
* Remove header_A4.odt style
|
||||
|
||||
+5
-1
@@ -21,7 +21,6 @@ CursorInterface.cache_keys.update({'company', 'employee'})
|
||||
__all__ = ['Company', 'Employee', 'UserEmployee', 'User', 'Property',
|
||||
'Sequence', 'SequenceStrict', 'Date', 'CompanyConfigStart',
|
||||
'CompanyConfig', 'CompanyReport', 'LetterReport', 'Rule']
|
||||
__metaclass__ = PoolMeta
|
||||
|
||||
|
||||
class Company(ModelSQL, ModelView):
|
||||
@@ -82,6 +81,7 @@ class UserEmployee(ModelSQL):
|
||||
|
||||
|
||||
class User:
|
||||
__metaclass__ = PoolMeta
|
||||
__name__ = 'res.user'
|
||||
main_company = fields.Many2One('company.company', 'Main Company')
|
||||
company = fields.Many2One('company.company', 'Current Company',
|
||||
@@ -259,6 +259,7 @@ class User:
|
||||
|
||||
|
||||
class Property:
|
||||
__metaclass__ = PoolMeta
|
||||
__name__ = 'ir.property'
|
||||
company = fields.Many2One('company.company', 'Company',
|
||||
domain=[
|
||||
@@ -288,6 +289,7 @@ class Property:
|
||||
|
||||
|
||||
class Sequence:
|
||||
__metaclass__ = PoolMeta
|
||||
__name__ = 'ir.sequence'
|
||||
company = fields.Many2One('company.company', 'Company',
|
||||
domain=[
|
||||
@@ -310,6 +312,7 @@ class SequenceStrict(Sequence):
|
||||
|
||||
|
||||
class Date:
|
||||
__metaclass__ = PoolMeta
|
||||
__name__ = 'ir.date'
|
||||
|
||||
@classmethod
|
||||
@@ -372,6 +375,7 @@ class LetterReport(CompanyReport):
|
||||
|
||||
|
||||
class Rule:
|
||||
__metaclass__ = PoolMeta
|
||||
__name__ = 'ir.rule'
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -6,10 +6,10 @@ from trytond.transaction import Transaction
|
||||
|
||||
|
||||
__all__ = ['Cron', 'CronCompany']
|
||||
__metaclass__ = PoolMeta
|
||||
|
||||
|
||||
class Cron:
|
||||
__metaclass__ = PoolMeta
|
||||
__name__ = "ir.cron"
|
||||
companies = fields.Many2Many('ir.cron-company.company', 'cron', 'company',
|
||||
'Companies', help='Companies registered for this cron')
|
||||
|
||||
@@ -4,10 +4,10 @@ from trytond.pyson import Eval
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
__all__ = ['PartyConfiguration']
|
||||
__metaclass__ = PoolMeta
|
||||
|
||||
|
||||
class PartyConfiguration:
|
||||
__metaclass__ = PoolMeta
|
||||
__name__ = 'party.configuration'
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -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',
|
||||
@@ -105,4 +114,5 @@ setup(name=name,
|
||||
""",
|
||||
test_suite='tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
use_2to3=True,
|
||||
)
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user