[Python-3000-checkins] r56467 - in python/branches/py3k-struni: Doc/lib/libwave.tex Lib/idlelib/AutoComplete.py Lib/idlelib/AutoCompleteWindow.py Lib/idlelib/Bindings.py Lib/idlelib/CallTips.py Lib/idlelib/ClassBrowser.py Lib/idlelib/CodeContext.py Lib/idlelib/ColorDelegator.py Lib/idlelib/Debugger.py Lib/idlelib/EditorWindow.py Lib/idlelib/FileList.py Lib/idlelib/FormatParagraph.py Lib/idlelib/GrepDialog.py Lib/idlelib/HyperParser.py Lib/idlelib/IOBinding.py Lib/idlelib/IdleHistory.py Lib/idlelib/ObjectBrowser.py Lib/idlelib/OutputWindow.py Lib/idlelib/ParenMatch.py Lib/idlelib/PathBrowser.py Lib/idlelib/Percolator.py Lib/idlelib/PyShell.py Lib/idlelib/RemoteDebugger.py Lib/idlelib/RemoteObjectBrowser.py Lib/idlelib/ReplaceDialog.py Lib/idlelib/ScriptBinding.py Lib/idlelib/SearchDialog.py Lib/idlelib/StackViewer.py Lib/idlelib/TreeWidget.py Lib/idlelib/UndoDelegator.py Lib/idlelib/ZoomHeight.py Lib/idlelib/aboutDialog.py Lib/idlelib/configDialog.py Lib/idlelib/configHandler.py Lib/idlelib/idle.py Lib/idlelib/idle.pyw Lib/idlelib/macosxSupport.py Lib/idlelib/run.py Lib/test/test_asyncore.py Lib/test/test_unicode.py Modules/_codecsmodule.c

guido.van.rossum python-3000-checkins at python.org
Fri Jul 20 06:05:58 CEST 2007


Author: guido.van.rossum
Date: Fri Jul 20 06:05:57 2007
New Revision: 56467

Modified:
   python/branches/py3k-struni/   (props changed)
   python/branches/py3k-struni/Doc/lib/libwave.tex
   python/branches/py3k-struni/Lib/idlelib/AutoComplete.py
   python/branches/py3k-struni/Lib/idlelib/AutoCompleteWindow.py
   python/branches/py3k-struni/Lib/idlelib/Bindings.py
   python/branches/py3k-struni/Lib/idlelib/CallTips.py
   python/branches/py3k-struni/Lib/idlelib/ClassBrowser.py
   python/branches/py3k-struni/Lib/idlelib/CodeContext.py
   python/branches/py3k-struni/Lib/idlelib/ColorDelegator.py
   python/branches/py3k-struni/Lib/idlelib/Debugger.py
   python/branches/py3k-struni/Lib/idlelib/EditorWindow.py
   python/branches/py3k-struni/Lib/idlelib/FileList.py
   python/branches/py3k-struni/Lib/idlelib/FormatParagraph.py
   python/branches/py3k-struni/Lib/idlelib/GrepDialog.py
   python/branches/py3k-struni/Lib/idlelib/HyperParser.py
   python/branches/py3k-struni/Lib/idlelib/IOBinding.py
   python/branches/py3k-struni/Lib/idlelib/IdleHistory.py
   python/branches/py3k-struni/Lib/idlelib/ObjectBrowser.py
   python/branches/py3k-struni/Lib/idlelib/OutputWindow.py
   python/branches/py3k-struni/Lib/idlelib/ParenMatch.py
   python/branches/py3k-struni/Lib/idlelib/PathBrowser.py
   python/branches/py3k-struni/Lib/idlelib/Percolator.py
   python/branches/py3k-struni/Lib/idlelib/PyShell.py
   python/branches/py3k-struni/Lib/idlelib/RemoteDebugger.py
   python/branches/py3k-struni/Lib/idlelib/RemoteObjectBrowser.py
   python/branches/py3k-struni/Lib/idlelib/ReplaceDialog.py
   python/branches/py3k-struni/Lib/idlelib/ScriptBinding.py
   python/branches/py3k-struni/Lib/idlelib/SearchDialog.py
   python/branches/py3k-struni/Lib/idlelib/StackViewer.py
   python/branches/py3k-struni/Lib/idlelib/TreeWidget.py
   python/branches/py3k-struni/Lib/idlelib/UndoDelegator.py
   python/branches/py3k-struni/Lib/idlelib/ZoomHeight.py
   python/branches/py3k-struni/Lib/idlelib/aboutDialog.py
   python/branches/py3k-struni/Lib/idlelib/configDialog.py
   python/branches/py3k-struni/Lib/idlelib/configHandler.py
   python/branches/py3k-struni/Lib/idlelib/idle.py
   python/branches/py3k-struni/Lib/idlelib/idle.pyw
   python/branches/py3k-struni/Lib/idlelib/macosxSupport.py
   python/branches/py3k-struni/Lib/idlelib/run.py
   python/branches/py3k-struni/Lib/test/test_asyncore.py
   python/branches/py3k-struni/Lib/test/test_unicode.py
   python/branches/py3k-struni/Modules/_codecsmodule.c
Log:
Merged revisions 56443-56466 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/p3yk

................
  r56454 | kurt.kaiser | 2007-07-18 22:26:14 -0700 (Wed, 18 Jul 2007) | 2 lines
  
  Make relative imports explicit for py3k
................
  r56455 | kurt.kaiser | 2007-07-18 23:12:15 -0700 (Wed, 18 Jul 2007) | 2 lines
  
  Was modifying dict during iteration.
................
  r56457 | guido.van.rossum | 2007-07-19 07:33:19 -0700 (Thu, 19 Jul 2007) | 2 lines
  
  Fix failing test.
................
  r56466 | guido.van.rossum | 2007-07-19 20:58:16 -0700 (Thu, 19 Jul 2007) | 35 lines
  
  Merged revisions 56413-56465 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r56439 | georg.brandl | 2007-07-17 23:37:55 -0700 (Tue, 17 Jul 2007) | 2 lines
    
    Use "Unix" as platform name, not "UNIX".
  ........
    r56441 | guido.van.rossum | 2007-07-18 10:19:14 -0700 (Wed, 18 Jul 2007) | 3 lines
    
    SF patch# 1755885 by Kurt Kaiser: show location of Unicode escape errors.
    (Slightly tweaked for style and refcounts.)
  ........
    r56444 | kurt.kaiser | 2007-07-18 12:58:42 -0700 (Wed, 18 Jul 2007) | 2 lines
    
    Fix failing unicode test caused by change to ast.c at r56441
  ........
    r56451 | georg.brandl | 2007-07-18 15:36:53 -0700 (Wed, 18 Jul 2007) | 2 lines
    
    Add description for wave.setcomptype() values
  ........
    r56456 | walter.doerwald | 2007-07-19 06:04:38 -0700 (Thu, 19 Jul 2007) | 3 lines
    
    Document that codecs.lookup() returns a CodecInfo object.
    (fixes SF bug #1754453).
  ........
    r56463 | facundo.batista | 2007-07-19 16:57:38 -0700 (Thu, 19 Jul 2007) | 6 lines
    
    
    Added a select.select call in the test server loop to make sure the
    socket is ready to be read from before attempting a read (this
    prevents an error 10035 on some Windows platforms). [GSoC - Alan
    McIntyre]
  ........
................


Modified: python/branches/py3k-struni/Doc/lib/libwave.tex
==============================================================================
--- python/branches/py3k-struni/Doc/lib/libwave.tex	(original)
+++ python/branches/py3k-struni/Doc/lib/libwave.tex	Fri Jul 20 06:05:57 2007
@@ -142,6 +142,8 @@
 
 \begin{methoddesc}[Wave_write]{setcomptype}{type, name}
 Set the compression type and description.
+At the moment, only compression type \samp{NONE} is supported,
+meaning no compression.
 \end{methoddesc}
 
 \begin{methoddesc}[Wave_write]{setparams}{tuple}

Modified: python/branches/py3k-struni/Lib/idlelib/AutoComplete.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/AutoComplete.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/AutoComplete.py	Fri Jul 20 06:05:57 2007
@@ -7,10 +7,9 @@
 import sys
 import string
 
-from configHandler import idleConf
-
-import AutoCompleteWindow
-from HyperParser import HyperParser
+from .configHandler import idleConf
+from . import AutoCompleteWindow
+from .HyperParser import HyperParser
 
 import __main__
 

Modified: python/branches/py3k-struni/Lib/idlelib/AutoCompleteWindow.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/AutoCompleteWindow.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/AutoCompleteWindow.py	Fri Jul 20 06:05:57 2007
@@ -2,8 +2,8 @@
 An auto-completion window for IDLE, used by the AutoComplete extension
 """
 from Tkinter import *
-from MultiCall import MC_SHIFT
-import AutoComplete
+from .MultiCall import MC_SHIFT
+import idlelib.AutoComplete
 
 HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>"
 HIDE_SEQUENCES = ("<FocusOut>", "<ButtonPress>")

Modified: python/branches/py3k-struni/Lib/idlelib/Bindings.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/Bindings.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/Bindings.py	Fri Jul 20 06:05:57 2007
@@ -9,7 +9,7 @@
 
 """
 import sys
-from configHandler import idleConf
+from .configHandler import idleConf
 
 menudefs = [
  # underscore prefixes character to underscore
@@ -80,7 +80,6 @@
    ]),
 ]
 
-import sys
 if sys.platform == 'darwin' and '.app' in sys.executable:
     # Running as a proper MacOS application bundle. This block restructures
     # the menus a little to make them conform better to the HIG.

Modified: python/branches/py3k-struni/Lib/idlelib/CallTips.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/CallTips.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/CallTips.py	Fri Jul 20 06:05:57 2007
@@ -9,8 +9,8 @@
 import sys
 import types
 
-import CallTipWindow
-from HyperParser import HyperParser
+from . import CallTipWindow
+from .HyperParser import HyperParser
 
 import __main__
 

Modified: python/branches/py3k-struni/Lib/idlelib/ClassBrowser.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/ClassBrowser.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/ClassBrowser.py	Fri Jul 20 06:05:57 2007
@@ -14,10 +14,10 @@
 import sys
 import pyclbr
 
-import PyShell
-from WindowList import ListedToplevel
-from TreeWidget import TreeNode, TreeItem, ScrolledCanvas
-from configHandler import idleConf
+from . import PyShell
+from .WindowList import ListedToplevel
+from .TreeWidget import TreeNode, TreeItem, ScrolledCanvas
+from .configHandler import idleConf
 
 class ClassBrowser:
 

Modified: python/branches/py3k-struni/Lib/idlelib/CodeContext.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/CodeContext.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/CodeContext.py	Fri Jul 20 06:05:57 2007
@@ -11,9 +11,9 @@
 """
 import Tkinter
 from Tkconstants import TOP, LEFT, X, W, SUNKEN
-from configHandler import idleConf
 import re
 from sys import maxint as INFINITY
+from .configHandler import idleConf
 
 BLOCKOPENERS = set(["class", "def", "elif", "else", "except", "finally", "for",
                     "if", "try", "while", "with"])

Modified: python/branches/py3k-struni/Lib/idlelib/ColorDelegator.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/ColorDelegator.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/ColorDelegator.py	Fri Jul 20 06:05:57 2007
@@ -3,8 +3,8 @@
 import keyword
 import __builtin__
 from Tkinter import *
-from Delegator import Delegator
-from configHandler import idleConf
+from .Delegator import Delegator
+from .configHandler import idleConf
 
 DEBUG = False
 
@@ -248,7 +248,7 @@
             self.tag_remove(tag, "1.0", "end")
 
 def main():
-    from Percolator import Percolator
+    from .Percolator import Percolator
     root = Tk()
     root.wm_protocol("WM_DELETE_WINDOW", root.quit)
     text = Text(background="white")

Modified: python/branches/py3k-struni/Lib/idlelib/Debugger.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/Debugger.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/Debugger.py	Fri Jul 20 06:05:57 2007
@@ -2,9 +2,9 @@
 import bdb
 import types
 from Tkinter import *
-from WindowList import ListedToplevel
-from ScrolledList import ScrolledList
-import macosxSupport
+from .WindowList import ListedToplevel
+from .ScrolledList import ScrolledList
+from . import macosxSupport
 
 
 class Idb(bdb.Bdb):

Modified: python/branches/py3k-struni/Lib/idlelib/EditorWindow.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/EditorWindow.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/EditorWindow.py	Fri Jul 20 06:05:57 2007
@@ -6,18 +6,19 @@
 from Tkinter import *
 import tkSimpleDialog
 import tkMessageBox
-from MultiCall import MultiCallCreator
-
+import traceback
 import webbrowser
-import idlever
-import WindowList
-import SearchDialog
-import GrepDialog
-import ReplaceDialog
-import PyParse
-from configHandler import idleConf
-import aboutDialog, textView, configDialog
-import macosxSupport
+
+from .MultiCall import MultiCallCreator
+from . import idlever
+from . import WindowList
+from . import SearchDialog
+from . import GrepDialog
+from . import ReplaceDialog
+from . import PyParse
+from .configHandler import idleConf
+from . import aboutDialog, textView, configDialog
+from . import macosxSupport
 
 # The default tab setting for a Text widget, in average-width characters.
 TK_TABWIDTH_DEFAULT = 8
@@ -40,13 +41,13 @@
     return file, filename, descr
 
 class EditorWindow(object):
-    from Percolator import Percolator
-    from ColorDelegator import ColorDelegator
-    from UndoDelegator import UndoDelegator
-    from IOBinding import IOBinding, filesystemencoding, encoding
-    import Bindings
+    from .Percolator import Percolator
+    from .ColorDelegator import ColorDelegator
+    from .UndoDelegator import UndoDelegator
+    from .IOBinding import IOBinding, filesystemencoding, encoding
+    from . import Bindings
     from Tkinter import Toplevel
-    from MultiStatusBar import MultiStatusBar
+    from .MultiStatusBar import MultiStatusBar
 
     help_url = None
 
@@ -530,11 +531,11 @@
             return None
         head, tail = os.path.split(filename)
         base, ext = os.path.splitext(tail)
-        import ClassBrowser
+        from . import ClassBrowser
         ClassBrowser.ClassBrowser(self.flist, base, [head])
 
     def open_path_browser(self, event=None):
-        import PathBrowser
+        from . import PathBrowser
         PathBrowser.PathBrowser(self.flist)
 
     def gotoline(self, lineno):
@@ -860,7 +861,6 @@
                 self.load_extension(name)
             except:
                 print("Failed to load extension", repr(name))
-                import traceback
                 traceback.print_exc()
 
     def get_standard_extension_names(self):
@@ -871,7 +871,7 @@
             mod = __import__(name, globals(), locals(), [])
         except ImportError:
             print("\nFailed to import extension: ", name)
-            return
+            raise
         cls = getattr(mod, name)
         keydefs = idleConf.GetExtensionBindings(name)
         if hasattr(cls, "menudefs"):

Modified: python/branches/py3k-struni/Lib/idlelib/FileList.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/FileList.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/FileList.py	Fri Jul 20 06:05:57 2007
@@ -5,7 +5,7 @@
 
 class FileList:
 
-    from EditorWindow import EditorWindow  # class variable, may be overridden
+    from .EditorWindow import EditorWindow  # class variable, may be overridden
                                            # e.g. by PyShellFileList
 
     def __init__(self, root):
@@ -106,7 +106,7 @@
 
 
 def _test():
-    from EditorWindow import fixwordbreaks
+    from .EditorWindow import fixwordbreaks
     import sys
     root = Tk()
     fixwordbreaks(root)

Modified: python/branches/py3k-struni/Lib/idlelib/FormatParagraph.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/FormatParagraph.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/FormatParagraph.py	Fri Jul 20 06:05:57 2007
@@ -15,7 +15,7 @@
 # * Fancy comments, like this bulleted list, arent handled :-)
 
 import re
-from configHandler import idleConf
+from .configHandler import idleConf
 
 class FormatParagraph:
 

Modified: python/branches/py3k-struni/Lib/idlelib/GrepDialog.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/GrepDialog.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/GrepDialog.py	Fri Jul 20 06:05:57 2007
@@ -63,7 +63,7 @@
         if not path:
             self.top.bell()
             return
-        from OutputWindow import OutputWindow
+        from .OutputWindow import OutputWindow
         save = sys.stdout
         try:
             sys.stdout = OutputWindow(self.flist)

Modified: python/branches/py3k-struni/Lib/idlelib/HyperParser.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/HyperParser.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/HyperParser.py	Fri Jul 20 06:05:57 2007
@@ -10,7 +10,7 @@
 
 import string
 import keyword
-import PyParse
+from . import PyParse
 
 class HyperParser:
 

Modified: python/branches/py3k-struni/Lib/idlelib/IOBinding.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/IOBinding.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/IOBinding.py	Fri Jul 20 06:05:57 2007
@@ -14,9 +14,9 @@
 import tkMessageBox
 import re
 from Tkinter import *
-from SimpleDialog import SimpleDialog
+from .SimpleDialog import SimpleDialog
 
-from configHandler import idleConf
+from .configHandler import idleConf
 
 try:
     from codecs import BOM_UTF8

Modified: python/branches/py3k-struni/Lib/idlelib/IdleHistory.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/IdleHistory.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/IdleHistory.py	Fri Jul 20 06:05:57 2007
@@ -1,4 +1,4 @@
-from configHandler import idleConf
+from .configHandler import idleConf
 
 class History:
 

Modified: python/branches/py3k-struni/Lib/idlelib/ObjectBrowser.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/ObjectBrowser.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/ObjectBrowser.py	Fri Jul 20 06:05:57 2007
@@ -9,7 +9,7 @@
 # XXX TO DO:
 # - for classes/modules, add "open source" to object browser
 
-from TreeWidget import TreeItem, TreeNode, ScrolledCanvas
+from .TreeWidget import TreeItem, TreeNode, ScrolledCanvas
 
 from repr import Repr
 

Modified: python/branches/py3k-struni/Lib/idlelib/OutputWindow.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/OutputWindow.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/OutputWindow.py	Fri Jul 20 06:05:57 2007
@@ -1,8 +1,8 @@
 from Tkinter import *
-from EditorWindow import EditorWindow
+from .EditorWindow import EditorWindow
 import re
 import tkMessageBox
-import IOBinding
+from . import IOBinding
 
 class OutputWindow(EditorWindow):
 

Modified: python/branches/py3k-struni/Lib/idlelib/ParenMatch.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/ParenMatch.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/ParenMatch.py	Fri Jul 20 06:05:57 2007
@@ -5,8 +5,8 @@
 parentheses, square brackets, and curly braces.
 """
 
-from HyperParser import HyperParser
-from configHandler import idleConf
+from .HyperParser import HyperParser
+from .configHandler import idleConf
 
 _openers = {')':'(',']':'[','}':'{'}
 CHECK_DELAY = 100 # miliseconds

Modified: python/branches/py3k-struni/Lib/idlelib/PathBrowser.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/PathBrowser.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/PathBrowser.py	Fri Jul 20 06:05:57 2007
@@ -2,8 +2,8 @@
 import sys
 import imp
 
-from TreeWidget import TreeItem
-from ClassBrowser import ClassBrowser, ModuleBrowserTreeItem
+from .TreeWidget import TreeItem
+from .ClassBrowser import ClassBrowser, ModuleBrowserTreeItem
 
 class PathBrowser(ClassBrowser):
 
@@ -86,7 +86,7 @@
         return sorted
 
 def main():
-    import PyShell
+    from . import PyShell
     PathBrowser(PyShell.flist)
     if sys.stdin is sys.__stdin__:
         mainloop()

Modified: python/branches/py3k-struni/Lib/idlelib/Percolator.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/Percolator.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/Percolator.py	Fri Jul 20 06:05:57 2007
@@ -1,5 +1,5 @@
-from WidgetRedirector import WidgetRedirector
-from Delegator import Delegator
+from .WidgetRedirector import WidgetRedirector
+from .Delegator import Delegator
 
 class Percolator:
 

Modified: python/branches/py3k-struni/Lib/idlelib/PyShell.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/PyShell.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/PyShell.py	Fri Jul 20 06:05:57 2007
@@ -11,7 +11,6 @@
 import threading
 import traceback
 import types
-import macosxSupport
 
 import linecache
 from code import InteractiveInterpreter
@@ -24,17 +23,17 @@
     sys.exit(1)
 import tkMessageBox
 
-from EditorWindow import EditorWindow, fixwordbreaks
-from FileList import FileList
-from ColorDelegator import ColorDelegator
-from UndoDelegator import UndoDelegator
-from OutputWindow import OutputWindow
-from configHandler import idleConf
-import idlever
-
-import rpc
-import Debugger
-import RemoteDebugger
+from .EditorWindow import EditorWindow, fixwordbreaks
+from .FileList import FileList
+from .ColorDelegator import ColorDelegator
+from .UndoDelegator import UndoDelegator
+from .OutputWindow import OutputWindow
+from .configHandler import idleConf
+from . import idlever
+from . import rpc
+from . import Debugger
+from . import RemoteDebugger
+from . import macosxSupport
 
 IDENTCHARS = string.ascii_letters + string.digits + "_"
 LOCALHOST = '127.0.0.1'
@@ -542,13 +541,13 @@
         return
 
     def remote_stack_viewer(self):
-        import RemoteObjectBrowser
+        from . import RemoteObjectBrowser
         oid = self.rpcclt.remotequeue("exec", "stackviewer", ("flist",), {})
         if oid is None:
             self.tkconsole.root.bell()
             return
         item = RemoteObjectBrowser.StubObjectTreeItem(self.rpcclt, oid)
-        from TreeWidget import ScrolledCanvas, TreeNode
+        from .TreeWidget import ScrolledCanvas, TreeNode
         top = Toplevel(self.tkconsole.root)
         theme = idleConf.GetOption('main','Theme','name')
         background = idleConf.GetHighlight(theme, 'normal')['background']
@@ -588,7 +587,7 @@
         self.save_warnings_filters = warnings.filters[:]
         warnings.filterwarnings(action="error", category=SyntaxWarning)
         if isinstance(source, types.UnicodeType):
-            import IOBinding
+            from . import IOBinding
             try:
                 source = source.encode(IOBinding.encoding)
             except UnicodeError:
@@ -677,7 +676,7 @@
 
     def checklinecache(self):
         c = linecache.cache
-        for key in c.keys():
+        for key in list(c.keys()):
             if key[:1] + key[-1:] != "<>":
                 del c[key]
 
@@ -798,7 +797,7 @@
 
 
     # New classes
-    from IdleHistory import History
+    from .IdleHistory import History
 
     def __init__(self, flist=None):
         if use_subprocess:
@@ -837,7 +836,7 @@
         self.save_stdout = sys.stdout
         self.save_stderr = sys.stderr
         self.save_stdin = sys.stdin
-        import IOBinding
+        from . import IOBinding
         self.stdout = PseudoFile(self, "stdout", IOBinding.encoding)
         self.stderr = PseudoFile(self, "stderr", IOBinding.encoding)
         self.console = PseudoFile(self, "console", IOBinding.encoding)
@@ -1007,7 +1006,7 @@
         if len(line) == 0:  # may be EOF if we quit our mainloop with Ctrl-C
             line = "\n"
         if isinstance(line, str):
-            import IOBinding
+            from . import IOBinding
             try:
                 line = line.encode(IOBinding.encoding)
             except UnicodeError:
@@ -1195,7 +1194,7 @@
                 "(sys.last_traceback is not defined)",
                 master=self.text)
             return
-        from StackViewer import StackBrowser
+        from .StackViewer import StackBrowser
         sv = StackBrowser(self.root, self.flist)
 
     def view_restart_mark(self, event=None):

Modified: python/branches/py3k-struni/Lib/idlelib/RemoteDebugger.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/RemoteDebugger.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/RemoteDebugger.py	Fri Jul 20 06:05:57 2007
@@ -22,8 +22,8 @@
 
 import sys
 import types
-import rpc
-import Debugger
+from . import rpc
+from . import Debugger
 
 debugging = 0
 

Modified: python/branches/py3k-struni/Lib/idlelib/RemoteObjectBrowser.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/RemoteObjectBrowser.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/RemoteObjectBrowser.py	Fri Jul 20 06:05:57 2007
@@ -1,4 +1,4 @@
-import rpc
+from . import rpc
 
 def remote_object_tree_item(item):
     wrapper = WrappedObjectTreeItem(item)

Modified: python/branches/py3k-struni/Lib/idlelib/ReplaceDialog.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/ReplaceDialog.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/ReplaceDialog.py	Fri Jul 20 06:05:57 2007
@@ -1,6 +1,7 @@
 from Tkinter import *
-import SearchEngine
-from SearchDialogBase import SearchDialogBase
+
+from . import SearchEngine
+from .SearchDialogBase import SearchDialogBase
 
 def replace(text):
     root = text._root()

Modified: python/branches/py3k-struni/Lib/idlelib/ScriptBinding.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/ScriptBinding.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/ScriptBinding.py	Fri Jul 20 06:05:57 2007
@@ -23,9 +23,9 @@
 import tabnanny
 import tokenize
 import tkMessageBox
-import PyShell
+from . import PyShell
 
-from configHandler import idleConf
+from .configHandler import idleConf
 
 IDENTCHARS = string.ascii_letters + string.digits + "_"
 

Modified: python/branches/py3k-struni/Lib/idlelib/SearchDialog.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/SearchDialog.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/SearchDialog.py	Fri Jul 20 06:05:57 2007
@@ -1,7 +1,7 @@
 from Tkinter import *
-import SearchEngine
-from SearchDialogBase import SearchDialogBase
 
+from . import SearchEngine
+from .SearchDialogBase import SearchDialogBase
 
 def _setup(text):
     root = text._root()

Modified: python/branches/py3k-struni/Lib/idlelib/StackViewer.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/StackViewer.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/StackViewer.py	Fri Jul 20 06:05:57 2007
@@ -2,8 +2,8 @@
 import sys
 import linecache
 
-from TreeWidget import TreeNode, TreeItem, ScrolledCanvas
-from ObjectBrowser import ObjectTreeItem, make_objecttreeitem
+from .TreeWidget import TreeNode, TreeItem, ScrolledCanvas
+from .ObjectBrowser import ObjectTreeItem, make_objecttreeitem
 
 def StackBrowser(root, flist=None, tb=None, top=None):
     if top is None:

Modified: python/branches/py3k-struni/Lib/idlelib/TreeWidget.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/TreeWidget.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/TreeWidget.py	Fri Jul 20 06:05:57 2007
@@ -19,8 +19,8 @@
 from Tkinter import *
 import imp
 
-import ZoomHeight
-from configHandler import idleConf
+from . import ZoomHeight
+from .configHandler import idleConf
 
 ICONDIR = "Icons"
 
@@ -453,7 +453,7 @@
 # Testing functions
 
 def test():
-    import PyShell
+    from . import PyShell
     root = Toplevel(PyShell.root)
     root.configure(bd=0, bg="yellow")
     root.focus_set()

Modified: python/branches/py3k-struni/Lib/idlelib/UndoDelegator.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/UndoDelegator.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/UndoDelegator.py	Fri Jul 20 06:05:57 2007
@@ -1,7 +1,8 @@
 import sys
 import string
 from Tkinter import *
-from Delegator import Delegator
+
+from .Delegator import Delegator
 
 #$ event <<redo>>
 #$ win <Control-y>
@@ -337,7 +338,7 @@
         return self.depth
 
 def main():
-    from Percolator import Percolator
+    from .Percolator import Percolator
     root = Tk()
     root.wm_protocol("WM_DELETE_WINDOW", root.quit)
     text = Text()

Modified: python/branches/py3k-struni/Lib/idlelib/ZoomHeight.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/ZoomHeight.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/ZoomHeight.py	Fri Jul 20 06:05:57 2007
@@ -2,7 +2,8 @@
 
 import re
 import sys
-import macosxSupport
+
+from . import macosxSupport
 
 class ZoomHeight:
 

Modified: python/branches/py3k-struni/Lib/idlelib/aboutDialog.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/aboutDialog.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/aboutDialog.py	Fri Jul 20 06:05:57 2007
@@ -4,8 +4,9 @@
 
 from Tkinter import *
 import os
-import textView
-import idlever
+
+from . import textView
+from . import idlever
 
 class AboutDialog(Toplevel):
     """Modal about dialog for idle
@@ -157,7 +158,7 @@
     # test the dialog
     root = Tk()
     def run():
-        import aboutDialog
+        from . import aboutDialog
         aboutDialog.AboutDialog(root, 'About')
     Button(root, text='Dialog', command=run).pack()
     root.mainloop()

Modified: python/branches/py3k-struni/Lib/idlelib/configDialog.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/configDialog.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/configDialog.py	Fri Jul 20 06:05:57 2007
@@ -13,12 +13,12 @@
 import tkMessageBox, tkColorChooser, tkFont
 import copy
 
-from configHandler import idleConf
-from dynOptionMenuWidget import DynOptionMenu
-from tabpage import TabPageSet
-from keybindingDialog import GetKeysDialog
-from configSectionNameDialog import GetCfgSectionNameDialog
-from configHelpSourceEdit import GetHelpSourceDialog
+from .configHandler import idleConf
+from .dynOptionMenuWidget import DynOptionMenu
+from .tabpage import TabPageSet
+from .keybindingDialog import GetKeysDialog
+from .configSectionNameDialog import GetCfgSectionNameDialog
+from .configHelpSourceEdit import GetHelpSourceDialog
 
 class ConfigDialog(Toplevel):
 

Modified: python/branches/py3k-struni/Lib/idlelib/configHandler.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/configHandler.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/configHandler.py	Fri Jul 20 06:05:57 2007
@@ -19,8 +19,9 @@
 """
 import os
 import sys
-import macosxSupport
-from ConfigParser import ConfigParser, NoOptionError, NoSectionError
+
+from . import macosxSupport
+from .ConfigParser import ConfigParser, NoOptionError, NoSectionError
 
 class InvalidConfigType(Exception): pass
 class InvalidConfigSet(Exception): pass

Modified: python/branches/py3k-struni/Lib/idlelib/idle.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/idle.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/idle.py	Fri Jul 20 06:05:57 2007
@@ -3,7 +3,7 @@
 except ImportError:
     # IDLE is not installed, but maybe PyShell is on sys.path:
     try:
-        import PyShell
+        from . import PyShell
     except ImportError:
         raise
     else:

Modified: python/branches/py3k-struni/Lib/idlelib/idle.pyw
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/idle.pyw	(original)
+++ python/branches/py3k-struni/Lib/idlelib/idle.pyw	Fri Jul 20 06:05:57 2007
@@ -3,7 +3,7 @@
 except ImportError:
     # IDLE is not installed, but maybe PyShell is on sys.path:
     try:
-        import PyShell
+        from . import PyShell
     except ImportError:
         raise
     else:

Modified: python/branches/py3k-struni/Lib/idlelib/macosxSupport.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/macosxSupport.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/macosxSupport.py	Fri Jul 20 06:05:57 2007
@@ -47,10 +47,10 @@
     # Due to a (mis-)feature of TkAqua the user will also see an empty Help
     # menu.
     from Tkinter import Menu, Text, Text
-    from EditorWindow import prepstr, get_accelerator
-    import Bindings
-    import WindowList
-    from MultiCall import MultiCallCreator
+    from .EditorWindow import prepstr, get_accelerator
+    from . import Bindings
+    from . import WindowList
+    from .MultiCall import MultiCallCreator
 
     menubar = Menu(root)
     root.configure(menu=menubar)
@@ -73,11 +73,11 @@
     menubar.add_cascade(label='IDLE', menu=menu)
 
     def about_dialog(event=None):
-        import aboutDialog
+        from . import aboutDialog
         aboutDialog.AboutDialog(root, 'About IDLE')
 
     def config_dialog(event=None):
-        import configDialog
+        from . import configDialog
         configDialog.ConfigDialog(root, 'Settings')
 
 

Modified: python/branches/py3k-struni/Lib/idlelib/run.py
==============================================================================
--- python/branches/py3k-struni/Lib/idlelib/run.py	(original)
+++ python/branches/py3k-struni/Lib/idlelib/run.py	Fri Jul 20 06:05:57 2007
@@ -8,13 +8,13 @@
 import threading
 import Queue
 
-import CallTips
-import AutoComplete
+from . import CallTips
+from . import AutoComplete
 
-import RemoteDebugger
-import RemoteObjectBrowser
-import StackViewer
-import rpc
+from . import RemoteDebugger
+from . import RemoteObjectBrowser
+from . import StackViewer
+from . import rpc
 
 import __main__
 
@@ -243,7 +243,7 @@
         sys.stdin = self.console = self.get_remote_proxy("stdin")
         sys.stdout = self.get_remote_proxy("stdout")
         sys.stderr = self.get_remote_proxy("stderr")
-        import IOBinding
+        from . import IOBinding
         sys.stdin.encoding = sys.stdout.encoding = \
                              sys.stderr.encoding = IOBinding.encoding
         self.interp = self.get_remote_proxy("interp")

Modified: python/branches/py3k-struni/Lib/test/test_asyncore.py
==============================================================================
--- python/branches/py3k-struni/Lib/test/test_asyncore.py	(original)
+++ python/branches/py3k-struni/Lib/test/test_asyncore.py	Fri Jul 20 06:05:57 2007
@@ -65,12 +65,14 @@
     else:
         n = 200
         while n > 0:
-            data = conn.recv(10)
-            assert isinstance(data, bytes)
-            # keep everything except for the newline terminator
-            buf.write(data.replace(b'\n', b''))
-            if b'\n' in data:
-                break
+            r, w, e = select.select([conn], [], [])
+            if r:
+                data = conn.recv(10)
+                assert isinstance(data, bytes)
+                # keep everything except for the newline terminator
+                buf.write(data.replace(b'\n', b''))
+                if b'\n' in data:
+                    break
             n -= 1
             time.sleep(0.01)
 

Modified: python/branches/py3k-struni/Lib/test/test_unicode.py
==============================================================================
--- python/branches/py3k-struni/Lib/test/test_unicode.py	(original)
+++ python/branches/py3k-struni/Lib/test/test_unicode.py	Fri Jul 20 06:05:57 2007
@@ -55,10 +55,9 @@
     def test_literals(self):
         self.assertEqual('\xff', '\u00ff')
         self.assertEqual('\uffff', '\U0000ffff')
-        self.assertRaises((UnicodeError, SyntaxError), eval, '\'\\Ufffffffe\'')
-        self.assertRaises((UnicodeError, SyntaxError), eval, '\'\\Uffffffff\'')
-        self.assertRaises((UnicodeError, SyntaxError),
-                          eval, '\'\\U%08x\'' % 0x110000)
+        self.assertRaises(SyntaxError, eval, '\'\\Ufffffffe\'')
+        self.assertRaises(SyntaxError, eval, '\'\\Uffffffff\'')
+        self.assertRaises(SyntaxError, eval, '\'\\U%08x\'' % 0x110000)
 
     def test_repr(self):
         if not sys.platform.startswith('java'):

Modified: python/branches/py3k-struni/Modules/_codecsmodule.c
==============================================================================
--- python/branches/py3k-struni/Modules/_codecsmodule.c	(original)
+++ python/branches/py3k-struni/Modules/_codecsmodule.c	Fri Jul 20 06:05:57 2007
@@ -10,7 +10,7 @@
 
      register(search_function) -> None
 
-     lookup(encoding) -> (encoder, decoder, stream_reader, stream_writer)
+     lookup(encoding) -> CodecInfo object
 
    The builtin Unicode codecs use the following interface:
 
@@ -45,7 +45,8 @@
 \n\
 Register a codec search function. Search functions are expected to take\n\
 one argument, the encoding name in all lower case letters, and return\n\
-a tuple of functions (encoder, decoder, stream_reader, stream_writer).");
+a tuple of functions (encoder, decoder, stream_reader, stream_writer)\n\
+(or a CodecInfo object).");
 
 static
 PyObject *codec_register(PyObject *self, PyObject *search_function)
@@ -57,10 +58,10 @@
 }
 
 PyDoc_STRVAR(lookup__doc__,
-"lookup(encoding) -> (encoder, decoder, stream_reader, stream_writer)\n\
+"lookup(encoding) -> CodecInfo\n\
 \n\
 Looks up a codec tuple in the Python codec registry and returns\n\
-a tuple of functions.");
+a tuple of function (or a CodecInfo object).");
 
 static
 PyObject *codec_lookup(PyObject *self, PyObject *args)


More information about the Python-3000-checkins mailing list