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

        and remove support for Python 3.6.

        issue11048
        review364451002
diffstat:

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

diffs (99 lines):

diff -r bf40f3703c90 -r 8a74a27aeca3 .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 bf40f3703c90 -r 8a74a27aeca3 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)
 * Add web shop check box to product image
diff -r bf40f3703c90 -r 8a74a27aeca3 sale.py
--- a/sale.py   Mon Dec 13 23:10:13 2021 +0100
+++ b/sale.py   Sat Dec 18 16:34:37 2021 +0100
@@ -1,15 +1,6 @@
 # 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 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 sql.conditionals import NullIf
 from sql.operators import Equal
diff -r bf40f3703c90 -r 8a74a27aeca3 setup.py
--- a/setup.py  Mon Dec 13 23:10:13 2021 +0100
+++ b/setup.py  Sat Dec 18 16:34:37 2021 +0100
@@ -130,16 +130,16 @@
         'Natural Language :: Spanish',
         '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,
     dependency_links=dependency_links,
     zip_safe=False,
diff -r bf40f3703c90 -r 8a74a27aeca3 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_shop/* --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://}

Reply via email to