Skip to content

Commit

Permalink
chore: Upgrade Python requirements (#203)
Browse files Browse the repository at this point in the history
* chore: Upgrade Python requirements

* fix: drop support for python 3.8

* fix: quality issues

---------

Co-authored-by: Irtaza Akram <[email protected]>
  • Loading branch information
edx-requirements-bot and irtazaakram authored Jul 29, 2024
1 parent 4aa6274 commit 0dc0e34
Show file tree
Hide file tree
Showing 17 changed files with 86 additions and 230 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest] # Add macos-latest later?
python-version: ['3.8', '3.11', '3.12']
python-version: ['3.11', '3.12']
toxenv: ["django42", "package", "quality"]
# We're only testing against MySQL 8 right now because 5.7 is
# incompatible with Djagno 4.2. We'd have to make the tox.ini file more
Expand All @@ -40,9 +40,9 @@ jobs:
--health-timeout 5s
--health-retries 3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint-imports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
name: Lint Python Imports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.11'

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.11

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ sphinx:
configuration: docs/conf.py

python:
version: 3.8
version: 3.11
install:
- requirements: requirements/doc.txt
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def get_version(*file_paths):

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/3.8', None),
'python': ('https://docs.python.org/3.11', None),
'django': ('https://docs.djangoproject.com/en/2.2/', 'https://docs.djangoproject.com/en/2.2/_objects/'),
'model_utils': ('https://django-model-utils.readthedocs.io/en/latest/', None),
}
Expand Down
2 changes: 1 addition & 1 deletion mysql_test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
also do some MySQL-specific things around charset/collation settings and row
compression.
The tox targets for py38-django32 and py38-django42 will use this settings file.
The tox targets for py311-django42 and py312-django42 will use this settings file.
For the most part, you can use test_settings.py instead (that's the default if
you just run "pytest" with no arguments).
Expand Down
6 changes: 4 additions & 2 deletions openedx_tagging/core/tagging/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,10 @@ def get_object_tags(
.exclude(taxonomy__enabled=False) # Exclude if the whole taxonomy is disabled
)
if not include_deleted:
base_qs = base_qs.exclude(taxonomy_id=None) # Exclude if the whole taxonomy was deleted
base_qs = base_qs.exclude(tag_id=None, taxonomy__allow_free_text=False) # Exclude if just the tag is deleted
# Exclude if the whole taxonomy was deleted
base_qs = base_qs.exclude(taxonomy_id=None) # type: ignore
# Exclude if just the tag is deleted
base_qs = base_qs.exclude(tag_id=None, taxonomy__allow_free_text=False) # type: ignore
tags = (
base_qs
# Preload related objects, including data for the "get_lineage" method on ObjectTag/Tag:
Expand Down
22 changes: 5 additions & 17 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
Expand All @@ -10,13 +10,6 @@ asgiref==3.8.1
# via django
attrs==23.2.0
# via -r requirements/base.in
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# celery
# django
# djangorestframework
# kombu
billiard==4.2.0
# via celery
celery==5.4.0
Expand All @@ -42,7 +35,7 @@ click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
cryptography==42.0.8
cryptography==43.0.0
# via pyjwt
django==4.2.14
# via
Expand Down Expand Up @@ -107,21 +100,16 @@ semantic-version==2.10.0
# via edx-drf-extensions
six==1.16.0
# via python-dateutil
sqlparse==0.5.0
sqlparse==0.5.1
# via django
stevedore==5.2.0
# via
# edx-django-utils
# edx-opaque-keys
typing-extensions==4.12.2
# via
# asgiref
# edx-opaque-keys
# kombu
# via edx-opaque-keys
tzdata==2024.1
# via
# backports-zoneinfo
# celery
# via celery
urllib3==2.2.2
# via requests
vine==5.1.0
Expand Down
6 changes: 1 addition & 5 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
Expand All @@ -26,10 +26,6 @@ py==1.11.0
# via tox
six==1.16.0
# via tox
tomli==2.0.1
# via
# import-linter
# tox
tox==3.28.0
# via
# -c requirements/constraints.txt
Expand Down
72 changes: 16 additions & 56 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# make upgrade
Expand All @@ -13,7 +13,7 @@ asgiref==3.8.1
# -r requirements/quality.txt
# django
# django-stubs
astroid==3.2.3
astroid==3.2.4
# via
# -r requirements/quality.txt
# pylint
Expand All @@ -24,14 +24,6 @@ backports-tarfile==1.2.0
# via
# -r requirements/quality.txt
# jaraco-context
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/quality.txt
# celery
# django
# djangorestframework
# kombu
billiard==4.2.0
# via
# -r requirements/quality.txt
Expand Down Expand Up @@ -96,14 +88,14 @@ coverage[toml]==7.6.0
# via
# -r requirements/quality.txt
# pytest-cov
cryptography==42.0.8
cryptography==43.0.0
# via
# -r requirements/quality.txt
# pyjwt
# secretstorage
ddt==1.7.2
# via -r requirements/quality.txt
diff-cover==9.1.0
diff-cover==9.1.1
# via -r requirements/dev.in
dill==0.3.8
# via
Expand Down Expand Up @@ -135,11 +127,11 @@ django-debug-toolbar==4.4.6
# via
# -r requirements/dev.in
# -r requirements/quality.txt
django-stubs==5.0.2
django-stubs==5.0.4
# via
# -r requirements/quality.txt
# djangorestframework-stubs
django-stubs-ext==5.0.2
django-stubs-ext==5.0.4
# via
# -r requirements/quality.txt
# django-stubs
Expand All @@ -159,7 +151,7 @@ dnspython==2.6.1
# via
# -r requirements/quality.txt
# pymongo
docutils==0.20.1
docutils==0.21.2
# via
# -r requirements/quality.txt
# readme-renderer
Expand All @@ -175,16 +167,12 @@ edx-drf-extensions==10.3.0
# via -r requirements/quality.txt
edx-i18n-tools==1.6.0
# via -r requirements/dev.in
edx-lint==5.3.6
edx-lint==5.3.7
# via -r requirements/quality.txt
edx-opaque-keys==2.10.0
# via
# -r requirements/quality.txt
# edx-drf-extensions
exceptiongroup==1.2.2
# via
# -r requirements/quality.txt
# pytest
filelock==3.15.4
# via
# -r requirements/ci.txt
Expand All @@ -203,17 +191,11 @@ import-linter==2.0
# via
# -r requirements/ci.txt
# -r requirements/quality.txt
importlib-metadata==8.0.0
importlib-metadata==8.2.0
# via
# -r requirements/pip-tools.txt
# -r requirements/quality.txt
# build
# keyring
# twine
importlib-resources==6.4.0
# via
# -r requirements/quality.txt
# keyring
iniconfig==2.0.0
# via
# -r requirements/quality.txt
Expand Down Expand Up @@ -281,7 +263,7 @@ more-itertools==10.3.0
# -r requirements/quality.txt
# jaraco-classes
# jaraco-functools
mypy==1.10.1
mypy==1.11.0
# via -r requirements/quality.txt
mypy-extensions==1.0.0
# via
Expand All @@ -305,7 +287,7 @@ packaging==24.1
# build
# pytest
# tox
path==16.14.0
path==17.0.0
# via edx-i18n-tools
pbr==6.0.0
# via
Expand Down Expand Up @@ -363,7 +345,7 @@ pyjwt[crypto]==2.8.0
# -r requirements/quality.txt
# drf-jwt
# edx-drf-extensions
pylint==3.2.5
pylint==3.2.6
# via
# -r requirements/quality.txt
# edx-lint
Expand Down Expand Up @@ -396,7 +378,7 @@ pyproject-hooks==1.1.0
# -r requirements/pip-tools.txt
# build
# pip-tools
pytest==8.2.2
pytest==8.3.2
# via
# -r requirements/quality.txt
# pytest-cov
Expand All @@ -418,7 +400,7 @@ pyyaml==6.0.1
# -r requirements/quality.txt
# code-annotations
# edx-i18n-tools
readme-renderer==43.0
readme-renderer==44.0
# via
# -r requirements/quality.txt
# twine
Expand Down Expand Up @@ -462,7 +444,7 @@ snowballstemmer==2.2.0
# via
# -r requirements/quality.txt
# pydocstyle
sqlparse==0.5.0
sqlparse==0.5.1
# via
# -r requirements/quality.txt
# django
Expand All @@ -477,20 +459,6 @@ text-unidecode==1.3
# via
# -r requirements/quality.txt
# python-slugify
tomli==2.0.1
# via
# -r requirements/ci.txt
# -r requirements/pip-tools.txt
# -r requirements/quality.txt
# build
# coverage
# django-stubs
# import-linter
# mypy
# pip-tools
# pylint
# pytest
# tox
tomlkit==0.13.0
# via
# -r requirements/quality.txt
Expand All @@ -501,7 +469,7 @@ tox==3.28.0
# -r requirements/ci.txt
twine==5.1.1
# via -r requirements/quality.txt
types-pyyaml==6.0.12.20240311
types-pyyaml==6.0.12.20240724
# via
# -r requirements/quality.txt
# django-stubs
Expand All @@ -514,22 +482,16 @@ typing-extensions==4.12.2
# via
# -r requirements/ci.txt
# -r requirements/quality.txt
# asgiref
# astroid
# django-stubs
# django-stubs-ext
# djangorestframework-stubs
# edx-opaque-keys
# grimp
# import-linter
# kombu
# mypy
# pylint
# rich
tzdata==2024.1
# via
# -r requirements/quality.txt
# backports-zoneinfo
# celery
urllib3==2.2.2
# via
Expand Down Expand Up @@ -557,10 +519,8 @@ wheel==0.43.0
# pip-tools
zipp==3.19.2
# via
# -r requirements/pip-tools.txt
# -r requirements/quality.txt
# importlib-metadata
# importlib-resources

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
Loading

0 comments on commit 0dc0e34

Please sign in to comment.