Skip to content

Commit a9817e9

Browse files
fix: propagate --upgrade flag to all pip-compile calls in make upgrade
The PIP_COMPILE macro did not include \${COMPILE_OPTS}, so only pip.txt and pip-tools.txt were compiled with --upgrade. All other files (base.txt, test.txt, quality.txt, etc.) were compiled without it, keeping their existing pinned versions. When a transitive dependency releases a new version, pip-tools.txt would upgrade but the rest of the chain would not, causing version conflicts in dev.txt (which includes both as -r inputs). Aligns the Makefile with the pattern from openedx/openedx-core: - Add --rebuild to the PIP_COMPILE macro - Pass --upgrade via PIP_COMPILE_OPTS so all files get it uniformly - Remove the split code path for pip.txt and pip-tools.txt Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
1 parent 2b732c3 commit a9817e9

9 files changed

Lines changed: 282 additions & 232 deletions

File tree

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ docs: ## generate Sphinx HTML documentation, including API docs
3333
$(BROWSER)docs/_build/html/index.html
3434

3535
# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
36-
PIP_COMPILE = pip-compile $(PIP_COMPILE_OPTS)
36+
PIP_COMPILE = pip-compile --rebuild $(PIP_COMPILE_OPTS)
3737

38-
compile-requirements: ## compile the requirements/*.txt files with the latest packages satisfying requirements/*.in
38+
compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade
39+
compile-requirements: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
3940
pip install -qr requirements/pip-tools.txt
4041
pip install -qr requirements/pip.txt
41-
pip-compile -v ${COMPILE_OPTS} --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
42-
pip-compile -v ${COMPILE_OPTS} -o requirements/pip-tools.txt requirements/pip-tools.in
42+
# Make sure to compile files after any other files they include!
43+
$(PIP_COMPILE) --allow-unsafe -o requirements/pip.txt requirements/pip.in
44+
$(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in
4345
pip install -qr requirements/pip.txt
4446
pip install -qr requirements/pip-tools.txt
4547
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
@@ -53,8 +55,7 @@ compile-requirements: ## compile the requirements/*.txt files with the latest pa
5355
mv requirements/test.tmp requirements/test.txt
5456

5557
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
56-
pip install -qr requirements/pip-tools.txt
57-
$(MAKE) compile-requirements COMPILE_OPTS="--upgrade"
58+
make compile-requirements PIP_COMPILE_OPTS="--upgrade"
5859

5960
quality: ## check coding style with pycodestyle and pylint
6061
tox -e quality

requirements/base.txt

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,29 @@
22
# This file is autogenerated by pip-compile with Python 3.12
33
# by the following command:
44
#
5-
# pip-compile --output-file=requirements/base.txt requirements/base.in
5+
# make upgrade
66
#
7-
asgiref==3.9.1
7+
asgiref==3.11.1
88
# via django
9-
attrs==25.3.0
9+
attrs==26.1.0
1010
# via -r requirements/base.in
11+
bracex==2.6
12+
# via wcmatch
1113
casbin-django-orm-adapter==1.7.0
1214
# via -r requirements/base.in
13-
certifi==2025.8.3
15+
certifi==2026.2.25
1416
# via requests
1517
cffi==2.0.0
1618
# via
1719
# cryptography
1820
# pynacl
19-
charset-normalizer==3.4.3
21+
charset-normalizer==3.4.7
2022
# via requests
21-
click==8.3.1
23+
click==8.3.2
2224
# via edx-django-utils
23-
cryptography==46.0.2
25+
cryptography==46.0.7
2426
# via pyjwt
25-
django==4.2.24
27+
django==5.2.13
2628
# via
2729
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
2830
# -r requirements/base.in
@@ -48,7 +50,7 @@ django-waffle==5.0.0
4850
# via
4951
# edx-django-utils
5052
# edx-drf-extensions
51-
djangorestframework==3.16.1
53+
djangorestframework==3.17.1
5254
# via
5355
# -r requirements/base.in
5456
# drf-jwt
@@ -60,9 +62,9 @@ dnspython==2.8.0
6062
# via pymongo
6163
drf-jwt==1.19.2
6264
# via edx-drf-extensions
63-
drf-yasg==1.21.11
65+
drf-yasg==1.21.15
6466
# via edx-api-doc-tools
65-
edx-api-doc-tools==2.1.2
67+
edx-api-doc-tools==3.0.0
6668
# via -r requirements/base.in
6769
edx-ccx-keys==2.0.2
6870
# via -r requirements/base.in
@@ -74,64 +76,66 @@ edx-drf-extensions==10.6.0
7476
# via
7577
# -r requirements/base.in
7678
# edx-organizations
77-
edx-opaque-keys==3.0.0
79+
edx-opaque-keys==4.0.0
7880
# via
7981
# -r requirements/base.in
8082
# edx-ccx-keys
8183
# edx-drf-extensions
8284
# edx-organizations
83-
edx-organizations==7.3.0
85+
edx-organizations==8.0.0
8486
# via -r requirements/base.in
85-
idna==3.10
87+
idna==3.11
8688
# via requests
8789
inflection==0.5.1
8890
# via drf-yasg
8991
openedx-atlas==0.7.0
9092
# via -r requirements/base.in
9193
packaging==26.0
9294
# via drf-yasg
93-
pillow==12.1.1
95+
pillow==12.2.0
9496
# via edx-organizations
95-
psutil==7.1.0
97+
psutil==7.2.2
9698
# via edx-django-utils
97-
pycasbin==2.2.0
99+
pycasbin==2.8.0
98100
# via
99101
# -r requirements/base.in
100102
# casbin-django-orm-adapter
101-
pycparser==2.23
103+
pycparser==3.0
102104
# via cffi
103-
pyjwt[crypto]==2.10.1
105+
pyjwt[crypto]==2.12.1
104106
# via
105107
# drf-jwt
106108
# edx-drf-extensions
107-
pymongo==4.15.2
109+
pymongo==4.16.0
108110
# via edx-opaque-keys
109-
pynacl==1.6.0
111+
pynacl==1.6.2
110112
# via edx-django-utils
111-
pytz==2025.2
113+
pytz==2026.1.post1
112114
# via drf-yasg
113115
pyyaml==6.0.3
114116
# via drf-yasg
115-
requests==2.32.5
117+
requests==2.33.1
116118
# via edx-drf-extensions
117119
semantic-version==2.10.0
118120
# via edx-drf-extensions
119-
simpleeval==1.0.3
121+
simpleeval==1.0.7
120122
# via pycasbin
121123
six==1.17.0
122124
# via edx-ccx-keys
123-
sqlparse==0.5.3
125+
sqlparse==0.5.5
124126
# via django
125-
stevedore==5.5.0
127+
stevedore==5.7.0
126128
# via
127129
# edx-django-utils
128130
# edx-opaque-keys
129131
typing-extensions==4.15.0
130132
# via edx-opaque-keys
131133
uritemplate==4.2.0
132134
# via drf-yasg
133-
urllib3==2.5.0
135+
urllib3==2.6.3
134136
# via requests
137+
wcmatch==10.1
138+
# via pycasbin
135139

136140
# The following packages are considered to be unsafe in a requirements file:
137141
# setuptools

requirements/ci.txt

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,39 @@
22
# This file is autogenerated by pip-compile with Python 3.12
33
# by the following command:
44
#
5-
# pip-compile --output-file=requirements/ci.txt requirements/ci.in
5+
# make upgrade
66
#
7-
cachetools==6.2.6
8-
# via tox
9-
chardet==5.2.0
7+
cachetools==7.0.5
108
# via tox
119
colorama==0.4.6
1210
# via tox
1311
distlib==0.4.0
1412
# via virtualenv
15-
filelock==3.20.3
13+
filelock==3.25.2
1614
# via
15+
# python-discovery
1716
# tox
1817
# virtualenv
1918
packaging==26.0
2019
# via
2120
# pyproject-api
2221
# tox
23-
platformdirs==4.5.1
22+
platformdirs==4.9.6
2423
# via
24+
# python-discovery
2525
# tox
2626
# virtualenv
2727
pluggy==1.6.0
2828
# via tox
2929
pyproject-api==1.10.0
3030
# via tox
31-
tox==4.34.1
31+
python-discovery==1.2.2
32+
# via
33+
# tox
34+
# virtualenv
35+
tomli-w==1.2.0
36+
# via tox
37+
tox==4.52.1
3238
# via -r requirements/ci.in
33-
virtualenv==20.36.1
39+
virtualenv==21.2.1
3440
# via tox

0 commit comments

Comments
 (0)