Skip to content

Commit 409c1a4

Browse files
committed
v4.0.1
1 parent 3a3b198 commit 409c1a4

7 files changed

Lines changed: 64 additions & 460 deletions

File tree

.github/workflows/workflow.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
29-
python-version: ['3.10', '3.14']
29+
python-version: ['3.12', '3.14']
3030
steps:
3131
- uses: actions/checkout@v6
3232

@@ -143,11 +143,11 @@ jobs:
143143
run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
144144

145145
- name: Upload artifacts
146-
uses: actions/upload-artifact@v6
146+
uses: actions/upload-artifact@v7
147147
with:
148148
name: python-packages
149149
path: dist/
150-
retention-days: 7
150+
retention-days: 3
151151

152152
release:
153153
name: Create Release
@@ -158,7 +158,7 @@ jobs:
158158
contents: write
159159
steps:
160160
- name: Download artifacts
161-
uses: actions/download-artifact@v7
161+
uses: actions/download-artifact@v8
162162
with:
163163
name: python-packages
164164
path: release-assets/
@@ -167,11 +167,8 @@ jobs:
167167
uses: softprops/action-gh-release@v2
168168
with:
169169
name: Release ${{ github.ref_name }}
170-
body: |
171-
Automated release for version ${{ github.ref_name }}
172-
draft: false
173-
prerelease: false
174170
files: release-assets/*
171+
generate_release_notes: true
175172

176173
publish:
177174
name: Publish to PyPI
@@ -183,7 +180,7 @@ jobs:
183180
id-token: write
184181
steps:
185182
- name: Download package artifacts
186-
uses: actions/download-artifact@v7
183+
uses: actions/download-artifact@v8
187184
with:
188185
name: python-packages
189186
path: dist

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,4 @@ cython_debug/
161161
# Custom
162162
*.prof
163163
junit.xml
164+
/requirements.txt

.snyk

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Snyk policy file
2+
# https://docs.snyk.io/scan-using-snyk/snyk-code/configure-snyk-code#excluding-directories-and-files-from-the-snyk-code-test
3+
version: v1.25.0
4+
exclude:
5+
global:
6+
- tests/**
7+
- ddcdatabases/core/constants.py
8+
ignore:
9+
'snyk:lic:pip:psycopg:LGPL-3.0':
10+
- '*':
11+
reason: psycopg is used as a dependency, not modified - LGPL-3.0 is compatible with MIT
12+
expires: 2027-03-20T00:00:00.000Z
13+
'snyk:lic:pip:psycopg-binary:LGPL-3.0':
14+
- '*':
15+
reason: psycopg-binary is used as a dependency, not modified - LGPL-3.0 is compatible with MIT
16+
expires: 2027-03-20T00:00:00.000Z

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<p align="center">
88
<a href="https://github.com/sponsors/ddc"><img src="https://img.shields.io/static/v1?style=plastic&label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=ff69b4" alt="Sponsor"/></a>
99
<br>
10-
<a href="https://ko-fi.com/ddcsta"><img src="https://img.shields.io/badge/Ko--fi-ddcsta-FF5E5B?style=plastic&logo=kofi&logoColor=white&color=brightgreen" alt="Ko-fi"/></a>
10+
<a href="https://ko-fi.com/ddc"><img src="https://img.shields.io/badge/Ko--fi-ddc-FF5E5B?style=plastic&logo=kofi&logoColor=white&color=brightgreen" alt="Ko-fi"/></a>
1111
<a href="https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ"><img src="https://img.shields.io/badge/Donate-PayPal-brightgreen.svg?style=plastic&logo=paypal&logoColor=white" alt="Donate"/></a>
1212
<br>
1313
<a href="https://pypi.python.org/pypi/ddcDatabases"><img src="https://img.shields.io/pypi/v/ddcDatabases.svg?style=plastic&logo=python&cacheSeconds=3600" alt="PyPi"/></a>
@@ -733,8 +733,8 @@ Released under the [MIT License](LICENSE)
733733

734734
# Support
735735

736-
If you find this project helpful, consider supporting development:
736+
If you find this project helpful, consider supporting development.
737737

738-
- [GitHub Sponsor](https://github.com/sponsors/ddc)
739-
- [ko-fi](https://ko-fi.com/ddcsta)
740-
- [PayPal](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)
738+
<a href='https://github.com/sponsors/ddc' target='_blank'><img height='24' style='border:0px;height:24px;' src='https://img.shields.io/badge/Sponsor-❤-ea4aaa?style=plastic&logo=github&logoColor=white' border='0' alt='Sponsor on GitHub' /></a>
739+
<a href='https://ko-fi.com/ddc' target='_blank'><img height='30' style='border:0px;height:30px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
740+
<a href='https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ' target='_blank'><img height='30' style='border:0px;height:30px;' src='https://www.paypalobjects.com/digitalassets/c/website/marketing/apac/C2/logos-buttons/optimize/44_Yellow_PayPal_Pill_Button.png' border='0' alt='Donate via PayPal' /></a>

ddcdatabases/core/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import logging
2-
from datetime import datetime, timezone
2+
from datetime import UTC, datetime
33
from typing import Any
44

55
_logger = logging.getLogger(__name__)
@@ -13,7 +13,7 @@ class CustomBaseException(Exception):
1313

1414
def __init__(self, msg: Any) -> None:
1515
self.original_exception = msg
16-
now = datetime.now(timezone.utc)
16+
now = datetime.now(UTC)
1717
dt = now.isoformat(timespec="milliseconds")
1818
_logger.error(f"[{dt}]:{repr(msg)}")
1919
raise msg

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ packages = ["ddcdatabases"]
1313

1414
[project]
1515
name = "ddcdatabases"
16-
version = "4.0.0"
16+
version = "4.0.1"
1717
description = "Simplified database ORM connections with support for multiple database engines"
1818
urls.Repository = "https://github.com/ddc/ddcDatabases"
1919
urls.Homepage = "https://pypi.org/project/ddcDatabases"
@@ -42,8 +42,6 @@ classifiers = [
4242
"Development Status :: 5 - Production/Stable",
4343
"License :: OSI Approved :: MIT License",
4444
"Programming Language :: Python :: 3",
45-
"Programming Language :: Python :: 3.10",
46-
"Programming Language :: Python :: 3.11",
4745
"Programming Language :: Python :: 3.12",
4846
"Programming Language :: Python :: 3.13",
4947
"Programming Language :: Python :: 3.14",
@@ -52,7 +50,7 @@ classifiers = [
5250
"Intended Audience :: Developers",
5351
"Natural Language :: English",
5452
]
55-
requires-python = ">=3.10"
53+
requires-python = ">=3.12"
5654
dependencies = [
5755
"pydantic-settings>=2.11.0",
5856
"sqlalchemy[asyncio]>=2.0.48",
@@ -72,12 +70,14 @@ dev = [
7270
"coverage>=7.13.5",
7371
"poethepoet>=0.42.1",
7472
"pytest-asyncio>=1.3.0",
75-
"ruff>=0.15.6",
76-
"testcontainers[postgres,mysql,mssql,mongodb,oracle]>=4.14.1",
73+
"ruff>=0.15.7",
74+
"testcontainers[postgres,mysql,mssql,mongodb,oracle]>=4.14.2",
7775
]
7876

7977
[tool.poe.tasks]
8078
linter.shell = "uv run ruff check --fix . && uv run ruff format ."
79+
snyk-export.shell = "rm -f requirements.txt && uv export --no-hashes --no-annotate --format requirements-txt > requirements.txt && uvx pre-commit run --all-files || uvx pre-commit run --all-files"
80+
snyk.sequence = ["snyk-export", { shell = "uv pip install pip && snyk test --file=requirements.txt && snyk code test; uv pip uninstall pip" }]
8181
profile = "uv run python -m cProfile -o cprofile_unit.prof -m pytest tests/unit"
8282
profile-integration = "uv run python -m cProfile -o cprofile_integration.prof -m pytest tests/integration"
8383
test.sequence = [{ shell = "uv run coverage run -m pytest tests/unit" }, { shell = "uv run coverage report" }, { shell = "uv run coverage xml" }]
@@ -121,15 +121,15 @@ exclude_lines = [
121121

122122
[tool.ruff]
123123
line-length = 120
124-
target-version = "py310"
124+
target-version = "py312"
125125

126126
[tool.ruff.lint]
127127
select = ["E", "W", "F", "I", "B", "C4", "UP", "S", "SLF"]
128128
ignore = ["E501", "E402", "UP046", "UP047"]
129129

130130
[tool.ruff.lint.per-file-ignores]
131131
"__init__.py" = ["F401"]
132-
"tests/**/*.py" = ["S101", "S105", "S106", "S311", "SLF001", "F841"]
132+
"tests/**/*.py" = ["S101", "S105", "S106", "S110", "S311", "S603", "S607", "SLF001", "F841"]
133133

134134
[tool.ruff.lint.isort]
135135
known-first-party = ["ddcdatabases"]

0 commit comments

Comments
 (0)