Skip to content

Commit c5611d4

Browse files
committed
[py] Update lock and make sed work on non-linux
1 parent 135bf62 commit c5611d4

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

py/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pyOpenSSL==25.1.0
3939
pyparsing==3.2.3
4040
pyproject-api==1.9.1
4141
PySocks==1.7.1
42-
pytest==8.3.5
42+
pytest==8.4.0
4343
pytest-instafail==0.5.0
4444
pytest-mock==3.14.1
4545
pytest-trio==0.8.0

py/requirements_lock.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ pygments==2.19.1 \
576576
--hash=sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c
577577
# via
578578
# -r py/requirements.txt
579+
# pytest
579580
# readme-renderer
580581
# rich
581582
pyopenssl==25.1.0 \
@@ -596,10 +597,12 @@ pysocks==1.7.1 \
596597
--hash=sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299 \
597598
--hash=sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5 \
598599
--hash=sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0
599-
# via -r py/requirements.txt
600-
pytest==8.3.5 \
601-
--hash=sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820 \
602-
--hash=sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845
600+
# via
601+
# -r py/requirements.txt
602+
# urllib3
603+
pytest==8.4.0 \
604+
--hash=sha256:14d920b48472ea0dbf68e45b96cd1ffda4705f33307dcc86c676c1b5104838a6 \
605+
--hash=sha256:f40f825768ad76c0977cbacdf1fd37c6f7a468e460ea6a0636078f8972d4517e
603606
# via
604607
# -r py/requirements.txt
605608
# pytest-instafail
@@ -737,7 +740,7 @@ typing-extensions==4.14.0 \
737740
# pyopenssl
738741
# rich
739742
# tox
740-
urllib3==2.4.0 \
743+
urllib3[socks]==2.4.0 \
741744
--hash=sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466 \
742745
--hash=sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813
743746
# via

scripts/update_py_dependencies.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,21 @@ echo
4949
pip list --outdated | while read -r line; do
5050
if [[ ! "${line}" =~ "Version Latest" && ! "${line}" =~ "----" ]]; then
5151
read -ra fields <<< "${line}"
52-
echo "upgrading ${fields[0]} from ${fields[1]} to ${fields[2]}"
53-
pip install --upgrade "${fields[0]}==${fields[2]}" > /dev/null
52+
package="${fields[0]}"
53+
echo "upgrading ${package} from ${fields[1]} to ${fields[2]}"
54+
pip install --upgrade "${package}==${fields[2]}" > /dev/null
5455
fi
5556
done
5657

5758
echo
5859
echo "generating new ${REQUIREMENTS_FILE}"
5960
pip freeze > "${REQUIREMENTS_FILE}"
61+
# `pip freeze` doesn't show package "extras", so we explicitly add it here for urllib3
62+
if [[ "${OSTYPE}" == "linux"* ]]; then
63+
sed -i "s/urllib3/urllib3[socks]/g" "${REQUIREMENTS_FILE}" # GNU sed
64+
else
65+
sed -i "" "s/urllib3/urllib3[socks]/g" "${REQUIREMENTS_FILE}"
66+
fi
6067

6168
echo "generating new lock file"
6269
bazel run //py:requirements.update

0 commit comments

Comments
 (0)