Merged revisions 72558,72745,72750,72876,73042,73045-73048,73069,73089,73163,73186,73213,73215,73217,73257-73258,73260 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72558 | benjamin.peterson | 2009-05-11 01:52:09 +0200 (Mo, 11 Mai 2009) | 1 line
sys.setdefaultencoding() strikes me as a bad example
........
r72745 | benjamin.peterson | 2009-05-17 16:16:29 +0200 (So, 17 Mai 2009) | 1 line
ignore .rst files in sphinx its self
........
r72750 | benjamin.peterson | 2009-05-17 18:59:27 +0200 (So, 17 Mai 2009) | 1 line
chop off slash
........
r72876 | benjamin.peterson | 2009-05-23 22:59:09 +0200 (Sa, 23 Mai 2009) | 1 line
remove mention of old ctypes version
........
r73042 | benjamin.peterson | 2009-05-30 05:10:52 +0200 (Sa, 30 Mai 2009) | 1 line
no fdatasync on macos
........
r73045 | georg.brandl | 2009-05-30 09:26:04 +0200 (Sa, 30 Mai 2009) | 1 line
#6146: fix markup bug.
........
r73046 | georg.brandl | 2009-05-30 09:31:25 +0200 (Sa, 30 Mai 2009) | 1 line
Use preferred form of raising exceptions.
........
r73047 | georg.brandl | 2009-05-30 12:33:23 +0200 (Sa, 30 Mai 2009) | 1 line
Fix some more small markup problems.
........
r73048 | georg.brandl | 2009-05-30 12:34:25 +0200 (Sa, 30 Mai 2009) | 1 line
Fix markup problem.
........
r73069 | benjamin.peterson | 2009-05-31 02:42:42 +0200 (So, 31 Mai 2009) | 1 line
fix signature
........
r73089 | andrew.kuchling | 2009-06-01 02:14:19 +0200 (Mo, 01 Jun 2009) | 1 line
The class for regexes isn't called RegexObject any more; correct the text
........
r73163 | georg.brandl | 2009-06-03 09:25:35 +0200 (Mi, 03 Jun 2009) | 1 line
Use the preferred form of raise statements in the docs.
........
r73186 | georg.brandl | 2009-06-03 23:21:09 +0200 (Mi, 03 Jun 2009) | 1 line
#6174: fix indentation in code example.
........
r73213 | georg.brandl | 2009-06-04 12:15:57 +0200 (Do, 04 Jun 2009) | 1 line
#5967: note that the C slicing APIs do not support negative indices.
........
r73215 | georg.brandl | 2009-06-04 12:22:31 +0200 (Do, 04 Jun 2009) | 1 line
#6176: fix man page section for flock(2).
........
r73217 | georg.brandl | 2009-06-04 12:27:21 +0200 (Do, 04 Jun 2009) | 1 line
#6175: document that inet_aton supports alternate input formats with less than three dots.
........
r73257 | georg.brandl | 2009-06-06 19:50:05 +0200 (Sa, 06 Jun 2009) | 1 line
#6211: elaborate a bit on ways to call the function.
........
r73258 | georg.brandl | 2009-06-06 19:51:31 +0200 (Sa, 06 Jun 2009) | 1 line
#6204: use a real reference instead of "see later".
........
r73260 | georg.brandl | 2009-06-06 20:21:58 +0200 (Sa, 06 Jun 2009) | 1 line
#6224: s/JPython/Jython/, and remove one link to a module nine years old.
........
diff --git a/Doc/library/crypt.rst b/Doc/library/crypt.rst
index 2f037c7..91464ef 100644
--- a/Doc/library/crypt.rst
+++ b/Doc/library/crypt.rst
@@ -52,7 +52,8 @@
cryptedpasswd = pwd.getpwnam(username)[1]
if cryptedpasswd:
if cryptedpasswd == 'x' or cryptedpasswd == '*':
- raise "Sorry, currently no support for shadow passwords"
+ raise NotImplementedError(
+ "Sorry, currently no support for shadow passwords")
cleartext = getpass.getpass()
return crypt.crypt(cleartext, cryptedpasswd) == cryptedpasswd
else:
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index 9a1acd6..eca14d6 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -1210,8 +1210,7 @@
Variable-sized data types
^^^^^^^^^^^^^^^^^^^^^^^^^
-``ctypes`` provides some support for variable-sized arrays and structures (this
-was added in version 0.9.9.7).
+``ctypes`` provides some support for variable-sized arrays and structures.
The ``resize`` function can be used to resize the memory buffer of an existing
ctypes object. The function takes the object as first argument, and the
diff --git a/Doc/library/easydialogs.rst b/Doc/library/easydialogs.rst
index f672af6..2cea693 100644
--- a/Doc/library/easydialogs.rst
+++ b/Doc/library/easydialogs.rst
@@ -100,7 +100,7 @@
+----------------------+------------------------------------------+
*commandlist* is a list of items of the form *cmdstr* or ``(cmdstr, descr)``,
- where *descr* is as above. The *cmdstr*s will appear in a popup menu. When
+ where *descr* is as above. The *cmdstr*\ s will appear in a popup menu. When
chosen, the text of *cmdstr* will be appended to the command line as is, except
that a trailing ``':'`` or ``'='`` (if present) will be trimmed off.
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index 9116bda..4679e70 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -84,9 +84,9 @@
.. exception:: LookupError
- The base class for the exceptions that are raised when a key or index used on a
- mapping or sequence is invalid: :exc:`IndexError`, :exc:`KeyError`. This can be
- raised directly by :func:`sys.setdefaultencoding`.
+ The base class for the exceptions that are raised when a key or index used on
+ a mapping or sequence is invalid: :exc:`IndexError`, :exc:`KeyError`. This
+ can be raised directly by :func:`codecs.lookup`.
.. exception:: EnvironmentError
diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst
index b3b977f..fa0b3cb 100644
--- a/Doc/library/fcntl.rst
+++ b/Doc/library/fcntl.rst
@@ -96,7 +96,7 @@
Perform the lock operation *op* on file descriptor *fd* (file objects providing
a :meth:`fileno` method are accepted as well). See the Unix manual
- :manpage:`flock(3)` for details. (On some systems, this function is emulated
+ :manpage:`flock(2)` for details. (On some systems, this function is emulated
using :cfunc:`fcntl`.)
diff --git a/Doc/library/imputil.rst b/Doc/library/imputil.rst
index 09a41f6..86089d2 100644
--- a/Doc/library/imputil.rst
+++ b/Doc/library/imputil.rst
@@ -160,7 +160,7 @@
parent = None
q = import_module(head, qname, parent)
if q: return q, tail
- raise ImportError, "No module named " + qname
+ raise ImportError("No module named " + qname)
def load_tail(q, tail):
m = q
@@ -171,7 +171,7 @@
mname = "%s.%s" % (m.__name__, head)
m = import_module(head, mname, m)
if not m:
- raise ImportError, "No module named " + mname
+ raise ImportError("No module named " + mname)
return m
def ensure_fromlist(m, fromlist, recursive=0):
@@ -189,7 +189,7 @@
subname = "%s.%s" % (m.__name__, sub)
submod = import_module(sub, subname, m)
if not submod:
- raise ImportError, "No module named " + subname
+ raise ImportError("No module named " + subname)
def import_module(partname, fqname, parent):
try:
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index fa179df..24c2191 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -528,6 +528,9 @@
Force write of file with filedescriptor *fd* to disk. Does not force update of
metadata. Availability: Unix.
+ .. note::
+ This function is not available on MacOS.
+
.. function:: fpathconf(fd, name)
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst
index cd90c38..9900278 100644
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -169,7 +169,7 @@
.. function:: java_ver(release='', vendor='', vminfo=('','',''), osinfo=('','',''))
- Version interface for JPython.
+ Version interface for Jython.
Returns a tuple ``(release, vendor, vminfo, osinfo)`` with *vminfo* being a
tuple ``(vm_name, vm_release, vm_vendor)`` and *osinfo* being a tuple
diff --git a/Doc/library/rexec.rst b/Doc/library/rexec.rst
index 7736904..2ce612a 100644
--- a/Doc/library/rexec.rst
+++ b/Doc/library/rexec.rst
@@ -272,11 +272,11 @@
elif mode in ('w', 'wb', 'a', 'ab'):
# check filename : must begin with /tmp/
if file[:5]!='/tmp/':
- raise IOError, "can't write outside /tmp"
+ raise IOError("can't write outside /tmp")
elif (string.find(file, '/../') >= 0 or
file[:3] == '../' or file[-3:] == '/..'):
- raise IOError, "'..' in filename forbidden"
- else: raise IOError, "Illegal open() mode"
+ raise IOError("'..' in filename forbidden")
+ else: raise IOError("Illegal open() mode")
return open(file, mode, buf)
Notice that the above code will occasionally forbid a perfectly valid filename;
diff --git a/Doc/library/rlcompleter.rst b/Doc/library/rlcompleter.rst
index 50f1afd..85a9d79 100644
--- a/Doc/library/rlcompleter.rst
+++ b/Doc/library/rlcompleter.rst
@@ -52,7 +52,7 @@
.. method:: Completer.complete(text, state)
- Return the *state*th completion for *text*.
+ Return the *state*\ th completion for *text*.
If called for *text* that doesn't include a period character (``'.'``), it will
complete from names currently defined in :mod:`__main__`, :mod:`__builtin__` and
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
index e09b646..ad3ab57 100644
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -216,7 +216,7 @@
except OSError, why:
errors.extend((src, dst, str(why)))
if errors:
- raise Error, errors
+ raise Error(errors)
Another example that uses the :func:`ignore_patterns` helper::
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst
index 3793a89..c039eee 100644
--- a/Doc/library/signal.rst
+++ b/Doc/library/signal.rst
@@ -232,7 +232,7 @@
def handler(signum, frame):
print 'Signal handler called with signal', signum
- raise IOError, "Couldn't open device!"
+ raise IOError("Couldn't open device!")
# Set the signal handler and a 5-second alarm
signal.signal(signal.SIGALRM, handler)
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index d1b107e..97fe268 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -401,6 +401,9 @@
library and needs objects of type :ctype:`struct in_addr`, which is the C type
for the 32-bit packed binary this function returns.
+ :func:`inet_aton` also accepts strings with less than three dots; see the
+ Unix manual page :manpage:`inet(3)` for details.
+
If the IPv4 address string passed to this function is invalid,
:exc:`socket.error` will be raised. Note that exactly what is valid depends on
the underlying C implementation of :cfunc:`inet_aton`.
diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst
index ce8085d..b1a1791 100644
--- a/Doc/library/tkinter.rst
+++ b/Doc/library/tkinter.rst
@@ -29,9 +29,6 @@
`Tkinter reference: a GUI for Python <http://infohost.nmt.edu/tcc/help/pubs/lang.html>`_
On-line reference material.
- `Tkinter for JPython <http://jtkinter.sourceforge.net>`_
- The Jython interface to Tkinter.
-
`Python and Tkinter Programming <http://www.amazon.com/exec/obidos/ASIN/1884777813>`_
The book by John Grayson (ISBN 1-884777-81-3).