changeset bcad44cc401a in modules/web_user:default
details: https://hg.tryton.org/modules/web_user?cmd=changeset&node=bcad44cc401a
description:
        Add support for Python 3.10

        and remove support for Python 3.6.

        issue11048
        review364451002
diffstat:

 .drone.yml |  12 ++++++------
 CHANGELOG  |   3 +++
 setup.py   |   4 ++--
 tox.ini    |   5 ++---
 user.py    |   2 +-
 5 files changed, 14 insertions(+), 12 deletions(-)

diffs (98 lines):

diff -r 4e02909228b2 -r bcad44cc401a .drone.yml
--- a/.drone.yml        Mon Dec 13 23:10:13 2021 +0100
+++ b/.drone.yml        Sat Dec 18 16:34:37 2021 +0100
@@ -42,12 +42,6 @@
 
 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 @@
         - IMAGE: python:3.9
           TOXENV: py39
           DATABASE: postgresql
+        - IMAGE: python:3.10
+          TOXENV: py310
+          DATABASE: sqlite
+        - IMAGE: python:3.10
+          TOXENV: py310
+          DATABASE: postgresql
diff -r 4e02909228b2 -r bcad44cc401a CHANGELOG
--- a/CHANGELOG Mon Dec 13 23:10:13 2021 +0100
+++ b/CHANGELOG Sat Dec 18 16:34:37 2021 +0100
@@ -1,3 +1,6 @@
+* Add support for Python 3.10
+* Remove support for Python 3.6
+
 Version 6.2.0 - 2021-11-01
 * Bug fixes (see mercurial logs for details)
 
diff -r 4e02909228b2 -r bcad44cc401a setup.py
--- a/setup.py  Mon Dec 13 23:10:13 2021 +0100
+++ b/setup.py  Sat Dec 18 16:34:37 2021 +0100
@@ -126,16 +126,16 @@
         '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 :: Office/Business',
         ],
     license='GPL-3',
-    python_requires='>=3.6',
+    python_requires='>=3.7',
     install_requires=requires,
     extras_require={
         'BCrypt': ['bcrypt'],
diff -r 4e02909228b2 -r bcad44cc401a tox.ini
--- a/tox.ini   Mon Dec 13 23:10:13 2021 +0100
+++ b/tox.ini   Sat Dec 18 16:34:37 2021 +0100
@@ -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 @@
     coverage report --include=.*/web_user/* --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://}
diff -r 4e02909228b2 -r bcad44cc401a user.py
--- a/user.py   Mon Dec 13 23:10:13 2021 +0100
+++ b/user.py   Sat Dec 18 16:34:37 2021 +0100
@@ -9,6 +9,7 @@
 import urllib.parse
 import warnings
 from email.header import Header
+from secrets import token_hex
 
 try:
     import bcrypt
@@ -25,7 +26,6 @@
 
 from trytond.config import config
 from trytond.exceptions import RateLimitException
-from trytond.ir.session import token_hex
 from trytond.model import (
     DeactivableMixin, Exclude, ModelSQL, ModelView, Unique, avatar_mixin,
     fields)

Reply via email to