Victor Stinner
e1ea8298c6
Issue #3080 : Fix test_reprlib on Windows
...
Fix the test for last module changes (r88520).
2011-02-23 14:14:48 +00:00
Victor Stinner
c0f1a1afae
Issue #11272 : Fix input() and sys.stdin for Windows newline
...
On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses
universal newline (replace '\r\n' by '\n').
2011-02-23 12:07:37 +00:00
Lars Gustäbel
dd071045e7
Issue #11224 : Improved sparse file read support (r85916) introduced a
...
regression in _FileInFile which is used in file-like objects returned
by TarFile.extractfile(). The inefficient design of the
_FileInFile.read() method causes various dramatic side-effects and
errors:
- The data segment of a file member is read completely into memory
every(!) time a small block is accessed. This is not only slow
but may cause unexpected MemoryErrors with very large files.
- Reading members from compressed tar archives is even slower
because of the excessive backwards seeking which is done when the
same data segment is read over and over again.
- As a backwards seek on a TarFile opened in stream mode is not
possible, using extractfile() fails with a StreamError.
2011-02-23 11:42:22 +00:00
Raymond Hettinger
499e19340e
Add tests for the _ChainMap helper class.
2011-02-23 07:56:53 +00:00
Raymond Hettinger
57d1a887e7
Fix imports from collections.abc
2011-02-23 00:46:28 +00:00
Brett Cannon
cfbcdbbbf2
A crypt algorithm may not be available by returning None.
2011-02-22 21:55:51 +00:00
Brett Cannon
daa5799cb8
Make Lib/crypt.py meet PEP 8 standards. This also led to a tweak in the new API
...
by making methods() into a module attribute as it is statically calculated.
2011-02-22 21:48:06 +00:00
Antoine Pitrou
543b7f3ee9
Issue #11277 : finally fix Snow Leopard crash following r88460.
...
(probably an OS-related issue with mmap)
2011-02-22 21:42:56 +00:00
Brett Cannon
292ee5dc43
Fix test.test_crypt.test_methods() to pass on OS X.
2011-02-22 20:17:14 +00:00
Giampaolo Rodolà
d686848807
In FTP.close() method, make sure to also close the socket object, not only the file.
2011-02-22 19:24:33 +00:00
Brett Cannon
4cfa24757b
Add lib2to3.__main__ to make it easier for debugging purposes to run 2to3.
2011-02-22 19:12:43 +00:00
Giampaolo Rodolà
bd258bd4c6
smtlib.py PEP8 normalization via pep8.py script.
2011-02-22 15:56:20 +00:00
Sean Reifscheider
e2dfefbe85
Issue #10924 : Adding salt and Modular Crypt Format to crypt library.
2011-02-22 10:55:44 +00:00
Brett Cannon
f3042782af
Issue #11074 : Make 'tokenize' so it can be reloaded.
...
The module stored away the 'open' object as found in the global namespace
(which fell through to the built-in namespace) since it defined its own 'open'.
Problem is that if you reloaded the module it then grabbed the 'open' defined
in the previous load, leading to code that infinite recursed. Switched to
simply call builtins.open directly.
2011-02-22 03:25:12 +00:00
Brett Cannon
eeb114b028
Issue #10512 : close the log file in cgi when running tests.
...
Thanks to Nadeem Vawda for the find and an initial fix.
2011-02-22 03:14:12 +00:00
Brett Cannon
7a54073a56
Issue #10992 : make tests pass when run under coverage.
...
Various tests fail when run under coverage. A primary culprit is refcount tests
which fail as the counts are thrown off by the coverage code. A new decorator
-- test.support.refcount_test -- is used to decorate tests which test refcounts
and to skip them when running under coverage. Other tests simply fail because
of changes in the system (e.g., __local__ suddenly appearing).
Thanks to Kristian Vlaardingerbroek for helping to diagnose the test failures.
2011-02-22 03:04:06 +00:00
Raymond Hettinger
c9423109f5
Factor-out common code for helper classes.
2011-02-22 01:55:36 +00:00
Raymond Hettinger
16fe75e4e0
Have the test filename match the module filename.
2011-02-22 01:48:33 +00:00
Raymond Hettinger
158c9c26fc
Issue #11085 : Moved collections abstract base classes into a separate module
...
called collections.abc, following the pattern used by importlib.abc. For
backwards compatibility, the names continue to also be imported into the
collections module.
2011-02-22 00:41:50 +00:00
Antoine Pitrou
ecc26923cd
Issue #4681 : Allow mmap() to work on file sizes and offsets larger than
...
4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for
32-bit Windows.
2011-02-21 23:41:12 +00:00
Antoine Pitrou
ce58dc7b16
Issue #10826 : Prevent sporadic failure in test_subprocess on Solaris due
...
to open door files.
2011-02-21 21:55:48 +00:00
Victor Stinner
5ed8b2c737
Fix PyUnicode_FromFormatV("%c") for non-BMP char
...
Issue #10830 : Fix PyUnicode_FromFormatV("%c") for non-BMP characters on
narrow build.
2011-02-21 21:13:44 +00:00
Victor Stinner
441cc01e0f
compileall uses repr() to format filenames/paths
...
Issue #11169 : compileall module uses repr() to format filenames and paths to
escape surrogate characters and show spaces.
2011-02-21 20:58:02 +00:00
Raymond Hettinger
ddb52404ee
Issue #11089 : Fix performance issue limiting the use of ConfigParser()
...
with large config files.
2011-02-21 19:42:11 +00:00
Brett Cannon
31f5929c1e
Issue #10990 : Prevent tests from clobbering a set trace function.
...
Many tests simply didn't care if they unset a pre-existing trace function. This
made test coverage impossible. This patch fixes various tests to put back any
pre-existing trace function. It also introduces test.support.no_tracing as a
decorator which will temporarily unset the trace function for tests which
simply fail otherwise.
Thanks to Kristian Vlaardingerbroek for helping to find the cause of various
trace function unsets.
2011-02-21 19:29:56 +00:00
Antoine Pitrou
54f0f84e9f
Issue #10276 : Fix the results of zlib.crc32() and zlib.adler32() on buffers
...
larger than 4GB. Patch by Nadeem Vawda.
2011-02-21 18:03:13 +00:00
Georg Brandl
2cebdd4865
Remove unittest methods scheduled for removal in 3.3 -- makes the unittest test suite pass again.
2011-02-20 11:18:09 +00:00
Georg Brandl
3ebb6b3615
Bump trunk to 3.3 alpha 0.
2011-02-20 10:37:07 +00:00
Georg Brandl
260a788767
Version bump to 3.2 final.
2011-02-20 10:29:04 +00:00
Georg Brandl
14927d0928
Topic and suspicious update.
2011-02-20 10:22:41 +00:00
Georg Brandl
a6d12ef048
Bump for 3.2rc3.
2011-02-13 10:00:57 +00:00
Georg Brandl
3a780aaab4
Update pydoc topics.
2011-02-13 09:54:12 +00:00
R. David Murray
774a66deda
Fix #11116 fix on Windows (close file before removing in MH code)
2011-02-12 00:03:31 +00:00
R. David Murray
fc14114ca9
#11116 : roll back on error during add so mailbox isn't left corrupted.
2011-02-11 22:47:17 +00:00
Giampaolo Rodolà
900d547047
reverting r88395 and r88387 as per http://mail.python.org/pipermail/python-dev/2011-February/108005.html
2011-02-11 14:01:46 +00:00
Giampaolo Rodolà
42e0b7f47e
asyncore: introduce a new 'closed' attribute to make sure that dispatcher gets closed only once.
...
In different occasions close() might be called more than once, causing problems with already disconnected sockets/dispatchers.
2011-02-11 13:04:18 +00:00
Senthil Kumaran
2933312fe7
Fixed issue11082 - Reject str for POST data with a TypeError. Document the need to explicitly encode to bytes when using urlencode.
2011-02-11 11:25:47 +00:00
Giampaolo Rodolà
73acad1fa2
get rid of asyncore.dispatcher's debug attribute, which is no longer used (assuming it ever was).
2011-02-10 18:42:36 +00:00
Nick Coghlan
ef3165720a
Issue 10971: Make test_zipimport_support once again compatible with refleak hunting (reviewed by Georg Brandl)
2011-02-07 13:43:07 +00:00
Georg Brandl
4543846517
#11132 : pass optimize parameter to recursive call in compileall.compile_dir(). Reviewed by Eric A.
2011-02-07 12:36:54 +00:00
Georg Brandl
6153604bc7
Remove lots of spaces within exception message.
2011-02-03 07:46:41 +00:00
Raymond Hettinger
6d7e26e959
Get command-line doctest of Lib/decimal.py to work again.
...
If tested as '__main__' instead 'decimal', the tracebacks would
abbreviate 'decimal.Inexact' as 'Inexact', breaking the doctests.
(Reviewed by Antoine.)
2011-02-01 23:54:43 +00:00
Antoine Pitrou
0ea622a5c8
Issue #8275 : Fix passing of callback arguments with ctypes under Win64.
...
Patch by Stan Mihai. Ok'ed by Georg.
2011-01-31 21:08:57 +00:00
Alexander Belopolsky
f0313560e0
Issue #11081 : Fixed struct.__all__. Reviewed by Georg Brandl.
2011-01-31 19:27:55 +00:00
Georg Brandl
d6e19c3513
Bump version.
2011-01-30 14:03:33 +00:00
Georg Brandl
56632b4e9b
Update pydoc topics.
2011-01-30 14:00:32 +00:00
Georg Brandl
0f6b47a338
#10680 : fix mutually exclusive arguments in argument groups.
2011-01-30 12:19:35 +00:00
Georg Brandl
d2f3857c40
#10961 : fix exception handling in new pydoc server code.
...
Patch by Ron Adam, reviewed by Eric Araujo.
2011-01-30 08:37:19 +00:00
Georg Brandl
d163c2c57b
#11069 : fix the IDLE Stack Viewer, by not using "list" as a variable name.
...
Original patch by Brian Curtin, reviewed by me.
2011-01-30 08:16:07 +00:00
R. David Murray
b7deff1ddc
#9124 : mailbox now accepts binary input and uses binary internally
...
Although this patch contains API changes and is rather weighty for an
RC phase, the mailbox module was essentially unusable without the patch
since it would produce UnicodeErrors when handling non-ascii input
at arbitrary and somewhat mysterious places, and any non-trivial amount
of email processing will encounter messages with non-ascii bytes.
The release manager approved the patch application.
The changes allow binary input, and reject non-ASCII string input early
with a useful message instead of failing mysteriously later. Binary
is used internally for reading and writing the mailbox files. StringIO
and Text file input are deprecated.
Initial patch by Victor Stinner, validated and expanded by R. David Murray.
2011-01-30 06:21:28 +00:00
Nick Coghlan
793ee1f8a8
Issue #10845 : Improve compatibility between multiprocessing on Windows and package, zipfile and directory execution (Reviewed by Antoine Pitrou and approved by Georg Brandl)
2011-01-30 01:24:08 +00:00
Éric Araujo
ac4e58eb61
Protect logging call against None argument ( fixes #11045 ).
...
Initial patch by Kelsey Hightower. Approved by Raymond. A test was
non-trivial to write without calling the private function directly, so
we moved that for later.
2011-01-29 20:32:11 +00:00
Alexander Belopolsky
7dabf16f69
Issue #10939 : Make Internaldate2tuple test more robust.
2011-01-29 19:49:40 +00:00
Ned Deily
5c2d330662
Issue 11052: Correct IDLE menu accelerators on Mac OS X for Save
...
commands. (with release manager approval for 3.2rc2)
2011-01-29 19:10:26 +00:00
Ned Deily
806c944edb
Issue #11053 : Fix IDLE "Syntax Error" windows to behave as in 2.x,
...
preventing a confusing hung appearance on OS X with the windows
obscured. (with release manager approval for 3.2rc2)
2011-01-29 18:43:56 +00:00
Ned Deily
70063937ec
Issue #10940 : Workaround an IDLE hang on Mac OS X 10.6 when using the
...
menu accelerators for Open Module, Go to Line, and New Indent Width.
The accelerators still work but no longer appear in the menu items.
2011-01-29 18:29:01 +00:00
Alexander Belopolsky
19e0a9e511
Issue #10939 : Fixed imaplib.Internaldate2tuple(). Thanks Joe Peterson
...
for the report and the patch. Reviewed by Georg Brandl.
2011-01-29 17:19:08 +00:00
Victor Stinner
80f75e684e
Issue #10989 : Fix a crash on SSLContext.load_verify_locations(None, True).
...
Patch reviewed by Antoine Pitrou, okayed by Georg Brandl.
2011-01-29 11:31:20 +00:00
Eric Smith
a1eac7218b
Issue #11302 : missing type check on _string.formatter_field_name_split and _string.formatter_parser caused crash.
...
Originial patch by haypo, reviewed by me, okayed by Georg.
2011-01-29 11:15:35 +00:00
Michael Foord
e180d3953f
Issue 10573: revert unittest docs to first / second
...
Minor internal change to unittest.TestCase.assertCountEqual
Reviewed by R. David Murray
2011-01-28 19:51:48 +00:00
Raymond Hettinger
8b5eb2f813
Issue #11020 : Command-line pyclbr was broken because of missing 2-to-3
...
conversion.
(Patch reviewed by David Murray.)
2011-01-27 00:06:54 +00:00
Antoine Pitrou
528d9f6ead
Issue #11018 : fix a test to not be a no-op in test_bz2.
...
Found by Nadeem Vawda, reviewed by Brett.
2011-01-26 23:29:28 +00:00
R. David Murray
7372a07fd0
#11019 : Make BytesGenerator handle Message with None body.
...
Bug discovery and initial patch by Victor Stinner.
2011-01-26 21:21:32 +00:00
Raymond Hettinger
a63a312a3f
Issue #11014 : Make 'filter' argument in tarfile.Tarfile.add() into a
...
keyword-only argument. The preceding positional argument was deprecated,
so it made no sense to add filter as a positional argument.
(Patch reviewed by Brian Curtin and Anthony Long.)
2011-01-26 20:34:14 +00:00
R. David Murray
bdd2d93bfe
Revert r88197. I'll refix correctly once there is a test.
2011-01-26 02:31:37 +00:00
Victor Stinner
3a7ee3ab5a
Fix BytesGenerator._handle_text() if the message has no payload (None)
2011-01-26 00:39:19 +00:00
Victor Stinner
0c4cc559cb
fix import in email.message_from_binary_file()
...
Parser => BytesParser
2011-01-25 23:15:47 +00:00
Raymond Hettinger
512d2cc643
Issue #11004 : Repair edge case in deque.count().
...
(Reviewed by Georg Brandl.)
Also made similar changes to deque.reverse() though this wasn't
strictly necessary (the edge case cannot occur with two pointers
moving to meet in the middle). Making the change in reverse()
was more a matter of future-proofing.
2011-01-25 21:32:39 +00:00
Brett Cannon
5543e81352
Tighten the restrictions on the test_sys test which triggers a fatal error when
...
run with tracing turned on.
2011-01-25 18:26:35 +00:00
Benjamin Peterson
d454249a36
another pretty crasher served up by pypy
2011-01-25 00:00:28 +00:00
Ned Deily
122539e287
#10974 : IDLE no longer crashes if its recent files list includes files
...
with non-ASCII characters in their path names.
(with approval of release manager for 3.2rc2)
2011-01-24 21:46:44 +00:00
Terry Reedy
feac624827
Issue #11000 ast.parse parses source, not just expressions.
2011-01-24 21:36:03 +00:00
Steven Bethard
b02701101b
Issue #9509 : make argarse properly handle IOErrors raised by argparse.FileType. Approved by Georg in the tracker.
2011-01-24 21:02:50 +00:00
Raymond Hettinger
bf1d2bc7cb
Make the type consistent for hashlib algorithm constants. (Reviewed by Benjamin).
2011-01-24 04:52:27 +00:00
Brett Cannon
c3e8867a41
Skip a recursion depth check test when running under CPython and have a trace
...
function set. Otherwise a Python fatal error about hitting an unrecoverable
recursion depth gets triggered.
Closes issue #10985 . Code review by Georg Brandl.
2011-01-23 23:06:05 +00:00
Raymond Hettinger
6ef18f4fa3
Fix typo.
2011-01-23 21:33:36 +00:00
Raymond Hettinger
98b140c196
Add entry for reprlib.
2011-01-23 21:05:46 +00:00
Georg Brandl
c7c199f907
#10983 : fix several bugs in the _tunnel implementation that seem to have missed while porting between branches. A unittest is needed!
2011-01-22 22:06:24 +00:00
Armin Ronacher
59531287fd
To match the behaviour of HTTP server, the HTTP client library now also encodes
...
headers with iso-8859-1 (latin1) encoding. It was already doing that for
incoming headers which makes this behaviour now consistent in both incoming and
outgoing direction.
2011-01-22 13:44:22 +00:00
Armin Ronacher
8d96d77f9a
Issue #10980 : encode headers with latin1 instead of ASCII in the HTTP server.
...
This makes the implementation of PEP 3333 compliant servers on top of
BaseHTTPServer possible.
2011-01-22 13:13:05 +00:00
Vinay Sajip
01241d6c35
Issue #10949 : Improved robustness of rotating file handlers.
2011-01-21 23:35:57 +00:00
Antoine Pitrou
00d650baaa
Fix JSON docs about loads() accepting only str objects, not bytes.
2011-01-21 21:37:32 +00:00
Antoine Pitrou
305bc9e0e8
Issue #10955 : Fix a potential crash when trying to mmap() a file past its
...
length. Initial patch by Ross Lagerwall.
This fixes a regression introduced by r88022.
2011-01-20 21:07:24 +00:00
Alexander Belopolsky
41a99bc20d
Issue #10934 : Fixed and expanded Internaldate2tuple() and
...
Time2Internaldate() documentation. Thanks Joe Peterson for the report
and the original patch.
2011-01-19 19:53:30 +00:00
Antoine Pitrou
ad62b03949
Issue #10451 : memoryview objects could allow to mutate a readable buffer.
...
Initial patch by Ross Lagerwall.
2011-01-18 18:57:52 +00:00
Raymond Hettinger
5bdfd910f5
Remove out-of-date comment
2011-01-16 09:16:27 +00:00
Antoine Pitrou
d0ebc75e73
Fix mmap and test_mmap under Windows too (followup to r88022)
2011-01-15 17:25:58 +00:00
Georg Brandl
3988ed8e6f
Bump to 3.2rc1.
2011-01-15 17:08:53 +00:00
Georg Brandl
5cc3dcb191
Update pydoc topics.
2011-01-15 16:44:11 +00:00
Antoine Pitrou
85f4615500
Issue #10916 : mmap should not segfault when a file is mapped using 0 as
...
length and a non-zero offset, and an attempt to read past the end of file
is made (IndexError is raised instead). Patch by Ross Lagerwall.
Requested by Georg.
2011-01-15 16:17:07 +00:00
Ned Deily
4ce92b23fe
#10907 : Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5,
...
rather than the currently problematic Apple-supplied one,
when running with the 64-/32-bit installer variant.
2011-01-15 04:37:12 +00:00
Victor Stinner
f1c7ca93c1
cgi: use isinstance(x, list) instead of type(x) == type([])
2011-01-14 13:08:27 +00:00
Victor Stinner
5c23b8e6ea
Issue #4953 : cgi.FieldStorage and cgi.parse() parse the request as bytes, not
...
as unicode, and accept binary files. Add encoding and errors attributes to
cgi.FieldStorage.
2011-01-14 13:05:21 +00:00
Victor Stinner
1d87deb605
test_urlparse: add tests for encoding and errors arguments
2011-01-14 13:05:19 +00:00
Victor Stinner
ac71c54b88
Add encoding and errors arguments to urllib.parse_qs() and urllib.parse_qsl()
2011-01-14 12:52:12 +00:00
Raymond Hettinger
d958ea70bc
Issue 10899: Remove function type annotations from the stdlib
2011-01-13 19:08:04 +00:00
Raymond Hettinger
cbb80896ae
Issue #10899 : Move function type annotations into docstrings.
...
Note, the docstrings (for the most part) were already very thorough
and included type information.
2011-01-13 18:15:51 +00:00
Georg Brandl
4d73b570eb
More PEP 8: no space around "=" in argument lists.
2011-01-13 07:13:06 +00:00
Raymond Hettinger
00fa03900c
Issue 10899: Remove function type annotations from the stdlib
2011-01-13 02:52:26 +00:00
Raymond Hettinger
cd92f37582
Issue 10899: Remove function type annotations from the stdlib
2011-01-13 02:31:25 +00:00