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: add python 3.12 support #21

Open
wants to merge 6 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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
python-version:
- '3.8'
toxenv: [testenv]

steps:
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
.PHONY: $(COMMON_CONSTRAINTS_TXT)
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"
echo "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@)

upgrade: $(COMMON_CONSTRAINTS_TXT)
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -q -r requirements/pip_tools.txt
pip-compile --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in
Expand Down
10 changes: 6 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
# pip-compile --output-file=requirements/base.txt requirements/base.in
#
pymongo==4.1.1
dnspython==2.6.1
# via pymongo
pymongo==4.6.3
# via -r requirements/base.in
42 changes: 24 additions & 18 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1,56 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
# pip-compile --output-file=requirements/ci.txt requirements/ci.in
#
distlib==0.3.4
cachetools==5.3.3
# via
# -r requirements/tox.txt
# virtualenv
filelock==3.7.1
# tox
chardet==5.2.0
# via
# -r requirements/tox.txt
# tox
# virtualenv
packaging==21.3
colorama==0.4.6
# via
# -r requirements/tox.txt
# tox
platformdirs==2.5.2
distlib==0.3.8
# via
# -r requirements/tox.txt
# virtualenv
filelock==3.13.3
# via
# -r requirements/tox.txt
# tox
# virtualenv
pluggy==1.0.0
packaging==24.0
# via
# -r requirements/tox.txt
# pyproject-api
# tox
py==1.11.0
platformdirs==4.2.0
# via
# -r requirements/tox.txt
# tox
pyparsing==3.0.9
# virtualenv
pluggy==1.4.0
# via
# -r requirements/tox.txt
# packaging
six==1.16.0
# tox
pyproject-api==1.6.1
# via
# -r requirements/tox.txt
# tox
# virtualenv
toml==0.10.2
tomli==2.0.1
# via
# -r requirements/tox.txt
# pyproject-api
# tox
tox==3.25.0
tox==4.14.2
# via -r requirements/tox.txt
virtualenv==20.14.1
virtualenv==20.25.1
# via
# -r requirements/tox.txt
# tox
39 changes: 39 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@



# This is a temporary solution to override the real common_constraints.txt
# In edx-lint, until the pyjwt constraint in edx-lint has been removed.
# See BOM-2721 for more details.
# Below is the copied and edited version of common_constraints

# A central location for most common version constraints
# (across edx repos) for pip-installation.
#
# Similar to other constraint files this file doesn't install any packages.
# It specifies version constraints that will be applied if a package is needed.
# When pinning something here, please provide an explanation of why it is a good
# idea to pin this package across all edx repos, Ideally, link to other information
# that will help people in the future to remove the pin when possible.
# Writing an issue against the offending project and linking to it here is good.
#
# Note: Changes to this file will automatically be used by other repos, referencing
# this file from Github directly. It does not require packaging in edx-lint.


# using LTS django version
Django<5.0

# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
elasticsearch<7.14.0

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected

# 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
5 changes: 4 additions & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@
# linking to it here is good.

# Common constraints for edx repos
-c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
-c common_constraints.txt

# Temporary to Support the python 3.11 Upgrade
backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library
12 changes: 6 additions & 6 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
# pip-compile --allow-unsafe --output-file=requirements/pip.txt requirements/pip.in
#
wheel==0.37.1
wheel==0.43.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==22.1.2
pip==24.0
# via -r requirements/pip.in
setuptools==62.3.2
setuptools==69.2.0
# via -r requirements/pip.in
31 changes: 23 additions & 8 deletions requirements/pip_tools.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
# pip-compile --output-file=requirements/pip_tools.txt requirements/pip_tools.in
#
click==8.1.3
build==1.2.1
# via pip-tools
pep517==0.12.0
click==8.1.7
# via pip-tools
pip-tools==6.6.2
importlib-metadata==6.11.0
# via
# -c requirements/common_constraints.txt
# build
packaging==24.0
# via build
pip-tools==7.4.1
# via -r requirements/pip_tools.in
pyproject-hooks==1.0.0
# via
# build
# pip-tools
tomli==2.0.1
# via pep517
wheel==0.37.1
# via
# build
# pip-tools
# pyproject-hooks
wheel==0.43.0
# via pip-tools
zipp==3.18.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
26 changes: 13 additions & 13 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
# pip-compile --output-file=requirements/test.txt requirements/test.in
#
attrs==21.4.0
dnspython==2.6.1
# via
# -r requirements/base.txt
# pymongo
exceptiongroup==1.2.0
# via pytest
iniconfig==1.1.1
iniconfig==2.0.0
# via pytest
packaging==21.3
packaging==24.0
# via pytest
pluggy==1.0.0
pluggy==1.4.0
# via pytest
py==1.11.0
# via pytest
pymongo==4.1.1
pymongo==4.6.3
# via -r requirements/base.txt
pyparsing==3.0.9
# via packaging
pytest==7.1.2
pytest==8.1.1
# via -r requirements/test.in
tomli==2.0.1
# via pytest
44 changes: 25 additions & 19 deletions requirements/tox.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
# pip-compile --output-file=requirements/tox.txt requirements/tox.in
#
distlib==0.3.4
cachetools==5.3.3
# via tox
chardet==5.2.0
# via tox
colorama==0.4.6
# via tox
distlib==0.3.8
# via virtualenv
filelock==3.7.1
filelock==3.13.3
# via
# tox
# virtualenv
packaging==21.3
# via tox
platformdirs==2.5.2
# via virtualenv
pluggy==1.0.0
# via tox
py==1.11.0
# via tox
pyparsing==3.0.9
# via packaging
six==1.16.0
packaging==24.0
# via
# pyproject-api
# tox
platformdirs==4.2.0
# via
# tox
# virtualenv
toml==0.10.2
pluggy==1.4.0
# via tox
tox==3.25.0
pyproject-api==1.6.1
# via tox
tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.14.2
# via -r requirements/tox.in
virtualenv==20.14.1
virtualenv==20.25.1
# via tox
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def is_requirement(line):
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.11',
],
setup_requires=['pyandoc'],
install_requires=load_requirements('requirements/base.in'),
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ envlist = testenv

[testenv]
deps =
-rrequirements/test.txt
-rrequirements/test.txt
commands =
pytest
pytest

Loading