Skip to content

Commit 96c5b1a

Browse files
fix: patch development and release dependency vulnerabilities
1 parent 943ae9f commit 96c5b1a

5 files changed

Lines changed: 395 additions & 991 deletions

File tree

‎.github/workflows/check-types.yml‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
with:
1818
submodules: recursive
1919

20-
- name: Set up Python 3.9
20+
- name: Set up Python 3.12
2121
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
2222
with:
23-
python-version: 3.9
23+
python-version: "3.12"
2424

2525
- name: Install uv
2626
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
@@ -29,13 +29,15 @@ jobs:
2929
cache-dependency-glob: "uv.lock"
3030

3131
- name: Install the project
32-
run: uv sync --all-extras --dev
32+
run: uv sync --locked --all-extras --dev
3333

3434
- name: Install workspace packages
3535
run: uv pip install -e livekit-protocol -e livekit-api -e livekit-rtc
3636

3737
- name: Download ffi
38-
run: uv run python livekit-rtc/rust-sdks/download_ffi.py --output .venv/lib/python3.9/site-packages/livekit/rtc/resources
38+
run: uv run python livekit-rtc/rust-sdks/download_ffi.py --output livekit-rtc/livekit/rtc/resources
3939

4040
- name: Check Types
41-
run: uv run mypy livekit-protocol livekit-api livekit-rtc
41+
run: |
42+
uv run mypy livekit-protocol livekit-api livekit-rtc
43+
uv run mypy --python-version 3.9 livekit-protocol/livekit livekit-api/livekit livekit-rtc/livekit

‎.github/workflows/ruff.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
88
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
99
with:
10-
python-version: "3.9"
10+
python-version: "3.12"
1111

1212
- name: Install uv
1313
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
@@ -16,7 +16,7 @@ jobs:
1616
cache-dependency-glob: "uv.lock"
1717

1818
- name: Install the project
19-
run: uv sync --all-extras --dev
19+
run: uv sync --locked --all-extras --dev
2020

2121
# Use the ruff version pinned in uv.lock rather than uvx's latest release,
2222
# so lint results only change when the lockfile is intentionally updated.

‎README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,14 @@ Software encoders (libvpx for VP8/VP9, libaom for AV1, OpenH264 for H264) are us
404404
405405
Please join us on [Slack](https://livekit.io/join-slack) to get help from our devs / community members. We welcome your contributions(PRs) and details can be discussed there.
406406
407+
### Development environment
408+
409+
The published SDKs support Python 3.9 and later. Development and release tooling
410+
requires Python 3.10 or later so that patched versions of its dependencies can be
411+
installed. For example, run `uv sync --locked --dev --python 3.12` from the
412+
repository root. A Python 3.9 runtime environment can use
413+
`uv sync --locked --no-dev --python 3.9`.
414+
407415
<!--BEGIN_REPO_NAV-->
408416
<br/><table>
409417
<thead><tr><th colspan="2">LiveKit Ecosystem</th></tr></thead>

‎pyproject.toml‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ description = "LiveKit Python SDKs monorepo"
55
requires-python = ">=3.9"
66
dependencies = ["livekit", "livekit-api", "livekit-protocol"]
77

8+
[tool.uv]
9+
# Security floors for transitive development and release dependencies.
10+
constraint-dependencies = [
11+
"cryptography>=50.0.0",
12+
"filelock>=3.20.3",
13+
"pillow>=12.3.0",
14+
"pygments>=2.20.0",
15+
"urllib3>=2.8.0",
16+
]
17+
18+
[tool.uv.dependency-groups]
19+
# Patched tooling requires Python 3.10; published SDKs still support Python 3.9.
20+
dev = { requires-python = ">=3.10" }
21+
822
[tool.uv.workspace]
923
members = ["livekit-rtc", "livekit-api", "livekit-protocol"]
1024

@@ -21,10 +35,10 @@ dev = [
2135
"types-aiofiles>=24",
2236
"ipython>=8.0.0",
2337
# Testing
24-
"pytest>=8.3.4",
38+
"pytest>=9.0.3",
2539
"pytest-asyncio>=0.24.0",
2640
# Build and packaging
27-
"requests",
41+
"requests>=2.33.0",
2842
"wheel",
2943
"twine",
3044
"auditwheel; sys_platform == 'linux'",

0 commit comments

Comments
 (0)