mirror of
				https://github.com/Garmelon/PFERD.git
				synced 2025-11-03 22:23:41 +01:00 
			
		
		
		
	Manually set event loop on windows
The behaviour of get_event_loop changed in 3.14 and no longer creates one. Instead, it will crash.
This commit is contained in:
		@@ -25,6 +25,9 @@ ambiguous situations.
 | 
				
			|||||||
## Added
 | 
					## Added
 | 
				
			||||||
- Store the description when using the `internet-shortcut` link format
 | 
					- Store the description when using the `internet-shortcut` link format
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Fixed
 | 
				
			||||||
 | 
					- Event loop errors on Windows with Python 3.14
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 3.8.3 - 2025-07-01
 | 
					## 3.8.3 - 2025-07-01
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Added
 | 
					## Added
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -133,7 +133,8 @@ def main() -> None:
 | 
				
			|||||||
            # https://bugs.python.org/issue39232
 | 
					            # https://bugs.python.org/issue39232
 | 
				
			||||||
            # https://github.com/encode/httpx/issues/914#issuecomment-780023632
 | 
					            # https://github.com/encode/httpx/issues/914#issuecomment-780023632
 | 
				
			||||||
            # TODO Fix this properly
 | 
					            # TODO Fix this properly
 | 
				
			||||||
            loop = asyncio.get_event_loop()
 | 
					            loop = asyncio.new_event_loop()
 | 
				
			||||||
 | 
					            asyncio.set_event_loop(loop)
 | 
				
			||||||
            loop.run_until_complete(pferd.run(args.debug_transforms))
 | 
					            loop.run_until_complete(pferd.run(args.debug_transforms))
 | 
				
			||||||
            loop.run_until_complete(asyncio.sleep(1))
 | 
					            loop.run_until_complete(asyncio.sleep(1))
 | 
				
			||||||
            loop.close()
 | 
					            loop.close()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user