chore: update to Python 3.11/3.12 and Django 4.2/5.2#13
Open
Conversation
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.
#Actualización a Python 3.11/3.12 y Django 4.2/5.2
1. Archivos modificados
requirements/pip.txtrequirements/constraints.txtsocial-auth-core==4.1.0→>=4.5.0requirements/base.inDjango>=4.2,<5.3,django-cas-ng>=5.0.0requirements/ci.incodecov(discontinuado)requirements/base.txtrequirements/test.txtrequirements/quality.txtrequirements/doc.txtrequirements/ci.txtrequirements/dev.txtrequirements/pip-tools.txttox.inipy{311,312}-django{42,52}, deps actualizados,whitelist_externals→allowlist_externalssetup.cfg[wheel] universal = 1setup.pypython_requires>=3.11, classifiers Django 4.2/5.2 + Python 3.11/3.12,BaseException→RuntimeError,os.system→subprocess.run,open()con context managers.github/workflows/ci.yml.github/workflows/pypi-publish.ymlpython -m build, pypi-publish@release/v1openedx_cas/__init__.pydefault_app_config(deprecado Django 3.2+)openedx_cas/apps.pydefault_auto_field = 'django.db.models.AutoField'openedx_cas/backends.pyis not→!=(SyntaxWarning Python 3.12+)openedx_cas/settings/test.pyDEFAULT_AUTO_FIELD = 'django.db.models.AutoField'2. Deprecaciones encontradas y corregidas
openedx_cas/__init__.pydefault_app_configopenedx_cas/backends.py(línea 132)is notpara comparar strings!=setup.pyBaseException(...)RuntimeError(...)setup.pyos.system(...)subprocess.run(...)setup.pyopen()sin context managerwith open() as f:setup.pypython setup.py sdist bdist_wheelpython -m build(en workflow)tox.iniwhitelist_externalsallowlist_externals(tox 4)setup.cfg[wheel] universal = 13. Dependencias actualizadas
django-cas-ngsocial-auth-corepython-caslxmlpipsetuptoolscodecov4. Compatibilidad y restricciones remotas
common_constraints.txt: Ahora diceDjango<6.0— compatible con Django 4.2 y 5.2. No fue necesario comentarla.0001_initial.py: Usamodels.AutoFieldexplícito — compatible con Django 5.2.force_text,smart_text,ugettext_lazy,url(), etc.) en ningún archivo .py.collections.Callable,typing.List,distutils,datetime.utcnow()) en ningún archivo.assertEquals, etc.) en los tests.5. Resultados de tests
6. Trabajo manual restante
.txtfueron generados con Python 3.13 (disponible en este entorno). Idealmente regenerar conmake upgradeen Linux con Python 3.12 para máxima fidelidad.codecov. Si se necesita reportar coverage, agregar el Codecov GitHub Action al workflowci.yml.