sqlalchemy-multiple-db 3.0.0__tar.gz → 3.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/.github/workflows/ci.yml +1 -1
  2. sqlalchemy_multiple_db-3.1.0/CHANGELOG.md +108 -0
  3. sqlalchemy_multiple_db-3.1.0/Makefile +134 -0
  4. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/PKG-INFO +4 -3
  5. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/README.md +1 -1
  6. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/pyproject.toml +2 -1
  7. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/src/sqlalchemy_multiple_db/__init__.py +1 -1
  8. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/tests/test_public_api.py +1 -1
  9. sqlalchemy_multiple_db-3.1.0/uv.lock +626 -0
  10. sqlalchemy_multiple_db-3.0.0/CHANGELOG.md +0 -112
  11. sqlalchemy_multiple_db-3.0.0/Makefile +0 -178
  12. sqlalchemy_multiple_db-3.0.0/uv.lock +0 -597
  13. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/.github/SECURITY.md +0 -0
  14. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/.github/dependabot.yml +0 -0
  15. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/.github/workflows/publish.yml +0 -0
  16. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/.gitignore +0 -0
  17. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/LICENSE +0 -0
  18. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/examples/basic_usage.py +0 -0
  19. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/examples/healthcheck_and_options.py +0 -0
  20. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/examples/transaction_rollback.py +0 -0
  21. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/src/sqlalchemy_multiple_db/config.py +0 -0
  22. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/src/sqlalchemy_multiple_db/exceptions.py +0 -0
  23. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/src/sqlalchemy_multiple_db/manager.py +0 -0
  24. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/tests/test_config.py +0 -0
  25. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/tests/test_examples.py +0 -0
  26. {sqlalchemy_multiple_db-3.0.0 → sqlalchemy_multiple_db-3.1.0}/tests/test_manager.py +0 -0
@@ -25,7 +25,7 @@ jobs:
25
25
  strategy:
26
26
  fail-fast: false
27
27
  matrix:
28
- python-version: ["3.11", "3.12", "3.13", "3.14"]
28
+ python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
29
29
  steps:
30
30
  - uses: actions/checkout@v4
31
31
  - uses: actions/setup-python@v5
@@ -0,0 +1,108 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ * Update changelog [Pavel Liashkov]
6
+
7
+ ## 3.0.0 (2026-07-20)
8
+
9
+ * feat: modernize SQLAlchemy multi-database library [Pavel Liashkov]
10
+
11
+ ## 2.1.1 (2024-10-18)
12
+
13
+ * Update changelog [Pavel Liashkov]
14
+ * Fix url in README [Pavel Liashkov]
15
+
16
+ ## 2.1.0 (2024-10-18)
17
+
18
+ * Update pipeline [Pavel Liashkov]
19
+ * Update version [Pavel Liashkov]
20
+
21
+ ## 2.0.0 (2023-08-03)
22
+
23
+ * Update sqlalchemy requirement from <1.5,>=1.4 to >=1.4,<2.1 [dependabot[bot]]
24
+ * Fix pipeline (#27) [Pavel Liashkov]
25
+ * Update version [Pavel Liashkov]
26
+
27
+ ## 1.8.0 (2021-07-26)
28
+
29
+ * Relax reqs version [Pavel Liashkov]
30
+
31
+ ## 1.7.0 (2021-07-23)
32
+
33
+ * Bump sqlalchemy from 1.4.18 to 1.4.19 [dependabot[bot]]
34
+ * Bump sqlalchemy from 1.4.19 to 1.4.20 [dependabot[bot]]
35
+ * Bump sqlalchemy from 1.4.20 to 1.4.22 [dependabot[bot]]
36
+ * Update version.py [Pavel Liashkov]
37
+
38
+ ## 1.6.0 (2021-06-18)
39
+
40
+ * Bump sqlalchemy from 1.4.17 to 1.4.18 [dependabot[bot]]
41
+ * Update version.py [Pavel Liashkov]
42
+
43
+ ## 1.5.0 (2021-06-04)
44
+
45
+ * Bump sqlalchemy from 1.4.15 to 1.4.17 [dependabot[bot]]
46
+ * Update version.py [Pavel Liashkov]
47
+
48
+ ## 1.4.0 (2021-05-18)
49
+
50
+ * Bump sqlalchemy from 1.4.13 to 1.4.15 [dependabot[bot]]
51
+ * Update version.py [Pavel Liashkov]
52
+
53
+ ## 1.3.0 (2021-05-05)
54
+
55
+ * Bump sqlalchemy from 1.4.8 to 1.4.13 [dependabot[bot]]
56
+ * Update version.py [Pavel Liashkov]
57
+
58
+ ## 1.2.0 (2021-04-16)
59
+
60
+ * Bump sqlalchemy from 1.4.5 to 1.4.8 [dependabot[bot]]
61
+ * Update version.py [Pavel Liashkov]
62
+
63
+ ## 1.1.0 (2021-04-05)
64
+
65
+ * Bump sqlalchemy from 1.4.0 to 1.4.2 [dependabot[bot]]
66
+ * Bump sqlalchemy from 1.4.2 to 1.4.5 [dependabot[bot]]
67
+ * Bump version [Pavel Liashkov]
68
+
69
+ ## 1.0.0 (2021-03-17)
70
+
71
+ * Add command for checking code [Pavel Liashkov]
72
+ * Bump sqlalchemy from 1.3.23 to 1.4.0 [dependabot[bot]]
73
+ * NOTASK: Bump version [Pavel Liashkov]
74
+ * Bump version [Pavel Liashkov]
75
+
76
+ ## 0.1.6 (2021-02-26)
77
+
78
+ * Add codecov settings [Pavel Liashkov]
79
+
80
+ ## 0.1.5 (2021-02-20)
81
+
82
+ * Update Makefile [Pavel Liashkov]
83
+ * Bump version [Pavel Liashkov]
84
+
85
+ ## 0.1.4 (2021-02-08)
86
+
87
+ * Update readme [Pavel Liashkov]
88
+
89
+ ## 0.1.3 (2021-02-02)
90
+
91
+ * Bump sqlalchemy from 1.3.22 to 1.3.23 [dependabot[bot]]
92
+ * Bump version [Pavel Liashkov]
93
+
94
+ ## 0.1.2 (2021-01-23)
95
+
96
+ * Fix Readme [Pavel Liashkov]
97
+ * Bump version [Pavel Liashkov]
98
+ * Fix package format [Pavel Liashkov]
99
+
100
+ ## 0.1.0 (2021-01-22)
101
+
102
+ * Add base [Pavel Liashkov]
103
+ * Add helper [Pavel Liashkov]
104
+ * Add support for multiple db [Pavel Liashkov]
105
+ * Fix DBConfig [Pavel Liashkov]
106
+ * Purge debug code [Pavel Liashkov]
107
+ * Add helper tests [Pavel Liashkov]
108
+
@@ -0,0 +1,134 @@
1
+ # =============================================================================
2
+ # Project configuration
3
+ # =============================================================================
4
+ PROJECT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
5
+ PROJECT_NAME := sqlalchemy-multiple-db
6
+ SRC_PATH := src/sqlalchemy_multiple_db
7
+ LINT_PATHS := src tests examples
8
+ UV ?= uv
9
+
10
+ .DEFAULT_GOAL := help
11
+
12
+ .PHONY: help venv/install/main venv/install/all lint/ruff lint/mypy lint format clean test build sys/changelog sys/tag
13
+
14
+ # =============================================================================
15
+ # Help
16
+ # =============================================================================
17
+ help: ## Display this help message
18
+ @awk 'BEGIN { FS = ":.*##"; printf "\nUsage:\n make <target>\n\nTargets:\n" } /^[a-zA-Z0-9_./-]+:.*##/ { printf " \033[36m%-24s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
19
+
20
+ # =============================================================================
21
+ # Environment
22
+ # =============================================================================
23
+ venv/install/main: ## Install main dependencies
24
+ @echo "==> Installing $(PROJECT_NAME) main dependencies"
25
+ $(UV) sync --no-group dev
26
+
27
+ venv/install/all: ## Install all dependency groups
28
+ @echo "==> Installing $(PROJECT_NAME) with all dependency groups"
29
+ $(UV) sync --all-groups
30
+
31
+ # =============================================================================
32
+ # Code quality
33
+ # =============================================================================
34
+ lint/ruff: ## Check formatting and lint with Ruff
35
+ @echo "==> Checking formatting and linting with Ruff"
36
+ $(UV) run --locked ruff format --check $(LINT_PATHS)
37
+ $(UV) run --locked ruff check $(LINT_PATHS)
38
+
39
+ lint/mypy: ## Type-check the source package with mypy
40
+ @echo "==> Type-checking $(SRC_PATH) with mypy"
41
+ $(UV) run --locked mypy $(SRC_PATH)
42
+
43
+ lint: lint/ruff lint/mypy ## Run all lint checks
44
+ @echo "==> Lint checks passed"
45
+
46
+ format: ## Format and auto-fix lint issues
47
+ @echo "==> Formatting and auto-fixing lint issues"
48
+ $(UV) run --locked ruff format $(LINT_PATHS)
49
+ $(UV) run --locked ruff check --fix $(LINT_PATHS)
50
+
51
+ # =============================================================================
52
+ # Test and build
53
+ # =============================================================================
54
+ test: ## Run the test suite with coverage
55
+ @echo "==> Testing $(PROJECT_NAME) with coverage"
56
+ $(UV) run --locked pytest --cov=sqlalchemy_multiple_db --cov-report=term-missing
57
+
58
+ build: ## Build distribution packages
59
+ @echo "==> Building $(PROJECT_NAME) distribution packages"
60
+ $(UV) build
61
+
62
+ clean: ## Remove generated files and caches
63
+ @echo "==> Removing generated files and caches"
64
+ rm -rf .coverage .mypy_cache .pytest_cache .ruff_cache build dist
65
+ find . -type d -name __pycache__ -prune -exec rm -rf {} +
66
+
67
+ # =============================================================================
68
+ # Release automation
69
+ # =============================================================================
70
+ # Requires mktemp, available on the project's supported macOS and Linux development environments.
71
+ sys/changelog: ## Generate CHANGELOG.md from historical version tags
72
+ @echo "==> Generating CHANGELOG.md from version tags"
73
+ @tmp_file=$$(mktemp CHANGELOG.md.XXXXXX) || exit $$?; \
74
+ cleanup() { rm -f "$$tmp_file"; }; \
75
+ trap cleanup 0; \
76
+ trap 'exit 1' HUP INT TERM; \
77
+ tags="$$( $(UV) run --locked python -c 'import re, subprocess, sys; pattern = re.compile(r"^v?(\d+)\.(\d+)\.(\d+)$$"); raw = subprocess.check_output(["git", "tag"], text=True).splitlines(); tagged = [(tuple(map(int, match.groups())), tag) for tag in raw if (match := pattern.fullmatch(tag))]; len({version for version, _ in tagged}) == len(tagged) or sys.exit("duplicate semantic-version tags are not supported"); tagged.sort(reverse=True); print(" ".join(tag for _, tag in tagged))' )" || exit $$?; \
78
+ if [ -z "$$tags" ]; then \
79
+ echo "No semantic-version tags found." >&2; \
80
+ exit 1; \
81
+ fi; \
82
+ { \
83
+ printf '# Changelog\n\n'; \
84
+ set -- $$tags; \
85
+ newest_tag=$$1; \
86
+ unreleased=$$(git log --no-merges "$$newest_tag..HEAD" --format='* %s [%an]' --reverse) || exit $$?; \
87
+ if [ -n "$$unreleased" ]; then \
88
+ printf '## Unreleased\n\n%s\n\n' "$$unreleased"; \
89
+ fi; \
90
+ while [ $$# -gt 0 ]; do \
91
+ current_tag=$$1; \
92
+ shift; \
93
+ older_tag=$${1:-}; \
94
+ tag_date=$$(git log -1 --format=%as "$$current_tag") || exit $$?; \
95
+ display_tag=$${current_tag#v}; \
96
+ printf '## %s (%s)\n\n' "$$display_tag" "$$tag_date"; \
97
+ if [ -n "$$older_tag" ]; then range="$$older_tag..$$current_tag"; else range="$$current_tag"; fi; \
98
+ git log --no-merges "$$range" --format='* %s [%an]' --reverse || exit $$?; \
99
+ printf '\n'; \
100
+ done; \
101
+ } > "$$tmp_file" || exit $$?; \
102
+ if ! mv "$$tmp_file" CHANGELOG.md; then \
103
+ echo "Unable to replace CHANGELOG.md." >&2; \
104
+ exit 1; \
105
+ fi; \
106
+ trap - 0; \
107
+ echo "CHANGELOG.md generated successfully."
108
+
109
+ sys/tag: ## Create and push a vX.Y.Z release tag
110
+ @read -r -p "Enter tag version (e.g., 2.0.0): " TAG; \
111
+ if ! printf '%s\n' "$$TAG" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$$'; then \
112
+ echo "Tag version must use the X.Y.Z format (for example, 2.0.0)" >&2; \
113
+ exit 1; \
114
+ fi; \
115
+ project_version="$$( $(UV) run --locked python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])' )" || exit $$?; \
116
+ if [ "$$project_version" != "$$TAG" ]; then \
117
+ echo "Tag version $$TAG does not match pyproject.toml project.version $$project_version" >&2; \
118
+ exit 1; \
119
+ fi; \
120
+ if [ -n "$$(git status --porcelain --untracked-files=all)" ]; then \
121
+ echo "Worktree must be clean before creating a release tag." >&2; \
122
+ exit 1; \
123
+ fi; \
124
+ if git show-ref --verify --quiet "refs/tags/v$$TAG"; then \
125
+ echo "Local tag v$$TAG already exists." >&2; \
126
+ exit 1; \
127
+ fi; \
128
+ echo "==> Creating and pushing v$$TAG"; \
129
+ git tag -a "v$$TAG" -m "Release v$$TAG" || exit $$?; \
130
+ if ! git push origin "v$$TAG"; then \
131
+ echo "Push failed; deleting local tag v$$TAG." >&2; \
132
+ git tag -d "v$$TAG" || exit $$?; \
133
+ exit 1; \
134
+ fi
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: sqlalchemy-multiple-db
3
- Version: 3.0.0
3
+ Version: 3.1.0
4
4
  Summary: Explicit SQLAlchemy session management for multiple named databases
5
5
  Project-URL: Changelog, https://github.com/bigbag/sqlalchemy-multiple-db/blob/main/CHANGELOG.md
6
6
  Project-URL: Homepage, https://github.com/bigbag/sqlalchemy-multiple-db
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
19
  Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
20
21
  Classifier: Topic :: Database
21
22
  Classifier: Topic :: Software Development :: Libraries
22
23
  Requires-Python: >=3.11
@@ -29,7 +30,7 @@ Explicit, typed SQLAlchemy 2.x session management for multiple named databases.
29
30
 
30
31
  ## Requirements
31
32
 
32
- - Python 3.11, 3.12, 3.13, or 3.14
33
+ - Python 3.11, 3.12, 3.13, 3.14, or 3.15
33
34
  - SQLAlchemy 2.x (installed automatically)
34
35
 
35
36
  ## Installation
@@ -4,7 +4,7 @@ Explicit, typed SQLAlchemy 2.x session management for multiple named databases.
4
4
 
5
5
  ## Requirements
6
6
 
7
- - Python 3.11, 3.12, 3.13, or 3.14
7
+ - Python 3.11, 3.12, 3.13, 3.14, or 3.15
8
8
  - SQLAlchemy 2.x (installed automatically)
9
9
 
10
10
  ## Installation
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sqlalchemy-multiple-db"
7
- version = "3.0.0"
7
+ version = "3.1.0"
8
8
  description = "Explicit SQLAlchemy session management for multiple named databases"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -20,6 +20,7 @@ classifiers = [
20
20
  "Programming Language :: Python :: 3.12",
21
21
  "Programming Language :: Python :: 3.13",
22
22
  "Programming Language :: Python :: 3.14",
23
+ "Programming Language :: Python :: 3.15",
23
24
  "Topic :: Database",
24
25
  "Topic :: Software Development :: Libraries",
25
26
  ]
@@ -4,7 +4,7 @@ from .config import DatabaseConfig
4
4
  from .exceptions import ConfigurationError, ManagerClosedError
5
5
  from .manager import DatabaseManager
6
6
 
7
- __version__ = "3.0.0"
7
+ __version__ = "3.1.0"
8
8
  __all__ = [
9
9
  "ConfigurationError",
10
10
  "DatabaseConfig",
@@ -9,7 +9,7 @@ def test_package_exposes_only_v3_public_api() -> None:
9
9
  "ManagerClosedError",
10
10
  "__version__",
11
11
  ]
12
- assert sqlalchemy_multiple_db.__version__ == "3.0.0"
12
+ assert sqlalchemy_multiple_db.__version__ == "3.1.0"
13
13
  assert not hasattr(sqlalchemy_multiple_db, "DBConfig")
14
14
  assert not hasattr(sqlalchemy_multiple_db, "DBHelper")
15
15
  assert not hasattr(sqlalchemy_multiple_db, "db")