chore: update to Python 3.11/3.12 and Django 4.2/5.2#13
Conversation
916aee1 to
aba45ba
Compare
aba45ba to
5a56827
Compare
|
@Gi-ron, regarding the local testing section you added in the PR description: I don’t think this adds much value here, since these exact test combinations are already running in GitHub Actions and we already know they are passing. What we really need to validate locally before merging is the plugin behavior in a real Open edX instance: install it in a Teak instance, verify that it installs cleanly, confirm there are no runtime errors, and test that the plugin actually works as expected there. Have you tested it on your side by installing the plugin in a Teak instance and verifying that everything works correctly without errors? I think that is the validation we still need before merging this PR. |
@magajh Sure, i updated the description to provide a series of steps on how to test locally. |
.github/workflows/ci.yml
Outdated
| toxenv: [ | ||
| 'py311-django42', | ||
| 'py311-django52', | ||
| 'py312-django42', |
There was a problem hiding this comment.
I’m not sure we need to include the Python 3.12 / Django 4.2 combination here, since I don't think any supported Open edX version runs on it. Looks like testing Python 3.12 with only Django 5.2 would be enough
There was a problem hiding this comment.
@Gi-ron you closed this comment but we still have 'py312-django42' listed here
.github/workflows/ci.yml
Outdated
| - name: Install pip | ||
| run: pip install -r requirements/pip.txt | ||
|
|
||
| python-version: ${{ matrix.toxenv == 'py311-django42' && '3.11' || matrix.toxenv == 'py311-django52' && '3.11' || matrix.toxenv == 'py312-django42' && '3.12' || matrix.toxenv == 'py312-django52' && '3.12' || '3.11' }} |
There was a problem hiding this comment.
I think this would be cleaner if we defined the supported environments explicitly in the matrix instead of deriving the Python version from toxenv in one long expression. Since we only support a fixed set of combinations, using matrix.include makes the workflow much easier to read and maintain
matrix:
include:
- python-version: "3.11"
toxenv: "py3.11-django4.2"
- python-version: "3.11"
toxenv: "py3.11-django5.2"
- python-version: "3.12"
toxenv: "py3.12-django5.2"
There was a problem hiding this comment.
@Gi-ron this comment is closed but this has not been solved yet
| with: | ||
| fetch-depth: 100 | ||
|
|
||
| - name: Download configuration |
There was a problem hiding this comment.
@Gi-ron I’m curious why this step and the related changes in this action are needed now. Was the action not working properly before?
There was a problem hiding this comment.
The issue was that the default configuration file (downloaded from openedx/edx-lint) uses ES module syntax (export default), but the action expects CommonJS (module.exports). This caused a syntax error when the action tried to run. I’m not entirely sure if this failure was already present before (I didn’t run the action on previous commits)
There was a problem hiding this comment.
@Gi-ron are we sure there is not a cleaner way to run this workflow?
If not, I'm ok with merging this but first I would like us to do a double check
|
@Gi-ron can we please add a compatibility notes table here like we've done for the other plugins? https://github.com/eduNEXT/eox-hooks?tab=readme-ov-file#compatibility-notes This new version is compatible for releases Sumac, Teak and Ulmo and the previous version is compatible with releases <=Redwood |
.github/workflows/ci.yml
Outdated
| toxenv: [ | ||
| 'py311-django42', | ||
| 'py311-django52', | ||
| 'py312-django42', |
There was a problem hiding this comment.
@Gi-ron you closed this comment but we still have 'py312-django42' listed here
.github/workflows/ci.yml
Outdated
| - name: Install pip | ||
| run: pip install -r requirements/pip.txt | ||
|
|
||
| python-version: ${{ matrix.toxenv == 'py311-django42' && '3.11' || matrix.toxenv == 'py311-django52' && '3.11' || matrix.toxenv == 'py312-django42' && '3.12' || matrix.toxenv == 'py312-django52' && '3.12' || '3.11' }} |
There was a problem hiding this comment.
@Gi-ron this comment is closed but this has not been solved yet
6f0670b to
69ef4d5
Compare
234d9f2 to
c89582b
Compare
83ba58c to
8fd3e1f
Compare
magajh
left a comment
There was a problem hiding this comment.
@Gi-ron, thanks for the work on this.
If we already tested the installation in a Teak environment with these latest changes and we’re confident it installs correctly without issues, then feel free to go ahead and merge it and release the new version.
I left one last comment about the commitlint flow, but I don’t consider it a blocker, so I’m approving this anyway
| with: | ||
| fetch-depth: 100 | ||
|
|
||
| - name: Download configuration |
There was a problem hiding this comment.
@Gi-ron are we sure there is not a cleaner way to run this workflow?
If not, I'm ok with merging this but first I would like us to do a double check
Description
This PR updates the
openedx-casplugin to support Open edX Teak release, which runs on Python 3.11/3.12 and Django 4.2/5.2. It also removes support for older Python and Django versions.The update includes:
0.3.0.Changes
Added
DJANGO_SETTINGS_MODULEin thequalitytox environment to avoid pylint configuration errors.Changed
social-auth-corefrom 4.1.0 to 4.8.5.make upgrade.ci.yml,pypi-publish.yml) to use recent action versions.tox.inito test against the new Python and Django versions.setup.pyto reflect Python 3.11/3.12 and Django 4.2/5.2.README.rstcompatibility table to include Teak.Removed
.pylintrcwith edx-lint).Fixed
setup.pyby usingwithstatements for file operations.tox.inito allow external commands in thequalityenvironment.Local Testing on Teak Instance
To validate the plugin works correctly in a real Open edX Teak environment, I performed the following steps on a local Tutor instance (Teak release):
Screenshot of the provider list:
The LMS logs showed no exceptions related to openedx_cas
Versioning
0.3.00.2.4The version has been bumped to minor because new Python and Django versions are supported and backward compatibility with older releases is dropped.
Checklist
make upgrade).setup.pyclassifiers updated.README.rstcompatibility table updated.CHANGELOG.rstupdated.0.3.0.tox -e quality) pass.