mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	[3.9] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) (GH-30785)
Automerge-Triggered-By: GH:asvetlov
This commit is contained in:
		
							parent
							
								
									3c4a3745b9
								
							
						
					
					
						commit
						6ed874f8c5
					
				
					 8 changed files with 29 additions and 24 deletions
				
			
		|  | @ -17,6 +17,7 @@ | |||
| import types | ||||
| import warnings | ||||
| import weakref | ||||
| from types import GenericAlias | ||||
| 
 | ||||
| from . import base_tasks | ||||
| from . import coroutines | ||||
|  | @ -147,8 +148,7 @@ def __del__(self): | |||
|             self._loop.call_exception_handler(context) | ||||
|         super().__del__() | ||||
| 
 | ||||
|     def __class_getitem__(cls, type): | ||||
|         return cls | ||||
|     __class_getitem__ = classmethod(GenericAlias) | ||||
| 
 | ||||
|     def _repr_info(self): | ||||
|         return base_tasks._task_repr_info(self) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kumar Aditya
						Kumar Aditya