| 
									
										
										
										
											2013-10-17 13:40:50 -07:00
										 |  |  | """The asyncio package, tracking PEP 3156.""" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-10 18:36:12 -05:00
										 |  |  | # flake8: noqa | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-17 13:40:50 -07:00
										 |  |  | import sys | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # This relies on each of the submodules having an __all__ variable. | 
					
						
							| 
									
										
										
										
											2015-01-06 01:03:58 +01:00
										 |  |  | from .base_events import * | 
					
						
							| 
									
										
										
										
											2014-06-29 00:46:45 +02:00
										 |  |  | from .coroutines import * | 
					
						
							| 
									
										
										
										
											2013-10-17 13:40:50 -07:00
										 |  |  | from .events import * | 
					
						
							| 
									
										
										
										
											2018-09-11 10:13:04 -07:00
										 |  |  | from .exceptions import * | 
					
						
							| 
									
										
										
										
											2014-01-25 15:32:06 +01:00
										 |  |  | from .futures import * | 
					
						
							| 
									
										
										
										
											2025-01-22 08:25:29 -08:00
										 |  |  | from .graph import * | 
					
						
							| 
									
										
										
										
											2013-10-17 13:40:50 -07:00
										 |  |  | from .locks import * | 
					
						
							|  |  |  | from .protocols import * | 
					
						
							| 
									
										
										
										
											2017-12-14 09:42:21 -05:00
										 |  |  | from .runners import * | 
					
						
							| 
									
										
										
										
											2014-01-25 15:32:06 +01:00
										 |  |  | from .queues import * | 
					
						
							| 
									
										
										
										
											2013-10-17 13:40:50 -07:00
										 |  |  | from .streams import * | 
					
						
							| 
									
										
										
										
											2014-02-01 22:49:59 +01:00
										 |  |  | from .subprocess import * | 
					
						
							| 
									
										
										
										
											2013-10-17 13:40:50 -07:00
										 |  |  | from .tasks import * | 
					
						
							| 
									
										
										
										
											2022-02-15 15:42:04 -08:00
										 |  |  | from .taskgroups import * | 
					
						
							| 
									
										
										
										
											2022-03-10 18:05:20 +02:00
										 |  |  | from .timeouts import * | 
					
						
							| 
									
										
										
										
											2020-05-18 23:03:28 -04:00
										 |  |  | from .threads import * | 
					
						
							| 
									
										
										
										
											2014-01-25 15:32:06 +01:00
										 |  |  | from .transports import * | 
					
						
							| 
									
										
										
										
											2013-10-17 13:40:50 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-06 01:03:58 +01:00
										 |  |  | __all__ = (base_events.__all__ + | 
					
						
							|  |  |  |            coroutines.__all__ + | 
					
						
							| 
									
										
										
										
											2014-06-29 00:46:45 +02:00
										 |  |  |            events.__all__ + | 
					
						
							| 
									
										
										
										
											2018-09-11 10:13:04 -07:00
										 |  |  |            exceptions.__all__ + | 
					
						
							| 
									
										
										
										
											2014-01-25 15:32:06 +01:00
										 |  |  |            futures.__all__ + | 
					
						
							| 
									
										
										
										
											2025-01-22 08:25:29 -08:00
										 |  |  |            graph.__all__ + | 
					
						
							| 
									
										
										
										
											2013-10-17 13:40:50 -07:00
										 |  |  |            locks.__all__ + | 
					
						
							|  |  |  |            protocols.__all__ + | 
					
						
							| 
									
										
										
										
											2017-12-14 09:42:21 -05:00
										 |  |  |            runners.__all__ + | 
					
						
							| 
									
										
										
										
											2014-01-25 15:32:06 +01:00
										 |  |  |            queues.__all__ + | 
					
						
							| 
									
										
										
										
											2013-10-17 13:40:50 -07:00
										 |  |  |            streams.__all__ + | 
					
						
							| 
									
										
										
										
											2014-02-01 22:49:59 +01:00
										 |  |  |            subprocess.__all__ + | 
					
						
							| 
									
										
										
										
											2014-01-25 15:32:06 +01:00
										 |  |  |            tasks.__all__ + | 
					
						
							| 
									
										
										
										
											2023-06-26 03:54:03 -04:00
										 |  |  |            taskgroups.__all__ + | 
					
						
							| 
									
										
										
										
											2020-05-18 23:03:28 -04:00
										 |  |  |            threads.__all__ + | 
					
						
							| 
									
										
										
										
											2022-03-10 18:05:20 +02:00
										 |  |  |            timeouts.__all__ + | 
					
						
							| 
									
										
										
										
											2014-01-25 15:32:06 +01:00
										 |  |  |            transports.__all__) | 
					
						
							| 
									
										
										
										
											2014-07-18 12:44:25 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | if sys.platform == 'win32':  # pragma: no cover | 
					
						
							|  |  |  |     from .windows_events import * | 
					
						
							|  |  |  |     __all__ += windows_events.__all__ | 
					
						
							|  |  |  | else: | 
					
						
							|  |  |  |     from .unix_events import *  # pragma: no cover | 
					
						
							|  |  |  |     __all__ += unix_events.__all__ | 
					
						
							| 
									
										
										
										
											2024-12-24 17:30:26 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  | def __getattr__(name: str): | 
					
						
							|  |  |  |     import warnings | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-09 00:55:46 -07:00
										 |  |  |     match name: | 
					
						
							|  |  |  |         case "AbstractEventLoopPolicy": | 
					
						
							|  |  |  |             warnings._deprecated(f"asyncio.{name}", remove=(3, 16)) | 
					
						
							|  |  |  |             return events._AbstractEventLoopPolicy | 
					
						
							|  |  |  |         case "DefaultEventLoopPolicy": | 
					
						
							|  |  |  |             warnings._deprecated(f"asyncio.{name}", remove=(3, 16)) | 
					
						
							|  |  |  |             if sys.platform == 'win32': | 
					
						
							|  |  |  |                 return windows_events._DefaultEventLoopPolicy | 
					
						
							|  |  |  |             return unix_events._DefaultEventLoopPolicy | 
					
						
							|  |  |  |         case "WindowsSelectorEventLoopPolicy": | 
					
						
							|  |  |  |             if sys.platform == 'win32': | 
					
						
							|  |  |  |                 warnings._deprecated(f"asyncio.{name}", remove=(3, 16)) | 
					
						
							|  |  |  |                 return windows_events._WindowsSelectorEventLoopPolicy | 
					
						
							|  |  |  |             # Else fall through to the AttributeError below. | 
					
						
							|  |  |  |         case "WindowsProactorEventLoopPolicy": | 
					
						
							|  |  |  |             if sys.platform == 'win32': | 
					
						
							|  |  |  |                 warnings._deprecated(f"asyncio.{name}", remove=(3, 16)) | 
					
						
							|  |  |  |                 return windows_events._WindowsProactorEventLoopPolicy | 
					
						
							|  |  |  |             # Else fall through to the AttributeError below. | 
					
						
							| 
									
										
										
										
											2024-12-24 17:30:26 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  |     raise AttributeError(f"module {__name__!r} has no attribute {name!r}") |