summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Backport r67974:Georg Brandl2008-12-281-0/+10
| | | | | | #4759: allow None as first argument of bytearray.translate(), for consistency with bytes.translate(). Also fix segfault for bytearray.translate(x, None) -- will backport this part to 3.0 and 2.6.
* Follow-up to r67746 in order to restore backwards-compatibility forGeorg Brandl2008-12-271-7/+19
| | | | those who (monkey-)patch TextWrapper.wordsep_re with a custom RE.
* #4748 lambda generators shouldn't return valuesBenjamin Peterson2008-12-271-0/+10
|
* Patch #4739 by David Laban: add symbols to pydoc help topics,Georg Brandl2008-12-271-2/+55
| | | | so that ``help('@')`` works as expected.
* Issue #4756: zipfile.is_zipfile() now supports file-like objects.Antoine Pitrou2008-12-272-12/+53
| | | | Patch by Gabriel Genellina.
* Fix bogus unicode tests in pickletester.Alexandre Vassalotti2008-12-271-2/+2
|
* Fix issue #4730: cPickle corrupts high-unicode strings.Alexandre Vassalotti2008-12-271-2/+9
| | | | | Update outdated copy of PyUnicode_EncodeRawUnicodeEscape. Add a test case.
* Issue #4740: Use HIGHEST_PROTOCOL in pickle test.Hirokazu Yamamoto2008-12-273-6/+6
| | | | (There is no behavior difference in 2.x because HIGHEST_PROTOCOL == 2)
* fixed #4400 : distutils .pypirc default generated file was broken.Tarek Ziadé2008-12-244-7/+151
|
* #4736 BufferRWPair.closed shouldn't try to call another property as a functionBenjamin Peterson2008-12-242-2/+3
|
* As a result of a regression that snuck into 2.5.3 add a test case thatSkip Montanaro2008-12-231-0/+2
| | | | | ensures that when you try to read from a file opened for writing an IOError is raised.
* add py3k warnings to frame.f_exc_*Benjamin Peterson2008-12-221-0/+10
|
* Merged revisions 67809 via svnmerge fromBenjamin Peterson2008-12-211-1/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r67809 | benjamin.peterson | 2008-12-15 21:54:45 -0600 (Mon, 15 Dec 2008) | 1 line fix logic error ........
* Issue #3439: add bit_length method to int and long.Mark Dickinson2008-12-172-0/+72
| | | | | Thanks Fredrik Johansson and Victor Stinner for code, Raymond Hettinger for review.
* Issue #2183: Simplify and optimize bytecode for list comprehensions.Antoine Pitrou2008-12-173-33/+18
|
* Merged revisions ↵Benjamin Peterson2008-12-1620-153/+329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67427,67431,67433,67435,67630,67652,67656-67657,67674-67675,67678-67679,67705-67706,67716,67723,67765-67771,67774,67776,67778 via svnmerge from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r67427 | benjamin.peterson | 2008-11-28 16:07:41 -0600 (Fri, 28 Nov 2008) | 1 line fix spelling in comment ........ r67431 | benjamin.peterson | 2008-11-28 17:14:08 -0600 (Fri, 28 Nov 2008) | 1 line add a scripts directory; move things to it ........ r67433 | benjamin.peterson | 2008-11-28 17:18:48 -0600 (Fri, 28 Nov 2008) | 1 line run svneol.py ........ r67435 | benjamin.peterson | 2008-11-28 17:25:03 -0600 (Fri, 28 Nov 2008) | 1 line rename pre/post_order_mapping to pre/post_order_heads ........ r67630 | alexandre.vassalotti | 2008-12-06 21:51:56 -0600 (Sat, 06 Dec 2008) | 2 lines Fix typo in the urllib2.HTTPDigestAuthHandler fixer. ........ r67652 | armin.ronacher | 2008-12-07 15:39:43 -0600 (Sun, 07 Dec 2008) | 5 lines Added a fixer that cleans up a tuple argument to isinstance after the tokens in it were fixed. This is mainly used to remove double occurrences of tokens as a leftover of the long -> int / unicode -> str conversion. ........ r67656 | armin.ronacher | 2008-12-07 16:54:16 -0600 (Sun, 07 Dec 2008) | 3 lines Added missing copyright fo 2to3 fix_isinstance. ........ r67657 | armin.ronacher | 2008-12-07 18:29:35 -0600 (Sun, 07 Dec 2008) | 3 lines 2to3: intern and reduce fixes now add the imports if missing. Because that is a common task the fixer_util module now has a function "touch_import" that adds imports if missing. ........ r67674 | benjamin.peterson | 2008-12-08 19:58:11 -0600 (Mon, 08 Dec 2008) | 1 line copy permission bits when making backup files #4602 ........ r67675 | benjamin.peterson | 2008-12-08 19:59:11 -0600 (Mon, 08 Dec 2008) | 1 line add forgotten import ........ r67678 | benjamin.peterson | 2008-12-08 20:08:30 -0600 (Mon, 08 Dec 2008) | 1 line fix #4602 for real ........ r67679 | armin.ronacher | 2008-12-09 00:54:03 -0600 (Tue, 09 Dec 2008) | 3 lines Removed redudant code from the 2to3 long fixer. This fixes #4590. ........ r67705 | benjamin.peterson | 2008-12-11 13:04:08 -0600 (Thu, 11 Dec 2008) | 1 line put trailers after a range call after the list() ........ r67706 | benjamin.peterson | 2008-12-11 13:17:57 -0600 (Thu, 11 Dec 2008) | 1 line add html related modules to the fix_imports mapping ........ r67716 | benjamin.peterson | 2008-12-11 22:16:47 -0600 (Thu, 11 Dec 2008) | 1 line consolidate tests ........ r67723 | benjamin.peterson | 2008-12-12 19:49:31 -0600 (Fri, 12 Dec 2008) | 1 line fix name ........ r67765 | benjamin.peterson | 2008-12-14 14:05:05 -0600 (Sun, 14 Dec 2008) | 1 line run fix_isinstance after fix_long and fix_unicode ........ r67766 | benjamin.peterson | 2008-12-14 14:13:05 -0600 (Sun, 14 Dec 2008) | 1 line use run_order instead of order ........ r67767 | benjamin.peterson | 2008-12-14 14:28:12 -0600 (Sun, 14 Dec 2008) | 1 line don't retain parenthesis if there is only one item left ........ r67768 | benjamin.peterson | 2008-12-14 14:32:30 -0600 (Sun, 14 Dec 2008) | 1 line use insert_child() ........ r67769 | benjamin.peterson | 2008-12-14 14:59:10 -0600 (Sun, 14 Dec 2008) | 1 line parenthesize doesn't belong in pygram or FixerBase ........ r67770 | alexandre.vassalotti | 2008-12-14 15:15:36 -0600 (Sun, 14 Dec 2008) | 2 lines Fix typo: html.paser -> html.parser. ........ r67771 | benjamin.peterson | 2008-12-14 15:22:09 -0600 (Sun, 14 Dec 2008) | 1 line altering .children needs to call changed() ........ r67774 | benjamin.peterson | 2008-12-14 15:55:38 -0600 (Sun, 14 Dec 2008) | 1 line employ an evil hack to fix multiple names in the same import statement ........ r67776 | benjamin.peterson | 2008-12-14 16:22:38 -0600 (Sun, 14 Dec 2008) | 1 line make a common mixin class for Test_imports and friends ........ r67778 | alexandre.vassalotti | 2008-12-14 17:48:20 -0600 (Sun, 14 Dec 2008) | 2 lines Make fix_imports refactor multiple imports as. ........
* #3954: Fix error handling code in _hotshot.logreaderAmaury Forgeot d'Arc2008-12-151-0/+6
| | | | Will port to 2.6. hotshot was deleted from python 3.
* Issue #4197: Fix the remaining part of the doctest-in-zipfile problem by ↵Nick Coghlan2008-12-152-3/+42
| | | | giving linecache access to the module globals when available
* #4578: fix has_key() usage in compiler package.Georg Brandl2008-12-155-18/+16
|
* modify other occurrence of test_bad_addressAntoine Pitrou2008-12-151-1/+1
|
* try to fix failure in test_bad_address on some buildbotsAntoine Pitrou2008-12-141-1/+1
|
* Backport r67759 (fix io.IncrementalNewlineDecoder for UTF-16 et al.).Antoine Pitrou2008-12-142-56/+85
|
* Add file that was missed from r67750Nick Coghlan2008-12-141-0/+203
|
* Fix several issues relating to access to source code inside zipfiles. ↵Nick Coghlan2008-12-148-48/+111
| | | | Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details.
* remove has_key usageBenjamin Peterson2008-12-141-1/+1
|
* Issue #4163: Use unicode-friendly word splitting in the textwrap functions ↵Antoine Pitrou2008-12-132-7/+17
| | | | when given an unicode string.
* Issue #4616: TarFile.utime(): Restore directory times on Windows.Lars Gustäbel2008-12-122-10/+3
|
* Issue #4084: Fix max, min, max_mag and min_mag Decimal methods toFacundo Batista2008-12-112-16/+33
| | | | | | give correct results in the case where one argument is a quiet NaN and the other is a finite number that requires rounding. Thanks Mark Dickinson.
* #1030250: correctly pass the dry_run option to the mkpath() function.Amaury Forgeot d'Arc2008-12-111-1/+1
|
* #4559: When a context manager's __exit__() method returns an object whoseAmaury Forgeot d'Arc2008-12-101-0/+30
| | | | | | | conversion to bool raises an exception, 'with' loses that exception. Reviewed by Jeffrey Yasskin. Already ported to 2.5, will port to 2.6 and 3.0
* Add simple unittests for RequestJeremy Hylton2008-12-091-1/+47
|
* Issue 4597: Fix several cases in EvalFrameEx where an exception could beJeffrey Yasskin2008-12-081-0/+14
| | | | "raised" without setting x, err, or why to let the eval loop know.
* Issue #4509: bugs in bytearray with exports (buffer protocol)Antoine Pitrou2008-12-061-0/+32
|
* Issue #4445: save 3 bytes (on average, on a typical machine) perMark Dickinson2008-12-051-2/+2
| | | | string allocation.
* #4529: fix parser's validation for try-except-finally statements.Georg Brandl2008-12-051-0/+10
|
* #4544: add `dedent` to textwrap.__all__.Georg Brandl2008-12-051-1/+1
|
* #4458: recognize "-" as an argument, not a malformed option in gnu_getopt().Georg Brandl2008-12-052-1/+6
|
* rename the new check_call_output to check_output. its less ugly.Gregory P. Smith2008-12-052-22/+22
|
* Took Nick Coghlan's advice about importing warnings globally in logging, to ↵Vinay Sajip2008-12-041-3/+1
| | | | avoid the possibility of race conditions: "This could deadlock if a thread spawned as a side effect of importing a module happens to trigger a warning. warnings is pulled into sys.modules as part of the interpreter startup - having a global 'import warnings' shouldn't have any real effect on logging's import time."
* Adds a subprocess.check_call_output() function to return the output from aGregory P. Smith2008-12-042-12/+94
| | | | process on success or raise an exception on error.
* Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters toFred Drake2008-12-042-3/+41
| | | | | support unusual filenames (such as those containing semi-colons) in Content-Disposition headers.
* Issue #4384: Added logging integration with warnings module using ↵Vinay Sajip2008-12-032-4/+86
| | | | captureWarnings(). This change includes a NullHandler which does nothing; it will be of use to library developers who want to avoid the "No handlers could be found for logger XXX" message which can appear if the library user doesn't configure logging.
* Backport r67478Raymond Hettinger2008-12-031-0/+2
|
* Send HTTP headers and message body in a single send() call.Jeremy Hylton2008-11-292-27/+46
| | | | | | | | | | | | | | | | | This change addresses part of issue 4336. Change endheaders() to take an optional message_body argument that is sent along with the headers. Change xmlrpclib and httplib's other methods to use this new interface. It is more efficient to make a single send() call, which should get the entire client request into one packet (assuming it is smaller than the MTU) and will avoid the long pause for delayed ack following timeout. Also: - Add a comment about the buffer size for makefile(). - Extract _set_content_length() method and fix whitespace issues there.
* Reflow long lines.Jeremy Hylton2008-11-291-5/+10
|
* Merged revisions ↵Benjamin Peterson2008-11-2815-86/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67384,67386-67387,67389-67390,67392,67399-67400,67403-67405,67426 via svnmerge from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r67384 | benjamin.peterson | 2008-11-25 16:13:31 -0600 (Tue, 25 Nov 2008) | 4 lines don't duplicate calls to start_tree() RefactoringTool.pre_order values now holds a list of the fixers while pre_order_mapping holds the dict. ........ r67386 | benjamin.peterson | 2008-11-25 16:44:52 -0600 (Tue, 25 Nov 2008) | 1 line #4423 fix_imports was still replacing usage of a module if attributes were being used ........ r67387 | benjamin.peterson | 2008-11-25 16:47:54 -0600 (Tue, 25 Nov 2008) | 1 line fix broken test ........ r67389 | benjamin.peterson | 2008-11-25 17:13:17 -0600 (Tue, 25 Nov 2008) | 1 line remove compatibility code; we only cater to 2.5+ ........ r67390 | benjamin.peterson | 2008-11-25 22:03:36 -0600 (Tue, 25 Nov 2008) | 1 line fix #3994; the usage of changed imports was fixed in nested cases ........ r67392 | benjamin.peterson | 2008-11-26 11:11:40 -0600 (Wed, 26 Nov 2008) | 1 line simpilfy and comment fix_imports ........ r67399 | benjamin.peterson | 2008-11-26 11:47:03 -0600 (Wed, 26 Nov 2008) | 1 line remove more compatibility code ........ r67400 | benjamin.peterson | 2008-11-26 12:07:41 -0600 (Wed, 26 Nov 2008) | 1 line set svn:ignore ........ r67403 | benjamin.peterson | 2008-11-26 13:11:11 -0600 (Wed, 26 Nov 2008) | 1 line wrap import ........ r67404 | benjamin.peterson | 2008-11-26 13:29:49 -0600 (Wed, 26 Nov 2008) | 1 line build the fix_imports pattern in compile_pattern, so MAPPING can be changed and reflected in the pattern ........ r67405 | benjamin.peterson | 2008-11-26 14:01:24 -0600 (Wed, 26 Nov 2008) | 1 line stop ugly messages about runtime errors being from printed ........ r67426 | benjamin.peterson | 2008-11-28 16:01:40 -0600 (Fri, 28 Nov 2008) | 5 lines don't replace a module name if it is in the middle of a attribute lookup This fix also stops module names from being replaced if they are not in an attribute lookup. ........
* issue4238: bsd support for cpu_countJesse Noller2008-11-281-1/+1
|
* Fixed issue ##3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise ↵Christian Heimes2008-11-281-1/+1
| | | | an exception
* Merged revisions 67183,67191,67371 via svnmerge fromBenjamin Peterson2008-11-253-10/+32
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r67183 | benjamin.peterson | 2008-11-10 21:51:33 -0600 (Mon, 10 Nov 2008) | 1 line handle 'import x as y' in fix_imports; this still needs more work... ........ r67191 | benjamin.peterson | 2008-11-11 17:24:51 -0600 (Tue, 11 Nov 2008) | 1 line super() is good ........ r67371 | benjamin.peterson | 2008-11-24 16:02:00 -0600 (Mon, 24 Nov 2008) | 1 line don't blow up in the metaclass fixer when assignments in the class statement aren't simple ........
* Add unittests that verify documented behavior of public methods in TransportJeremy Hylton2008-11-241-1/+86
| | | | | | | | class. These methods can be overridden. The tests verify that the overridden methods are called, and that changes to the connection have a visible effect on the request.