From 06a7b9469969e484dd0caa8f207ea03a81119c26 Mon Sep 17 00:00:00 2001
From: Christoph Zwerschke DBUtils 3.1.0 was released on March 17, 2024. Changes: Support Python version 3.12, cease support for Python 3.6. Various small internal improvements and modernizations. DBUtils 3.0.3 was released on April 27, 2023. Changes: Minor fixes and section an advanced usage in docs. DBUtils 3.0.2 was released on January 14, 2022. The optional iterator protocol on cursors is now supported. DBUtils 3.0.1 was released on December 22, 2021. It includes InterfaceError to the default list of exceptions
for which the connection failover mechanism is applied.
You can override this with the failures parameter. DBUtils 3.0.0 was released on November 26, 2021. It is intended to be used with Python versions 3.6 to 3.10. Cease support for Python 2 and 3.5, minor optimizations. DBUtils 2.0.3 was released on November 26, 2021. Changes: Support Python version 3.10. DBUtils 2.0.2 was released on June 8, 2021. Changes: Allow using context managers for pooled connections. DBUtils 2.0.1 was released on April 8, 2021. Changes: Avoid "name Exception is not defined" when exiting. DBUtils 2.0 was released on September 26, 2020. It is intended to be used with Python versions 2.7 and 3.5 to 3.9. This changelog has been compiled from the former release notes. DBUtils 1.4 was released on September 26, 2020. It is intended to be used with Python versions 2.7 and 3.5 to 3.9.Changelog for DBUtils
3.1.0
+
+
+3.0.3
3.0.3
3.0.2
3.0.1
3.0.0
3.0.0
2.0.3
2.0.3
2.0.2
2.0.2
2.0.1
2.0.1
2.0
2.0
1.4
1.4
inside a transaction.
DBUtils 1.3 was released on March 3, 2018.
It is intended to be used with Python versions 2.6, 2.7 and 3.4 to 3.7.
@@ -102,12 +111,12 @@This version now supports context handlers for connections and cursors.
DBUtils 1.2 was released on February 5, 2017.
It is intended to be used with Python versions 2.6, 2.7 and 3.0 to 3.6.
DBUtils 1.1.1 was released on February 4, 2017.
It is intended to be used with Python versions 2.3 to 2.7.
@@ -121,7 +130,7 @@Fixed a problem when running under Jython (reported by Vitaly Kruglikov).
DBUtils 1.1 was released on August 14, 2011.
Improvements:
@@ -150,7 +159,7 @@Fixed some minor issues with the DBUtilsExample for Webware.
DBUtils 1.0 was released on November 29, 2008.
It is intended to be used with Python versions 2.2 to 2.6.
@@ -183,7 +192,7 @@DBUtils 0.9.4 was released on July 7, 2007.
This release fixes a problem in the destructor code and has been supplemented @@ -192,7 +201,7 @@
DBUtils 0.9.3 was released on May 21, 2007.
Changes:
@@ -207,7 +216,7 @@DBUtils 0.9.2 was released on September 22, 2006.
It is intended to be used with Python versions 2.2 to 2.5.
@@ -217,7 +226,7 @@DBUtils 0.9.1 was released on May 8, 2006.
It is intended to be used with Python versions 2.2 to 2.4.
@@ -231,7 +240,7 @@Improved the documentation and added a User's Guide.
DBUtils 0.8.1 was released on September 13, 2005.
It is intended to be used with Python versions 2.0 to 2.4.
diff --git a/docs/changelog.rst b/docs/changelog.rst index 6d0833f..796684e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,17 @@ Changelog for DBUtils +++++++++++++++++++++ +3.1.0 +===== + +DBUtils 3.1.0 was released on March 17, 2024. + +Changes: + +* Support Python version 3.12, cease support for Python 3.6. +* Various small internal improvements and modernizations. + + 3.0.3 ===== diff --git a/docs/main.de.html b/docs/main.de.html index 1a2dda7..e4f5834 100644 --- a/docs/main.de.html +++ b/docs/main.de.html @@ -2,8 +2,8 @@ + -English | German
DBUtils unterstützt die Python Versionen 3.6 bis 3.11.
+DBUtils unterstützt die Python Versionen 3.7 bis 3.12.
Die Module in der Variante für klassisches PyGreSQL benötigen PyGreSQL Version 4.0 oder höher, während die Module in der allgemeinen Variante für DB-API 2 mit jedem beliebigen Python-Datenbankadapter-Modul zusammenarbeiten, @@ -536,7 +536,7 @@
Copyright © 2005-2023 Christoph Zwerschke. +
Copyright © 2005-2024 Christoph Zwerschke. Alle Rechte vorbehalten.
DBUtils ist freie und quelloffene Software, lizenziert unter der MIT-Lizenz.
diff --git a/docs/main.de.rst b/docs/main.de.rst index aa800d6..a42853b 100644 --- a/docs/main.de.rst +++ b/docs/main.de.rst @@ -1,7 +1,7 @@ Benutzeranleitung für DBUtils +++++++++++++++++++++++++++++ -:Version: 3.0.3 +:Version: 3.1.0 :Translations: English_ | German .. _English: main.html @@ -98,7 +98,7 @@ herunterzuladen und zu installieren:: Anforderungen ============= -DBUtils unterstützt die Python_ Versionen 3.6 bis 3.11. +DBUtils unterstützt die Python_ Versionen 3.7 bis 3.12. Die Module in der Variante für klassisches PyGreSQL benötigen PyGreSQL_ Version 4.0 oder höher, während die Module in der allgemeinen Variante @@ -583,7 +583,7 @@ Autoren Copyright und Lizenz ==================== -Copyright © 2005-2023 Christoph Zwerschke. +Copyright © 2005-2024 Christoph Zwerschke. Alle Rechte vorbehalten. DBUtils ist freie und quelloffene Software, diff --git a/docs/main.html b/docs/main.html index 50c9ffd..9290bb2 100644 --- a/docs/main.html +++ b/docs/main.html @@ -2,8 +2,8 @@ + -English | German
DBUtils supports Python versions 3.6 to 3.11.
+DBUtils supports Python versions 3.7 to 3.12.
The modules in the classic PyGreSQL variant need PyGreSQL version 4.0 or above, while the modules in the universal DB-API 2 variant run with any Python DB-API 2 compliant database interface module.
@@ -494,7 +494,7 @@Copyright © 2005-2023 by Christoph Zwerschke. +
Copyright © 2005-2024 by Christoph Zwerschke. All Rights Reserved.
DBUtils is free and open source software, licensed under the MIT license.
diff --git a/docs/main.rst b/docs/main.rst index fa574b7..e2fdbd9 100644 --- a/docs/main.rst +++ b/docs/main.rst @@ -1,7 +1,7 @@ DBUtils User's Guide ++++++++++++++++++++ -:Version: 3.0.3 +:Version: 3.1.0 :Translations: English | German_ .. _German: main.de.html @@ -95,7 +95,7 @@ It is even easier to download and install the package in one go using `pip`_:: Requirements ============ -DBUtils supports Python_ versions 3.6 to 3.11. +DBUtils supports Python_ versions 3.7 to 3.12. The modules in the classic PyGreSQL variant need PyGreSQL_ version 4.0 or above, while the modules in the universal DB-API 2 variant run with @@ -543,7 +543,7 @@ Credits Copyright and License ===================== -Copyright © 2005-2023 by Christoph Zwerschke. +Copyright © 2005-2024 by Christoph Zwerschke. All Rights Reserved. DBUtils is free and open source software, diff --git a/docs/make.py b/docs/make.py index c071071..a00977b 100755 --- a/docs/make.py +++ b/docs/make.py @@ -1,15 +1,14 @@ -#!/usr/bin/python3.10 +#!/usr/bin/python3.11 """Build HTML from reST files.""" -from glob import glob from pathlib import Path from docutils.core import publish_file print("Creating the documentation...") -for rst_file in glob('*.rst'): +for rst_file in Path().glob('*.rst'): rst_path = Path(rst_file) name = Path(rst_file).stem lang = Path(name).suffix diff --git a/pyproject.toml b/pyproject.toml index 3426c54..d4f3aa4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,12 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ - "setuptools>=61.2", + "setuptools>=69", ] [project] name = "DBUtils" -version = "3.1.0b1" +version = "3.1.0" description = "Database connections for multi-threaded environments." license = {text = "MIT License"} authors = [{name = "Christoph Zwerschke", email = "cito@online.de"}] @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Database", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", @@ -58,19 +59,27 @@ platforms = ["any"] include-package-data = false [tool.ruff] +line-length = 79 +target-version = "py37" + +[tool.ruff.lint] select = [ "A", # flake8-builtins + # "ANN", # flake8-annotations "ARG", # flake8-unused-arguments "B", # flake8-bugbear + # "BLE", # flake8-blind-except "C4", # flake8-comprehensions "C90", # McCabe cyclomatic complexity "COM", # flake8-commas "D", # pydocstyle "DTZ", # flake8-datetimez "E", # pycodestyle + # "EM", # flake8-errmsg "ERA", # eradicate "EXE", # flake8-executable "F", # Pyflakes + # "FBT", # flake8-boolean-trap "G", # flake8-logging-format "I", # isort "ICN", # flake8-import-conventions @@ -84,43 +93,40 @@ select = [ "PT", # flake8-pytest-style "PTH", # flake8-use-pathlib "PYI", # flake8-pyi + # "Q", # flake8-quotes "RET", # flake8-return "RSE", # flake8-raise "RUF", # Ruff-specific rules "S", # flake8-bandit + # "SLF", # flake8-self "SIM", # flake8-simplify "T10", # flake8-debugger "T20", # flake8-print "TCH", # flake8-type-checking "TID", # flake8-tidy-imports + # "TRY", # tryceratops "UP", # pyupgrade "W", # pycodestyle "YTT", # flake8-2020 - # "ANN", # flake8-annotations - # "BLE", # flake8-blind-except - # "EM", # flake8-errmsg - # "FBT", # flake8-boolean-trap - # "Q", # flake8-quotes - # "SLF", # flake8-self - # "TRY", # tryceratops ] # Note: use `ruff rule ...` to see explanations of rules ignore = [ "D203", # no blank line before class docstring "D213", # multi-line docstrings should not start at second line ] -line-length = 79 -target-version = "py37" -[tool.ruff.mccabe] +[tool.ruff.lint.mccabe] max-complexity = 30 -[tool.ruff.pylint] +[tool.ruff.lint.flake8-quotes] +inline-quotes = "double" + +[tool.ruff.lint.pylint] max-args = 12 max-branches = 35 max-statements = 95 -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "docs/*" = [ "INP001", # allow stand-alone scripts "T201", # allow print statements diff --git a/tests/test_threading_local.py b/tests/test_threading_local.py index 2c86525..3871e6c 100644 --- a/tests/test_threading_local.py +++ b/tests/test_threading_local.py @@ -71,7 +71,7 @@ def f(): assert not hasattr(my_data, 'color') class MyLocal(local): - __slots__ = 'number' + __slots__ = ('number',) my_data = MyLocal() my_data.number = 42 diff --git a/tox.ini b/tox.ini index 529d75c..62aab9d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py3{7,8,9,10,11}, ruff, manifest, docs, spell +envlist = py3{7,8,9,10,11,12}, ruff, manifest, docs, spell [testenv] setenv = @@ -9,25 +9,25 @@ commands = pytest {posargs} [testenv:spell] -basepython = python3.10 +basepython = python3.11 deps = codespell commands = codespell . [testenv:ruff] -basepython = python3.10 +basepython = python3.11 deps = ruff commands = - ruff . + ruff check . [testenv:manifest] -basepython = python3.10 +basepython = python3.11 deps = check-manifest commands = check-manifest -v [testenv:docs] -basepython = python3.10 +basepython = python3.11 extras = docs changedir = docs commands =