We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e39bae6 commit d8e56e1Copy full SHA for d8e56e1
.github/actions/python-package-build/action.yml
@@ -40,24 +40,19 @@ runs:
40
id: build
41
shell: bash
42
run: |
43
- uv build
+ uv build --python ${{ inputs.python-version }}
44
45
# Set outputs
46
WHEEL_FILE=$(ls dist/*.whl | head -1)
47
echo "wheel-file=$WHEEL_FILE" >> $GITHUB_OUTPUT
48
echo "dist-path=dist" >> $GITHUB_OUTPUT
49
echo "Built wheel: $WHEEL_FILE"
50
51
- - name: Install the built wheel
52
- shell: bash
53
- run: |
54
- uv venv
55
- uv pip install "${{ steps.build.outputs.wheel-file }}"
56
-
57
- name: Test package as CLI tool
58
if: inputs.test-package == 'true'
59
60
+ uv venv --python ${{ inputs.python-version }}
61
uv pip install "${{ steps.build.outputs.wheel-file }}[cli]"
62
uv run ${{ inputs.cli-test-command }}
63
.github/workflows/build-test-python.yml
@@ -24,3 +24,4 @@ jobs:
24
test-package: "true"
25
uv-version: "0.8.22"
26
cli-test-command: "twyn --version"
27
+ python-version: "3.10"
.github/workflows/lint.yml
@@ -19,7 +19,7 @@ jobs:
19
uses: astral-sh/setup-uv@2ddd2b9cb38ad8efd50337e8ab201519a34c9f24 # v7.1.1
20
21
- name: Install the project
22
- run: uv sync --locked --group dev
+ run: uv sync --locked --group dev --python 3.10
23
- name: Cache mypy cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.1
.github/workflows/publish.yml
@@ -29,6 +29,7 @@ jobs:
29
publish: "false"
30
uv-version: ${{ env.UV_VERSION }}
31
32
33
34
- name: Upload package artifacts
35
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
.github/workflows/test.yml
@@ -15,7 +15,7 @@ jobs:
15
strategy:
16
fail-fast: false
17
matrix:
18
- python-version: ["3.9", "3.13"]
+ python-version: ["3.10", "3.14"]
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Dockerfile
@@ -1,4 +1,4 @@
1
-ARG PYTHON_IMAGE=3.13-slim@sha256:1020ca463dc51c26bbad49de85dbb2986d93b71050102f3fa2a7f0fc4c2ea81e
+ARG PYTHON_IMAGE=3.14-slim@sha256:4ed33101ee7ec299041cc41dd268dae17031184be94384b1ce7936dc4e5dead3
2
3
# --------------- `base` stage ---------------
4
FROM python:${PYTHON_IMAGE} AS base
dependencies/scripts/download_packages.py
@@ -1,9 +1,10 @@
import json
import logging
+from collections.abc import Callable
from dataclasses import dataclass
5
from datetime import datetime
6
from pathlib import Path
-from typing import Any, Callable, Optional
7
+from typing import Any
8
from zoneinfo import ZoneInfo
9
10
import click
@@ -33,8 +34,8 @@ class ServerError(Exception):
@dataclass(frozen=True)
class Ecosystem:
36
url: str
- params: Optional[dict[str, Any]]
37
- pages: Optional[int]
+ params: dict[str, Any] | None
38
+ pages: int | None
39
parser: Callable[[dict[str, Any]], list[str]]
@@ -88,7 +89,7 @@ def download(
88
89
90
91
def get_packages(
- base_url: str, parser: Callable[[dict[str, Any]], list[str]], params: Optional[dict[str, Any]] = None
92
+ base_url: str, parser: Callable[[dict[str, Any]], list[str]], params: dict[str, Any] | None = None
93
) -> list[str]:
94
for attempt in stamina.retry_context(
95
on=(httpx.TransportError, httpx.TimeoutException, ServerError),
justfile
@@ -1,6 +1,6 @@
# VARIABLE DEFINITIONS
venv := ".venv"
-python_version :="3.13"
+python_version :="3.14"
run := "uv run"
venv-exists := path_exists(venv)
pyproject.toml
@@ -9,13 +9,12 @@ maintainers = [
{ name = "Daniel Sanz", email = "imsdn4z@gmail.com" },
{ name = "Sergio Castillo", email = "s.cast.lara@gmail.com" },
11
]
12
-requires-python = "<4,>=3.9"
+requires-python = "<4,>=3.10"
13
dependencies = [
14
"requests<3.0.0,>=2.32.4",
"rapidfuzz<4.0.0,>=2.13.7",
"pyparsing<4.0.0,>=3.2.3",
"tomlkit<0.14.0,>=0.11.6",
- "tomli<3.0.0,>=2.2.1; python_version < \"3.13\"",
"pydantic>=2.11.7,<3.0.0",
"pyyaml>=6.0.2",
@@ -70,7 +69,7 @@ requires = ["hatchling"]
70
69
build-backend = "hatchling.build"
71
72
[tool.ruff]
73
-target-version = "py39"
+target-version = "py310"
74
line-length = 120
75
76
src = ["twyn", "tests"]
@@ -115,7 +114,7 @@ ignore = [
115
114
convention = "pep257"
116
117
[tool.mypy]
118
-python_version = "3.9"
+python_version = "3.10"
119
ignore_missing_imports = true
120
namespace_packages = true
121
explicit_package_bases = true
src/twyn/base/constants.py
@@ -1,8 +1,6 @@
from __future__ import annotations
-from typing import TYPE_CHECKING, Literal
-from typing_extensions import TypeAlias
+from typing import TYPE_CHECKING, Literal, TypeAlias
from twyn import dependency_parser
from twyn.trusted_packages import selectors
0 commit comments