File tree Expand file tree Collapse file tree 4 files changed +2188
-2188
lines changed 
Misc/NEWS.d/next/Core and Builtins Expand file tree Collapse file tree 4 files changed +2188
-2188
lines changed Original file line number Diff line number Diff line change @@ -215,9 +215,9 @@ always available.
215215   files to (and read them from) a parallel directory tree rooted at this
216216   directory, rather than from ``__pycache__ `` directories in the source code
217217   tree. Any ``__pycache__ `` directories in the source code tree will be ignored
218-    and new `.pyc ` files written within the bytecode  prefix. Thus if you use
218+    and new `.pyc ` files written within the pycache  prefix. Thus if you use
219219   :mod: `compileall ` as a pre-build step, you must ensure you run it with the
220-    same bytecode  prefix (if any) that you will use at runtime.
220+    same pycache  prefix (if any) that you will use at runtime.
221221
222222   A relative path is interpreted relative to the current working directory.
223223
Original file line number Diff line number Diff line change @@ -363,13 +363,13 @@ def source_from_cache(path):
363363        raise  NotImplementedError ('sys.implementation.cache_tag is None' )
364364    path  =  _os .fspath (path )
365365    head , pycache_filename  =  _path_split (path )
366-     found_in_bytecode_prefix  =  False 
366+     found_in_pycache_prefix  =  False 
367367    if  sys .pycache_prefix  is  not   None :
368368        stripped_path  =  sys .pycache_prefix .rstrip (path_separators )
369369        if  head .startswith (stripped_path  +  path_sep ):
370370            head  =  head [len (stripped_path ):]
371-             found_in_bytecode_prefix  =  True 
372-     if  not  found_in_bytecode_prefix :
371+             found_in_pycache_prefix  =  True 
372+     if  not  found_in_pycache_prefix :
373373        head , pycache  =  _path_split (head )
374374        if  pycache  !=  _PYCACHE :
375375            raise  ValueError (f'{ _PYCACHE }   not bottom-level directory in ' 
Original file line number Diff line number Diff line change 1- Add :envvar: `PYTHONBYTECODEPREFIX ` environment variable and :option: `-X `
2- ``bytecode_prefix `` command-line option to set an alternate root directory for
1+ Add :envvar: `PYTHONPYCACHEPREFIX ` environment variable and :option: `-X `
2+ ``pycache_prefix `` command-line option to set an alternate root directory for
33writing module bytecode cache files.
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments