mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Refs #35530 -- Corrected deprecation message in auth.alogin().
Follow up to ceecd518b1.
			
			
This commit is contained in:
		
				
					committed by
					
						 Sarah Boyce
						Sarah Boyce
					
				
			
			
				
	
			
			
			
						parent
						
							0b2493a0da
						
					
				
				
					commit
					b3166e1e15
				
			| @@ -205,7 +205,7 @@ async def alogin(request, user, backend=None): | ||||
|     # RemovedInDjango61Warning. | ||||
|     if user is None: | ||||
|         warnings.warn( | ||||
|             "Fallback to request.user when user is None will be removed.", | ||||
|             "Fallback to request.auser() when user is None will be removed.", | ||||
|             RemovedInDjango61Warning, | ||||
|             stacklevel=2, | ||||
|         ) | ||||
|   | ||||
| @@ -64,9 +64,9 @@ details on these changes. | ||||
| * The ``all`` keyword argument of ``django.contrib.staticfiles.finders.find()`` | ||||
|   will be removed. | ||||
|  | ||||
| * The fallback to ``request.user`` when ``user`` is ``None`` in | ||||
|   ``django.contrib.auth.login()`` and ``django.contrib.auth.alogin()`` will be | ||||
|   removed. | ||||
| * Fallbacks to ``request.user`` and ``request.auser()`` when ``user`` is | ||||
|   ``None`` in ``django.contrib.auth.login()`` and | ||||
|   ``django.contrib.auth.alogin()``, respectively, will be removed. | ||||
|  | ||||
| * The ``ordering`` keyword argument of the PostgreSQL specific aggregation | ||||
|   functions ``django.contrib.postgres.aggregates.ArrayAgg``, | ||||
|   | ||||
| @@ -479,9 +479,9 @@ Miscellaneous | ||||
| * The ``all`` argument for the ``django.contrib.staticfiles.finders.find()`` | ||||
|   function is deprecated in favor of the ``find_all`` argument. | ||||
|  | ||||
| * The fallback to ``request.user`` when ``user`` is ``None`` in | ||||
|   ``django.contrib.auth.login()`` and ``django.contrib.auth.alogin()`` will be | ||||
|   removed. | ||||
| * Fallbacks to ``request.user`` and ``request.auser()`` when ``user`` is | ||||
|   ``None`` in ``django.contrib.auth.login()`` and | ||||
|   ``django.contrib.auth.alogin()``, respectively, are deprecated. | ||||
|  | ||||
| * The ``ordering`` keyword argument of the PostgreSQL specific aggregation | ||||
|   functions ``django.contrib.postgres.aggregates.ArrayAgg``, | ||||
|   | ||||
| @@ -79,7 +79,7 @@ class AsyncAuthTest(TestCase): | ||||
|             ), | ||||
|             self.assertWarnsMessage( | ||||
|                 RemovedInDjango61Warning, | ||||
|                 "Fallback to request.user when user is None will be removed.", | ||||
|                 "Fallback to request.auser() when user is None will be removed.", | ||||
|             ), | ||||
|         ): | ||||
|             await alogin(request, None) | ||||
| @@ -100,7 +100,7 @@ class AsyncAuthTest(TestCase): | ||||
|             ), | ||||
|             self.assertWarnsMessage( | ||||
|                 RemovedInDjango61Warning, | ||||
|                 "Fallback to request.user when user is None will be removed.", | ||||
|                 "Fallback to request.auser() when user is None will be removed.", | ||||
|             ), | ||||
|         ): | ||||
|             await alogin(request, None) | ||||
| @@ -116,7 +116,7 @@ class AsyncAuthTest(TestCase): | ||||
|         request.session = await self.client.asession() | ||||
|         with self.assertWarnsMessage( | ||||
|             RemovedInDjango61Warning, | ||||
|             "Fallback to request.user when user is None will be removed.", | ||||
|             "Fallback to request.auser() when user is None will be removed.", | ||||
|         ): | ||||
|             await alogin(request, None) | ||||
|         user = await aget_user(request) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user