Add support for Python 3.10
and remove support for Python 3.6. issue11048 review364451002
This commit is contained in:
+6
-6
@@ -42,12 +42,6 @@ services:
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- IMAGE: python:3.6
|
||||
TOXENV: py36
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.6
|
||||
TOXENV: py36
|
||||
DATABASE: postgresql
|
||||
- IMAGE: python:3.7
|
||||
TOXENV: py37
|
||||
DATABASE: sqlite
|
||||
@@ -66,3 +60,9 @@ matrix:
|
||||
- IMAGE: python:3.9
|
||||
TOXENV: py39
|
||||
DATABASE: postgresql
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: sqlite
|
||||
- IMAGE: python:3.10
|
||||
TOXENV: py310
|
||||
DATABASE: postgresql
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
* Add support for Python 3.10
|
||||
* Remove support for Python 3.6
|
||||
* Add creatable attribute on tree and form views
|
||||
* Fill local cache of Function field instances with values
|
||||
* Cache Function field getter without context in readonly transactions
|
||||
|
||||
@@ -145,17 +145,17 @@ setup(name=name,
|
||||
'Natural Language :: Turkish',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: Implementation :: CPython',
|
||||
'Programming Language :: Python :: Implementation :: PyPy',
|
||||
'Topic :: Software Development :: Libraries :: Application Frameworks',
|
||||
],
|
||||
platforms='any',
|
||||
license='GPL-3',
|
||||
python_requires='>=3.6',
|
||||
python_requires='>=3.7',
|
||||
install_requires=[
|
||||
'lxml >= 2.0',
|
||||
'relatorio[fodt] >= 0.7.0',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = {py36,py37,py38,py39}-{sqlite,postgresql},pypy3-{sqlite,postgresql}
|
||||
envlist = {py37,py38,py39,py310}-{sqlite,postgresql},pypy3-{sqlite,postgresql}
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
@@ -7,9 +7,8 @@ commands =
|
||||
coverage report --include=./trytond/* --omit=*/tests/*
|
||||
deps =
|
||||
coverage
|
||||
{py36,py37,py38,py39}-postgresql: psycopg2 >= 2.5
|
||||
{py37,py38,py39,py310}-postgresql: psycopg2 >= 2.5
|
||||
pypy3-postgresql: psycopg2cffi >= 2.5
|
||||
py36-sqlite: sqlitebck
|
||||
setenv =
|
||||
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
|
||||
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
|
||||
|
||||
+1
-4
@@ -55,10 +55,7 @@ def run(options):
|
||||
console = Console(local, histsize=options.histsize)
|
||||
banner = "Tryton %s, Python %s on %s" % (
|
||||
__version__, sys.version, sys.platform)
|
||||
kwargs = {}
|
||||
if sys.version_info >= (3, 6):
|
||||
kwargs['exitmsg'] = ''
|
||||
console.interact(banner=banner, **kwargs)
|
||||
console.interact(banner=banner, exitmsg='')
|
||||
else:
|
||||
console = InteractiveConsole(local)
|
||||
console.runcode(sys.stdin.read())
|
||||
|
||||
+1
-10
@@ -1,17 +1,8 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
import binascii
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
|
||||
try:
|
||||
from secrets import token_hex
|
||||
except ImportError:
|
||||
def token_hex(nbytes=None):
|
||||
if nbytes is None:
|
||||
nbytes = 32
|
||||
return binascii.hexlify(os.urandom(nbytes)).decode('ascii')
|
||||
from secrets import token_hex
|
||||
|
||||
from trytond.config import config
|
||||
from trytond.model import ModelSQL, fields
|
||||
|
||||
Reference in New Issue
Block a user