11[build-system ]
2- requires = [" hatchling>=1.27.0 " ]
2+ requires = [" hatchling" ]
33build-backend = " hatchling.build"
44
55[project ]
66name = " firebird-driver"
77description = " Firebird driver for Python"
88dynamic = [" version" ]
99readme = " README.md"
10- requires-python = " >=3.8 "
10+ requires-python = " >=3.11 "
1111license = { file = " LICENSE" }
1212authors = [
1313 { name = " Pavel Cisar" , email = " pcisar@users.sourceforge.net" },
@@ -18,20 +18,18 @@ classifiers = [
1818 " Intended Audience :: Developers" ,
1919 " License :: OSI Approved :: MIT License" ,
2020 " Programming Language :: Python :: 3 :: Only" ,
21- " Programming Language :: Python :: 3.8" ,
22- " Programming Language :: Python :: 3.9" ,
23- " Programming Language :: Python :: 3.10" ,
2421 " Programming Language :: Python :: 3.11" ,
2522 " Programming Language :: Python :: 3.12" ,
23+ " Programming Language :: Python :: 3.13" ,
2624 " Operating System :: POSIX :: Linux" ,
2725 " Operating System :: Microsoft :: Windows" ,
2826 " Operating System :: MacOS" ,
2927 " Topic :: Software Development" ,
3028 " Topic :: Database" ,
3129]
3230dependencies = [
33- " firebird-base~=1.8 " ,
34- " python-dateutil> =2.8 " ,
31+ # "firebird-base @file:////home/job/python/projects/firebird-base ",
32+ " firebird-base~ =2.0 " ,
3533]
3634
3735[project .urls ]
@@ -50,18 +48,25 @@ include = ["src"]
5048[tool .hatch .build .targets .wheel ]
5149packages = [" src/firebird" ]
5250
51+ [tool .hatch .metadata ]
52+ allow-direct-references = true
53+
5354[tool .hatch .envs .default ]
5455dependencies = [
5556]
5657
58+ [tool .hatch .envs .hatch-test ]
59+ extra-args = [" --host=localhost" ]
60+
5761[tool .hatch .envs .test ]
5862dependencies = [
5963 " coverage[toml]>=6.5" ,
6064 " pytest" ,
6165]
66+
6267[tool .hatch .envs .test .scripts ]
63- test = " pytest {args:tests}"
64- test-cov = " coverage run -m pytest {args:tests}"
68+ test = " pytest --host=localhost {args:tests}"
69+ test-cov = " coverage run -m pytest --host=localhost {args:tests}"
6570cov-report = [
6671 " - coverage combine" ,
6772 " coverage report" ,
@@ -76,8 +81,8 @@ cov = [
7681]
7782version = " python --version"
7883
79- [[tool .hatch .envs .test .matrix ]]
80- python = [" 3.8 " , " 3.9 " , " 3.10 " , " 3. 11" , " 3.12" , " 3.13" ]
84+ [[tool .hatch .envs .hatch- test .matrix ]]
85+ python = [" 3.11" , " 3.12" , " 3.13" ]
8186
8287[tool .hatch .envs .doc ]
8388detached = false
@@ -95,63 +100,13 @@ docset = [
95100 " cd docs; VERSION=`hatch version` ; tar --exclude='.DS_Store' -cvzf ../dist/firebird-driver-$VERSION-docset.tgz firebird-driver.docset" ,
96101]
97102
98- [tool .hatch .envs .lint ]
99- detached = true
100- dependencies = [
101- " black>=23.1.0" ,
102- " mypy>=1.0.0" ,
103- " ruff>=0.0.243" ,
104- ]
105- [tool .hatch .envs .lint .scripts ]
106- typing = " mypy --install-types --non-interactive {args:src/firebird/driver tests}"
107- style = [
108- " ruff {args:.}" ,
109- " black --check --diff {args:.}" ,
110- ]
111- fmt = [
112- " black {args:.}" ,
113- " ruff --fix {args:.}" ,
114- " style" ,
115- ]
116- all = [
117- " style" ,
118- " typing" ,
119- ]
120-
121- [tool .black ]
122- target-version = [" py38" ]
123- line-length = 120
124- skip-string-normalization = true
125-
126103[tool .ruff ]
127- target-version = " py38 "
104+ target-version = " py311 "
128105line-length = 120
129- select = [
130- " A" ,
131- " ARG" ,
132- " B" ,
133- " C" ,
134- " DTZ" ,
135- " E" ,
136- " EM" ,
137- " F" ,
138- " FBT" ,
139- " I" ,
140- " ICN" ,
141- " ISC" ,
142- " N" ,
143- " PLC" ,
144- " PLE" ,
145- " PLR" ,
146- " PLW" ,
147- " Q" ,
148- " RUF" ,
149- " S" ,
150- " T" ,
151- " TID" ,
152- " UP" ,
153- " W" ,
154- " YTT" ,
106+
107+ [tool .ruff .lint ]
108+ select = [" A" , " ARG" , " B" , " C" , " DTZ" , " E" , " EM" , " F" , " FBT" , " I" , " ICN" , " ISC" , " N" ,
109+ " PLC" , " PLE" , " PLR" , " PLW" , " Q" , " RUF" , " S" , " T" , " TID" , " UP" , " W" , " YTT" ,
155110]
156111ignore = [
157112 # Allow non-abstract empty methods in abstract base classes
@@ -162,19 +117,29 @@ ignore = [
162117 " S105" , " S106" , " S107" ,
163118 # Ignore complexity
164119 " C901" , " PLR0911" , " PLR0912" , " PLR0913" , " PLR0915" ,
120+ #
121+ " E741" ,
122+ # Allow relative imports
123+ " TID252" ,
124+ # Allow literals in exceptions
125+ " EM101" , " EM102" ,
126+ # Single quotes instead double
127+ " Q000"
165128]
166129unfixable = [
167130 # Don't touch unused imports
168131 " F401" ,
132+ # Don't change single quotes to double
133+ " Q000"
169134]
170135
171- [tool .ruff .isort ]
172- known-first-party = [" firebird.driver " ]
136+ [tool .ruff .lint . isort ]
137+ known-first-party = [" firebird.base " ]
173138
174- [tool .ruff .flake8-tidy-imports ]
139+ [tool .ruff .lint . flake8-tidy-imports ]
175140ban-relative-imports = " all"
176141
177- [tool .ruff .per-file-ignores ]
142+ [tool .ruff .lint . per-file-ignores ]
178143# Tests can use magic values, assertions, and relative imports
179144"tests/**/*" = [" PLR2004" , " S101" , " TID252" ]
180145
@@ -187,8 +152,8 @@ omit = [
187152]
188153
189154[tool .coverage .paths ]
190- firebird_driver = [" src/python " , " */python/ src/firebird/driver" ]
191- tests = [" tests" , " */python/tests " ]
155+ firebird_base = [" src/firebird/driver" ]
156+ tests = [" tests" ]
192157
193158[tool .coverage .report ]
194159exclude_lines = [
0 commit comments