mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628)
Drop isinstance checks from create_subprocess_exec function and let subprocess module do them. https://bugs.python.org/issue35246 https://bugs.python.org/issue35246
This commit is contained in:
		
							parent
							
								
									e1f95e77e0
								
							
						
					
					
						commit
						744c08a9c7
					
				
					 3 changed files with 12 additions and 5 deletions
				
			
		|  | @ -622,6 +622,17 @@ async def execute(): | |||
|         self.loop.run_until_complete(execute()) | ||||
| 
 | ||||
| 
 | ||||
|     def test_create_subprocess_exec_with_path(self): | ||||
|         async def execute(): | ||||
|             p = await subprocess.create_subprocess_exec( | ||||
|                 support.FakePath(sys.executable), '-c', 'pass') | ||||
|             await p.wait() | ||||
|             p = await subprocess.create_subprocess_exec( | ||||
|                 sys.executable, '-c', 'pass', support.FakePath('.')) | ||||
|             await p.wait() | ||||
| 
 | ||||
|         self.assertIsNone(self.loop.run_until_complete(execute())) | ||||
| 
 | ||||
| if sys.platform != 'win32': | ||||
|     # Unix | ||||
|     class SubprocessWatcherMixin(SubprocessMixin): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 依云
						依云