Project

General

Profile

Bug #70861

tox : cible stable-backports cassée

Added by Paul Marillonnet 3 months ago. Updated about 1 month ago.

Status:
Solution déployée
Priority:
Normal
Category:
-
Target version:
-
Start date:
31 October 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

sur Jenkins toutes les nuits :

    def test_get_authentication_events_hows(rf, simple_user):
        user = authenticate(username=simple_user.username, password=simple_user.username)
        request = rf.get('/login/')
>       middleware = SessionMiddleware()

tests/test_utils.py:97: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/authentic-3116/tox-jenkins/authentic/py3-stable-backports/lib/python3.9/site-packages/django/contrib/sessions/middleware.py:16: in __init__
    super().__init__(get_response)
/tmp/authentic-3116/tox-jenkins/authentic/py3-stable-backports/lib/python3.9/site-packages/django/utils/deprecation.py:95: in __init__
    self._get_response_none_deprecation(get_response)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <django.contrib.sessions.middleware.SessionMiddleware object at 0x7fea0a21e9d0>
get_response = None

    def _get_response_none_deprecation(self, get_response):
        if get_response is None:
>           warnings.warn(
                'Passing None for the middleware get_response argument is '
                'deprecated.',
                RemovedInDjango40Warning, stacklevel=3,
            )
E           django.utils.deprecation.RemovedInDjango40Warning: Passing None for the middleware get_response argument is deprecated.

/tmp/authentic-3116/tox-jenkins/authentic/py3-stable-backports/lib/python3.9/site-packages/django/utils/deprecation.py:143: RemovedInDjango40Warning

Sans trop capter ce qui ne va pas on dirait que c’est la façon dont on initialise le middleware qui n’est plus gérée dans Django 4.


Files


Related issues

Has duplicate Authentic 2 - Bug #70846: environnement py3-stable-backports en erreur suite à #70631Fermé29 October 2022

Actions

Associated revisions

Revision 9670f4d8 (diff)
Added by Paul Marillonnet 3 months ago

tests: pass a valid get_response upon middleware initialization (#70861)

History

#1

Updated by Paul Marillonnet 3 months ago

  • Status changed from Nouveau to En cours
  • Assignee set to Paul Marillonnet

Je regarde.

#2

Updated by Benjamin Dauvergne 3 months ago

  • Has duplicate Bug #70846: environnement py3-stable-backports en erreur suite à #70631 added
#3

Updated by Benjamin Dauvergne 3 months ago

Juste passer un faux get_response comme paramètre, lambda: None.

#4

Updated by Paul Marillonnet 3 months ago

Yes, ça peut être fait comme ça, en effet.

#6

Updated by Agate Berriot 3 months ago

  • Status changed from Solution proposée to Solution validée
#7

Updated by Paul Marillonnet 3 months ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 9670f4d857874a7dfa2be8863d603606d0eaa2af
Author: Paul Marillonnet <pmarillonnet@entrouvert.com>
Date:   Mon Oct 31 11:34:50 2022 +0100

    tests: pass a valid get_response upon middleware initialization (#70861)
#8

Updated by Transition automatique about 1 month ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF