Victor Stinner
4a2b7a1b14
Issue #9425 : Create PyErr_WarnFormat() function
...
Similar to PyErr_WarnEx() but use PyUnicode_FromFormatV() to format the warning
message.
Strip also some trailing spaces.
2010-08-13 14:03:48 +00:00
Antoine Pitrou
3e2eab19b9
Typo.
2010-08-12 15:15:01 +00:00
Antoine Pitrou
7c8bcb6f92
Issue #7467 : when a file from a ZIP archive, its CRC is checked and a
...
BadZipfile error is raised if it doesn't match (as used to be the
case in Python 2.5 and earlier).
2010-08-12 15:11:50 +00:00
Benjamin Peterson
d4efbf90d2
use pep 383 decoding for mknod and mkfifo #9570
...
Patch by David Watson.
2010-08-11 19:20:42 +00:00
Alexander Belopolsky
f0f45142d5
Issue #2443 : Added a new macro, Py_VA_COPY, which is equivalent to C99
...
va_copy, but available on all python platforms. Untabified a few
unrelated files.
2010-08-11 17:31:17 +00:00
Antoine Pitrou
32cfedeb1c
Issue #9550 : a BufferedReader could issue an additional read when the
...
original read request had been satisfied, which can block indefinitely
when the underlying raw IO channel is e.g. a socket. Report and original
patch by Jason V. Miller.
2010-08-11 13:31:33 +00:00
Antoine Pitrou
b73caab436
Issue #6915 : Under Windows, os.listdir() didn't release the Global
...
Interpreter Lock around all system calls. Original patch by Ryan Kelly.
2010-08-09 23:39:31 +00:00
Antoine Pitrou
5af4f4b983
Issue #3757 : thread-local objects now support cyclic garbage collection.
...
Thread-local objects involved in reference cycles will be deallocated
timely by the cyclic GC, even if the underlying thread is still running.
2010-08-09 22:38:19 +00:00
Antoine Pitrou
6e451df800
Followup to r83869 and issue #8524 : rename socket.forget() to socket.detach()
...
and make it return the file descriptor.
2010-08-09 20:39:54 +00:00
Fred Drake
a492362f9a
issue #9452 :
...
Add read_file, read_string, and read_dict to the configparser API;
new source attribute to exceptions.
2010-08-09 12:52:45 +00:00
Florent Xicluna
c7eaede21e
Fix ``Tools/scripts/checkpyc.py`` after PEP 3147.
2010-08-09 12:26:44 +00:00
Antoine Pitrou
aba74bddd6
Revert r83877 in order to fix compilation
2010-08-09 10:47:46 +00:00
Senthil Kumaran
9f347ea545
reapply the revert made in r83875
...
Now the _collections is statically built, the build dependencies are in proper
order and build works fine.
Commit Log from r83874:
Issue 9396. Apply functools.lru_cache in the place of the
random flushing cache in the re module.
2010-08-09 07:30:53 +00:00
Raymond Hettinger
31022301b5
Revert 83784 adding functools.lru_cache() to the re module.
...
The problem is that the re module is imported by sysconfig
and re needs functools which uses collections.OrderedDict()
but the _collectionsmodule.c code is not yet constructed
at this point in the build.
The likely best solution will be to include _collections
as part of the static build before the rest of the
boot-strapping.
2010-08-09 05:56:50 +00:00
Raymond Hettinger
4f859ed9c7
Issue 9396. Apply functools.lru_cache in the place of the
...
random flushing cache in the re module.
2010-08-09 04:24:42 +00:00
Antoine Pitrou
e43f9d0ed6
Issue #8524 : Add a forget() method to socket objects, so as to put the
...
socket into the closed state without closing the underlying file
descriptor.
2010-08-08 23:24:50 +00:00
Florent Xicluna
ba8a98600e
Fix xml.etree.ElementInclude to include the tail of the current node. Issue #6231
2010-08-08 23:08:41 +00:00
Antoine Pitrou
696e03553b
Issue #477863 : Print a warning at shutdown if gc.garbage is not empty.
2010-08-08 22:18:46 +00:00
Florent Xicluna
eb6f3ead00
Fix #8530 : Prevent stringlib fastsearch from reading beyond the front of an array.
2010-08-08 22:07:16 +00:00
Antoine Pitrou
bddc9fe22b
Issue #5319 : Print an error if flushing stdout fails at interpreter
...
shutdown.
2010-08-08 20:46:42 +00:00
Florent Xicluna
c17f17294f
Issue #8047 : Fix the xml.etree serializer to return bytes by default.
...
Use ``encoding="unicode"`` to generate a Unicode string.
2010-08-08 19:48:29 +00:00
Thomas Heller
bf4cc5d469
Fix issue6869: refcount problem in the _ctypes extension.
2010-08-08 18:16:20 +00:00
Florent Xicluna
39d795d8c1
Issue #7564 : Skip test_ioctl if another process is attached to /dev/tty.
2010-08-08 18:06:13 +00:00
Florent Xicluna
e7eaec699e
Typo.
2010-08-08 18:03:44 +00:00
Thomas Heller
864cc6703a
Fix issue5504: ctypes does now work with systems where mmap can't be
...
PROT_WRITE and PROT_EXEC.
2010-08-08 17:58:53 +00:00
Senthil Kumaran
c41e1fad49
Add a news entry for Issue8280.
2010-08-08 11:50:22 +00:00
Raymond Hettinger
d331ce9e66
Issue #9507 : Named tuple repr will now automatically display the right
...
name in a tuple subclass.
2010-08-08 01:13:42 +00:00
Mark Dickinson
af43e9a288
Issue #8433 : Fix test_curses failure for platforms with recent versions of ncurses.
2010-08-07 12:33:36 +00:00
Brian Curtin
ef9efbd69c
Fix #9324 : Add parameter validation to signal.signal on Windows in order
...
to prevent crashes.
2010-08-06 19:27:32 +00:00
Mark Dickinson
e6fc7401a9
In PySlice_IndicesEx, clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX] rather than [PY_SSIZE_T_MIN, PY_SSIZE_T_MAX].
2010-08-06 18:55:26 +00:00
Mark Dickinson
4f3086f264
Misc/NEWS entry for r83751.
2010-08-06 09:38:58 +00:00
Brian Curtin
f045d775fd
Issue #9524 : Document that two CTRL* signals are meant for use only
...
with os.kill.
2010-08-05 18:56:00 +00:00
Gerhard Häring
1c5471f319
Issue #6683 : For SMTP logins we now try all authentication methods advertised
...
by the server. Many servers are buggy and advertise authentication methods they
o not support in reality. This change makes smtplib.auth() work more often in
the real world, where we face misconfigured servers and servers that advertise
methods they don't support due to the madness that is SASL.
2010-08-05 14:08:44 +00:00
Mark Dickinson
388122d43b
Issue #9337 : Make float.__str__ identical to float.__repr__.
...
(And similarly for complex numbers.)
2010-08-04 20:56:28 +00:00
Antoine Pitrou
560f7647ce
Issue #8814 : function annotations (the `__annotations__` attribute)
...
are now included in the set of attributes copied by default by
functools.wraps and functools.update_wrapper. Patch by Terrence Cole.
2010-08-04 18:28:02 +00:00
Antoine Pitrou
482e66a58a
Issue #9496 : Provide a test suite for the rlcompleter module. Patch by
...
Michele Orrù.
2010-08-04 15:43:16 +00:00
Giampaolo Rodolà
f96482e91a
as per discussion with antoine revert changes made in 83708 as the user useing ftplib's readline methods is supposed to always use a binary file
2010-08-04 10:36:18 +00:00
Giampaolo Rodolà
b939235c6a
fix issue #6822 : ftplib's storline method doesn't work with text files
2010-08-04 10:12:00 +00:00
Giampaolo Rodolà
b5c23761d3
issue #8687 : provides a test suite for sched.py module
2010-08-04 09:28:05 +00:00
Giampaolo Rodolà
934abddaec
fix issue #2944 : asyncore doesn't handle connection refused correctly (patch by Alexander Shigin). Merged from 2.7 branch.
2010-08-04 09:02:27 +00:00
Richard Jones
dd24cf692c
note smtpd module changes in NEWS
2010-08-04 01:19:22 +00:00
R. David Murray
c4e69cc1d8
#3196 : if needed pad a short base64 encoded word before trying to decode.
...
The RFCs encourage following Postel's law: be liberal in what you accept.
So if someone forgot to pad the base64 encoded word payload to an
even four bytes, we add the padding before handing it to base64mime.decode.
Previously, missing padding resulted in a HeaderParseError.
Patch by Jason Williams.
2010-08-03 22:14:10 +00:00
Mark Dickinson
df7f2fd350
Misc/NEWS entry for r83677.
2010-08-03 18:44:16 +00:00
R. David Murray
88c49fe320
#9444 : use first of prefix_chars for help opt instead of raising error
...
An argparse option parser created with a prefix_chars that did not
include a '-' would happily add -h and --help options, and then throw
an error when it tried to format the help because the - was an invalid
prefix character. This patch makes it use the first character of
prefix_chars as the character for the help options if and only if '-'
is not one of the valid prefix_chars.
Fix by Theodore Turocy, unit tests by Catherine Devlin.
2010-08-03 17:56:09 +00:00
Antoine Pitrou
f767f08e29
Issue #8867 : Fix `Tools/scripts/serve.py` to work with files containing
...
non-ASCII content.
2010-08-03 17:09:36 +00:00
Mark Dickinson
6b54e1f782
Issue #8065 : Fix another memory leak in readline module, from failure to free
...
the result of a call to history_get_history_state.
2010-08-03 16:49:49 +00:00
Mark Dickinson
29b238e0dc
Issue #9450 : Fix memory leaks in readline.remove/replace_history_entry.
2010-08-03 16:08:16 +00:00
Georg Brandl
2d3c4e79a1
#7372 : fix regression in pstats: a previous fix to handle cProfile data in add_callers broke handling of profile data.
2010-08-02 17:24:49 +00:00
Georg Brandl
8e43fbfffa
#9428 : fix running scripts from profile/cProfile with their own name and the right namespace. Same fix as for trace.py in #1690103 .
2010-08-02 12:20:23 +00:00
Georg Brandl
b1a97afadb
#9209 and #7781 : fix two crashes in pstats interactive browser.
2010-08-02 12:06:18 +00:00
Georg Brandl
5f90d79473
Fix style of referring to issues.
2010-08-01 22:31:05 +00:00
Raymond Hettinger
5be21b7a5a
Update OrderedDict implementation to match that in Py2.7.
2010-08-01 22:10:57 +00:00
Antoine Pitrou
7ffa196dce
Issue #8397 : Raise an error when attempting to mix iteration and regular
...
reads on a BZ2File object, rather than returning incorrect results.
2010-08-01 20:08:46 +00:00
Antoine Pitrou
c881f1592f
Issue #9448 : Fix a leak of OS resources (mutexes or semaphores) when
...
re-initializing a buffered IO object by calling its `__init__` method.
2010-08-01 16:53:42 +00:00
Georg Brandl
e6c5950af0
#5551 : symbolic links never can be mount points. Fixes the fix for #1713 .
2010-08-01 15:30:56 +00:00
Brian Curtin
ea47eaa395
Fix #8105 . Add validation to mmap.mmap so invalid file descriptors
...
don't cause a crash on Windows.
2010-08-01 15:26:26 +00:00
Georg Brandl
0bccc185b4
#8046 : add context manager protocol support to mmap objects. Also add closed property.
2010-08-01 14:50:00 +00:00
Mark Dickinson
5b65df7ce2
Issue #9416 : Fix some issues with complex formatting where the
...
output with no type specifier failed to match the str output:
- format(complex(-0.0, 2.0), '-') omitted the real part from the output,
- format(complex(0.0, 2.0), '-') included a sign and parentheses.
2010-08-01 10:41:49 +00:00
Georg Brandl
b16e38b825
#8826 : the "expires" attribute value is a date string with spaces, but apparently not all user-agents put it in quotes. Handle that as a special case.
2010-08-01 09:06:34 +00:00
Georg Brandl
8f9f466505
#1690103 : fix initial namespace for code run with trace.main().
2010-08-01 08:35:29 +00:00
Georg Brandl
920bc0fd86
Add another news entry.
2010-08-01 08:10:08 +00:00
Georg Brandl
f325e03f48
#8230 : make Lib/test/sortperf.py run on Python 3.
2010-08-01 08:07:49 +00:00
R. David Murray
7905d61b2c
#8620 : Cmd no longer truncates last character if stdin ends without newline
...
Cmd used to blindly chop off the last character of every input line. If
the input reached EOF and there was no final new line, it would truncate
the last character of the last command. This fix instead strips trailing
\r\n from the input lines. While this is a small behavior change, it
should not break any working code, since feeding a '\r\n' terminated
file to Cmd would previously leave the \r's on the lines, resulting
in failed command execution.
I wrote the unit test in preparation for a PyOhio TeachMe session
run by Catherine Devlin, and we can thank Catherine and the PyOhio
session attendees for the fix. I've added Catherine to the Acks file
for organizing and leading the TeachMe session, out of which we will
hopefully get some new contributors.
2010-08-01 03:31:09 +00:00
Georg Brandl
05245f7487
#5146 : handle UID THREAD command correctly.
2010-07-31 22:32:52 +00:00
Georg Brandl
87a1564f24
#5147 : revert accidental indentation of header constant for MozillaCookieJar.
2010-07-31 22:11:11 +00:00
Georg Brandl
78aa396415
#8198 : the Helper class should not save the stdin and stdout objects
...
at import time, rather by default use the current streams like the
other APIs that output help.
2010-07-31 21:51:48 +00:00
Georg Brandl
bb1901529d
Fix "Berkeley" name.
2010-07-31 21:41:42 +00:00
Georg Brandl
cfb68218b7
#7909 : the prefixes \\.\ and \\?\ indicate special Windows paths, do not try to manipulate them. See http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx for details.
2010-07-31 21:40:15 +00:00
Georg Brandl
6cb7b6593e
#1286 : allow using fileinput.FileInput as context manager.
2010-07-31 20:08:15 +00:00
Georg Brandl
ebb280cf90
Move news item to the correct position.
2010-07-31 18:09:46 +00:00
Georg Brandl
2e7346acc9
Re-commit r83327 now that the release is done.
2010-07-31 18:09:23 +00:00
Georg Brandl
ee449c41b4
Post-release updates.
2010-07-31 18:05:35 +00:00
Georg Brandl
014e0ca58e
Revert r83327. This will have to wait until after the alpha1 release.
2010-07-31 10:16:21 +00:00
Raymond Hettinger
9e46ef819c
Add functools.lfu_cache() and functools.lru_cache().
2010-07-31 10:11:39 +00:00
Georg Brandl
62069d3ce7
Bump versions and review NEWS file.
2010-07-31 08:56:11 +00:00
Georg Brandl
b90ffd88f1
Part of #7245 : when KeyboardInterrupt is raised while defining commands, restore the old commands instead of producing a traceback.
2010-07-30 22:20:16 +00:00
Matthias Klose
635edd1990
- Issue #7567 : PyCurses_setupterm: Don't call `setupterm' twice.
2010-07-30 21:40:57 +00:00
Georg Brandl
0a9c3e91dc
Show the traceback line numbers as well as the current line numbers if an exception is being debugged. Courtesy of pdb++ by Antonio Cuni. Also document -> and >> markers for "list".
2010-07-30 18:46:38 +00:00
Martin v. Löwis
e38de851eb
Use OpenSSL 1.0.0a on Windows.
2010-07-30 17:30:51 +00:00
Georg Brandl
e59ca2afe3
Add "longlist" and "source" commands, ideas borrowed from pdb++ by Antonio Cuni.
2010-07-30 17:04:28 +00:00
Georg Brandl
7410dd11ef
#809887 : improve pdb feedback for breakpoint-related actions. Also add a functional test for these commands.
2010-07-30 12:01:20 +00:00
Georg Brandl
3f94089a77
#5294 : Fix the behavior of pdb "continue" command when called in the top-level debugged frame.
2010-07-30 10:29:19 +00:00
Georg Brandl
d72e043bdd
#5727 : Restore the ability to use readline when calling into pdb in doctests.
2010-07-30 09:59:28 +00:00
Georg Brandl
34cc0f53be
#6719 : In pdb, do not stop somewhere in the encodings machinery if the source file to be debugged is in a non-builtin encoding.
2010-07-30 09:43:00 +00:00
Georg Brandl
25fbb891d8
Issue #8048 : Prevent doctests from failing when sys.displayhook has
...
been reassigned.
2010-07-30 09:23:23 +00:00
Georg Brandl
44f8bf9411
#8015 : fix crash when entering an empty line for breakpoint commands. Also restore environment properly when an exception occurs during the definition of commands.
2010-07-30 08:54:49 +00:00
Georg Brandl
2dfec552fe
Allow giving an explicit line number to "until".
2010-07-30 08:43:32 +00:00
Georg Brandl
e023091815
#1437051 : allow "continue"/"next"/etc. in .pdbrc, also add pdb -c option to give these commands. This allows to run a script until an exception occurs.
2010-07-30 08:29:39 +00:00
Georg Brandl
a91a94b7c0
#4179 : In pdb, allow "list ." as a command to return to the currently debugged line.
2010-07-30 07:14:01 +00:00
Mark Dickinson
cf28b95800
Issue #9422 : Fix memory leak when re-initializing a struct.Struct object.
2010-07-29 21:41:59 +00:00
Georg Brandl
0a0fc07d37
#4108 : the first default entry (User-agent: *) wins.
2010-07-29 17:55:01 +00:00
Georg Brandl
056cb93e7a
#6630 : allow customizing flags for compiling string.Template.idpattern.
2010-07-29 17:16:10 +00:00
Georg Brandl
8dcaa7396f
#9411 : allow selecting an encoding for configparser files. Also adds a new test config file to test special cases.
2010-07-29 12:17:40 +00:00
Georg Brandl
96a60ae90c
#1682942 : add some ConfigParser features: alternate delimiters, alternate comments, empty lines in values. Also enhance the docs with more examples and mention SafeConfigParser before ConfigParser. Patch by Lukas Langa, review by myself, Eric and Ezio.
2010-07-28 13:13:46 +00:00
Georg Brandl
cbb0ae4a42
#9354 : Provide getsockopt() in asyncore file_wrapper(). Patch by Lukas Langa.
2010-07-28 08:19:35 +00:00
Victor Stinner
8182b717db
Issue #8991 : convertbuffer() rejects discontigious buffers
2010-07-28 00:40:58 +00:00
Victor Stinner
cf448832eb
Issue #8966 : ctypes: Remove implicit bytes-unicode conversion
2010-07-28 00:15:03 +00:00
Alexander Belopolsky
455f7bdc05
Issue #9378 : python -m pickle <pickle file> will now load and display
...
the first object in the pickle file.
2010-07-27 23:02:38 +00:00
Florent Xicluna
f1046ca817
Issue #4770 : Restrict binascii module to accept only bytes (as specified).
...
And fix the email package to encode to ASCII instead of ``raw-unicode-escape`` before ASCII-to-binary decoding.
2010-07-27 21:20:15 +00:00
Alexander Belopolsky
c02cc2707a
Issue #9384 : python -m tkinter will now display a simple demo applet.
2010-07-27 14:16:32 +00:00