Skip to content

Commit

Permalink
feat: add python 312 support
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq committed Apr 5, 2024
1 parent ab3abe4 commit 7d2712d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [py38]
python-version: ['3.8', '3.12']
django-version: [django42]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Start container
run: |
Expand All @@ -27,5 +27,5 @@ jobs:
run: |
docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} -u root enterprise.catalog.app /edx/app/enterprise_catalog/enterprise_catalog/validate.sh
- name: Code Coverage
if: matrix.python-version == 'py38' && matrix.django-version=='django42'
if: matrix.python-version == '3.8' && matrix.django-version=='django42'
uses: codecov/codecov-action@v1
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ html_coverage: ## generate and view HTML coverage report
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(COMMON_CONSTRAINTS_TXT) piptools ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
# Make sure to compile files after any other files they include!
sed 's/Django<4.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
sed 's/django-simple-history==3.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
sed -i 's/django-simple-history==//g' requirements/common_constraints.txt
pip-compile --allow-unsafe --rebuild --upgrade -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Django<5.0
elasticsearch<7.14.0

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


# opentelemetry requires version 6.x at the moment:
# https://github.com/open-telemetry/opentelemetry-python/issues/3570
Expand Down
3 changes: 3 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ astroid<2.12

# To avoid any breaking changes
openai<=1.13.3

# For python greater than or equal to 3.9 backports.zoneinfo causing failures
backports.zoneinfo; python_version<'3.9'
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[tox]
skipsdist = true
envlist = {py38}-django{42}
envlist = py{38, 312}-django{42}

[testenv]
deps =
django42: Django>=4.2,<5.0
-r{toxinidir}/requirements/test.txt
commands =
{posargs:pytest}

0 comments on commit 7d2712d

Please sign in to comment.