Antoine Pitrou
c3ed2e7f83
Issue #9962 : GzipFile now has the peek() method.
2010-09-29 10:49:46 +00:00
Victor Stinner
137c34c027
Issue #9979 : Create function PyUnicode_AsWideCharString().
2010-09-29 10:25:54 +00:00
R. David Murray
11cabcf73d
#7110 : have regrtest print test failures and tracebacks to stderr not stdout.
...
Patch by Sandro Tosi.
2010-09-29 01:08:05 +00:00
R. David Murray
b78b4893a9
#9628 : fix runtests.sh -x option so more than one test can be excluded.
2010-09-28 22:25:18 +00:00
Antoine Pitrou
3e1fd27b74
Issue #9090 : When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
...
retry the select() loop instead of bailing out. This is because select()
can incorrectly report a socket as ready for reading (for example, if it
received some data with an invalid checksum).
2010-09-28 21:23:11 +00:00
Hirokazu Yamamoto
cc868d430b
Issue #3612 : Added new types to ctypes.wintypes. (CHAR and pointers)
2010-09-28 21:08:38 +00:00
Ronald Oussoren
01c428999a
Fix for issue #9568 .
2010-09-28 14:38:31 +00:00
Ronald Oussoren
9af738022e
Add support for the ZSH shell to the "Update Shell Profile" script
...
on MacOSX.
Patch by Sylvain Mora, issue #9701 .
2010-09-28 13:57:58 +00:00
Mark Dickinson
fa41e60c9d
Issue #9599 : Tweak loghelper algorithm to return slightly improved results for powers of 2.
2010-09-28 07:22:27 +00:00
Brett Cannon
5305a998d5
Since __import__ is not designed for general use, have its docstring point
...
people towards importlib.import_module().
Closes issue #7397 .
2010-09-27 21:08:38 +00:00
Brian Curtin
1771b54bed
Implement #8521 . Added named argument handling to winreg's CreateKeyEx,
...
DeleteKeyEx, and OpenKeyEx.
Note that CKE and DKE are new functions for 3.2 so I didn't give them a
versionchanged because of the existing versionadded. OpenKeyEx already
existed so it gets a versionchanged tag.
2010-09-27 17:56:36 +00:00
Antoine Pitrou
6d7df63837
Issue #9950 : Fix socket.sendall() crash or misbehaviour when a signal is
...
received. Now sendall() properly calls signal handlers if necessary,
and retries sending if these returned successfully, including on sockets
with a timeout.
2010-09-27 17:52:25 +00:00
Vinay Sajip
9fdd11b3b6
Issue #9947 : logging: Fixed locking bug in stopListening.
2010-09-25 17:48:25 +00:00
Vinay Sajip
32fb6a81f9
Issue #9945 : logging: Fixed locking bugs in addHandler/removeHandler.
2010-09-25 17:42:36 +00:00
Benjamin Peterson
aa7fbd9564
revert r85003, poorly considered; breaks tests
2010-09-25 03:25:42 +00:00
Benjamin Peterson
81437c9025
don't count keyword arguments as positional #9943
2010-09-25 03:14:33 +00:00
Alexander Belopolsky
ff09ce211f
Issue #9936 : Fixed executable lines' search in the trace module.
2010-09-24 18:03:12 +00:00
Brian Curtin
0dac808b3e
Fix #9790 : Rework the imports necessary for ntpath.samefile and
...
ntpath.sameopenfile.
2010-09-23 20:38:14 +00:00
Mark Dickinson
b09a3d69a6
Issue #9930 : Remove an unnecessary type check in wrap_binaryfunc_r;
...
this was causing reversed method calls like float.__radd__(3.0, 1) to
return NotImplemented instead of the expected numeric value.
2010-09-23 20:11:19 +00:00
Brian Curtin
e8e4b3bfd6
#9808 . Implement os.getlogin for Windows, completed by Jon Anglin.
...
The test is semi-dumb, it just makes sure something comes back since we
don't have a solid source to validate the returned login. We can't be 100%
sure that the USERNAME env var will always match what os.getlogin() returns,
so we don't make any specific assertion there.
2010-09-23 20:04:14 +00:00
Antoine Pitrou
70c6044913
Issue #9928 : Properly initialize the types exported by the bz2 module.
2010-09-23 19:51:39 +00:00
Antoine Pitrou
7b9698435d
Issue #1675951 : Allow GzipFile to work with unseekable file objects.
...
Patch by Florian Festi.
2010-09-23 16:22:51 +00:00
Vinay Sajip
0637d493e9
logging: added QueueListener and documentation.
2010-09-23 08:15:54 +00:00
Barry Warsaw
31c604d3a7
Issue 9916: Add some missing errno symbols.
2010-09-22 20:58:04 +00:00
Benjamin Peterson
0dc97ed18d
fix news
2010-09-21 21:28:47 +00:00
Hirokazu Yamamoto
2f816e6a10
Issue #9552 : Avoid unnecessary rebuild of OpenSSL. (Windows)
2010-09-21 18:23:05 +00:00
Antoine Pitrou
38425292fb
Issue #9908 : Fix os.stat() on bytes paths under Windows 7.
2010-09-21 18:19:07 +00:00
Antoine Pitrou
b3bfc3d88b
Issue #9899 : Fix test_tkinter.test_font on various platforms. Patch by
...
Ned Deily.
2010-09-21 16:26:09 +00:00
Antoine Pitrou
52d42503d5
Issue #2643 : msync() is not called anymore when deallocating an open mmap
...
object, only munmap().
2010-09-21 16:08:27 +00:00
Hirokazu Yamamoto
e31f7d9e2e
Revert r84902 before committing better solution.
2010-09-21 16:05:47 +00:00
Antoine Pitrou
f6350d2654
Issue #1633863 : Don't ignore $CC under AIX.
2010-09-21 15:19:14 +00:00
Brian Quinlan
af38dc5b0c
Add an entry for the concurrent.futures package
2010-09-21 12:28:43 +00:00
Vinay Sajip
212b590e11
logging: Updated LoggerAdapter implementation.
2010-09-21 11:31:32 +00:00
Vinay Sajip
c84f016988
Added some methods to LoggerAdapter, and updated documentation.
2010-09-21 11:25:39 +00:00
Benjamin Peterson
d4efd9eb15
add column offset to all syntax errors
2010-09-20 23:02:10 +00:00
Benjamin Peterson
2bc5c0be01
add news note
2010-09-20 23:01:33 +00:00
Antoine Pitrou
b0b384b7c0
Issue #9901 : Destroying the GIL in Py_Finalize() can fail if some other
...
threads are still running. Instead, reinitialize the GIL on a second
call to Py_Initialize().
2010-09-20 20:13:48 +00:00
Barry Warsaw
ebbef6fef2
Issue 9877: expose sysconfig.get_makefile_filename() in the public API.
2010-09-20 15:29:53 +00:00
Vinay Sajip
83eadd1488
logging: hasHandlers additions documented.
2010-09-20 10:31:18 +00:00
Brett Cannon
bc2eff3112
PyImport_Import was using the old import hack of sticking a dummy value into
...
fromlist to get __import__ to return the module desired. Now it uses the proper
approach of fetching the module from sys.modules.
Closes issue #9252 . Thanks to Alexander Belopolsky for the bug report.
2010-09-19 21:39:02 +00:00
Hirokazu Yamamoto
ba45c2b6a7
Issue #9552 : Avoid unnecessary rebuild of OpenSSL. (Windows)
2010-09-19 09:24:20 +00:00
Florent Xicluna
eb19dce085
Issue #1686 : Fix string.Template when overriding the pattern attribute.
2010-09-18 23:34:07 +00:00
Antoine Pitrou
98b46702d2
Issue #9854 : SocketIO objects now observe the RawIOBase interface in
...
non-blocking mode: they return None when an operation would block (instead
of raising an exception).
2010-09-18 22:59:00 +00:00
Antoine Pitrou
679e0f2328
Issue #9894 : Do not hardcode ENOENT in test_subprocess.
...
(GNU/Hurd is not dead)
2010-09-18 17:56:02 +00:00
Victor Stinner
e797c16f84
Issue #767645 : Set os.path.supports_unicode_filenames to True in posixpath
...
Previous commit changed macpath but macpath is not used anymore as os.path
2010-09-17 23:34:26 +00:00
Amaury Forgeot d'Arc
d61d077bf5
#1730136 : Fix comparison between a tk Font object and an object of a different type.
2010-09-17 23:27:09 +00:00
Vinay Sajip
19ec67acf6
Issue #9441 : logging: Improved test coverage for rotating file handlers.
2010-09-17 18:57:36 +00:00
Raymond Hettinger
35c87f2b8e
Issue 9865: add __sizeof__ to OrderedDict.
2010-09-16 19:10:17 +00:00
Hirokazu Yamamoto
234f88dc73
Issue #9810 : Compile bzip2 source files in python's project file
...
directly. It used to be built with bzip2's makefile.
2010-09-16 17:50:57 +00:00
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
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
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
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
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
Georg Brandl
bad092556e
Post-release update.
2010-09-05 21:29:17 +00:00
Georg Brandl
65ce6ada7f
Fix reST in NEWS, and remove NEWS.help (all committers should now know reST anyway, and for those who do not, there is Documenting Python.)
2010-09-05 17:32:31 +00:00
Georg Brandl
649971e63b
Rewrap.
2010-09-05 17:06:50 +00:00
Georg Brandl
58a7b46075
Bump to 3.2a2.
2010-09-05 08:30:40 +00:00
Raymond Hettinger
4c7c9af542
Clean-up functools.total_ordering().
2010-09-05 05:57:35 +00:00