Brett Cannon
b82489dd7f
setup.py was trying to build _weakref which is redundant as it's a built-in
...
module.
Closes issue #9848 . Thanks to Arfrever Frehtes Taifersar Arahesis for the bug
report.
2010-09-14 19:41:23 +00:00
Antoine Pitrou
328ec7455f
Issue #9854 : The default read() implementation in io.RawIOBase now
...
handles non-blocking readinto() returning None correctly.
2010-09-14 18:37:24 +00:00
Antoine Pitrou
9e0b864ac0
Issue #1552 : socket.socketpair() now returns regular socket.socket
...
objects supporting the whole socket API (rather than the "raw"
_socket.socket objects).
2010-09-14 18:00:02 +00:00
Antoine Pitrou
a468adc76d
Issue #9853 : Fix the signature of SSLSocket.recvfrom() and
...
SSLSocket.sendto() to match the corresponding socket methods.
2010-09-14 14:43:44 +00:00
Raymond Hettinger
98a5f3f838
Issue 9840: Add reprlib.recursive_repr(), a decorator for handling recursive calls to __repr__ methods.
2010-09-13 21:36:00 +00:00
Daniel Stutzbach
9f0cbf1c72
Issue #9213 : Add index and count methods to range objects, needed to
...
meet the API of the collections.Sequence ABC.
2010-09-13 21:16:29 +00:00
Eric Smith
e4d6317c87
Issue 7994: Make object.__format__() raise a PendingDeprecationWarning
...
if the format string is not empty. Manually merge r79596 and r84772
from 2.x.
Also, apparently test_format() from test_builtin never made it into
3.x. I've added it as well. It tests the basic format()
infrastructure.
2010-09-13 20:48:43 +00:00
Vinay Sajip
af9d10aa30
logging: enhanced HTTPHandler
2010-09-13 20:40:30 +00:00
Victor Stinner
ccb706cf0a
Issue #767645 : Set os.path.supports_unicode_filenames to True on Mac OS X
...
(macpath module).
2010-09-13 19:41:36 +00:00
Alexander Belopolsky
4d7701729c
Issue #9315 : Fix for the trace module to record correct class name
...
when tracing methods. Unit tests. Patch by Eli Bendersky.
2010-09-13 18:14:34 +00:00
Florent Xicluna
dc69e7217a
Make test.regrtest.__file__ absolute, this was not always the case when running profile or trace, for example. (issue #9323 )
2010-09-13 16:35:02 +00:00
Antoine Pitrou
1df1536fb9
Issue #9828 : Destroy the GIL in Py_Finalize(), so that it gets properly
...
re-created on a subsequent call to Py_Initialize(). The problem (a crash)
wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
2010-09-13 14:16:46 +00:00
Amaury Forgeot d'Arc
feb7307db4
#9210 : remove --with-wctype-functions configure option.
...
The internal unicode database is now always used.
(after 5 years: see
http://mail.python.org/pipermail/python-dev/2004-December/050193.html
)
2010-09-12 22:42:57 +00:00
Georg Brandl
b2f98401d1
Get rid of tabs.
2010-09-12 20:58:19 +00:00
Georg Brandl
b084b48cec
9806: add --extension-suffix option to python-config.
2010-09-12 17:14:26 +00:00
Matthias Klose
62d52fd966
- Issue #9817 : Add expat COPYING file; add expat, libffi and expat licenses
...
to Doc/license.rst.
2010-09-12 16:31:58 +00:00
Antoine Pitrou
6464d5ffdc
Issue #9837 : The read() method of ZipExtFile objects (as returned by
...
ZipFile.open()) could return more bytes than requested.
2010-09-12 14:51:20 +00:00
Raymond Hettinger
dc08a143e0
Issue #9826 : Handle recursive repr in collections.OrderedDict.
2010-09-12 05:15:22 +00:00
Raymond Hettinger
fa11db0a02
Issue #9825 : Replace OrderedDict.__del__() with weakrefs.
2010-09-12 04:12:42 +00:00
Benjamin Peterson
568867a6f2
check for NULL tp_as_mapping in PySequence_(Get/Set/Del)Slice #9834
2010-09-11 16:02:03 +00:00
Victor Stinner
1205f2774e
Issue #9738 : PyUnicode_FromFormat() and PyErr_Format() raise an error on
...
a non-ASCII byte in the format string.
Document also the encoding.
2010-09-11 00:54:47 +00:00
Victor Stinner
6f7b783cde
Issue #9579 , #9580 : Oops, add the author of the patch
2010-09-10 23:50:31 +00:00
Victor Stinner
cb04352e8c
Issue #9579 , #9580 : Fix os.confstr() for value longer than 255 bytes and encode
...
the value with filesystem encoding and surrogateescape (instead of utf-8 in
strict mode).
2010-09-10 23:49:04 +00:00
Victor Stinner
5b519e0201
Issue #9632 : Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
...
environment variable to set the filesystem encoding at Python startup.
sys.setfilesystemencoding() creates inconsistencies because it is unable to
reencode all filenames in all objects.
2010-09-10 21:57:59 +00:00
Amaury Forgeot d'Arc
ba117ef7e9
#4617 : Previously it was illegal to delete a name from the local
...
namespace if it occurs as a free variable in a nested block. This limitation
of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).
This sample was valid in 2.6, but fails to compile in 3.x without this change::
>>> def f():
... def print_error():
... print(e)
... try:
... something
... except Exception as e:
... print_error()
... # implicit "del e" here
This sample has always been invalid in Python, and now works::
>>> def outer(x):
... def inner():
... return x
... inner()
... del x
There is no need to bump the PYC magic number: the new opcode is used
for code that did not compile before.
2010-09-10 21:39:53 +00:00
Antoine Pitrou
8e6b407d6f
Issue #941346 : Improve the build process under AIX and allow Python to
...
be built as a shared library. Patch by Sébastien Sablé.
2010-09-10 19:44:44 +00:00
Antoine Pitrou
e4a189274f
Issue #9804 : ascii() now always represents unicode surrogate pairs as
...
a single `\UXXXXXXXX`, regardless of whether the character is printable
or not. Also, the "backslashreplace" error handler now joins surrogate
pairs into a single character on UCS-2 builds.
2010-09-09 20:30:23 +00:00
Antoine Pitrou
ea99c5c949
Issue #9410 : Various optimizations to the pickle module, leading to
...
speedups up to 4x (depending on the benchmark). Mostly ported from
Unladen Swallow; initial patch by Alexandre Vassalotti.
2010-09-09 18:33:21 +00:00
Antoine Pitrou
6e6cc830c4
Issue #9757 : memoryview objects get a release() method to release the
...
underlying buffer (previously this was only done when deallocating the
memoryview), and gain support for the context management protocol.
2010-09-09 12:59:39 +00:00
Raymond Hettinger
bad3c88094
Have pprint() respect the order in an OrderedDict.
2010-09-09 12:31:00 +00:00
Hirokazu Yamamoto
d72461a7ed
Updated VS7.1 project file. (I cannot test this file because I don't have VS7.1)
2010-09-09 06:14:23 +00:00
Antoine Pitrou
b41e128fe1
Issue #9188 : The gdb extension now handles correctly narrow (UCS2) as well
...
as wide (UCS4) unicode builds for both the host interpreter (embedded
inside gdb) and the interpreter under test.
2010-09-08 20:57:48 +00:00
Antoine Pitrou
079ce54efe
Issue #9797 : pystate.c wrongly assumed that zero couldn't be a valid
...
thread-local storage key.
2010-09-08 12:37:10 +00:00
Vinay Sajip
121a1c4e11
logging: Added QueueHandler.
2010-09-08 10:46:15 +00:00
Georg Brandl
febeb00e41
Add Lukasz.
2010-09-08 10:43:45 +00:00
Antoine Pitrou
783eea722b
Issue #9707 : Rewritten reference implementation of threading.local which
...
is friendlier towards reference cycles. This change is not normally
visible since an optimized C implementation (_thread._local) is used
instead.
2010-09-07 22:06:17 +00:00
Amaury Forgeot d'Arc
4b6fdf3852
#6394 : Add os.getppid() support for Windows.
2010-09-07 21:31:17 +00:00
Antoine Pitrou
4b92b5fad3
Issue #9792 : In case of connection failure, socket.create_connection()
...
would swallow the exception and raise a new one, making it impossible
to fetch the original errno, or to filter timeout errors. Now the
original error is re-raised.
2010-09-07 21:05:49 +00:00
Antoine Pitrou
5e38aae91b
Issue #9758 : When fcntl.ioctl() was called with mutable_flag set to True,
...
and the passed buffer was exactly 1024 bytes long, the buffer wouldn't
be updated back after the system call. Original patch by Brian Brazil.
2010-09-07 16:30:09 +00:00
Antoine Pitrou
a300007c6e
Issue #4026 : Make the fcntl extension build under AIX.
...
Patch by Sébastien Sablé.
2010-09-07 14:52:42 +00:00
Raymond Hettinger
0515661314
Issues #7889 , #9025 and #9379 : Improvements to the random module.
2010-09-07 04:44:52 +00:00
Raymond Hettinger
f763a728ad
Document which part of the random module module are guaranteed.
2010-09-07 00:38:15 +00:00
Raymond Hettinger
435cb0f233
Document which part of the random module module are guaranteed.
2010-09-06 23:36:31 +00:00
Raymond Hettinger
f45abc97bf
Add method to OrderedDict for repositioning keys to the ends.
2010-09-06 21:26:09 +00:00
Florent Xicluna
feb2ee46bc
typo
2010-09-06 20:27:15 +00:00
Antoine Pitrou
4bc12ef47d
Issue #9754 : Similarly to assertRaises and assertRaisesRegexp, unittest
...
test cases now also have assertWarns and assertWarnsRegexp methods to
check that a given warning type was triggered by the code under test.
2010-09-06 19:25:46 +00:00
Antoine Pitrou
972ee13e03
Issue #5506 : BytesIO objects now have a getbuffer() method exporting a
...
view of their contents without duplicating them. The view is both readable
and writable.
2010-09-06 18:48:21 +00:00
Brian Curtin
6285774f06
Implement #7566 - os.path.sameopenfile for Windows.
...
This uses the GetFileInformationByHandle function to return a tuple of values
to identify a file, then ntpath.sameopenfile compares file tuples, which
is exposed as os.path.sameopenfile.
2010-09-06 17:07:27 +00:00
Gregory P. Smith
13b55291ac
hashlib has two new constant attributes: algorithms_guaranteed and
...
algorithms_avaiable that respectively list the names of hash algorithms
guaranteed to exist in all Python implementations and the names of hash
algorithms available in the current process.
Renames the attribute new in 3.2a0 'algorithms' to 'algorithms_guaranteed'.
2010-09-06 08:30:23 +00:00
Antoine Pitrou
0d739d7047
Issue #9293 : I/O streams now raise `io.UnsupportedOperation` when an
...
unsupported operation is attempted (for example, writing to a file open
only for reading).
2010-09-05 23:01:12 +00:00