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

feat!: Python 3.12 Upgrade #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
python-version:
- 3.11
- 3.12
targets: [ 'quality','main.test','docs' ]

steps:
Expand All @@ -40,7 +40,7 @@ jobs:
&& export TOXENV=django42 && make test.requirements tox.requirements ${{ matrix.targets }}"

- name: Run Coverage
if: matrix.python-version == '3.11' && matrix.targets=='main.test'
if: matrix.python-version == '3.12' && matrix.targets=='main.test'
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
4 changes: 2 additions & 2 deletions .github/workflows/mysql8-migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ 3.11 ]
os: [ ubuntu-22.04 ]
python-version: [ 3.12 ]

steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master
with:
branch: ${{ github.event.inputs.branch || 'master' }}
python_version: "3.11"
python_version: "3.12"
# optional parameters below; fill in if you'd like github or email notifications
# user_reviewers: ""
# team_reviewers: ""
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
version: 2

build:
os: "ubuntu-20.04"
os: "ubuntu-22.04"
tools:
python: "3.8"
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM ubuntu:focal as base

# System requirements.

# ENV variables for Python 3.11 support
ARG PYTHON_VERSION=3.11
# ENV variables for Python 3.12 support
ARG PYTHON_VERSION=3.12
ENV TZ=UTC
ENV TERM=xterm-256color
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
4 changes: 2 additions & 2 deletions analytics_data_api/management/commands/generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@ def generate_learner_engagement_data(course_id, username, start_date, end_date,
while current < end_date:
current = current + datetime.timedelta(days=1)
for metric in engagement_events.INDIVIDUAL_EVENTS:
num_events = random.randint(0, max_value)
num_events = random.randint(0, int(max_value))
if num_events:
for _ in range(num_events):
count = random.randint(0, max_value / 20)
count = random.randint(0, int(max_value / 20))
entity_type = metric.split('_', 1)[0]
event = metric.split('_', 1)[1]
entity_id = f'an-id-{entity_type}-{event}'
Expand Down
35 changes: 16 additions & 19 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.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
Expand All @@ -11,9 +11,9 @@ asgiref==3.8.1
# django-countries
boto==2.49.0
# via -r requirements/base.in
boto3==1.35.41
boto3==1.35.48
# via -r requirements/base.in
botocore==1.35.41
botocore==1.35.48
# via
# boto3
# s3transfer
Expand All @@ -31,7 +31,7 @@ coreapi==2.3.3
# via -r requirements/base.in
coreschema==0.0.4
# via coreapi
cryptography==43.0.1
cryptography==43.0.3
# via
# django-fernet-fields-v2
# pyjwt
Expand Down Expand Up @@ -91,32 +91,30 @@ djangorestframework-csv==3.0.2
# via
# -r requirements/base.in
# edx-enterprise-data
dnspython==2.6.1
# via
# -c requirements/constraints.txt
# pymongo
dnspython==2.7.0
# via pymongo
drf-jwt==1.19.2
# via edx-drf-extensions
drf-yasg==1.21.7
drf-yasg==1.21.8
# via edx-api-doc-tools
edx-api-doc-tools==2.0.0
# via -r requirements/base.in
edx-ccx-keys==1.3.0
# via -r requirements/base.in
edx-django-release-util==1.4.0
# via -r requirements/base.in
edx-django-utils==6.1.0
edx-django-utils==7.0.0
# via
# -r requirements/base.in
# edx-drf-extensions
# edx-enterprise-data
# edx-rest-api-client
edx-drf-extensions==10.4.0
edx-drf-extensions==10.5.0
# via
# -r requirements/base.in
# edx-enterprise-data
# edx-rbac
edx-enterprise-data==9.6.0
edx-enterprise-data==10.0.1
# via -r requirements/base.in
edx-opaque-keys==2.11.0
# via
Expand All @@ -132,7 +130,7 @@ edx-rest-api-client==6.0.0
# edx-enterprise-data
factory-boy==3.3.1
# via edx-enterprise-data
faker==30.4.0
faker==30.8.1
# via factory-boy
html5lib==1.1
# via -r requirements/base.in
Expand All @@ -150,25 +148,25 @@ jmespath==1.0.1
# botocore
markdown==3.7
# via -r requirements/base.in
markupsafe==3.0.1
markupsafe==3.0.2
# via jinja2
mysql-connector-python==9.1.0
# via edx-enterprise-data
newrelic==10.2.0
# via edx-django-utils
numpy==1.24.4
numpy==2.1.2
# via
# edx-enterprise-data
# pandas
ordered-set==4.1.0
# via -r requirements/base.in
packaging==24.1
# via drf-yasg
pandas==2.0.3
pandas==2.2.3
# via edx-enterprise-data
pbr==6.1.0
# via stevedore
psutil==6.0.0
psutil==6.1.0
# via edx-django-utils
pycparser==2.22
# via cffi
Expand Down Expand Up @@ -236,9 +234,8 @@ uritemplate==4.1.1
# via
# coreapi
# drf-yasg
urllib3==1.26.20
urllib3==2.2.3
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# botocore
# requests
Expand Down
2 changes: 1 addition & 1 deletion 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.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
Expand Down
6 changes: 0 additions & 6 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,5 @@ elasticsearch < 7.14.0
# elasticsearch-dsl depends on elasticsearch >=7.8.0,<8.0.0
elasticsearch-dsl>=7.2.1,<8.0.0

# botocore 1.35.14 has requirement urllib3<1.27,>=1.25.4; python_version < "3.10"
urllib3<2.0.0

# path>16.14.0 has removed the deprecated abspath function, which is breaking the docs build
path<16.15.0

# dnspython 2.7.0 Requires-Python >=3.9
dnspython<2.7.0
37 changes: 17 additions & 20 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.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
Expand All @@ -11,9 +11,9 @@ asgiref==3.8.1
# django-countries
boto==2.49.0
# via -r requirements/base.in
boto3==1.35.41
boto3==1.35.48
# via -r requirements/base.in
botocore==1.35.41
botocore==1.35.48
# via
# boto3
# s3transfer
Expand All @@ -31,7 +31,7 @@ coreapi==2.3.3
# via -r requirements/base.in
coreschema==0.0.4
# via coreapi
cryptography==43.0.1
cryptography==43.0.3
# via
# django-fernet-fields-v2
# pyjwt
Expand Down Expand Up @@ -91,32 +91,30 @@ djangorestframework-csv==3.0.2
# via
# -r requirements/base.in
# edx-enterprise-data
dnspython==2.6.1
# via
# -c requirements/constraints.txt
# pymongo
dnspython==2.7.0
# via pymongo
drf-jwt==1.19.2
# via edx-drf-extensions
drf-yasg==1.21.7
drf-yasg==1.21.8
# via edx-api-doc-tools
edx-api-doc-tools==2.0.0
# via -r requirements/base.in
edx-ccx-keys==1.3.0
# via -r requirements/base.in
edx-django-release-util==1.4.0
# via -r requirements/base.in
edx-django-utils==6.1.0
edx-django-utils==7.0.0
# via
# -r requirements/base.in
# edx-drf-extensions
# edx-enterprise-data
# edx-rest-api-client
edx-drf-extensions==10.4.0
edx-drf-extensions==10.5.0
# via
# -r requirements/base.in
# edx-enterprise-data
# edx-rbac
edx-enterprise-data==9.6.0
edx-enterprise-data==10.0.1
# via -r requirements/base.in
edx-opaque-keys==2.11.0
# via
Expand All @@ -132,7 +130,7 @@ edx-rest-api-client==6.0.0
# edx-enterprise-data
factory-boy==3.3.1
# via edx-enterprise-data
faker==30.4.0
faker==30.8.1
# via factory-boy
html5lib==1.1
# via -r requirements/base.in
Expand All @@ -150,27 +148,27 @@ jmespath==1.0.1
# botocore
markdown==3.7
# via -r requirements/base.in
markupsafe==3.0.1
markupsafe==3.0.2
# via jinja2
mysql-connector-python==9.1.0
# via edx-enterprise-data
mysqlclient==2.2.4
mysqlclient==2.2.5
# via -r requirements/dev.in
newrelic==10.2.0
# via edx-django-utils
numpy==1.24.4
numpy==2.1.2
# via
# edx-enterprise-data
# pandas
ordered-set==4.1.0
# via -r requirements/base.in
packaging==24.1
# via drf-yasg
pandas==2.0.3
pandas==2.2.3
# via edx-enterprise-data
pbr==6.1.0
# via stevedore
psutil==6.0.0
psutil==6.1.0
# via edx-django-utils
pycparser==2.22
# via cffi
Expand Down Expand Up @@ -238,9 +236,8 @@ uritemplate==4.1.1
# via
# coreapi
# drf-yasg
urllib3==1.26.20
urllib3==2.2.3
# via
# -c requirements/constraints.txt
# -r requirements/base.in
# botocore
# requests
Expand Down
Loading
Loading