]> granicus.if.org Git - python/log
python
13 years agoReuse PyUnicode_Copy() in validate_and_copy_tuple()
Victor Stinner [Tue, 11 Oct 2011 19:53:24 +0000 (21:53 +0200)]
Reuse PyUnicode_Copy() in validate_and_copy_tuple()

13 years agoUse PyUnicode_AsUnicodeAndSize() instead of PyUnicode_GET_SIZE()
Victor Stinner [Tue, 11 Oct 2011 19:55:01 +0000 (21:55 +0200)]
Use PyUnicode_AsUnicodeAndSize() instead of PyUnicode_GET_SIZE()

13 years agoIssue #13136: speed up conversion between different character widths.
Antoine Pitrou [Tue, 11 Oct 2011 18:58:41 +0000 (20:58 +0200)]
Issue #13136: speed up conversion between different character widths.

13 years agoIssue #13134: optimize finding single-character strings using memchr
Antoine Pitrou [Tue, 11 Oct 2011 18:29:21 +0000 (20:29 +0200)]
Issue #13134: optimize finding single-character strings using memchr

13 years agoMerge
Antoine Pitrou [Tue, 11 Oct 2011 17:54:03 +0000 (19:54 +0200)]
Merge

13 years agoMerge issue #13145 fix.
Mark Dickinson [Tue, 11 Oct 2011 17:07:19 +0000 (18:07 +0100)]
Merge issue #13145 fix.

13 years agoIssue #13145. Fix incorrect documentation for PyNumber_ToBase. Thanks Sven Marnach.
Mark Dickinson [Tue, 11 Oct 2011 17:06:36 +0000 (18:06 +0100)]
Issue #13145. Fix incorrect documentation for PyNumber_ToBase.  Thanks Sven Marnach.

13 years agoAvoid pulling threading when _thread is sufficient
Antoine Pitrou [Tue, 11 Oct 2011 16:51:53 +0000 (18:51 +0200)]
Avoid pulling threading when _thread is sufficient

13 years agoUse a dict for faster sysconfig startup (issue #13150)
Antoine Pitrou [Tue, 11 Oct 2011 14:07:30 +0000 (16:07 +0200)]
Use a dict for faster sysconfig startup (issue #13150)

13 years agoIssue #13150: The tokenize module doesn't compile large regular expressions at startu...
Antoine Pitrou [Tue, 11 Oct 2011 13:45:56 +0000 (15:45 +0200)]
Issue #13150: The tokenize module doesn't compile large regular expressions at startup anymore.
Instead, the re module's standard caching does its work.

13 years agoRemove unused variable
Antoine Pitrou [Tue, 11 Oct 2011 02:06:47 +0000 (04:06 +0200)]
Remove unused variable

13 years ago/* Remove unused code. It has been committed out since 2000 (!). */
Antoine Pitrou [Tue, 11 Oct 2011 01:17:47 +0000 (03:17 +0200)]
/* Remove unused code. It has been committed out since 2000 (!). */

13 years agoAvoid exporting private helpers
Antoine Pitrou [Mon, 10 Oct 2011 21:49:24 +0000 (23:49 +0200)]
Avoid exporting private helpers
(thanks "make smelly")

13 years agoFix the threading infrastructure in test_socket to support skipping
Antoine Pitrou [Mon, 10 Oct 2011 18:15:59 +0000 (20:15 +0200)]
Fix the threading infrastructure in test_socket to support skipping
tests from the setUp() routine.
This fixes a refleak in test_socket on some machines.

13 years agoUse identifier API for PyObject_GetAttrString.
Martin v. Löwis [Mon, 10 Oct 2011 16:11:30 +0000 (18:11 +0200)]
Use identifier API for PyObject_GetAttrString.

13 years agoany_find_slice() doesn't use callbacks anymore
Victor Stinner [Mon, 10 Oct 2011 01:21:36 +0000 (03:21 +0200)]
any_find_slice() doesn't use callbacks anymore

 * Call directly the right find/rfind method: allow inlining functions
 * Remove Py_LOCAL_CALLBACK (added for any_find_slice)

13 years agoMerge whatsnew fixes with 3.2.
Ezio Melotti [Sun, 9 Oct 2011 21:31:00 +0000 (00:31 +0300)]
Merge whatsnew fixes with 3.2.

13 years agoFix/improve markup in whatsnew/2.7.
Ezio Melotti [Sun, 9 Oct 2011 21:30:14 +0000 (00:30 +0300)]
Fix/improve markup in whatsnew/2.7.

13 years ago#13138: merge with 3.2.
Ezio Melotti [Sun, 9 Oct 2011 21:03:15 +0000 (00:03 +0300)]
#13138: merge with 3.2.

13 years ago#13138: add missing versionadded.
Ezio Melotti [Sun, 9 Oct 2011 21:02:03 +0000 (00:02 +0300)]
#13138: add missing versionadded.

13 years agoClean-up and improve the priority queue example in the heapq docs.
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.

13 years agoClean-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.

13 years agoDrop extra semicolon.
Martin v. Löwis [Sun, 9 Oct 2011 09:54:42 +0000 (11:54 +0200)]
Drop extra semicolon.

13 years agoAdd API for static strings, primarily good for identifiers.
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.

13 years agoMerge 3.2
Éric Araujo [Sun, 9 Oct 2011 06:58:16 +0000 (08:58 +0200)]
Merge 3.2

13 years agoBranch merge
Éric Araujo [Sun, 9 Oct 2011 06:55:04 +0000 (08:55 +0200)]
Branch merge

13 years agoBranch merge
Éric Araujo [Sun, 9 Oct 2011 05:32:35 +0000 (07:32 +0200)]
Branch merge

13 years agoAdd tests for Unicode handling in distutils’ check and register (#13114)
Éric Araujo [Sun, 9 Oct 2011 05:25:33 +0000 (07:25 +0200)]
Add tests for Unicode handling in distutils’ check and register (#13114)

13 years agoAs it turns out, this bug was already in the tracker: #11171
É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

13 years agoFix typo in the PyUnicode_Find() implementation
Antoine Pitrou [Sat, 8 Oct 2011 22:33:09 +0000 (00:33 +0200)]
Fix typo in the PyUnicode_Find() implementation

13 years agotest_unicode was forgetting to run the common string tests for str.find()
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()

13 years agotest_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()

13 years agoFix a missing encoding argument when opening a text file in some of iobench's subtests.
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)

13 years agoFix a missing encoding argument when opening a text file in some of iobench's subtests.
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)

13 years agoFix test_gdb following the small unicode struct change in c25262e97304 (issue #13130)
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)

13 years agoCloses #12192: Document that mutating list methods do not return the instance (origin...
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).

13 years agoFix packaging byte-compilation to comply with PEP 3147 (#11254).
É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.

13 years agoFix docstring of distutils.util.byte_compile (followup for #11254)
Éric Araujo [Sat, 8 Oct 2011 01:02:37 +0000 (03:02 +0200)]
Fix docstring of distutils.util.byte_compile (followup for #11254)

13 years agoMake C code in one packaging test comply with ISO C (#10359).
É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.

13 years agoMerge fixes for #10526, #10359, #11254, #9100 and the bug without number
É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

13 years agoFix distutils.sysconfig.get_makefile_filename when prefix != exec-prefix
Éric Araujo [Fri, 7 Oct 2011 23:56:52 +0000 (01:56 +0200)]
Fix distutils.sysconfig.get_makefile_filename when prefix != exec-prefix

13 years agoFix test_sysconfig when prefix != exec-prefix (#9100).
É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.

13 years agoFix distutils byte-compilation to comply with PEP 3147 (#11254).
É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.

13 years agoMake C code in one distutils test comply with ISO C (#10359).
É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.

13 years agoIssue #10141: fix socketmodule compilation on Linux systems with <linux/can.h>
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.

13 years agoFix a typo and a broken link (part of #10536).
É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.

13 years ago- Re-enable lib2to3's test_parser.py tests, though with an expected failure
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).

13 years agoMerged
Barry Warsaw [Fri, 7 Oct 2011 19:16:20 +0000 (15:16 -0400)]
Merged

13 years agoTrunk merge
Barry Warsaw [Fri, 7 Oct 2011 19:15:38 +0000 (15:15 -0400)]
Trunk merge

13 years ago- Re-enable lib2to3's test_parser.py tests, though with an expected failure
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).

13 years agoMerge with 3.2
Ned Deily [Fri, 7 Oct 2011 19:02:29 +0000 (12:02 -0700)]
Merge with 3.2

13 years agoIssue #7367: Ensure test directory always gets removed.
Ned Deily [Fri, 7 Oct 2011 19:01:40 +0000 (12:01 -0700)]
Issue #7367: Ensure test directory always gets removed.

13 years agoFix indentation.
Martin v. Löwis [Fri, 7 Oct 2011 18:58:00 +0000 (20:58 +0200)]
Fix indentation.

13 years agoChange PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.
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.

13 years agoBranch merge.
Barry Warsaw [Fri, 7 Oct 2011 18:45:25 +0000 (14:45 -0400)]
Branch merge.

13 years ago- Issue #11250: Back port fix from 3.3 branch, so that 2to3 can handle files
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).

13 years agoPyUnicode_Join() calls directly memcpy() if all strings are of the same kind
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

13 years agoIssue #12823: remove broken link and replace it with another resource.
Antoine Pitrou [Fri, 7 Oct 2011 14:58:35 +0000 (16:58 +0200)]
Issue #12823: remove broken link and replace it with another resource.

13 years agoIssue #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.

13 years agoIssue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
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).

13 years agoIssue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
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).

13 years agoIssue #12943: python -m tokenize support has been added to tokenize.
Meador Inge [Fri, 7 Oct 2011 13:53:38 +0000 (08:53 -0500)]
Issue #12943: python -m tokenize support has been added to tokenize.

13 years agoMark 'abc'.expandtab() optimization as specific to CPython
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

13 years agoMake platform.libc_ver() less slow
Antoine Pitrou [Fri, 7 Oct 2011 11:26:59 +0000 (13:26 +0200)]
Make platform.libc_ver() less slow

13 years agoFix formatting memory consumption with very large padding specifications
Antoine Pitrou [Fri, 7 Oct 2011 10:35:48 +0000 (12:35 +0200)]
Fix formatting memory consumption with very large padding specifications

13 years agoUpdate C API docs for PEP 393.
Georg Brandl [Fri, 7 Oct 2011 09:19:11 +0000 (11:19 +0200)]
Update C API docs for PEP 393.

13 years agostr.replace(a, a) is now returning str unchanged if a is a
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

13 years agoFix a Py_UCS4 / Py_UNICODE mixup.
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.

13 years agoMigrate the _csv module to the new unicode APIs
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)

13 years agoFix memory consumption estimate in test_unicode_repr_wide
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)

13 years agoFix massive slowdown in string formatting with str.format.
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

13 years agoFix massive slowdown in string formatting with the % operator
Antoine Pitrou [Thu, 6 Oct 2011 23:54:09 +0000 (01:54 +0200)]
Fix massive slowdown in string formatting with the % operator

13 years agoIssue #7367: merge from 3.2
Ned Deily [Thu, 6 Oct 2011 21:41:30 +0000 (14:41 -0700)]
Issue #7367: merge from 3.2

13 years agoIssue #7367: add NEWS item.
Ned Deily [Thu, 6 Oct 2011 21:31:14 +0000 (14:31 -0700)]
Issue #7367: add NEWS item.

13 years agomerge from 3.2
Ned Deily [Thu, 6 Oct 2011 21:24:31 +0000 (14:24 -0700)]
merge from 3.2

13 years agoIssue #7367: Fix pkgutil.walk_paths to skip directories whose
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.

13 years agoIssue #7367: Add test case to test_pkgutil for walking path with
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.

13 years agoIssue #7425: Refactor test_pydoc test case for '-k' behavior and add
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.

13 years agofix compiler warnings
Benjamin Peterson [Thu, 6 Oct 2011 21:06:25 +0000 (17:06 -0400)]
fix compiler warnings

13 years agoFix expected memory consumption for test_translate
Antoine Pitrou [Thu, 6 Oct 2011 20:41:08 +0000 (22:41 +0200)]
Fix expected memory consumption for test_translate

13 years agoFix size estimate for test_unicode_repr
Antoine Pitrou [Thu, 6 Oct 2011 20:32:10 +0000 (22:32 +0200)]
Fix size estimate for test_unicode_repr

13 years agoFix test_splitlines to reach its size estimate
Antoine Pitrou [Thu, 6 Oct 2011 20:19:07 +0000 (22:19 +0200)]
Fix test_splitlines to reach its size estimate

13 years agoMake the formula for this estimate more explicit
Antoine Pitrou [Thu, 6 Oct 2011 20:09:18 +0000 (22:09 +0200)]
Make the formula for this estimate more explicit

13 years agoEnsure that 1-char singletons get used
Antoine Pitrou [Thu, 6 Oct 2011 20:07:51 +0000 (22:07 +0200)]
Ensure that 1-char singletons get used

13 years agoFix size estimation for test_bigmem.StrTest.test_format
Antoine Pitrou [Thu, 6 Oct 2011 19:55:51 +0000 (21:55 +0200)]
Fix size estimation for test_bigmem.StrTest.test_format

13 years agoFix the expected memory consumption for some tests
Antoine Pitrou [Thu, 6 Oct 2011 19:46:23 +0000 (21:46 +0200)]
Fix the expected memory consumption for some tests

13 years agoIssue #10141: Don't use hardcoded frame size in example, use struct.calcsize()
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()

13 years agoIssue #10141: socket: add SocketCAN (PF_CAN) support. Initial patch by Matthias
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.

13 years agoRemove now duplicate code in _json.c; instead, reuse the new private lib
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

13 years agoIssue #12911: Fix memory consumption when calculating the repr() of huge tuples or...
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.

13 years agoIssue #12911: Fix memory consumption when calculating the repr() of huge tuples or...
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.

13 years agoFix PyUnicode_Join() for len==1 and non-exact string
Victor Stinner [Thu, 6 Oct 2011 13:58:54 +0000 (15:58 +0200)]
Fix PyUnicode_Join() for len==1 and non-exact string

13 years agoFix PyUnicode_CHARACTER_SIZE and PyUnicode_KIND_SIZE
Victor Stinner [Thu, 6 Oct 2011 13:54:53 +0000 (15:54 +0200)]
Fix PyUnicode_CHARACTER_SIZE and PyUnicode_KIND_SIZE

13 years agoFix compilation warnings under 64-bit Windows
Antoine Pitrou [Thu, 6 Oct 2011 13:44:15 +0000 (15:44 +0200)]
Fix compilation warnings under 64-bit Windows

13 years agoFix 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

13 years agoIssue #3163: The struct module gets new format characters 'n' and 'N'
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.

13 years agoFix compilation under Windows
Antoine Pitrou [Thu, 6 Oct 2011 13:25:32 +0000 (15:25 +0200)]
Fix compilation under Windows

13 years agoFix assertion in unicode_adjust_maxchar()
Victor Stinner [Thu, 6 Oct 2011 11:27:56 +0000 (13:27 +0200)]
Fix assertion in unicode_adjust_maxchar()

13 years agoMerge 3.2
Éric Araujo [Thu, 6 Oct 2011 11:23:50 +0000 (13:23 +0200)]
Merge 3.2

13 years agoBranch merge
Éric Araujo [Thu, 6 Oct 2011 11:22:21 +0000 (13:22 +0200)]
Branch merge