Use the PEP 735 "[dependency-groups]" (here: "dev", "test", "docs")
instead of Poetry's "dev" group, and `uv_build` as the build backend.
Replace poetry.lock with uv.lock.
Also, adapt CI and the README.
Use ">=installed,<next major" as the version range,
the minor version for 0.x packages, and only
a lower bound for calendar-versioned packages.
`black` stays below v26 to keep 2 lines after the `import`s.
Also, remove the redundant `geopy` entry in the "dev" group.
`sqlalchemy` v2.1 uses `psycopg` v3 as the default PostgreSQL driver.
So, we replace `psycopg2` with `psycopg`,
using its binary wheel that bundles `libpq`,
so CI no longer needs `libpq-dev` from `apt`.
No 0.x release of `wemake-python-styleguide` runs on Python 3.12+.
The current version pins `flake8-commas` to v2.x,
which crashes on the new f-string tokenizer.
The 1.x releases no longer bundle the `flake8` plug-ins this project uses.
The plug-ins are added back explicitly, one by one, on a separate branch.
The dependencies stay in the same series as on Python 3.8
where those support 3.13.
Only the unavoidable upgrades are taken:
- `matplotlib` to v3.9
- `numpy` to v2.1
- `pandas` to v2.2
- `scipy` (via statsmodels)
Required code changes:
- `numpy` v2.1 prints its scalars as `np.float64(...)`,
which `psycopg2` then writes into the SQL
=> Adjust `Forecast.from_dataframe()` to convert the
rounded values into plain `float`s
- Python 3.12 no longer accepts `float`s in `random.randint()`
=> The test factories now pass the seconds as `int`s
CI and `nox` use a `u`v-managed Python, which ships the C headers
needed to build `psycopg2` and `rpy2`.
`flake8` v4 does not run on Python 3.12+
and is upgraded in a future commit.
The sessions in `noxfile.py` do not work since the migration to
Poetry 2: they use `poetry install --no-dev` and `poetry export`,
which Poetry 2 removed or moved into a plugin. The sessions are
reworked together with the other development tools.
... and two flake8 plugins
On Python 3.8, the three packages stay at the newest versions that work
with `flake8` v4, which `wemake-python-styleguide` v0.17 requires.
The lock file now also records their newer releases for newer Python versions.
The actual upgrade follows together with the switch to Python 3.13.
`isort` v5 honors the `single_line_exclusions = typing` setting in
`setup.cfg`, which `isort` v4 ignored.
So, the `typing` imports that were split onto separate lines to satisfy
`isort` v4 are combined again, as the configuration originally intended.