Skip to content

Commit

Permalink
List our direct dependencies in requirements_vendor.in
Browse files Browse the repository at this point in the history
Then, using uv, we can build requirements_vendor.txt and remove
various unused dependencies. This isn't perfect, because we want to
vendor everything regardless of markers, and thus this still requires
manual fixup to remove all markers from the output.

This allows us to remove a number of packages (attrs, certifi,
importlib-metadata, more-itertools, pathlib2, and zipp), but does add
a few extra (colorama, which gives pytest better colourized output on
Windows; tomli, which pytest relies on to parse *.toml files on Python
< 3.11; and pyparsing, which packaging relies on to parse markers and
requirements).
  • Loading branch information
gsnedders committed Dec 18, 2024
1 parent 0be76cd commit 3fc8780
Show file tree
Hide file tree
Showing 92 changed files with 13,652 additions and 18,764 deletions.
2 changes: 0 additions & 2 deletions tools/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ protected-files = [

[tool.vendoring.license.fallback-urls]
atomicwrites = "https://raw.githubusercontent.com/untitaker/python-atomicwrites/refs/tags/1.1.5/LICENSE"
more_itertools = "https://raw.githubusercontent.com/more-itertools/more-itertools/refs/tags/4.2.0/LICENSE"
pathlib2 = "https://raw.githubusercontent.com/jazzband/pathlib2/refs/tags/2.3.5/LICENSE.rst"
webencodings = "https://raw.githubusercontent.com/gsnedders/python-webencodings/refs/tags/v0.5.1/LICENSE"

[tool.vendoring.transformations]
Expand Down
18 changes: 18 additions & 0 deletions tools/requirements_vendor.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This lists all the packages we use directly; these are unpinned here as we
# can rely on the existing pinned versions in requirements_vendor.txt to
# control when we do upgrades. It also makes this easier to audit, as
# everything here should see actual usage outside of third_party.

atomicwrites
h2
hpack
html5lib
hyperframe
# tooltool is referenced (by path) in tools/wpt/android.py
mozilla-tooltool-client @ git+https://github.com/mozilla-releng/tooltool.git@c1bda97eda1ec5246aa73a358c5e1d47e222380c#subdirectory=client
packaging
pytest-asyncio
pytest
pywebsocket3
six
websockets
45 changes: 39 additions & 6 deletions tools/requirements_vendor.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,55 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --universal --python-version 3.8 requirements_vendor.in -o requirements_vendor.txt

# This file was then modified to remove all markers, as we want to make
# sure everything is always available when it is needed.

atomicwrites==1.1.5 # Update license in pyproject.toml when this changes.
attrs==23.2.0
certifi==2018.4.16
# via -r requirements_vendor.in
colorama==0.4.6
# via pytest
exceptiongroup==1.2.1
# via pytest
h2==4.1.0
# via -r requirements_vendor.in
hpack==4.0.0
# via
# -r requirements_vendor.in
# h2
html5lib==1.1
# via -r requirements_vendor.in
hyperframe==6.0.1
importlib-metadata==2.1.0
# via
# -r requirements_vendor.in
# h2
iniconfig==1.1.1
more-itertools==4.2.0 # Update license in pyproject.toml when this changes.
# via pytest
mozilla-tooltool-client @ git+https://github.com/mozilla-releng/tooltool.git@c1bda97eda1ec5246aa73a358c5e1d47e222380c#subdirectory=client
# via -r requirements_vendor.in
packaging==21.3
pathlib2==2.3.5 # Update license in pyproject.toml when this changes.
# via
# -r requirements_vendor.in
# pytest
pluggy==1.5.0
# via pytest
pyparsing==3.1.4
# via packaging
pytest==8.2.1
# via
# -r requirements_vendor.in
# pytest-asyncio
pytest-asyncio==0.19.0
# via -r requirements_vendor.in
pywebsocket3==4.0.2
# via -r requirements_vendor.in
six==1.16.0
# via
# -r requirements_vendor.in
# html5lib
# pywebsocket3
tomli==2.2.1
# via pytest
webencodings==0.5.1 # Update license in pyproject.toml when this changes.
# via html5lib
websockets==12.0
zipp==1.2.0
# via -r requirements_vendor.in
134 changes: 0 additions & 134 deletions tools/third_party/attr/__init__.py

This file was deleted.

Loading

0 comments on commit 3fc8780

Please sign in to comment.