Brett Cannon
229cee2d3d
Deprecate BaseException.message as per PEP 352.
2007-05-05 01:34:02 +00:00
Walter Dörwald
27f4abf3b1
Clarify the behaviour of PyUnicode_DecodeUTF16(): A BOM is only skipped
...
in native order mode, and only if it's the first two bytes.
2007-05-03 15:13:55 +00:00
Vinay Sajip
c0a293c692
Added documentation for new optional credentials argument to SMTPHandler.__init__().
2007-05-01 10:21:45 +00:00
Georg Brandl
5a006b3978
Bug #1710295 : exceptions are now new-style classes.
2007-05-01 06:04:11 +00:00
Georg Brandl
58ef8cd29c
Version fix (bug #1708710 )
2007-04-27 19:20:00 +00:00
Steve Holden
6e6eaa7a67
Minor wording change on slicing aide-memoire.
2007-04-26 14:23:12 +00:00
Fred Drake
452f5df64a
fix some markup errors
2007-04-26 04:42:19 +00:00
Collin Winter
c2898c5a67
Standardize on test.test_support.run_unittest() (as opposed to a mix of run_unittest() and run_suite()). Also, add functionality to run_unittest() that admits usage of unittest.TestLoader.loadTestsFromModule().
2007-04-25 17:29:52 +00:00
Georg Brandl
e47c508850
Markup fix.
2007-04-25 06:25:55 +00:00
Georg Brandl
3dc6e90a2e
Patch #1698768 : updated the "using Python on the Mac" intro.
2007-04-25 06:24:59 +00:00
Raymond Hettinger
e133a95d1c
Fix markup
2007-04-24 22:13:43 +00:00
Georg Brandl
18afb37845
Bug #1705717 : error in sys.argv docs.
2007-04-24 15:10:09 +00:00
Georg Brandl
556697e412
Some new year updates.
2007-04-24 10:36:42 +00:00
Neal Norwitz
8eea9ac889
Fix SF #1703110 , Incorrect example for add_password() (use uri, not host)
2007-04-24 04:53:12 +00:00
Raymond Hettinger
4db5fe970c
SF 1193128: Let str.translate(None) be an identity transformation
2007-04-12 04:10:00 +00:00
Georg Brandl
5176180610
Repair missing spaces after \UNIX.
2007-04-11 23:28:44 +00:00
Andrew M. Kuchling
5bf02cd17f
Describe undocumented third argument to touchline()
2007-04-11 13:47:13 +00:00
Andrew M. Kuchling
400a49ba79
Add window.chgat() method, submitted via e-mail by Fabian Kreutz
2007-04-11 13:39:00 +00:00
Georg Brandl
781aef2d6b
Repair a duplicate label and some obsolete uses of \setindexsubitem.
2007-04-10 21:39:38 +00:00
Brett Cannon
55a1864832
Doc that file.next() has undefined behaviour when called on a file opened with
...
'w'. Closes bug #1569057 .
To be backported once 2.5 branch is unfrozen.
2007-04-08 04:29:32 +00:00
Andrew M. Kuchling
615b49b097
Some grammar fixes
2007-04-06 01:11:58 +00:00
Facundo Batista
c3a35e19cc
Now using unittest for the tests infraestructure. Also split the
...
tests in those who need the network, and that who doesn't.
2007-04-03 14:05:08 +00:00
Georg Brandl
b28ef9b429
Fix the strange case of
...
\begin{methoddesc}[NNTP]{...}
where
\ifx#1\@undefined ended up comparing N and N, therefore executing
the true part of the conditional, blowing up at \@undefined.
2007-04-03 07:04:27 +00:00
Raymond Hettinger
9e56d5beeb
SF #1382213 : Tutorial section 9.5.1 ignores MRO for new-style classes
2007-04-03 01:39:43 +00:00
Georg Brandl
5447850f6f
Fix the class name of strings.
2007-04-01 23:31:30 +00:00
Georg Brandl
5f4c580776
Remove bogus entry.
2007-04-01 23:29:10 +00:00
Georg Brandl
30d6c04696
Some semantic fixes.
2007-04-01 22:47:31 +00:00
Georg Brandl
6ec04ffc5d
Explicit class names.
2007-04-01 22:40:12 +00:00
Georg Brandl
ae91afdcfb
Lots of explicit class names for method and member descs.
2007-04-01 22:39:10 +00:00
Georg Brandl
b8e8df2e63
Another fix.
2007-04-01 21:39:52 +00:00
Georg Brandl
4e9165d2dd
Fix a lot of markup and meta-information glitches.
2007-04-01 21:29:15 +00:00
Georg Brandl
43445315ae
Typo fix.
2007-03-31 11:59:54 +00:00
Georg Brandl
dc580bd821
Duplicate label fix.
2007-03-31 11:58:36 +00:00
Georg Brandl
5201364de5
Markup fix.
2007-03-31 11:54:58 +00:00
Georg Brandl
b8b88743a8
repair string literal.
2007-03-31 10:17:31 +00:00
Georg Brandl
8c09b14978
Markup fix.
2007-03-30 19:14:02 +00:00
Georg Brandl
92a9fc0a2f
Duplicate label fix.
2007-03-30 19:01:38 +00:00
Andrew M. Kuchling
588a95d594
Add item. (Oops, accidentally checked this in on my branch)
2007-03-30 18:00:15 +00:00
Georg Brandl
f3c123d82d
Markup fix.
2007-03-30 17:48:39 +00:00
Georg Brandl
bc7d71a8fd
Duplicate label fix.
2007-03-30 17:47:21 +00:00
Georg Brandl
749757329a
Label name fix.
2007-03-30 17:39:39 +00:00
Georg Brandl
459ef66f6e
Markup fix.
2007-03-30 15:49:05 +00:00
Collin Winter
d4a0118029
Bug #1688274 : add documentation for C-level class objects.
2007-03-30 14:01:25 +00:00
Facundo Batista
93c33680a0
Added the posibility to pass the timeout to FTP.connect, not only when
...
instantiating the class. Docs and tests are updated.
2007-03-30 13:00:35 +00:00
Facundo Batista
b6a5c9d605
Added timout parameter to telnetlib.Telnet. Also created
...
test_telnetlib.py with a basic test and timeout ones.
Docs are also updated.
2007-03-29 18:22:35 +00:00
Georg Brandl
9499b7117a
These are actually methods.
2007-03-29 07:41:32 +00:00
Facundo Batista
366d6262f8
Added timeout to smtplib (to SMTP and SMTP_SSL). Also created
...
the test_smtplib.py file, with a basic test and the timeout
ones. Docs are updated too.
2007-03-28 18:25:54 +00:00
Facundo Batista
1b1c347311
Added an optional timeout to poplib.POP3. Also created a
...
test_poplib.py file with a basic test and the timeout
ones. Docs are also updated.
2007-03-27 18:23:21 +00:00
Georg Brandl
f03facfe90
Some nits.
2007-03-26 20:28:28 +00:00
Facundo Batista
51b7abc519
Added an optional timeout to FTP class. Also I started a test_ftplib.py
...
file to test the ftp lib (right now I included a basic test, the timeout
one, and nothing else).
2007-03-26 20:18:31 +00:00
Georg Brandl
85fd7ac93d
Markup fix.
2007-03-25 19:04:55 +00:00
Georg Brandl
6b5e1aa167
Markup fix.
2007-03-25 18:44:35 +00:00
Brett Cannon
27ef61ca18
Change the docs to no longer claim that unittest is preferred over doctest for
...
regression tests.
2007-03-25 01:32:36 +00:00
Georg Brandl
3d52e5f07d
Revert accidental change.
2007-03-24 22:27:56 +00:00
Georg Brandl
b881b9aacf
Remove typo accent.
2007-03-24 22:20:34 +00:00
Žiga Seilnacht
c64ad484a9
Patch #1489771 : update syntax rules in Python Reference Manual.
...
Python 2.5 added support for explicit relative import statements and
yield expressions, which were missing in the manual.
Also fix grammar productions that used the names from the Grammar file,
markup that broke the generated grammar.txt, and wrap some lines that
broke the pdf output. Will backport.
2007-03-24 14:24:26 +00:00
Facundo Batista
07c78be0b4
Added a 'create_connect()' function to socket.py, which creates a
...
connection with an optional timeout, and modified httplib.py to
use this function in HTTPConnection. Applies patch 1676823.
2007-03-23 18:54:07 +00:00
Martin v. Löwis
2f401d7186
Patch #1686451 : Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}.
...
Will backport.
2007-03-23 10:35:49 +00:00
Georg Brandl
bfcc975527
Bug #1685704 : use -m switch in timeit docs.
2007-03-22 08:05:45 +00:00
Facundo Batista
3ff9e55890
Minor clarification, saying that blocking means no timeout (from bug #882297 )
2007-03-21 19:41:24 +00:00
Andrew M. Kuchling
4732c6e164
Put code examples at left margin instead of indenting them
2007-03-21 16:59:20 +00:00
Andrew M. Kuchling
7af1bdf619
Fix sentence, and fix typo in example
2007-03-21 16:57:32 +00:00
Andrew M. Kuchling
8aa30927ab
Add comments on maintenance of this file
2007-03-21 14:32:43 +00:00
Georg Brandl
5e0b865b0f
Patch #1684834 : document some utility C API functions.
2007-03-21 09:16:53 +00:00
Georg Brandl
cae9f3d916
New test for rev. 54407 which only uses directories under TESTFN.
2007-03-21 09:10:29 +00:00
Neal Norwitz
c990f6454f
Try backing out 54407 to see if it corrects the problems on the Windows
...
buildbots. This rev was backported, so we will need to keep both branches
in sync, pending the outcome of the test after this checkin.
2007-03-20 05:23:09 +00:00
Neal Norwitz
216f9b0709
Add a comment about 3k migration
2007-03-20 05:08:23 +00:00
Neal Norwitz
b9523df1e6
Add some doc that was left out from some change to platform.py
2007-03-20 05:07:28 +00:00
Collin Winter
a8785cc26a
Patch #1630118 : add a SpooledTemporaryFile class to tempfile.
2007-03-19 18:52:08 +00:00
Georg Brandl
1d4b834574
Patch #1682878 : the new socket methods are recv_into and recvfrom_into, not *_buf.
2007-03-18 08:25:00 +00:00
Georg Brandl
2b869943fa
Patch #1675423 : PyComplex_AsCComplex() now tries to convert an object
...
to complex using its __complex__() method before falling back to the
__float__() method. Therefore, the functions in the cmath module now
can operate on objects that define a __complex__() method.
(backport)
2007-03-17 16:08:45 +00:00
Collin Winter
6f187743ff
Patch 1339796: add a relpath() function to os.path.
2007-03-16 22:16:08 +00:00
Žiga Seilnacht
594965d17a
Whitespace cleanup. Also remove the empty lines
...
from the previous check in.
2007-03-16 12:11:11 +00:00
Žiga Seilnacht
6f2d09c949
Patch #1623563 : allow __class__ assignment for classes with __slots__.
...
The old and the new class are still required to have the same slot
names, but the order in which they are specified is not relevant.
2007-03-16 11:59:38 +00:00
Georg Brandl
6ab8452036
RFE #1670167 : fix in isinstance() docs.
2007-03-16 08:33:47 +00:00
Georg Brandl
5a80ff6111
Add \versionadded tag.
2007-03-16 08:24:21 +00:00
Georg Brandl
8844e438b1
Patch #1273829 : os.walk() now has a "followlinks" parameter. If set to
...
True (which is not the default), it visits symlinks pointing to
directories.
2007-03-16 08:22:40 +00:00
Georg Brandl
8784bae65d
Patch #1680978 : consistently use "alive" instead of "active" in the
...
thread lib doc.
2007-03-15 07:38:14 +00:00
Gregory P. Smith
90fd76a2b4
Its time to stop listing (Unix, Windows) when we really mean "everything but Mac OS 9"
...
now that nobody is likely to use Python on Mac OS 9 and most of the (Mac) platform
items are all OS X special API specific since OS X is unixy enough for these modules
to be available out of the box.
2007-03-14 07:19:50 +00:00
Gregory P. Smith
859b7c1b82
correct order and names of the less often used keyword parameters.
2007-03-14 07:17:40 +00:00
Georg Brandl
03b90d8cfd
Patch #957650 : "%var%" environment variable references are now properly
...
expanded in ntpath.expandvars(), also "~user" home directory references
are recognized and handled on Windows.
2007-03-13 22:07:36 +00:00
Georg Brandl
8044e5bbd4
Deprecate commands.getstatus().
2007-03-13 21:32:01 +00:00
Georg Brandl
8e84c65660
Patch #1393667 : pdb now has a "run" command which restarts the debugged
...
Python program, optionally with different arguments.
2007-03-13 21:08:15 +00:00
Thomas Heller
c3a643192f
Add versionadded marker for ctypes.c_bool.
2007-03-13 21:01:39 +00:00
Georg Brandl
5240d7416c
Patch #1444529 : the builtin compile() now accepts keyword arguments.
...
(backport)
2007-03-13 20:46:32 +00:00
Thomas Heller
5dc4fe09b7
Patch #1649190 : Adding support for _Bool to ctypes as c_bool, by David Remahl.
2007-03-13 20:42:52 +00:00
Georg Brandl
d9bef35e3c
Patch #1533909 : the timeit module now accepts callables in addition to
...
strings for the code to time and the setup code. Also added two
convenience functions for instantiating a Timer and calling its methods.
2007-03-13 19:32:21 +00:00
Georg Brandl
35ef9c19fe
Patch #1537850 : tempfile.NamedTemporaryFile now has a "delete" parameter
...
which can be set to False to prevent the default delete-on-close
behavior.
2007-03-13 18:31:49 +00:00
Georg Brandl
9e6b47002a
Patch #1581073 : add a flag to textwrap that prevents the dropping of
...
whitespace while wrapping.
2007-03-13 18:15:41 +00:00
Lars Gustäbel
c64e40215d
This is the implementation of POSIX.1-2001 (pax) format read/write
...
support.
The TarInfo class now contains all necessary logic to process and
create tar header data which has been moved there from the TarFile
class. The fromtarfile() method was added. The new path and linkpath
properties are aliases for the name and linkname attributes in
correspondence to the pax naming scheme.
The TarFile constructor and classmethods now accept a number of
keyword arguments which could only be set as attributes before (e.g.
dereference, ignore_zeros). The encoding and pax_headers arguments
were added for pax support. There is a new tarinfo keyword argument
that allows using subclassed TarInfo objects in TarFile.
The boolean TarFile.posix attribute is deprecated, because now three
tar formats are supported. Instead, the desired format for writing is
specified using the constants USTAR_FORMAT, GNU_FORMAT and PAX_FORMAT
as the format keyword argument. This change affects TarInfo.tobuf()
as well.
The test suite has been heavily reorganized and partially rewritten.
A new testtar.tar was added that contains sample data in many formats
from 4 different tar programs.
Some bugs and quirks that also have been fixed:
Directory names do no longer have a trailing slash in TarInfo.name or
TarFile.getnames().
Adding the same file twice does not create a hardlink file member.
The TarFile constructor does no longer need a name argument.
The TarFile._mode attribute was renamed to mode and contains either
'r', 'w' or 'a'.
2007-03-13 10:47:19 +00:00
Georg Brandl
0692a2621c
Patch #1679379 : add documentation for fnmatch.translate().
2007-03-13 07:50:57 +00:00
Georg Brandl
f252c7b76b
Typo fix.
2007-03-12 16:15:09 +00:00
Georg Brandl
871f1bc601
Backport from Py3k branch:
...
Patch #1591665 : implement the __dir__() special function lookup in PyObject_Dir.
Had to change a few bits of the patch because classobjs and __methods__ are still
in Py2.6.
2007-03-12 13:17:36 +00:00
Martin v. Löwis
2681beb23e
Patch #1677862 : Require a space or tab after import in .pth files.
2007-03-12 11:01:10 +00:00
Collin Winter
ae04106a0e
Patch #1599845 : Add an option to disable the implicit calls to server_bind() and server_activate() in the constructors for TCPServer, SimpleXMLRPCServer and DocXMLRPCServer.
2007-03-10 14:41:48 +00:00
Collin Winter
b7b2b4eecf
Bug #1629566 : clarify the docs on the return values of parsedate() and parsedate_tz() in email.utils and rfc822.
2007-03-09 18:09:10 +00:00
Martin v. Löwis
1190a38d33
Patch #957003 : Implement smtplib.LMTP.
2007-03-09 15:35:55 +00:00
Brett Cannon
a30fcb4dae
Introduce test.test_support.TransientResource. It's a context manager to
...
surround calls to resources that may or may not be available. Specifying the
expected exception and attributes to be raised if the resource is not available
prevents overly broad catching of exceptions.
This is meant to help suppress spurious failures by raising
test.test_support.ResourceDenied if the exception matches. It would probably
be good to go through the various network tests and surround the calls to catch
connection timeouts (as done with test_socket_ssl in this commit).
2007-03-08 23:58:11 +00:00
Georg Brandl
6c932ad43d
Fix #1676656 : \em is different from \emph...
2007-03-08 17:49:06 +00:00
Martin v. Löwis
1843b68917
Add missing ) in parenthical remark.
2007-03-08 13:42:43 +00:00
Martin v. Löwis
05c075d629
Bug #1115886 : os.path.splitext('.cshrc') gives now ('.cshrc', '').
2007-03-07 11:04:33 +00:00
Georg Brandl
f08c073ded
Patch #1669331 : clarify shutil.copyfileobj() behavior wrt. file position.
2007-03-07 09:34:45 +00:00
Georg Brandl
d0a962506b
Patch #787789 : allow to pass custom TestRunner instances to unittest's
...
main() function.
2007-03-07 09:21:06 +00:00
George Yoshida
cadbbfc85b
add versionadded info
2007-03-07 04:21:18 +00:00
Georg Brandl
1579265aac
Patch #1602128 : clarify that richcmp methods can return NotImplemented
...
and should return True or False otherwise.
2007-03-06 18:29:58 +00:00
Martin v. Löwis
ab8a6bba25
Patch #912410 : Replace HTML entity references for attribute values
...
in HTMLParser.
2007-03-06 14:43:00 +00:00
Georg Brandl
ff432e6f4a
Patch #1663234 : you can now run doctest on test files and modules
...
using "python -m doctest [-v] filename ...".
2007-03-06 13:37:45 +00:00
Martin v. Löwis
3eb7648986
Patch #1121142 : Implement ZipFile.open.
2007-03-06 10:41:24 +00:00
Georg Brandl
d28b9fc686
Patch #1671450 : add a section about subclassing builtin types to the
...
"extending and embedding" tutorial.
2007-03-06 10:02:47 +00:00
Georg Brandl
39fc1da6dc
Nit: a struct field is set to GenericAlloc, not GenericAlloc().
2007-03-06 09:33:01 +00:00
Georg Brandl
b5e3f0dfc6
Bugs #1668032 , #1668036 , #1669304 : clarify behavior of PyMem_Realloc and _Resize.
2007-03-02 20:30:14 +00:00
Andrew M. Kuchling
7659a87e49
Add NamedTuple
2007-03-01 14:36:12 +00:00
Raymond Hettinger
c37e5e04eb
Add collections.NamedTuple
2007-03-01 06:16:43 +00:00
Andrew M. Kuchling
c6a1ef3fe1
Add some items
2007-02-26 23:54:17 +00:00
Andrew M. Kuchling
f2ae27e61a
Markup fix
2007-02-26 23:02:47 +00:00
Jeremy Hylton
759410b372
Do not copy free variables to locals in class namespaces.
...
Fixes bug 1569356, but at the cost of a minor incompatibility in
locals(). Add test that verifies that the class namespace is not
polluted. Also clarify the behavior in the library docs.
Along the way, cleaned up the dict_to_map and map_to_dict
implementations and added some comments that explain what they do.
2007-02-26 18:41:18 +00:00
Fred Drake
5a3e812444
- SF patch #1657613 : add documentation for the Element interface
...
- clean up bogus use of the {datadescni} environment everywhere
2007-02-25 17:56:27 +00:00
Raymond Hettinger
d36862cf78
Add itertools.izip_longest().
2007-02-21 05:20:38 +00:00
Raymond Hettinger
cbac8ce5b0
Fixup docstrings for merge().
2007-02-19 18:15:04 +00:00
Martin v. Löwis
382abeff0f
Patch #1490190 : posixmodule now includes os.chflags() and os.lchflags()
...
functions on platforms where the underlying system calls are available.
2007-02-19 10:55:19 +00:00
Raymond Hettinger
bcc40ba922
Provide an example of defaultdict with non-zero constant factory function.
2007-02-19 09:14:10 +00:00
Raymond Hettinger
00166c5532
Add merge() function to heapq.
2007-02-19 04:08:43 +00:00
Georg Brandl
9cb37fc5d0
Add missing \versionadded.
2007-02-15 11:29:55 +00:00
Georg Brandl
983d100202
Patch #1494140 : Add documentation for the new struct.Struct object.
2007-02-15 11:29:04 +00:00
Georg Brandl
9dca5eaf57
Make functools.wraps() docs a bit clearer.
2007-02-15 10:37:59 +00:00
Martin v. Löwis
91670d0246
Bug #1658794 : Remove extraneous 'this'.
...
Will backport to 2.5.
2007-02-13 12:08:24 +00:00
Martin v. Löwis
84f6de9d7e
Patch #1517891 : Make 'a' create the file if it doesn't exist.
...
Fixes #1514451 .
2007-02-13 10:10:39 +00:00
Martin v. Löwis
c6d626ed9f
Patch #698833 : Support file decryption in zipfile.
2007-02-13 09:49:38 +00:00
Lars Gustäbel
a69aa327aa
Bug #1656581 : Point out that external file objects are supposed to be
...
at position 0.
2007-02-12 09:25:53 +00:00
Georg Brandl
441268f867
Bug #1656078 : typo in in profile docs.
2007-02-09 18:48:41 +00:00
Martin v. Löwis
7c4615b252
Update broken link. Will backport to 2.5.
2007-02-09 12:58:49 +00:00
Raymond Hettinger
3156316823
SF: 1397711 Set docs conflated immutable and hashable
2007-02-07 21:04:20 +00:00
Lars Gustäbel
3f8aca1164
Patch #1652681 : create nonexistent files in append mode and
...
allow appending to empty files.
2007-02-06 18:38:13 +00:00
Brett Cannon
129bd52146
No more raising of string exceptions!
...
The next step of PEP 352 (for 2.6) causes raising a string exception to trigger
a TypeError. Trying to catch a string exception raises a DeprecationWarning.
References to string exceptions has been removed from the docs since they are
now just an error.
2007-01-30 21:34:36 +00:00
Georg Brandl
a05153683c
Bug #1648191 : typo in docs.
2007-01-30 20:21:30 +00:00
Andrew M. Kuchling
15c1fe5047
More edits
2007-01-29 21:28:48 +00:00
Andrew M. Kuchling
5781dd2d7c
Various minor edits
2007-01-29 20:55:40 +00:00
Andrew M. Kuchling
85acbca511
Minor edits to the curses HOWTO
2007-01-29 20:21:43 +00:00
Fred Drake
7a7cbae77b
fix typo (extraneous ")")
2007-01-26 16:28:44 +00:00
Andrew M. Kuchling
27b4c8b23c
Add item
2007-01-25 20:02:13 +00:00
Andrew M. Kuchling
391e917b1a
Strengthen warning about using lock()
2007-01-24 20:06:41 +00:00
Martin v. Löwis
aef4c6bc00
Patch #1610575 : Add support for _Bool to struct.
2007-01-21 09:33:07 +00:00
Raymond Hettinger
1b0ce85271
SF# 1635892: Fix docs for betavariate's input parameters .
2007-01-19 18:07:18 +00:00
Neal Norwitz
a6c0b59814
SF #1635217 , Fix unbalanced paren
2007-01-19 05:53:33 +00:00
Fred Drake
b94ed71bd1
add missing version entry
2007-01-18 05:42:30 +00:00
Georg Brandl
b26b1c6d6b
Bug #1629125 : fix wrong data type (int -> Py_ssize_t) in PyDict_Next docs.
2007-01-17 21:19:58 +00:00
Georg Brandl
45dc1f2fd3
Bug #1637967 : missing //= operator in list.
2007-01-17 21:09:04 +00:00
Andrew M. Kuchling
3ffcfe2f68
[Part of bug #1599254 ] Add suggestion to Mailbox docs to use Maildir, and warn user to lock/unlock mailboxes when modifying them
2007-01-17 19:55:06 +00:00
Brett Cannon
f5c034af10
Add a note for strptime that just because strftime supports some extra
...
directive that is not documented that strptime will as well.
2007-01-15 19:12:08 +00:00
Guido van Rossum
2799aab86d
Doc patch matching r53434 (htonl etc. now always take/return positive ints).
2007-01-15 00:02:35 +00:00