]> granicus.if.org Git - python/commitdiff
Issue #25488: merge idle.py from 3.5.
authorTerry Jan Reedy <tjreedy@udel.edu>
Fri, 30 Sep 2016 06:56:46 +0000 (02:56 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Fri, 30 Sep 2016 06:56:46 +0000 (02:56 -0400)
1  2 
Lib/idlelib/idle.py

index c01cf992cc152edf3ceafabf535fe14e5e6a7799,141534dfe13583942cba5807f53295e9fc78adb9..485d5a75a29c1ad8f39f4558ce4759797951baa1
@@@ -1,11 -1,13 +1,14 @@@
  import os.path
  import sys
  
- # If we are working on a development version of IDLE, we need to prepend the
- # parent of this idlelib dir to sys.path.  Otherwise, importing idlelib gets
- # the version installed with the Python used to call this module:
++
+ # Enable running IDLE with idlelib in a non-standard location.
+ # This was once used to run development versions of IDLE.
+ # Because PEP 434 declared idle.py a public interface,
+ # removal should require deprecation.
  idlelib_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- sys.path.insert(0, idlelib_dir)
+ if idlelib_dir not in sys.path:
+     sys.path.insert(0, idlelib_dir)
  
- import idlelib.pyshell
- idlelib.pyshell.main()
 -from idlelib.PyShell import main  # This is subject to change
++from idlelib.pyshell import main  # This is subject to change
+ main()