Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade Python requirements #314

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: clean compile_translations coverage docs dummy_translations \
extract_translations fake_translations help pull_translations push_translations \
quality requirements selfcheck test test-all upgrade validate
quality requirements selfcheck test test-all compile-requirements upgrade validate

.DEFAULT_GOAL := help

Expand Down Expand Up @@ -46,27 +46,29 @@ COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade
compile-requirements: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -qr requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip-compile ${COMPILE_OPTS} --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
pip-compile ${COMPILE_OPTS} -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade --allow-unsafe -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
pip-compile --upgrade -o requirements/doc.txt requirements/doc.in
pip-compile --upgrade --allow-unsafe -o requirements/quality.txt requirements/quality.in
pip-compile --upgrade -o requirements/ci.txt requirements/ci.in
pip-compile --upgrade -o requirements/dev.txt requirements/dev.in
pip-compile ${COMPILE_OPTS} --allow-unsafe -o requirements/base.txt requirements/base.in
pip-compile ${COMPILE_OPTS} -o requirements/test.txt requirements/test.in
pip-compile ${COMPILE_OPTS} -o requirements/doc.txt requirements/doc.in
pip-compile ${COMPILE_OPTS} --allow-unsafe -o requirements/quality.txt requirements/quality.in
pip-compile ${COMPILE_OPTS} -o requirements/ci.txt requirements/ci.in
pip-compile ${COMPILE_OPTS} -o requirements/dev.txt requirements/dev.in
# Let tox control the Django version for tests
sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
mv requirements/test.tmp requirements/test.txt
# Also lets tox control DRF version
sed '/^[dD]jangorestframework==/d' requirements/test.txt > requirements/test.tmp
mv requirements/test.tmp requirements/test.txt

upgrade: ## update the pip requirements files to use the latest releases satisfying our constraints
$(MAKE) compile-requirements COMPILE_OPTS="--upgrade"

quality: ## check coding style with pycodestyle and pylint
tox -e quality
Expand Down
2 changes: 1 addition & 1 deletion completion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"""


__version__ = '4.6.7'
__version__ = '4.6.8'
38 changes: 16 additions & 22 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ appdirs==1.4.4
# via fs
asgiref==3.8.1
# via django
attrs==23.2.0
attrs==24.2.0
# via openedx-events
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
Expand All @@ -25,10 +25,6 @@ celery==5.4.0
# via event-tracking
certifi==2024.7.4
# via requests
cffi==1.16.0
# via
# cryptography
# pynacl
charset-normalizer==3.3.2
# via requests
click==8.1.7
Expand All @@ -49,7 +45,7 @@ code-annotations==1.8.0
# via edx-toggles
cryptography==43.0.0
# via pyjwt
django==4.2.14
django==4.2.15
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
Expand Down Expand Up @@ -83,7 +79,7 @@ drf-jwt==1.19.2
# via edx-drf-extensions
edx-ccx-keys==1.3.0
# via openedx-events
edx-django-utils==5.14.2
edx-django-utils==5.15.0
# via
# edx-drf-extensions
# edx-toggles
Expand All @@ -109,13 +105,13 @@ fastavro==1.9.5
# via openedx-events
fs==2.4.16
# via xblock
idna==3.7
idna==3.8
# via requests
jinja2==3.1.4
# via code-annotations
kombu==5.3.7
kombu==5.4.0
# via celery
lxml==5.2.2
lxml==5.3.0
# via xblock
mako==1.3.5
# via xblock
Expand All @@ -124,19 +120,17 @@ markupsafe==2.1.5
# jinja2
# mako
# xblock
newrelic==9.12.0
newrelic==9.13.0
# via edx-django-utils
openedx-events==9.11.0
openedx-events==9.12.0
# via event-tracking
pbr==6.0.0
pbr==6.1.0
# via stevedore
prompt-toolkit==3.0.47
# via click-repl
psutil==6.0.0
# via edx-django-utils
pycparser==2.22
# via cffi
pyjwt[crypto]==2.8.0
pyjwt[crypto]==2.9.0
# via
# drf-jwt
# edx-drf-extensions
Expand All @@ -157,15 +151,15 @@ pytz==2024.1
# -r requirements/base.in
# event-tracking
# xblock
pyyaml==6.0.1
pyyaml==6.0.2
# via
# code-annotations
# xblock
requests==2.32.3
# via edx-drf-extensions
semantic-version==2.10.0
# via edx-drf-extensions
simplejson==3.19.2
simplejson==3.19.3
# via xblock
six==1.16.0
# via
Expand All @@ -175,7 +169,7 @@ six==1.16.0
# python-dateutil
sqlparse==0.5.1
# via django
stevedore==5.2.0
stevedore==5.3.0
# via
# code-annotations
# edx-django-utils
Expand All @@ -202,13 +196,13 @@ wcwidth==0.2.13
# via prompt-toolkit
web-fragments==2.2.0
# via xblock
webob==1.8.7
webob==1.8.8
# via xblock
xblock==4.0.1
xblock==5.1.0
# via -r requirements/base.in

# The following packages are considered to be unsafe in a requirements file:
setuptools==71.1.0
setuptools==73.0.1
# via
# -r requirements/base.in
# fs
4 changes: 2 additions & 2 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
cachetools==5.4.0
cachetools==5.5.0
# via tox
chardet==5.2.0
# via tox
Expand Down Expand Up @@ -34,7 +34,7 @@ tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.16.0
tox==4.18.0
# via -r requirements/ci.in
virtualenv==20.26.3
# via tox
9 changes: 0 additions & 9 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ elasticsearch<7.14.0
# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0

# opentelemetry requires version 6.x at the moment:
# https://github.com/open-telemetry/opentelemetry-python/issues/3570
# Normally this could be added as a constraint in edx-django-utils, where we're
# adding the opentelemetry dependency. However, when we compile pip-tools.txt,
# that uses version 7.x, and then there's no undoing that when compiling base.txt.
# So we need to pin it globally, for now.
# Ticket for unpinning: https://github.com/openedx/edx-lint/issues/407
importlib-metadata<7

# Cause: https://github.com/openedx/event-tracking/pull/290
# event-tracking 2.4.1 upgrades to pymongo 4.4.0 which is not supported on edx-platform.
# We will pin event-tracking to do not break existing installations
Expand Down
4 changes: 4 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@

# Temporary to Support the python 3.11 Upgrade
backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library

# Temporary until we drop support for python 3.8
# Upgrading causes quality error: AttributeError: module 'importlib.resources' has no attribute 'files'
edx-lint<5.4
Loading
Loading