]>
granicus.if.org Git - python/log
Ezio Melotti [Sun, 9 Oct 2011 21:31:00 +0000 (00:31 +0300)]
Merge whatsnew fixes with 3.2.
Ezio Melotti [Sun, 9 Oct 2011 21:30:14 +0000 (00:30 +0300)]
Fix/improve markup in whatsnew/2.7.
Ezio Melotti [Sun, 9 Oct 2011 21:03:15 +0000 (00:03 +0300)]
#13138: merge with 3.2.
Ezio Melotti [Sun, 9 Oct 2011 21:02:03 +0000 (00:02 +0300)]
#13138: add missing versionadded.
Raymond Hettinger [Sun, 9 Oct 2011 16:29:14 +0000 (17:29 +0100)]
Clean-up and improve the priority queue example in the heapq docs.
Raymond Hettinger [Sun, 9 Oct 2011 16:28:14 +0000 (17:28 +0100)]
Clean-up and improve the priority queue example in the heapq docs.
Martin v. Löwis [Sun, 9 Oct 2011 09:54:42 +0000 (11:54 +0200)]
Drop extra semicolon.
Martin v. Löwis [Sun, 9 Oct 2011 08:38:36 +0000 (10:38 +0200)]
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
Éric Araujo [Sun, 9 Oct 2011 06:58:16 +0000 (08:58 +0200)]
Merge 3.2
Éric Araujo [Sun, 9 Oct 2011 06:55:04 +0000 (08:55 +0200)]
Branch merge
Éric Araujo [Sun, 9 Oct 2011 05:32:35 +0000 (07:32 +0200)]
Branch merge
Éric Araujo [Sun, 9 Oct 2011 05:25:33 +0000 (07:25 +0200)]
Add tests for Unicode handling in distutils’ check and register (#13114)
Éric Araujo [Sun, 9 Oct 2011 04:32:38 +0000 (06:32 +0200)]
As it turns out, this bug was already in the tracker: #11171
Antoine Pitrou [Sat, 8 Oct 2011 22:33:09 +0000 (00:33 +0200)]
Fix typo in the PyUnicode_Find() implementation
Antoine Pitrou [Sat, 8 Oct 2011 20:42:00 +0000 (22:42 +0200)]
test_unicode was forgetting to run the common string tests for str.find()
Antoine Pitrou [Sat, 8 Oct 2011 20:41:35 +0000 (22:41 +0200)]
test_unicode was forgetting to run the common string tests for str.find()
Antoine Pitrou [Sat, 8 Oct 2011 17:40:22 +0000 (19:40 +0200)]
Fix a missing encoding argument when opening a text file in some of iobench's subtests.
(found by Georg)
Antoine Pitrou [Sat, 8 Oct 2011 17:40:04 +0000 (19:40 +0200)]
Fix a missing encoding argument when opening a text file in some of iobench's subtests.
(found by Georg)
Antoine Pitrou [Sat, 8 Oct 2011 17:33:24 +0000 (19:33 +0200)]
Fix test_gdb following the small unicode struct change in
c25262e97304 (issue #13130)
Georg Brandl [Sat, 8 Oct 2011 16:32:40 +0000 (18:32 +0200)]
Closes #12192: Document that mutating list methods do not return the instance (original patch by Mike Hoy).
Éric Araujo [Sat, 8 Oct 2011 02:09:15 +0000 (04:09 +0200)]
Fix packaging byte-compilation to comply with PEP 3147 (#11254).
I want to replace custom byte-compiling function with calls to
compileall before 3.3b1, but in the short term it’s good to have this
fixed.
Adapted from the distutils patch by Jeff Ramnani. I tested with -B, -O
and -OO; test_util and test_mixin2to3 fail in -O mode because lib2to3
doesn’t support it.
Éric Araujo [Sat, 8 Oct 2011 01:02:37 +0000 (03:02 +0200)]
Fix docstring of distutils.util.byte_compile (followup for #11254)
Éric Araujo [Sat, 8 Oct 2011 00:58:50 +0000 (02:58 +0200)]
Make C code in one packaging test comply with ISO C (#10359).
Patch by Hallvard B Furuseth.
Éric Araujo [Sat, 8 Oct 2011 00:57:45 +0000 (02:57 +0200)]
Merge fixes for #10526, #10359, #11254, #9100 and the bug without number
Éric Araujo [Fri, 7 Oct 2011 23:56:52 +0000 (01:56 +0200)]
Fix distutils.sysconfig.get_makefile_filename when prefix != exec-prefix
Éric Araujo [Fri, 7 Oct 2011 23:55:07 +0000 (01:55 +0200)]
Fix test_sysconfig when prefix != exec-prefix (#9100).
I tested this manually; it would be great to have buildbots using
installed Pythons, including Pythons configured with different prefix
and exec-prefix.
Reported by Zsolt Cserna.
Éric Araujo [Fri, 7 Oct 2011 22:34:13 +0000 (00:34 +0200)]
Fix distutils byte-compilation to comply with PEP 3147 (#11254).
Patch by Jeff Ramnani. Tested with -B, -O and -OO.
Éric Araujo [Fri, 7 Oct 2011 21:13:45 +0000 (23:13 +0200)]
Make C code in one distutils test comply with ISO C (#10359).
Patch by Hallvard B Furuseth.
Charles-François Natali [Fri, 7 Oct 2011 20:47:08 +0000 (22:47 +0200)]
Issue #10141: fix socketmodule compilation on Linux systems with <linux/can.h>
but without AF_CAN definition.
Éric Araujo [Fri, 7 Oct 2011 20:02:58 +0000 (22:02 +0200)]
Fix a typo and a broken link (part of #10536).
Found by Franz Glasner in #2504.
Barry Warsaw [Fri, 7 Oct 2011 19:26:54 +0000 (15:26 -0400)]
- Re-enable lib2to3's test_parser.py tests, though with an expected failure
(see issue 13125).
Barry Warsaw [Fri, 7 Oct 2011 19:16:20 +0000 (15:16 -0400)]
Merged
Barry Warsaw [Fri, 7 Oct 2011 19:15:38 +0000 (15:15 -0400)]
Trunk merge
Barry Warsaw [Fri, 7 Oct 2011 19:14:53 +0000 (15:14 -0400)]
- Re-enable lib2to3's test_parser.py tests, though with an expected failure
(see issue 13125).
Ned Deily [Fri, 7 Oct 2011 19:02:29 +0000 (12:02 -0700)]
Merge with 3.2
Ned Deily [Fri, 7 Oct 2011 19:01:40 +0000 (12:01 -0700)]
Issue #7367: Ensure test directory always gets removed.
Martin v. Löwis [Fri, 7 Oct 2011 18:58:00 +0000 (20:58 +0200)]
Fix indentation.
Martin v. Löwis [Fri, 7 Oct 2011 18:55:35 +0000 (20:55 +0200)]
Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.
Barry Warsaw [Fri, 7 Oct 2011 18:45:25 +0000 (14:45 -0400)]
Branch merge.
Barry Warsaw [Fri, 7 Oct 2011 18:44:49 +0000 (14:44 -0400)]
- Issue #11250: Back port fix from 3.3 branch, so that 2to3 can handle files
with line feeds. This was ported from the sandbox to the 3.3 branch, but
didn't make it into 3.2.
- Re-enable lib2to3's test_parser.py tests, though with an expected failure
(see issue 13125).
Victor Stinner [Fri, 7 Oct 2011 15:02:31 +0000 (17:02 +0200)]
PyUnicode_Join() calls directly memcpy() if all strings are of the same kind
Antoine Pitrou [Fri, 7 Oct 2011 14:58:35 +0000 (16:58 +0200)]
Issue #12823: remove broken link and replace it with another resource.
Antoine Pitrou [Fri, 7 Oct 2011 14:58:07 +0000 (16:58 +0200)]
Issue #12823: remove broken link and replace it with another resource.
Antoine Pitrou [Fri, 7 Oct 2011 14:17:50 +0000 (16:17 +0200)]
Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
as "The pipe is being closed") is now mapped to POSIX errno EPIPE
(previously EINVAL).
Antoine Pitrou [Fri, 7 Oct 2011 14:16:31 +0000 (16:16 +0200)]
Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
as "The pipe is being closed") is now mapped to POSIX errno EPIPE
(previously EINVAL).
Meador Inge [Fri, 7 Oct 2011 13:53:38 +0000 (08:53 -0500)]
Issue #12943: python -m tokenize support has been added to tokenize.
Victor Stinner [Fri, 7 Oct 2011 11:31:46 +0000 (13:31 +0200)]
Mark 'abc'.expandtab() optimization as specific to CPython
Improve also str.replace(a, a) test
Antoine Pitrou [Fri, 7 Oct 2011 11:26:59 +0000 (13:26 +0200)]
Make platform.libc_ver() less slow
Antoine Pitrou [Fri, 7 Oct 2011 10:35:48 +0000 (12:35 +0200)]
Fix formatting memory consumption with very large padding specifications
Georg Brandl [Fri, 7 Oct 2011 09:19:11 +0000 (11:19 +0200)]
Update C API docs for PEP 393.
Victor Stinner [Fri, 7 Oct 2011 08:01:28 +0000 (10:01 +0200)]
str.replace(a, a) is now returning str unchanged if a is a
Antoine Pitrou [Fri, 7 Oct 2011 02:35:30 +0000 (04:35 +0200)]
Fix a Py_UCS4 / Py_UNICODE mixup.
This worked under Unix because wchar_t is 4 bytes wide.
Antoine Pitrou [Fri, 7 Oct 2011 02:26:55 +0000 (04:26 +0200)]
Migrate the _csv module to the new unicode APIs
(except for a Py_UNICODE_strchr() call)
Antoine Pitrou [Fri, 7 Oct 2011 00:35:00 +0000 (02:35 +0200)]
Fix memory consumption estimate in test_unicode_repr_wide
(on Martin's buildbot it still seems a bit inaccurate)
Antoine Pitrou [Fri, 7 Oct 2011 00:26:47 +0000 (02:26 +0200)]
Fix massive slowdown in string formatting with str.format.
Example:
./python -m timeit -s "f='{}' + '-' * 1024 + '{}'; s='abcd' * 16384" "f.format(s, s)"
-> before: 547 usec per loop
-> after: 13 usec per loop
-> 3.2: 22.5 usec per loop
-> 2.7: 12.6 usec per loop
Antoine Pitrou [Thu, 6 Oct 2011 23:54:09 +0000 (01:54 +0200)]
Fix massive slowdown in string formatting with the % operator
Ned Deily [Thu, 6 Oct 2011 21:41:30 +0000 (14:41 -0700)]
Issue #7367: merge from 3.2
Ned Deily [Thu, 6 Oct 2011 21:31:14 +0000 (14:31 -0700)]
Issue #7367: add NEWS item.
Ned Deily [Thu, 6 Oct 2011 21:24:31 +0000 (14:24 -0700)]
merge from 3.2
Ned Deily [Thu, 6 Oct 2011 21:19:08 +0000 (14:19 -0700)]
Issue #7367: Fix pkgutil.walk_paths to skip directories whose
contents cannot be read.
Ned Deily [Thu, 6 Oct 2011 21:19:06 +0000 (14:19 -0700)]
Issue #7367: Add test case to test_pkgutil for walking path with
an unreadable directory.
Ned Deily [Thu, 6 Oct 2011 21:19:03 +0000 (14:19 -0700)]
Issue #7425: Refactor test_pydoc test case for '-k' behavior and add
new test cases for importing bad packages and unreadable packages dirs.
Benjamin Peterson [Thu, 6 Oct 2011 21:06:25 +0000 (17:06 -0400)]
fix compiler warnings
Antoine Pitrou [Thu, 6 Oct 2011 20:41:08 +0000 (22:41 +0200)]
Fix expected memory consumption for test_translate
Antoine Pitrou [Thu, 6 Oct 2011 20:32:10 +0000 (22:32 +0200)]
Fix size estimate for test_unicode_repr
Antoine Pitrou [Thu, 6 Oct 2011 20:19:07 +0000 (22:19 +0200)]
Fix test_splitlines to reach its size estimate
Antoine Pitrou [Thu, 6 Oct 2011 20:09:18 +0000 (22:09 +0200)]
Make the formula for this estimate more explicit
Antoine Pitrou [Thu, 6 Oct 2011 20:07:51 +0000 (22:07 +0200)]
Ensure that 1-char singletons get used
Antoine Pitrou [Thu, 6 Oct 2011 19:55:51 +0000 (21:55 +0200)]
Fix size estimation for test_bigmem.StrTest.test_format
Antoine Pitrou [Thu, 6 Oct 2011 19:46:23 +0000 (21:46 +0200)]
Fix the expected memory consumption for some tests
Victor Stinner [Thu, 6 Oct 2011 18:27:20 +0000 (20:27 +0200)]
Issue #10141: Don't use hardcoded frame size in example, use struct.calcsize()
Charles-François Natali [Thu, 6 Oct 2011 17:47:44 +0000 (19:47 +0200)]
Issue #10141: socket: add SocketCAN (PF_CAN) support. Initial patch by Matthias
Fuchs, updated by Tiago Gonçalves.
Antoine Pitrou [Thu, 6 Oct 2011 17:09:51 +0000 (19:09 +0200)]
Remove now duplicate code in _json.c; instead, reuse the new private lib
Antoine Pitrou [Thu, 6 Oct 2011 17:04:12 +0000 (19:04 +0200)]
Issue #12911: Fix memory consumption when calculating the repr() of huge tuples or lists.
This introduces a small private API for this common pattern.
The issue has been discovered thanks to Martin's huge-mem buildbot.
Antoine Pitrou [Thu, 6 Oct 2011 16:57:27 +0000 (18:57 +0200)]
Issue #12911: Fix memory consumption when calculating the repr() of huge tuples or lists.
This introduces a small private API for this common pattern.
The issue has been discovered thanks to Martin's huge-mem buildbot.
Victor Stinner [Thu, 6 Oct 2011 13:58:54 +0000 (15:58 +0200)]
Fix PyUnicode_Join() for len==1 and non-exact string
Victor Stinner [Thu, 6 Oct 2011 13:54:53 +0000 (15:54 +0200)]
Fix PyUnicode_CHARACTER_SIZE and PyUnicode_KIND_SIZE
Antoine Pitrou [Thu, 6 Oct 2011 13:44:15 +0000 (15:44 +0200)]
Fix compilation warnings under 64-bit Windows
Antoine Pitrou [Thu, 6 Oct 2011 13:34:41 +0000 (15:34 +0200)]
Fix compilation warnings under 64-bit Windows
Antoine Pitrou [Thu, 6 Oct 2011 13:27:40 +0000 (15:27 +0200)]
Issue #3163: The struct module gets new format characters 'n' and 'N'
supporting C integer types `ssize_t` and `size_t`, respectively.
Antoine Pitrou [Thu, 6 Oct 2011 13:25:32 +0000 (15:25 +0200)]
Fix compilation under Windows
Victor Stinner [Thu, 6 Oct 2011 11:27:56 +0000 (13:27 +0200)]
Fix assertion in unicode_adjust_maxchar()
Éric Araujo [Thu, 6 Oct 2011 11:23:50 +0000 (13:23 +0200)]
Merge 3.2
Éric Araujo [Thu, 6 Oct 2011 11:22:21 +0000 (13:22 +0200)]
Branch merge
Éric Araujo [Thu, 6 Oct 2011 11:10:34 +0000 (13:10 +0200)]
Branch merge
Victor Stinner [Thu, 6 Oct 2011 10:32:37 +0000 (12:32 +0200)]
Fix my last change on PyUnicode_Join(): don't process separator if len==1
Victor Stinner [Thu, 6 Oct 2011 10:31:55 +0000 (12:31 +0200)]
str.replace() avoids memory when it's possible
Éric Araujo [Thu, 6 Oct 2011 03:28:56 +0000 (05:28 +0200)]
Fix return code of “pysetup run COMMAND” (closes #12222)
Éric Araujo [Thu, 6 Oct 2011 03:18:41 +0000 (05:18 +0200)]
Minor: improve one test name, address pyflakes warnings
Éric Araujo [Thu, 6 Oct 2011 03:15:09 +0000 (05:15 +0200)]
Add test that was promised in a comment but not actually written
Éric Araujo [Thu, 6 Oct 2011 03:10:09 +0000 (05:10 +0200)]
Fix incorrect test.
The packaging.install.remove function (a.k.a. the uninstall feature)
takes a path argument to allow client code to use custom directories
instead of sys.path. The test used to give self.root_dir as path, which
corresponds to a prefix option, but prefix is not on sys.path, it’s only
the base directory used to compute the stdlib and site-packages
directory paths. The test now gives a valid site-packages path to the
function.
Éric Araujo [Thu, 6 Oct 2011 02:59:41 +0000 (04:59 +0200)]
Change one name in packaging’s test_uninstall to avoid confusion.
install_lib may be the name of a module, a command or an option, so I
find it clearer to use site_packages to refer to a string object
containing the path of the site-packages directory created in a
temporary directory during tests.
Victor Stinner [Thu, 6 Oct 2011 00:47:11 +0000 (02:47 +0200)]
_copy_characters() fails more quickly in debug mode on inconsistent state
Éric Araujo [Thu, 6 Oct 2011 00:44:19 +0000 (02:44 +0200)]
Add regrtest check for caches in packaging.database (see #12167)
Victor Stinner [Thu, 6 Oct 2011 00:39:42 +0000 (02:39 +0200)]
Fix find_module_path(): make the string ready
Victor Stinner [Thu, 6 Oct 2011 00:36:59 +0000 (02:36 +0200)]
Fix a compiler warning: don't define unicode_is_singleton() in release mode
Victor Stinner [Thu, 6 Oct 2011 00:34:51 +0000 (02:34 +0200)]
Fix _warnings.c: make the filename string ready
Victor Stinner [Wed, 5 Oct 2011 23:51:19 +0000 (01:51 +0200)]
rephrase PyUnicode_1BYTE_KIND documentation
Victor Stinner [Wed, 5 Oct 2011 23:45:57 +0000 (01:45 +0200)]
Don't check for the maximum character when copying from unicodeobject.c
* Create copy_characters() function which doesn't check for the maximum
character in release mode
* _PyUnicode_CheckConsistency() is no more static to be able to use it
in _PyUnicode_FormatAdvanced() (in formatter_unicode.c)
* _PyUnicode_CheckConsistency() checks the string hash
Victor Stinner [Wed, 5 Oct 2011 23:13:58 +0000 (01:13 +0200)]
Fix post-condition in unicode_repr(): check the result, not the input