mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	bpo-44061: Fix pkgutil.iter_modules regression when passed a pathlib.Path object (GH-25964) (GH-26052)
Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									6c190b5ae5
								
							
						
					
					
						commit
						0cb9775a85
					
				
					 3 changed files with 49 additions and 0 deletions
				
			
		|  | @ -412,6 +412,7 @@ def get_importer(path_item): | |||
|     The cache (or part of it) can be cleared manually if a | ||||
|     rescan of sys.path_hooks is necessary. | ||||
|     """ | ||||
|     path_item = os.fsdecode(path_item) | ||||
|     try: | ||||
|         importer = sys.path_importer_cache[path_item] | ||||
|     except KeyError: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Steve Dower
						Steve Dower