mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	bpo-33128 Fix duplicated call to importlib._install_external_importers (GH-6273)
External importers were being added in both phases of the import system initialisation. They're only supposed to be added in the second phase, after the import machinery has been appropriately configured.
This commit is contained in:
		
							parent
							
								
									650ba4ffd1
								
							
						
					
					
						commit
						0977091dca
					
				
					 3 changed files with 5 additions and 5 deletions
				
			
		|  | @ -325,11 +325,6 @@ initimport(PyInterpreterState *interp, PyObject *sysmod) | |||
| 
 | ||||
|     /* Install importlib as the implementation of import */ | ||||
|     value = PyObject_CallMethod(importlib, "_install", "OO", sysmod, impmod); | ||||
|     if (value != NULL) { | ||||
|         Py_DECREF(value); | ||||
|         value = PyObject_CallMethod(importlib, | ||||
|                                     "_install_external_importers", ""); | ||||
|     } | ||||
|     if (value == NULL) { | ||||
|         PyErr_Print(); | ||||
|         return _Py_INIT_ERR("importlib install failed"); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Pablo Galindo
						Pablo Galindo