From dc96c20fa2ed56c469d8538c03bc193ce80a7c44 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 26 Oct 2022 20:17:06 +0300 Subject: [PATCH 01/16] Tests, CI: Run tests with Python 3.11 --- .github/workflows/run-tests.yaml | 2 +- docs/news.rst | 5 +++++ setup.py | 5 +++-- tox.ini | 12 ++++++------ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index aae7413..baafe49 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] include: - os: ubuntu-latest os-name: Linux diff --git a/docs/news.rst b/docs/news.rst index d4ec879..a557348 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,11 @@ News ==== +Version 0.3.1 (in development) +------------------------------ + +* Python 3.11. + Version 0.3.0 (2021-09-24) -------------------------- diff --git a/setup.py b/setup.py index 2647b09..911b3ac 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ if sys.version_info[:2] == (2, 7): execfile(versionpath, sqlconvert_version) # noqa: F821 'execfile' Py3 elif sys.version_info >= (3, 4): - exec(open(versionpath, 'rU').read(), sqlconvert_version) + exec(open(versionpath, 'r').read(), sqlconvert_version) else: raise ImportError("sqlconvert requires Python 2.7 or 3.4+") @@ -20,7 +20,7 @@ setup( name='sqlconvert', version=sqlconvert_version['__version__'], description='Broytman sqlconvert', - long_description=open('README.rst', 'rU').read(), + long_description=open('README.rst', 'r').read(), long_description_content_type="text/x-rst", author='Oleg Broytman', author_email='phd@phdru.name', @@ -54,6 +54,7 @@ setup( 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', ], packages=['sqlconvert'], scripts=['scripts/mysql2sql'], diff --git a/tox.ini b/tox.ini index e9b04fc..6eaedf2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.15 -envlist = py27,py3{4,5,6,7,8,9,10}{,-sqlite},py{27,39}-flake8 +envlist = py27,py3{4,5,6,7,8,9,10,11}{,-sqlite},py{27,36,311}-flake8 # Base test environment settings [testenv] @@ -18,7 +18,7 @@ whitelist_externals = createdb dropdb -[testenv:{py27,py34,py35,py36,py37,py38,py39,py310}] +[testenv:py{27,34,35,36,37,38,39,310,311}] commands = {[testenv]commands} {envpython} -m pytest @@ -26,14 +26,14 @@ commands = cmp.py -i tests/mysql2sql/test.out test.out rm.py -f test.out -[testenv:{py27,py34,py35,py36,py37,py38,py39,py310}-sqlite] +[testenv:py{27,34,35,36,37,38,39,310,311}-sqlite] commands = {[testenv]commands} -rm.py -f /tmp/test.sqdb {envpython} -m pytest -D sqlite:///tmp/test.sqdb rm.py -f /tmp/test.sqdb -[testenv:{py27,py34,py35,py36,py37,py38,py39,py310}-sqlite-w32] +[testenv:py{27,34,35,36,37,38,39,310,311}-sqlite-w32] platform = win32 commands = {[testenv]commands} @@ -41,7 +41,7 @@ commands = pytest -D sqlite:/{env:TEMP}/test.sqdb?debug=1 rm.py -f {env:TEMP}/test.sqdb -[testenv:{py27,py34,py35,py36,py37,py38,py39,py310}-postgres{,-w32}] +[testenv:py{27,34,35,36,37,38,39,310,311}-postgres{,-w32}] commands = {[testenv]commands} -dropdb --username=runner test @@ -50,7 +50,7 @@ commands = dropdb --username=runner test # flake8 -[testenv:{py27,py34,py35,py36,py37,py38,py39,py310}-flake8] +[testenv:py{27,34,35,36,37,38,39,310,311}-flake8] deps = flake8 pytest < 7.0 -- 2.39.2 From 5329824763d9331fea4dc6d54a6a19204ddf8334 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 30 Oct 2022 21:57:51 +0300 Subject: [PATCH 02/16] Docs: Year 2022 [skip ci] --- README.rst | 2 +- docs/index.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 5293e6d..a2b1cae 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ SQL converter. Author: Oleg Broytman . -Copyright (C) 2016-2021 PhiloSoft Design. +Copyright (C) 2016-2022 PhiloSoft Design. License: GPL. diff --git a/docs/index.rst b/docs/index.rst index e67d848..ea593de 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -41,7 +41,7 @@ Credits Created by Oleg Broytman . -Copyright (C) 2016-2021 PhiloSoft Design. +Copyright (C) 2016-2022 PhiloSoft Design. License -- 2.39.2 From 9bf761b86f72286dd9ec8edd531b30aec25fac7c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 6 Dec 2022 19:44:17 +0300 Subject: [PATCH 03/16] CI(GHActions): Use `conda` to install older Pythons Ubuntu >= 22 and `setup-python` dropped Pythons < 3.7. Use `s-weigand/setup-conda` instead of `setup-python`. --- .github/workflows/run-tests.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index baafe49..a4d5fd7 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -35,9 +35,14 @@ jobs: # Setup Python/pip - uses: actions/checkout@v2 + - uses: s-weigand/setup-conda@v1 + with: + python-version: ${{ matrix.python-version }} + if: ${{ runner.os == 'Linux' && matrix.python-version != '3.11' }} - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + if: ${{ runner.os != 'Linux' || matrix.python-version == '3.11' }} - name: Cache pip uses: actions/cache@v3 with: -- 2.39.2 From bc282b1800583b7eac6b46a56aad38138a3f0a84 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 8 Dec 2022 15:38:39 +0300 Subject: [PATCH 04/16] CI(GHActions): Set `$LD_LIBRARY_PATH` Python 2.7 on Linux requires `$LD_LIBRARY_PATH`. --- .github/workflows/run-tests.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index a4d5fd7..4777a9f 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -59,6 +59,7 @@ jobs: - name: Set TOXENV run: | import os, sys + ld_library_path = None pyver = '%d%d' % tuple(sys.version_info[:2]) toxenv = 'py%s' % pyver toxenv += ',py%s-sqlite' % pyver @@ -66,10 +67,15 @@ jobs: toxenv += '-w32' toxenv += ',py%s-postgres' % pyver if os.name == 'posix': + if pyver == '27': # Python 2.7 on Linux requires `$LD_LIBRARY_PATH` + ld_library_path = os.path.join( + os.path.dirname(os.path.dirname(sys.executable)), 'lib') toxenv += ',py%s-flake8' % pyver elif os.name == 'nt': toxenv += '-w32' with open(os.environ['GITHUB_ENV'], 'a') as f: + if ld_library_path: + f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n') f.write('TOXENV=' + toxenv + '\n') f.write('PGPASSWORD=test\n') shell: python -- 2.39.2 From eabdc0827ee1bb4a5a549d8cef6e1b62e654471d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 15 Dec 2022 19:16:48 +0300 Subject: [PATCH 05/16] Tests(tox): Limit "tox < 4" `tox` 4+ has incompatible `tox.ini` syntax. It's impossible to use one `tox.ini` for Pythons < 3.7 and 3.7+. --- .github/workflows/run-tests.yaml | 2 +- devscripts/requirements/requirements_tox.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 4777a9f..fc4d9a7 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -55,7 +55,7 @@ jobs: python --version python -m pip install --upgrade pip setuptools wheel pip --version - pip install --upgrade virtualenv tox + pip install --upgrade virtualenv "tox < 4" - name: Set TOXENV run: | import os, sys diff --git a/devscripts/requirements/requirements_tox.txt b/devscripts/requirements/requirements_tox.txt index 8b5960b..b72a322 100644 --- a/devscripts/requirements/requirements_tox.txt +++ b/devscripts/requirements/requirements_tox.txt @@ -1 +1 @@ -tox >= 3.15 +tox >= 3.15, < 4 -- 2.39.2 From 2391d24951c354fe6bdfcb70f4e16a75b7346970 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 15 Dec 2022 23:53:34 +0300 Subject: [PATCH 06/16] CI(GHActions): More descriptive step names Add OS name. --- .github/workflows/run-tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index fc4d9a7..7d51773 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -24,11 +24,11 @@ jobs: # Setup PostgreSQL - uses: ankane/setup-postgres@v1 - - name: Setup Postgres user + - name: Setup Postgres user @ Linux run: | sudo -u postgres psql --command="ALTER USER runner CREATEDB PASSWORD 'test'" if: ${{ runner.os == 'Linux' }} - - name: Setup Postgres user + - name: Setup Postgres user @ w32 run: | psql --command="CREATE USER runner CREATEDB PASSWORD 'test'" if: ${{ runner.os == 'Windows' }} -- 2.39.2 From ef4ecd3c4073a35ec0d0233ba7c03e66156a3bed Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 15 Jul 2023 21:16:09 +0300 Subject: [PATCH 07/16] CI(GHActions): Install all Python and PyPy versions from `conda-forge` --- .github/workflows/run-tests.yaml | 10 +++++++--- devscripts/requirements/requirements.txt | 2 -- docs/news.rst | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 7d51773..c7b0332 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -4,6 +4,8 @@ on: [push, pull_request] jobs: run-tests: + env: + not_in_conda: "[]" strategy: matrix: @@ -37,12 +39,13 @@ jobs: - uses: actions/checkout@v2 - uses: s-weigand/setup-conda@v1 with: + conda-channels: conda-forge python-version: ${{ matrix.python-version }} - if: ${{ runner.os == 'Linux' && matrix.python-version != '3.11' }} + if: ${{ !contains(fromJSON(env.not_in_conda), matrix.python-version) }} - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - if: ${{ runner.os != 'Linux' || matrix.python-version == '3.11' }} + if: ${{ contains(fromJSON(env.not_in_conda), matrix.python-version) }} - name: Cache pip uses: actions/cache@v3 with: @@ -53,9 +56,10 @@ jobs: - name: Install dependencies run: | python --version + python -m ensurepip python -m pip install --upgrade pip setuptools wheel pip --version - pip install --upgrade virtualenv "tox < 4" + pip install --upgrade virtualenv "tox >= 3.15, < 4" - name: Set TOXENV run: | import os, sys diff --git a/devscripts/requirements/requirements.txt b/devscripts/requirements/requirements.txt index abe3d94..08b0cd3 100644 --- a/devscripts/requirements/requirements.txt +++ b/devscripts/requirements/requirements.txt @@ -1,5 +1,3 @@ ---install-option=-O2 - sqlparse SQLObject>=2.2.1; python_version >= '2.7' and python_version < '3.0' SQLObject>=3.0.0; python_version >= '3.4' diff --git a/docs/news.rst b/docs/news.rst index a557348..4f15f88 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -6,6 +6,8 @@ Version 0.3.1 (in development) * Python 3.11. +* CI(GHActions): Install all Python and PyPy versions from ``conda-forge``. + Version 0.3.0 (2021-09-24) -------------------------- -- 2.39.2 From 2b2304b8b9c117129cfaf5d60b84cbcc0da9a60f Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 17 Sep 2023 19:32:32 +0300 Subject: [PATCH 08/16] CI(GHActions): Ensure `pip` only if needed This is to work around a problem in conda with Python 3.7 - it brings in wrong version of `setuptools` incompatible with Python 3.7. --- .github/workflows/run-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index c7b0332..a7e7258 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -56,7 +56,7 @@ jobs: - name: Install dependencies run: | python --version - python -m ensurepip + python -m pip || python -m ensurepip --default-pip --upgrade python -m pip install --upgrade pip setuptools wheel pip --version pip install --upgrade virtualenv "tox >= 3.15, < 4" -- 2.39.2 From b000a48daf78ac2a4c09adfc7bf44fd919764bd6 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 10 Dec 2023 15:03:40 +0300 Subject: [PATCH 09/16] Fix(Py3): `sqlparse` lost module `compat` --- scripts/mysql2sql | 6 +++++- sqlconvert/process_tokens.py | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/mysql2sql b/scripts/mysql2sql index cacbafa..e859f2a 100755 --- a/scripts/mysql2sql +++ b/scripts/mysql2sql @@ -6,7 +6,6 @@ from io import open import os import sys -from sqlparse.compat import text_type from sqlconvert.print_tokens import print_tokens from sqlconvert.process_mysql import is_directive_statement, process_statement from sqlconvert.process_tokens import is_newline_statement, StatementGrouper @@ -14,6 +13,11 @@ from sqlconvert.process_tokens import is_newline_statement, StatementGrouper from m_lib.defenc import default_encoding from m_lib.pbar.tty_pbar import ttyProgressBar +try: + text_type = unicode +except NameError: + text_type = str + def get_fsize(fp): try: diff --git a/sqlconvert/process_tokens.py b/sqlconvert/process_tokens.py index 414c5ca..886f36d 100644 --- a/sqlconvert/process_tokens.py +++ b/sqlconvert/process_tokens.py @@ -2,9 +2,13 @@ from sqlparse.sql import Comment from sqlobject.converters import sqlrepr from sqlparse import parse -from sqlparse.compat import PY3 from sqlparse import tokens as T +try: + xrange +except NameError: + xrange = range + def find_error(token_list): """Find an error""" @@ -36,10 +40,6 @@ def escape_strings(token_list, dbname): token.normalized = token.value = value -if PY3: - xrange = range - - class StatementGrouper(object): """Collect lines and reparse until the last statement is complete""" -- 2.39.2 From 1526d94cfa10aa68de1330b1c24ef0d99f8b2b0d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 13 Dec 2023 22:39:27 +0300 Subject: [PATCH 10/16] Fix(Py3): Use a different test file for Python 3.5+ --- tests/mysql2sql/{test.out => test.out2} | 0 tests/mysql2sql/test.out3 | 20 ++++++++++++++++++++ tox.ini | 15 +++++++++++++-- 3 files changed, 33 insertions(+), 2 deletions(-) rename tests/mysql2sql/{test.out => test.out2} (100%) create mode 100644 tests/mysql2sql/test.out3 diff --git a/tests/mysql2sql/test.out b/tests/mysql2sql/test.out2 similarity index 100% rename from tests/mysql2sql/test.out rename to tests/mysql2sql/test.out2 diff --git a/tests/mysql2sql/test.out3 b/tests/mysql2sql/test.out3 new file mode 100644 index 0000000..462e2be --- /dev/null +++ b/tests/mysql2sql/test.out3 @@ -0,0 +1,20 @@ +CREATE TABLE mytable ( + id int(10) unsigned NOT NULL AUTO_INCREMENT, + date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + flag tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (id), + UNIQUE KEY date (date) +) ENGINE="InnoDB" DEFAULT CHARSET=utf8; +INSERT INTO /* inline comment */ mytable VALUES (1, 'тест'); +SELECT * FROM mytable; -- line-comment" + +; +INSERT INTO "MyTable" ("Id", "Name") +VALUES (1, 'one'); +INSERT INTO mytable VALUES (1, 'one'); + +INSERT INTO mytable VALUES (2, 'two'); +INSERT INTO mytable (id, name) VALUES (1, 'one'); + +INSERT INTO mytable (id, name) VALUES (2, 'two'); +-- The end diff --git a/tox.ini b/tox.ini index 6eaedf2..78a7970 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.15 -envlist = py27,py3{4,5,6,7,8,9,10,11}{,-sqlite},py{27,36,311}-flake8 +envlist = py27,py3{4,5,6,7,8,9,10,11}{,-m2s,-sqlite},py{27,36,311}-flake8 # Base test environment settings [testenv] @@ -22,8 +22,19 @@ whitelist_externals = commands = {[testenv]commands} {envpython} -m pytest + +[testenv:py{27,34}-m2s] +commands = + {[testenv]commands} + {envpython} {envbindir}/mysql2sql -P demo/demo.sql test.out + cmp.py -i tests/mysql2sql/test.out2 test.out + rm.py -f test.out + +[testenv:py{35,36,37,38,39,310,311}-m2s] +commands = + {[testenv]commands} {envpython} {envbindir}/mysql2sql -P demo/demo.sql test.out - cmp.py -i tests/mysql2sql/test.out test.out + cmp.py -i tests/mysql2sql/test.out3 test.out rm.py -f test.out [testenv:py{27,34,35,36,37,38,39,310,311}-sqlite] -- 2.39.2 From 41e8d69b09b74aa4bd4f496c6a17879d6be3b59d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 14 Dec 2023 20:19:59 +0300 Subject: [PATCH 11/16] Build(setup.py): Install `m_lib.full` We need both `m_lib` and `m_lib.defenc`. --- devscripts/requirements/requirements.txt | 3 +-- setup.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/devscripts/requirements/requirements.txt b/devscripts/requirements/requirements.txt index 08b0cd3..a5e54e3 100644 --- a/devscripts/requirements/requirements.txt +++ b/devscripts/requirements/requirements.txt @@ -1,5 +1,4 @@ sqlparse SQLObject>=2.2.1; python_version >= '2.7' and python_version < '3.0' SQLObject>=3.0.0; python_version >= '3.4' -m_lib.defenc>=1.0 -m_lib>=3.1 +m_lib.full>=1.0 diff --git a/setup.py b/setup.py index 911b3ac..e8a6a94 100755 --- a/setup.py +++ b/setup.py @@ -62,8 +62,7 @@ setup( install_requires=[ 'SQLObject>=2.2.1; python_version=="2.7"', 'SQLObject>=3.0.0; python_version>="3.4"', - 'm_lib.defenc>=1.0', - 'm_lib>=3.1', + 'm_lib.full>=1.0', 'sqlparse', ], ) -- 2.39.2 From cf2b73dad8446d9422d57f16251e21ed504e9cdf Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 14 Dec 2023 20:22:10 +0300 Subject: [PATCH 12/16] Docs: Copyright to 2023 [skip ci] --- README.rst | 2 +- docs/index.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index a2b1cae..c5829a5 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ SQL converter. Author: Oleg Broytman . -Copyright (C) 2016-2022 PhiloSoft Design. +Copyright (C) 2016-2023 PhiloSoft Design. License: GPL. diff --git a/docs/index.rst b/docs/index.rst index ea593de..e9458b8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -41,7 +41,7 @@ Credits Created by Oleg Broytman . -Copyright (C) 2016-2022 PhiloSoft Design. +Copyright (C) 2016-2023 PhiloSoft Design. License -- 2.39.2 From 7e882385fe58feea5f11db7a8ddafc736f520d30 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 14 Dec 2023 20:25:40 +0300 Subject: [PATCH 13/16] Build: Python 3.12 --- .github/workflows/run-tests.yaml | 2 +- docs/news.rst | 2 +- setup.py | 1 + tox.ini | 14 +++++++------- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index a7e7258..4ebb36d 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] include: - os: ubuntu-latest os-name: Linux diff --git a/docs/news.rst b/docs/news.rst index 4f15f88..3a49d74 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -4,7 +4,7 @@ News Version 0.3.1 (in development) ------------------------------ -* Python 3.11. +* Python 3.10, 3.11, 3.12. * CI(GHActions): Install all Python and PyPy versions from ``conda-forge``. diff --git a/setup.py b/setup.py index e8a6a94..3d74634 100755 --- a/setup.py +++ b/setup.py @@ -55,6 +55,7 @@ setup( 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], packages=['sqlconvert'], scripts=['scripts/mysql2sql'], diff --git a/tox.ini b/tox.ini index 78a7970..b726b45 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.15 -envlist = py27,py3{4,5,6,7,8,9,10,11}{,-m2s,-sqlite},py{27,36,311}-flake8 +envlist = py27,py3{4,5,6,7,8,9,10,11,12}{,-m2s,-sqlite},py{27,36,312}-flake8 # Base test environment settings [testenv] @@ -18,7 +18,7 @@ whitelist_externals = createdb dropdb -[testenv:py{27,34,35,36,37,38,39,310,311}] +[testenv:py{27,34,35,36,37,38,39,310,311,312}] commands = {[testenv]commands} {envpython} -m pytest @@ -30,21 +30,21 @@ commands = cmp.py -i tests/mysql2sql/test.out2 test.out rm.py -f test.out -[testenv:py{35,36,37,38,39,310,311}-m2s] +[testenv:py{35,36,37,38,39,310,311,312}-m2s] commands = {[testenv]commands} {envpython} {envbindir}/mysql2sql -P demo/demo.sql test.out cmp.py -i tests/mysql2sql/test.out3 test.out rm.py -f test.out -[testenv:py{27,34,35,36,37,38,39,310,311}-sqlite] +[testenv:py{27,34,35,36,37,38,39,310,311,312}-sqlite] commands = {[testenv]commands} -rm.py -f /tmp/test.sqdb {envpython} -m pytest -D sqlite:///tmp/test.sqdb rm.py -f /tmp/test.sqdb -[testenv:py{27,34,35,36,37,38,39,310,311}-sqlite-w32] +[testenv:py{27,34,35,36,37,38,39,310,311,312}-sqlite-w32] platform = win32 commands = {[testenv]commands} @@ -52,7 +52,7 @@ commands = pytest -D sqlite:/{env:TEMP}/test.sqdb?debug=1 rm.py -f {env:TEMP}/test.sqdb -[testenv:py{27,34,35,36,37,38,39,310,311}-postgres{,-w32}] +[testenv:py{27,34,35,36,37,38,39,310,311,312}-postgres{,-w32}] commands = {[testenv]commands} -dropdb --username=runner test @@ -61,7 +61,7 @@ commands = dropdb --username=runner test # flake8 -[testenv:py{27,34,35,36,37,38,39,310,311}-flake8] +[testenv:py{27,34,35,36,37,38,39,310,311,312}-flake8] deps = flake8 pytest < 7.0 -- 2.39.2 From 382a9e7e381c6bd51e8a945cd49b79f01b725df6 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 14 Dec 2023 23:32:09 +0300 Subject: [PATCH 14/16] Build(setup.cfg): Remove `validators.py` We no longer carry `validators.py` with us. [skip ci] --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 9e6f371..708bf5e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,5 +10,5 @@ tag_date = 0 tag_svn_revision = 0 [flake8] -exclude = .git,.tox,docs/conf.py,validators.py +exclude = .git,.tox,docs/conf.py -- 2.39.2 From 17c7586f65903786148aa9beae7d2453e25941db Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 2 Jan 2024 04:13:55 +0300 Subject: [PATCH 15/16] Docs: Year 2024 [skip ci] --- README.rst | 2 +- docs/index.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index c5829a5..22113ca 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ SQL converter. Author: Oleg Broytman . -Copyright (C) 2016-2023 PhiloSoft Design. +Copyright (C) 2016-2024 PhiloSoft Design. License: GPL. diff --git a/docs/index.rst b/docs/index.rst index e9458b8..a73e921 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -41,7 +41,7 @@ Credits Created by Oleg Broytman . -Copyright (C) 2016-2023 PhiloSoft Design. +Copyright (C) 2016-2024 PhiloSoft Design. License -- 2.39.2 From d3aa108f100d7cb2e3c802fcb599db9711a36456 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 2 Jan 2024 04:14:49 +0300 Subject: [PATCH 16/16] Build(GHActions): Use `checkout@v4` instead of outdated `v2` --- .github/workflows/run-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 4ebb36d..25c08a0 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -36,7 +36,7 @@ jobs: if: ${{ runner.os == 'Windows' }} # Setup Python/pip - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: s-weigand/setup-conda@v1 with: conda-channels: conda-forge -- 2.39.2