Commit Graph

4699 Commits

Author SHA1 Message Date
Steven Bethard e9330e7941 Initial commit of the argparse library, based on argparse 1.1.
Docs still need some updating to make getopt and optparse match the wording promised in the PEP.
There are also probably a number of :class:ArgumentParser etc. links that could be added to the argparse documentation.
2010-03-02 08:38:09 +00:00
Barry Warsaw 08a8fb30b6 Manually copy patch for bug 7250 from the release26-maint branch. I suck
because I did this in the wrong order and couldn't smack svnmerge into
submission.
2010-03-01 21:46:51 +00:00
Florent Xicluna e7901c5ebb #7808: Fix reference leaks in _bsddb and related tests. 2010-03-01 20:45:01 +00:00
Gregory P. Smith 6a65f85e79 Fixes issue #7999: os.setreuid() and os.setregid() would refuse to accept
a -1 parameter on some platforms such as OS X.
2010-03-01 05:43:43 +00:00
Gregory P. Smith 3c699d334a Adds c_ssize_t to ctypes. issue 6729. 2010-03-01 04:56:12 +00:00
Gregory P. Smith 9e5d1327f8 Issue #7242: On Solaris 9 and earlier calling os.fork() from within a
thread could raise an incorrect RuntimeError about not holding the import
lock.  The import lock is now reinitialized after fork.
2010-03-01 01:22:39 +00:00
Gregory P. Smith cce211f88c Issue #1068268: The subprocess module now handles EINTR in internal
os.waitpid and os.read system calls where appropriate.
2010-03-01 00:05:08 +00:00
Gregory P. Smith 613c7a549a Issue #7481: When a threading.Thread failed to start it would leave the
instance stuck in initial state and present in threading.enumerate().
2010-02-28 18:36:09 +00:00
Florent Xicluna 2a903b26e9 Issue #1729305: Fix doctest to handle encode error with "backslashreplace". It fixes #7667 too. 2010-02-27 13:31:23 +00:00
Florent Xicluna 82aa01fa29 Add entry for issue #691291. 2010-02-27 11:19:18 +00:00
Martin v. Löwis 99bf01b4b4 Add Florent Xicluna. 2010-02-25 20:42:40 +00:00
Ezio Melotti 321251567e #7649: "u'%c' % char" now behaves like "u'%s' % char" and raises a UnicodeDecodeError if 'char' is a byte string that can't be decoded using the default encoding. 2010-02-25 17:36:04 +00:00
Ezio Melotti 2076666770 typos 2010-02-24 16:49:56 +00:00
Eric Smith 2d9856d6ce Issue #7309: Unchecked pointer access when converting UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings. 2010-02-24 14:15:36 +00:00
Dirkjan Ochtman ebc73dce57 Issue #7427: improve the representation of httplib.BadStatusLine exceptions. 2010-02-24 04:49:00 +00:00
R. David Murray 48605be128 Issue 7975: in python 2.6 bsddb.dbshelve switched from DictMixin to
MutableMapping, and thereby lost functionality because the replacement
functionality was implemented incorrectly or incompletely).  Since bsddb
isn't in py3k, this patch just goes back to using DictMixin in order to
correct the regression.
2010-02-24 02:31:27 +00:00
Brett Cannon 1ffccb0f8a Record that Dino Viehland got commit privs. 2010-02-24 01:38:04 +00:00
Victor Stinner f20f9c299e Issue #7649: Fix u'%c' % char for character in range 0x80..0xFF
=> raise an UnicodeDecodeError. Patch written by Ezio Melotti.
2010-02-23 23:16:07 +00:00
Georg Brandl ea370a9edd #6544: fix refleak in kqueue, occurring in certain error conditions. 2010-02-23 21:48:57 +00:00
Dirkjan Ochtman 8614817875 Fix #1537721: add writeheader() method to csv.DictWriter.
Reviewed by skip.montanaro and thomas.wouters.
2010-02-23 21:09:52 +00:00
Thomas Heller 92bd059c67 ctypes CThunkObject was not registered correctly with the cycle
garbage collector, leading to possible leaks when using callback
functions.
2010-02-23 20:11:44 +00:00
Tarek Ziadé b8708a298e fixed #5801: removed spurious empty lines in wsgiref 2010-02-23 05:53:05 +00:00
R. David Murray f28fd24c36 Issue 6292: for the moment at least, the test suite passes if run
with -OO.  Tests requiring docstrings are skipped.  Patch by
Brian Curtin, thanks to Matias Torchinsky for helping review and
improve the patch.
2010-02-23 00:24:49 +00:00
Eric Smith 87bcb243ac Issue #6902: Fix problem with built-in types format incorrectly with 0 padding. 2010-02-23 00:11:16 +00:00
Andrew M. Kuchling b64d61369a #2560: remove an unnecessary 'for' loop from my_fgets() in Parser/myreadline.c.
Noted by Joseph Armbruster; patch by Jessica McKellar.

The original code was 'for (;;) {...}', where ... ended
with a 'return -2' statement and did not contain a 'break' or 'continue'
statement.  Therefore, the body of the loop is always executed once.

Once upon a time there was a 'continue' in the loop, but it was removed in
rev36346, committed by mwh on Wed Jul 7 17:44:12 2004.
2010-02-22 22:48:41 +00:00
Jack Diederich 5cac46dd41 * fix issue#7476 2010-02-22 21:27:38 +00:00
Eric Smith f32d4acead Issue #7988: Fix default alignment to be right aligned for complex.__format__. Now it matches other numeric types. 2010-02-22 18:33:47 +00:00
Andrew M. Kuchling 83fddec8bd Note granting of commit privileges to Larry Hastings 2010-02-22 17:21:54 +00:00
Mark Dickinson 82b34c5dbe Issue #5211: Fix complex type to avoid implicit calls to
complex.__coerce__.  Thanks Meador Inge for the patch.
2010-02-21 12:57:35 +00:00
R. David Murray 51f1204590 Issue 7970: When email.Parser.Parser parses a MIME message of type
message/rfc822 it turns it into an object whose body consists of
a list containing a single Message object.  HeaderParser, on the
other hand, just copies the body as a string.  Generator.flatten
has a special handler for the message mime type that expected the
body to be the one item list.  This fails if the message was parsed
by HeaderParser.  So we now check to see if the body is a string
first, and if so just we just emit it.
2010-02-21 04:23:00 +00:00
Ezio Melotti 4cc80ca921 #3426: os.path.abspath now returns unicode when its arg is unicode. 2010-02-20 08:09:39 +00:00
Mark Dickinson 6d8effb1fc Issue #7633: Context method in the decimal module (with the exception
of the 'canonical' and 'is_canonical' methods) now consistently accept
integer arguments wherever a Decimal instance is accepted.  Thanks
Juan José Conti for the patch.
2010-02-18 14:27:02 +00:00
Martin v. Löwis 413fabc070 Stop providing crtassem.h symbols when compiling with
Visual Studio 2010, as msvcr100.dll is not a platform
assembly anymore.
2010-02-18 09:22:20 +00:00
Martin v. Löwis 7875ef67cd Issue #7903: Define _BSD_SOURCE through OpenBSD 4.9. 2010-02-15 21:41:12 +00:00
Martin v. Löwis 5e2dd866a8 Issue #3920: Define _BSD_SOURCE on OpenBSD 4.4. 2010-02-15 08:32:00 +00:00
R. David Murray 7c29f071d5 Issue 5754: tweak shelve doc wording to make it clearer that even when
writeback=True values are written to the backing store when assigned to
the shelf.  Add test to confirm that this happens.  Doc patch and added
test by Robert Lehmann.  I also fixed the cross references to the sync
and close methods.
2010-02-11 01:38:42 +00:00
R. David Murray 63e4fd7eef Issue 7835: Shelve's __del__ method calls its close method, and its
close method refers to an identifier in the global module namespace.
This means that when __del__ is called during interpreter shutdown (if,
for example, the calling program still has a pointer to the shelf),
sometimes that global identifier would wind up being None, causing
mysterious 'ignored' exceptions.  This patch checks for the possible None
value first before using the global, thus avoiding the error messages.
2010-02-10 22:42:04 +00:00
Ezio Melotti 8f6a287029 #7712: add a temp_cwd context manager to test_support and use it in regrtest to run all the tests in a temporary directory, saving the original CWD in test_support.SAVEDCWD. Thanks to Florent Xicluna who helped with the patch. 2010-02-10 21:40:33 +00:00
Michael Foord db43b5a1f5 Issue 7893 and Issue 7588 2010-02-10 14:25:12 +00:00
Antoine Pitrou 42fb6ab491 Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">")
in XML processing instructions and comments.  These raw characters are
allowed by the XML specification, and are necessary when outputting e.g.
PHP code in a processing instruction.  Patch by Neil Muller.
2010-02-09 17:08:05 +00:00
Ronald Oussoren dd25e86cf4 Issue 6003: ZipFile.writestr "compression_type" argument 2010-02-07 20:18:02 +00:00
Vinay Sajip 64e8b970f9 Issue #7869: logging: improved format-time diagnostics and removed some 1.5.2 support code. 2010-02-07 12:56:54 +00:00
Vinay Sajip 657514a690 Issue #7868: logging: added loggerClass attribute to Manager. 2010-02-07 01:37:08 +00:00
Benjamin Peterson 2d798ac619 post release updates 2010-02-06 18:26:27 +00:00
Benjamin Peterson a7be9d240a bump version to 2.7a3 2010-02-06 16:37:32 +00:00
R. David Murray ce6e4b0930 issue #7728: test_timeout was using a hardcoded port, which was
causing buildbot failures.  Changed to use test_support.bind_port.
Patch by Florent Xicluna.
2010-02-06 04:27:21 +00:00
Barry Warsaw b1e66ee651 Resolve bug 7847 by including documentation for -J, -U, and -X under "Options
you shouldn't use".
2010-02-05 18:45:25 +00:00
Antoine Pitrou bb445a1f22 Issue #5677: Explicitly forbid write operations on read-only file objects,
and read operations on write-only file objects.  On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash
the interpreter.  Patch by Stefan Krah.
2010-02-05 17:05:54 +00:00
Benjamin Peterson 565d78586b normalize exceptions passed to the __exit__ method #7853
In Python 2.x, exceptions in finally blocks are not normalized.  Since with
statements are implemented using finally blocks, ceval.c had to be tweaked to
distinguish between with finally blocks and normal ones.

A test for the finalization of generators containing with statements was also
added.
2010-02-05 02:12:14 +00:00
Vinay Sajip 0e6e97d9ad Issue #7851: logging: clarification on logging configuration files. 2010-02-04 20:23:45 +00:00