Skip to content

Commit 624ca0e

Browse files
author
alexandre.vassalotti
committed
Merged revisions 63066-63076,63079,63081-63085,63087-63097,63099,63101-63104 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r63066 | georg.brandl | 2008-05-11 10:56:04 -0400 (Sun, 11 May 2008) | 2 lines #2709 followup: better description of Tk's pros and cons. ........ r63067 | georg.brandl | 2008-05-11 11:05:13 -0400 (Sun, 11 May 2008) | 2 lines #1326: document and test zipimporter.archive and zipimporter.prefix. ........ r63068 | georg.brandl | 2008-05-11 11:07:39 -0400 (Sun, 11 May 2008) | 2 lines #2816: clarify error messages for EOF while scanning strings. ........ r63069 | georg.brandl | 2008-05-11 11:17:41 -0400 (Sun, 11 May 2008) | 3 lines #2787: Flush stdout after writing test name, helpful when running hanging or long-running tests. Patch by Adam Olsen. ........ r63070 | georg.brandl | 2008-05-11 11:20:16 -0400 (Sun, 11 May 2008) | 3 lines #2803: fix wrong invocation of heappush in seldom-reached code. Thanks to Matt Harden. ........ r63073 | benjamin.peterson | 2008-05-11 12:38:07 -0400 (Sun, 11 May 2008) | 2 lines broaden .bzrignore ........ r63076 | andrew.kuchling | 2008-05-11 15:15:52 -0400 (Sun, 11 May 2008) | 1 line Add message to test assertion ........ r63083 | andrew.kuchling | 2008-05-11 16:08:33 -0400 (Sun, 11 May 2008) | 1 line Try setting HOME env.var to fix test on Win32 ........ r63092 | georg.brandl | 2008-05-11 16:53:55 -0400 (Sun, 11 May 2008) | 2 lines #2809 followup: even better split docstring. ........ r63094 | georg.brandl | 2008-05-11 17:03:42 -0400 (Sun, 11 May 2008) | 4 lines - #2250: Exceptions raised during evaluation of names in rlcompleter's ``Completer.complete()`` method are now caught and ignored. ........ r63095 | georg.brandl | 2008-05-11 17:16:37 -0400 (Sun, 11 May 2008) | 2 lines Clarify os.strerror()s exception behavior. ........ r63097 | georg.brandl | 2008-05-11 17:34:10 -0400 (Sun, 11 May 2008) | 2 lines #2535: remove duplicated method. ........ r63104 | alexandre.vassalotti | 2008-05-11 19:04:27 -0400 (Sun, 11 May 2008) | 2 lines Moved the Queue module stub in lib-old. ........ git-svn-id: http://svn.python.org/projects/python/branches/py3k@63340 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 01b0ac1 commit 624ca0e

17 files changed

Lines changed: 92 additions & 41 deletions

File tree

.bzrignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,5 @@ Modules/Setup.local
4141
Modules/config.c
4242
Parser/pgen
4343
Lib/plat-mac/errors.rsrc.df.rsrc
44-
Lib/lib2to3/Grammar2.6.0.alpha.1.pickle
45-
Lib/lib2to3/Grammar2.6.0.alpha.2.pickle
46-
Lib/lib2to3/PatternGrammar2.6.0.alpha.1.pickle
47-
Lib/lib2to3/PatternGrammar2.6.0.alpha.2.pickle
44+
Lib/lib2to3/Grammar*.pickle
45+
Lib/lib2to3/PatternGrammar*.pickle

Doc/library/os.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ process and user.
274274
.. function:: strerror(code)
275275

276276
Return the error message corresponding to the error code in *code*.
277-
Availability: Unix, Windows.
277+
On platforms where :cfunc:`strerror` returns ``NULL`` when given an unknown
278+
error number, :exc:`ValueError` is raised. Availability: Unix, Windows.
278279

279280

280281
.. function:: umask(mask)

Doc/library/othergui.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ also available for Python:
6969
<http://www.amazon.com/exec/obidos/ASIN/1932394621>`_, by Noel Rappin and
7070
Robin Dunn.
7171

72-
PyGTK, PyQt, and wxPython, all have a modern look and feel and far more
73-
widgets and better documentation than Tkinter. In addition,
74-
there are many other GUI toolkits for Python, both cross-platform, and
75-
platform-specific. See the `GUI Programming
72+
PyGTK, PyQt, and wxPython, all have a modern look and feel and more
73+
widgets than Tkinter. In addition, there are many other GUI toolkits for
74+
Python, both cross-platform, and platform-specific. See the `GUI Programming
7675
<http://wiki.python.org/moin/GuiProgramming>`_ page in the Python Wiki for a
7776
much more complete list, and also for links to documents where the
7877
different GUI toolkits are compared.

Doc/library/rlcompleter.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,6 @@ Completer objects have the following method:
6161
If called for a dotted name, it will try to evaluate anything without obvious
6262
side-effects (functions will not be evaluated, but it can generate calls to
6363
:meth:`__getattr__`) up to the last part, and find matches for the rest via the
64-
:func:`dir` function.
64+
:func:`dir` function. Any exception raised during the evaluation of the
65+
expression is caught, silenced and :const:`None` is returned.
6566

Doc/library/tk.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ classes. In addition, the internal module :mod:`_tkinter` provides a threadsafe
2222
mechanism which allows Python and Tcl to interact.
2323

2424
:mod:`Tkinter`'s chief virtues are that it is fast, and that it usually comes
25-
bundled with Python. Although it has been used to create some very good
26-
applications, including IDLE, its standard documentation is weak (but there
27-
are some good books and tutorials), and it has an outdated look and
28-
feel. For more modern, better documented, and much more extensive GUI
29-
libraries, see the :ref:`other-gui-packages` section.
25+
bundled with Python. Although its standard documentation is weak, good
26+
material is available, which includes: references, tutorials, a book and
27+
others. :mod:`Tkinter` is also famous for having an outdated look and feel,
28+
which has been vastly improved in Tk 8.5. Nevertheless, there are many other
29+
GUI libraries that you could be interested in. For more information about
30+
alternatives, see the :ref:`other-gui-packages` section.
3031

3132
.. toctree::
3233

Doc/library/zipimport.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,14 @@ zipimporter Objects
5959

6060
.. class:: zipimporter(archivepath)
6161

62-
Create a new zipimporter instance. *archivepath* must be a path to a ZIP file.
62+
Create a new zipimporter instance. *archivepath* must be a path to a ZIP
63+
file, or to a specific path within a ZIP file. For example, an *archivepath*
64+
of :file:`foo/bar.zip/lib` will look for modules in the :file:`lib` directory
65+
inside the ZIP file :file:`foo/bar.zip` (provided that it exists).
66+
6367
:exc:`ZipImportError` is raised if *archivepath* doesn't point to a valid ZIP
6468
archive.
6569

66-
*archivepath* can also contain a path within the ZIP file -- the importer
67-
object will then look under that path instead of the ZIP file root. For
68-
example, an *archivepath* of :file:`foo/bar.zip/lib` will look for modules
69-
in the :file:`lib` directory inside the ZIP file :file:`foo/bar.zip`
70-
(provided that it exists).
71-
72-
7370
.. method:: find_module(fullname[, path])
7471

7572
Search for a module specified by *fullname*. *fullname* must be the fully
@@ -114,13 +111,19 @@ zipimporter Objects
114111

115112
.. attribute:: archive
116113

117-
The file name of the importer's associated ZIP file.
114+
The file name of the importer's associated ZIP file, without a possible
115+
subpath.
118116

119117

120118
.. attribute:: prefix
121119

122-
The path within the ZIP file where modules are searched; see
123-
:class:`zipimporter` for details.
120+
The subpath within the ZIP file where modules are searched. This is the
121+
empty string for zipimporter objects which point to the root of the ZIP
122+
file.
123+
124+
The :attr:`archive` and :attr:`prefix` attributes, when combined with a
125+
slash, equal the original *archivepath* argument given to the
126+
:class:`zipimporter` constructor.
124127

125128

126129
.. _zipimport-examples:

Lib/distutils/tests/test_dist.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,10 @@ def test_custom_pydistutils(self):
213213
# win32-style
214214
if sys.platform == 'win32':
215215
# home drive should be found
216-
os.environ['HOMEPATH'] = curdir
216+
os.environ['HOME'] = curdir
217217
files = dist.find_config_files()
218-
self.assert_(user_filename in files)
218+
self.assert_(user_filename in files,
219+
'%r not found in %r' % (user_filename, files))
219220
finally:
220221
for key, value in old.items():
221222
if value is None:

Lib/lib-tk/Tkinter.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,6 @@ def grab_status(self):
589589
status = self.tk.call('grab', 'status', self._w)
590590
if status == 'none': status = None
591591
return status
592-
def lower(self, belowThis=None):
593-
"""Lower this widget in the stacking order."""
594-
self.tk.call('lower', self._w, belowThis)
595592
def option_add(self, pattern, value, priority = None):
596593
"""Set a VALUE (second parameter) for an option
597594
PATTERN (first parameter).

Lib/rlcompleter.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ def attr_matches(self, text):
121121
if not m:
122122
return []
123123
expr, attr = m.group(1, 3)
124-
object = eval(expr, self.namespace)
124+
try:
125+
object = eval(expr, self.namespace)
126+
except Exception:
127+
return []
125128
words = dir(object)
126129
if hasattr(object,'__class__'):
127130
words.append('__class__')

Lib/sched.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def run(self):
117117
action(*argument)
118118
delayfunc(0) # Let other threads run
119119
else:
120-
heapq.heappush(event)
120+
heapq.heappush(q, event)
121121

122122
@property
123123
def queue(self):

0 commit comments

Comments
 (0)