mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Revert to os.path.join() semantics for path manipulation in importlib
which is different than what imp.cache_from_source() operates on.
This commit is contained in:
		
							parent
							
								
									6c802b8491
								
							
						
					
					
						commit
						cf649958f7
					
				
					 2 changed files with 2988 additions and 3007 deletions
				
			
		|  | @ -65,16 +65,7 @@ def _r_long(int_bytes): | |||
| #     and choosing in _setup(). | ||||
| def _path_join(*args): | ||||
|     """Replacement for os.path.join().""" | ||||
|     if len(path_separators) == 1: | ||||
|         sep = path_sep | ||||
|     else: | ||||
|         for x in reversed(args[0]): | ||||
|             if x in path_separators: | ||||
|                 sep = x | ||||
|                 break | ||||
|         else: | ||||
|             sep = path_sep | ||||
|     return sep.join(x[:-len(sep)] if x.endswith(sep) else x | ||||
|     return path_sep.join(x[:-len(path_sep)] if x.endswith(path_sep) else x | ||||
|                          for x in args if x) | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										5982
									
								
								Python/importlib.h
									
										
									
									
									
								
							
							
						
						
									
										5982
									
								
								Python/importlib.h
									
										
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brett Cannon
						Brett Cannon