mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed (#18314)
* Hard reset + cherry piciking the changes. * 📜🤖 Added by blurb_it. * Added @vstinner News * Update Misc/NEWS.d/next/Library/2020-02-11-13-01-38.bpo-38691.oND8Sk.rst Co-Authored-By: Victor Stinner <vstinner@python.org> * Hard reset to master * Hard reset to master + latest changes Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
		
							parent
							
								
									85a2eef473
								
							
						
					
					
						commit
						d83b6600b2
					
				
					 5 changed files with 2658 additions and 2647 deletions
				
			
		|  | @ -1829,6 +1829,9 @@ are always available.  They are listed here in alphabetical order. | ||||||
|       Negative values for *level* are no longer supported (which also changes |       Negative values for *level* are no longer supported (which also changes | ||||||
|       the default value to 0). |       the default value to 0). | ||||||
| 
 | 
 | ||||||
|  |    .. versionchanged:: 3.9 | ||||||
|  |       When the command line options :option:`-E` or :option:`-I` are being used, | ||||||
|  |       the environment variable :envvar:`PYTHONCASEOK` is now ignored. | ||||||
| 
 | 
 | ||||||
| .. rubric:: Footnotes | .. rubric:: Footnotes | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -589,6 +589,9 @@ Changes in the Python API | ||||||
|   since the *buffering* parameter has been removed. |   since the *buffering* parameter has been removed. | ||||||
|   (Contributed by Victor Stinner in :issue:`39357`.) |   (Contributed by Victor Stinner in :issue:`39357`.) | ||||||
| 
 | 
 | ||||||
|  | * The :mod:`importlib` module now ignores the :envvar:`PYTHONCASEOK` | ||||||
|  |   environment variable when the :option:`-E` or :option:`-I` command line | ||||||
|  |   options are being used. | ||||||
| 
 | 
 | ||||||
| CPython bytecode changes | CPython bytecode changes | ||||||
| ------------------------ | ------------------------ | ||||||
|  |  | ||||||
|  | @ -35,7 +35,7 @@ def _make_relax_case(): | ||||||
| 
 | 
 | ||||||
|         def _relax_case(): |         def _relax_case(): | ||||||
|             """True if filenames must be checked case-insensitively.""" |             """True if filenames must be checked case-insensitively.""" | ||||||
|             return key in _os.environ |             return not sys.flags.ignore_environment and key in _os.environ | ||||||
|     else: |     else: | ||||||
|         def _relax_case(): |         def _relax_case(): | ||||||
|             """True if filenames must be checked case-insensitively.""" |             """True if filenames must be checked case-insensitively.""" | ||||||
|  |  | ||||||
|  | @ -0,0 +1,2 @@ | ||||||
|  | The :mod:`importlib` module now ignores the :envvar:`PYTHONCASEOK` | ||||||
|  | environment variable when :option:`-E` or :option:`-I` command line option is used. | ||||||
							
								
								
									
										5295
									
								
								Python/importlib_external.h
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										5295
									
								
								Python/importlib_external.h
									
										
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 idomic
						idomic