Commit d390540a authored by Jan Reimes's avatar Jan Reimes
Browse files

chore: update Python version requirements and refactor imports

* Update Python version requirement to 3.13 in pyproject.toml files.
* Change target version in Ruff configuration to 3.13.
* Refactor exception handling to use parentheses for multiple exceptions.
* Replace zipinspect with unzip-http for remote ZIP extraction in downloads.py.
parent 7c74dd3c
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -5,14 +5,14 @@ modelling conventions for the 3gpp-crawler project.

## Python Version

Python 3.14+ only (requires-python = ">=3.14,<4.0").
Code can use all 3.14 features (T | None is native and preferred).
Python 3.13+ only (requires-python = ">=3.13,<4.0").
Code can use all 3.13 features (T | None is native and preferred).

## Code Style

### Type Hints

- **Use T | None, never Optional[T].** The project uses Python 3.14 and
- **Use T | None, never Optional[T].** The project uses Python 3.13 and
  `from __future__ import annotations` in all files, so `str | None` is universal.
- **Use list[X], dict[K, V], tuple[X, ...]** from builtins -- never
  typing.List, typing.Dict, etc.
@@ -233,7 +233,8 @@ tdoc_app.command("ct", rich_help_panel=HELP_PANEL_CRAWLING, hidden=True)(crawl_t
## Ruff Configuration

See ruff.toml:
- target-version = "py314"

- target-version = "py313"
- line-length = 160
- preview = true
- Selected rule sets: E, F, C4, C90, D, I, PT, PL, SIM, UP, W, S, ANN, B, NPY
+2 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ Two workspace dependencies are sourced from git:
| `packaging` | `>=25.0` | Version string parsing and normalization |
| `pandas` | `>=3.0.0` | Data manipulation and analysis |
| `python-dotenv` | `>=1.1.1` | `.env` file auto-loading (`load_dotenv()`) |
| `zipinspect` | `>=0.1.2` | ZIP archive inspection |
| `unzip-http` | `>=0.7` | Remote ZIP extraction over HTTP |
| `aiointerpreters` | `>=0.4.0` | Async subinterpreter management for parallel crawling |
| `pool-executors` | workspace | Thread/process/subinterpreter pool abstractions |

@@ -234,6 +234,7 @@ Detection logic: tries `asyncio.get_running_loop()`, falls back to `asyncio.run(
## Platform Requirements

### Development

- Python 3.13+ (3.14+ preferred for subinterpreter support)
- Git (for version tagging via uv-dynamic-versioning)
- `uv` package manager (`pip install uv`)
+1 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ authors = [
]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.13,<4.0"
requires-python = ">=3.13,<3.14"
dependencies = []
classifiers = [
    "Intended Audience :: Developers",
@@ -21,4 +21,3 @@ classifiers = [
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ try:
    from concurrent.futures import InterpreterPoolExecutor

    HAS_INTERPRETER_POOL_EXECUTOR = True
except ImportError, AttributeError:
except (ImportError, AttributeError):
    InterpreterPoolExecutor = None  # type: ignore[assignment, misc]
    HAS_INTERPRETER_POOL_EXECUTOR = False

+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ authors = [
]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.13,<4.0"
requires-python = ">=3.13,<3.14"
classifiers = [
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
Loading