Upgrade to django 4.2/5.2 and fix potential thread local issues - #35
Closed
yakky wants to merge 5 commits into
Closed
Upgrade to django 4.2/5.2 and fix potential thread local issues#35yakky wants to merge 5 commits into
yakky wants to merge 5 commits into
Conversation
- Drop MiddlewareMixin in favour of a plain new-style middleware so that set_urlconf(None) is guaranteed via try/finally even when a BaseException (SystemExit, KeyboardInterrupt, …) escapes Django's convert_exception_to_response wrapper, which only catches Exception. - Move reload_urlconf() before set_urlconf(urlconf) so that any set_urlconf call that reload_urlconf() may issue internally cannot override the site-specific value we are about to set. - Update tests: replace direct process_request/process_response calls with the __call__ contract; add test_urlconf_restored_after_exception to assert the try/finally guarantee against BaseException.
- tox.ini: envlist now py{311,312,313}-django{42,52}-cms{311}; remove
django32/41/cms39 deps; add django52 dep
- setup.cfg: python_requires >=3.11; classifiers updated to
Django 4.2/5.0/5.1/5.2 and Python 3.11/3.12/3.13
- .github/workflows/test.yml: matrix updated to Python 3.11/3.12/3.13,
Django 42/52, CMS 311; py313+django42 marked continue-on-error;
action versions bumped to v4/v5
- .github/workflows/lint.yml: Python bumped to 3.12; action versions
bumped to v4/v5
- pyproject.toml: black and ruff target-version updated to py311
- requirements-test.txt: remove mock, nose, django-nose, flake8 (dead
packages replaced by stdlib unittest.mock and ruff)
- cms_helper.py: rename MIDDLEWARE_CLASSES to MIDDLEWARE (removed in
Django 2.0)
Travis CI and the old GitLab CI config referenced Python 2.7/3.5-3.8 and Django 1.x/2.x. GitHub Actions is the active CI.
Travis CI and the old GitLab CI config referenced Python 2.7/3.5-3.8 and Django 1.x/2.x. GitHub Actions is the active CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.