@@ -7,7 +7,7 @@ name = "saturnin-core"
77dynamic = [" version" ]
88description = " Saturnin core services"
99readme = " README.md"
10- requires-python = " >=3.8 "
10+ requires-python = " >=3.11 "
1111license = { file = " LICENSE" }
1212authors = [
1313 {
name =
" Pavel Cisar" ,
email =
" [email protected] " },
@@ -19,10 +19,9 @@ classifiers = [
1919 " Intended Audience :: System Administrators" ,
2020 " License :: OSI Approved :: MIT License" ,
2121 " Programming Language :: Python :: 3 :: Only" ,
22- " Programming Language :: Python :: 3.8" ,
23- " Programming Language :: Python :: 3.9" ,
24- " Programming Language :: Python :: 3.10" ,
2522 " Programming Language :: Python :: 3.11" ,
23+ " Programming Language :: Python :: 3.12" ,
24+ " Programming Language :: Python :: 3.13" ,
2625 " Operating System :: POSIX :: Linux" ,
2726 " Operating System :: Microsoft :: Windows" ,
2827 " Operating System :: MacOS" ,
@@ -32,9 +31,9 @@ classifiers = [
3231 " Topic :: Database" ,
3332 ]
3433dependencies = [
35- " saturnin>=0.9 .0" ,
36- " firebird-driver>=1.10 .0" ,
37- " firebird-lib>=1.5 .0"
34+ " saturnin==0.10 .0" ,
35+ " firebird-driver~=2 .0" ,
36+ " firebird-lib~=2 .0"
3837 ]
3938
4039[project .urls ]
@@ -72,104 +71,48 @@ include = ["src"]
7271[tool .hatch .build .targets .wheel ]
7372packages = [" src/saturnin" ]
7473
74+ [tool .hatch .metadata ]
75+ allow-direct-references = true
76+
7577[tool .hatch .envs .default ]
7678dependencies = [
7779]
7880
79- [tool .hatch .envs .test ]
80- dependencies = [
81- " coverage[toml]>=6.5" ,
82- " pytest" ,
83- ]
84- [tool .hatch .envs .test .scripts ]
85- test = " pytest {args:tests}"
86- test-cov = " coverage run -m pytest {args:tests}"
87- cov-report = [
88- " - coverage combine" ,
89- " coverage report" ,
90- ]
91- cov = [
92- " test-cov" ,
93- " cov-report" ,
81+ [tool .hatch .envs .hatch-test ]
82+ extra-dependencies = [
9483]
95- version = " python --version"
9684
97- [[tool .hatch .envs .test .matrix ]]
98- python = [" 3.8 " , " 3.9 " , " 3.10 " , " 3.11 " ]
85+ [[tool .hatch .envs .hatch- test .matrix ]]
86+ python = [" 3.11 " , " 3.12 " , " 3.13 " ]
9987
10088[tool .hatch .envs .doc ]
10189detached = false
10290platforms = [" linux" ]
10391dependencies = [
104- " Sphinx>=7.1 " ,
92+ " Sphinx==7.2.6 " ,
10593 " sphinx-bootstrap-theme>=0.8.1" ,
10694 " sphinx-autodoc-typehints>=1.24.0" ,
10795 " doc2dash>=3.0.0"
10896]
10997[tool .hatch .envs .doc .scripts ]
11098build = " cd docs ; make html"
11199docset = [
112- " cd docs ; doc2dash -u https://saturnin-core.readthedocs .io/en/latest/ -f -i ./_static/fb-favicon.png -n saturnin-core ./_build/html/" ,
100+ " cd docs ; doc2dash -u https://saturnin-core.rtfd .io/en/latest/ -f -i ./_static/fb-favicon.png -n saturnin-core ./_build/html/" ,
113101 " cd docs; VERSION=`hatch version` ; tar --exclude='.DS_Store' -cvzf ../dist/saturnin-core-$VERSION-docset.tgz saturnin-core.docset" ,
114102]
115103
116- [tool .hatch .envs .lint ]
117- detached = true
118- dependencies = [
119- " black>=23.1.0" ,
120- " mypy>=1.0.0" ,
121- " ruff>=0.0.243" ,
122- ]
123- [tool .hatch .envs .lint .scripts ]
124- typing = " mypy --install-types --non-interactive {args:src/saturnin tests}"
125- style = [
126- " ruff {args:.}" ,
127- " black --check --diff {args:.}" ,
128- ]
129- fmt = [
130- " black {args:.}" ,
131- " ruff --fix {args:.}" ,
132- " style" ,
133- ]
134- all = [
135- " style" ,
136- " typing" ,
137- ]
138-
139- [tool .black ]
140- target-version = [" py38" ]
141- line-length = 120
142- skip-string-normalization = true
143-
144104[tool .ruff ]
145- target-version = " py38 "
105+ target-version = " py311 "
146106line-length = 120
147- select = [
148- " A" ,
149- " ARG" ,
150- " B" ,
151- " C" ,
152- " DTZ" ,
153- " E" ,
154- " EM" ,
155- " F" ,
156- " FBT" ,
157- " I" ,
158- " ICN" ,
159- " ISC" ,
160- " N" ,
161- " PLC" ,
162- " PLE" ,
163- " PLR" ,
164- " PLW" ,
165- " Q" ,
166- " RUF" ,
167- " S" ,
168- " T" ,
169- " TID" ,
170- " UP" ,
171- " W" ,
172- " YTT" ,
107+
108+ [tool .ruff .format ]
109+ preview = true
110+ quote-style = " single"
111+ exclude = [" *.pyi" ]
112+
113+ [tool .ruff .lint ]
114+ select = [" A" , " ARG" , " B" , " C" , " DTZ" , " E" , " EM" , " F" , " FBT" , " I" , " ICN" , " ISC" , " N" ,
115+ " PLC" , " PLE" , " PLR" , " PLW" , " Q" , " RUF" , " S" , " T" , " TID" , " UP" , " W" , " YTT" ,
173116]
174117ignore = [
175118 # Allow non-abstract empty methods in abstract base classes
@@ -180,21 +123,37 @@ ignore = [
180123 " S105" , " S106" , " S107" ,
181124 # Ignore complexity
182125 " C901" , " PLR0911" , " PLR0912" , " PLR0913" , " PLR0915" ,
126+ #
127+ " E741" ,
128+ # Allow relative imports
129+ " TID252" ,
130+ # Allow literals in exceptions
131+ " EM101" , " EM102" ,
132+ # Single quotes instead double
133+ " Q000"
183134]
184135unfixable = [
185136 # Don't touch unused imports
186137 " F401" ,
138+ # Don't change single quotes to double
139+ " Q000"
187140]
141+ exclude = [" *_pb2.py" , " *.pyi" , " tests/*" , " docs/*" , " work/*" ]
188142
189- [tool .ruff .isort ]
190- known-first-party = [" saturnin" ]
143+ [tool .ruff .lint .isort ]
144+ known-first-party = [
145+ " firebird.driver" ,
146+ " firebird.base" ,
147+ " firebird.lib" ,
148+ " firebird.uuid" ,
149+ " saturnin" ,
150+ ]
191151
192- [tool .ruff .flake8-tidy-imports ]
152+ [tool .ruff .lint . flake8-tidy-imports ]
193153ban-relative-imports = " all"
194154
195- [tool .ruff .per-file-ignores ]
155+ [tool .ruff .lint . per-file-ignores ]
196156# Tests can use magic values, assertions, and relative imports
197- "tests/**/*" = [" PLR2004" , " S101" , " TID252" ]
198157
199158[tool .coverage .run ]
200159source_pkgs = [" saturnin" , " tests" ]
@@ -204,8 +163,8 @@ omit = [
204163]
205164
206165[tool .coverage .paths ]
207- saturnin = [" src/python " , " */python/ src/saturnin" ]
208- tests = [" tests" , " */python/tests " ]
166+ firebird_base = [" src/saturnin" ]
167+ tests = [" tests" ]
209168
210169[tool .coverage .report ]
211170exclude_lines = [
0 commit comments