Fonctionner avec django 3.2 (#67760) #10

Merged
bdauvergne merged 7 commits from wip/67760-django-32 into main 2023-01-30 17:08:24 +01:00
Owner

Pas mal de commentaires dans le ticket, s'y référer, je n'en remet pas une couche ici.

Pas mal de commentaires dans le ticket, s'y référer, je n'en remet pas une couche ici.
bdauvergne added 7 commits 2023-01-18 12:53:26 +01:00
8930235a81 django32: check message content directly in the page (#67760)
Which is the point of interest anyway.
https://code.djangoproject.com/ticket/32191 for details on why it is not possible anymore to check the plain text in the response header.
1d0dc19b82 django32: implement clear_tenants_settings as a global function (#67760)
Django 3.2 introduced a constraint on the access of settings object
attributes, they can only be in uppercase. As clear_tenants_settings is
only used by tests on the multitenant framework, clear_tenants_settings
is reimplemented as a global function using a global variable
_tenant_settings_wrapper to access the global multitenant aware wrapper
around the setting object.
gitea-wip/hobo/pipeline/pr-main This commit looks good Details
ca75887fe9
django32: change the way Thread are made tenant aware (#67760)
Django 3.2. changed the implementation of django.db.ConnectionHandler it
now user asgiref.local.Local as a thread/asyncio-task local dictionnary
instead of threading.local. This new implementation use
threading.current_thread() to get a reference to the current thread
instead of threading._get_ident(), but inside __bootstrap_inner, the
_active dictionnary is not initialized and current_thread() returns a
dummy value instead of the current thread.

To work around this behaviour I made __bootstrap_inner wrap the run
method with the code needed to setup the tenant, so that it's run after
__boostrap_inner initialization of the current thread in the _active
dictionnary.
Owner

Pas de remarque et je pourrais valider mais à cause de ca75887fe9 , je serai pour pousser ça plus tôt qu'un mercredi.

De peur que tu ne vois pas mon commentaire et pousse, je validerai plus tard (si personne ne trouve à redire d'ici là).

Pas de remarque et je pourrais valider mais à cause de https://gitea.entrouvert.org/entrouvert/hobo/commit/ca75887fe9ec6ad4f3e825b44c0c10a6ce7c9140 , je serai pour pousser ça plus tôt qu'un mercredi. De peur que tu ne vois pas mon commentaire et pousse, je validerai plus tard (si personne ne trouve à redire d'ici là).
Owner

Vu le commit pointé,

Django 3.2. changed the implementation of django.db.ConnectionHandler it
now user asgiref.local.Local

J'imagine que c'est "it now uses". Plus loin aussi un s/use/uses/ à faire.

Dans le commit, l'ajout d'un commentaire au tox.ini semble sans rapport.

Vu le commit pointé, > Django 3.2. changed the implementation of django.db.ConnectionHandler it now user asgiref.local.Local J'imagine que c'est "it now uses". Plus loin aussi un s/use/uses/ à faire. Dans le commit, l'ajout d'un commentaire au tox.ini semble sans rapport.
bdauvergne force-pushed wip/67760-django-32 from ca75887fe9 to 842f699e8a 2023-01-30 14:56:20 +01:00 Compare
Author
Owner

Message de commit corrigé.
Commentaire dans tox.ini retiré.

Message de commit corrigé. Commentaire dans tox.ini retiré.
ecazenave approved these changes 2023-01-30 16:25:55 +01:00
ecazenave left a comment
Owner

Déploie nous ça rapidos.

Déploie nous ça rapidos.
bdauvergne merged commit 842f699e8a into main 2023-01-30 17:08:24 +01:00
bdauvergne deleted branch wip/67760-django-32 2023-01-30 17:08:24 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: entrouvert/hobo#10
No description provided.