Antoine Pitrou
0836baa46a
Issue #14159 : Fix the len() of weak containers (WeakSet, WeakKeyDictionary, WeakValueDictionary) to return a better approximation when some objects are dead or dying.
...
Moreover, the implementation is now O(1) rather than O(n).
Thanks to Yury Selivanov for reporting.
2012-03-01 16:28:14 +01:00
Antoine Pitrou
bbe2f60b3c
Issue #14159 : Fix the len() of weak containers (WeakSet, WeakKeyDictionary, WeakValueDictionary) to return a better approximation when some objects are dead or dying.
...
Moreover, the implementation is now O(1) rather than O(n).
Thanks to Yury Selivanov for reporting.
2012-03-01 16:26:35 +01:00
Antoine Pitrou
049242b87c
Issue #13125 : Silence spurious test_lib2to3 output when in non-verbose mode.
...
Patch by Mikhail Novikov.
2012-02-27 19:56:37 +01:00
Antoine Pitrou
d311374089
Issue #13125 : Silence spurious test_lib2to3 output when in non-verbose mode.
...
Patch by Mikhail Novikov.
2012-02-27 19:55:36 +01:00
Éric Araujo
40e0f35ad5
Fix comparison bug with 'rc' versions in packaging.version ( #11841 ).
...
I added some tests in 2105ab8553b7 and found no bug, but it turns out
that the doctest is not actually run. While converting the doctest to
unittest style, I stumbled upon this bug again and this time applied the
code patch provided by Filip Gruszczyński.
2012-02-27 11:47:44 +01:00
Antoine Pitrou
70d2717f2e
Issue #13521 : dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
...
Patch by Filip Gruszczyński.
2012-02-27 00:59:34 +01:00
Antoine Pitrou
e965d97ed1
Issue #13521 : dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
...
Patch by Filip Gruszczyński.
2012-02-27 00:45:12 +01:00
Nick Coghlan
ab7bf2143e
Close issue #6210 : Implement PEP 409
2012-02-26 17:49:52 +10:00
Ezio Melotti
cda6b6d60d
#14081 : The sep and maxsplit parameter to str.split, bytes.split, and bytearray.split may now be passed as keyword arguments.
2012-02-26 09:39:55 +02:00
Éric Araujo
7d32e7e5bc
Port the #6884 fix to packaging
2012-02-26 04:01:34 +01:00
Éric Araujo
f71654521b
Merge from 3.2
2012-02-25 17:26:44 +01:00
Éric Araujo
e7295a7635
Add news entry for previous commit
2012-02-25 16:57:39 +01:00
Éric Araujo
c071a613df
Merge 3.2
2012-02-25 16:32:18 +01:00
Éric Araujo
2e0a0e1640
Fix long-standing bugs with MANIFEST.in parsing on Windows ( #6884 ).
...
These regex changes fix a number of issues for distutils on Windows:
- #6884 : impossible to include a file starting with 'build'
- #9691 and #14004 : sdist includes too many files
- #13193 : test_filelist failures
This commit replaces the incorrect changes done in 0a94e2f807c7 and
90b30d62caf2 to fix #13193 ; we were too eager to fix the test failures
and I did not study the code enough before greenlighting patches. This
time we have unit tests from the problems reported by users to be sure
we have the right fix.
Thanks to Nadeem Vawda for his help.
2012-02-25 16:28:05 +01:00
Stefan Krah
9a2d99e28a
- Issue #10181 : New memoryview implementation fixes multiple ownership
...
and lifetime issues of dynamically allocated Py_buffer members (#9990 )
as well as crashes (#8305 , #7433 ). Many new features have been added
(See whatsnew/3.3), and the documentation has been updated extensively.
The ndarray test object from _testbuffer.c implements all aspects of
PEP-3118, so further development towards the complete implementation
of the PEP can proceed in a test-driven manner.
Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
and many ideas.
- Issue #12834 : Fix incorrect results of memoryview.tobytes() for
non-contiguous arrays.
- Issue #5231 : Introduce memoryview.cast() method that allows changing
format and shape without making a copy of the underlying memory.
2012-02-25 12:24:21 +01:00
Georg Brandl
afe05bd494
Bump version to 3.2.3rc1.
2012-02-23 21:14:12 +01:00
Antoine Pitrou
cf1c8339f9
Issue #14084 : Fix a file descriptor leak when importing a module with a bad encoding.
2012-02-22 18:08:30 +01:00
Antoine Pitrou
4f22a8d739
Issue #14084 : Fix a file descriptor leak when importing a module with a bad encoding.
2012-02-22 18:05:43 +01:00
Nadeem Vawda
6721149501
Merge: #14053 : Fix "make patchcheck" to work with MQ.
...
Patch by Francisco Martín Brugué
2012-02-22 11:53:09 +02:00
Nadeem Vawda
9f64f73193
Issue #14053 : Fix "make patchcheck" to work with MQ.
...
Patch by Francisco Martín Brugué
2012-02-22 11:46:41 +02:00
Benjamin Peterson
c9f54cf512
enable hash randomization by default
2012-02-21 16:08:05 -05:00
Martin v. Löwis
dc4170c5bc
merge 2.6
2012-02-21 18:07:58 +01:00
Martin v. Löwis
dbd3f6173a
Issue #6807 : Run msisupport.mak earlier.
2012-02-21 18:06:22 +01:00
Martin v. Löwis
f9caee9ab4
merge 3.2
2012-02-21 17:26:10 +01:00
Martin v. Löwis
26bb3cf7cd
Issue #10580 : Minor grammar change in Windows installer.
2012-02-21 17:23:55 +01:00
Petri Lehtinen
8b24506534
Merge branch '3.2'
...
Closes #8033 .
2012-02-21 13:59:40 +02:00
Petri Lehtinen
4fe85abab9
sqlite3: Fix 64-bit integer handling in user functions on 32-bit architectures
...
Closes #8033 .
2012-02-21 13:49:50 +02:00
Ezio Melotti
307da2b070
Merge the HTMLParser fix with 3.2.
2012-02-21 09:29:10 +02:00
Ezio Melotti
29877e8e04
HTMLParser is now able to handle slashes in the start tag.
2012-02-21 09:25:00 +02:00
Benjamin Peterson
71f660e00f
update to Unicode 6.1
2012-02-20 22:24:29 -05:00
Georg Brandl
2fb477c0f0
Merge 3.2: Issue #13703 plus some related test suite fixes.
2012-02-21 00:33:36 +01:00
Georg Brandl
09562b4330
Fix typo.
2012-02-20 23:09:59 +01:00
Georg Brandl
09a7c72cad
Merge from 3.1: Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
...
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 21:31:46 +01:00
Georg Brandl
2daf6ae249
Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
...
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 19:54:16 +01:00
Antoine Pitrou
c229e6e8ff
Issue #14040 : Remove rarely used file name suffixes for C extensions (under POSIX mainly).
...
This will improve import performance a bit (especially under importlib).
2012-02-20 19:41:11 +01:00
Antoine Pitrou
ea6b4d5f70
Issue #13641 : Decoding functions in the base64 module now accept ASCII-only unicode strings.
...
Patch by Catalin Iacob.
2012-02-20 19:30:23 +01:00
Benjamin Peterson
8eb1269c34
add generic implementation of a __dict__ descriptor for C types
2012-02-19 19:59:10 -05:00
Antoine Pitrou
c541f8ef40
Issue #14043 : Speed up importlib's _FileFinder by at least 8x, and add a new importlib.invalidate_caches() function.
...
importlib is now often faster than imp.find_module() at finding modules.
2012-02-20 01:48:16 +01:00
Benjamin Peterson
01d7eba316
allow arbitrary attributes on classmethod and staticmethod ( closes #14051 )
2012-02-19 01:10:25 -05:00
Charles-François Natali
3ccc918b4a
Issue #14001 : CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
...
upon malformed POST request.
2012-02-18 15:02:10 +01:00
Charles-François Natali
cd96b4f1ff
Issue #14001 : CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
...
upon malformed POST request.
2012-02-18 14:53:41 +01:00
Charles-François Natali
ec1712a166
Issue #14001 : CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
...
upon malformed POST request.
2012-02-18 14:42:57 +01:00
Petri Lehtinen
aa2c670ee6
Merge branch '3.2'
...
Closes #11689 .
2012-02-17 21:36:52 +02:00
Petri Lehtinen
c86d9e2846
Fix a variable scoping error in an sqlite3 test
...
Closes #11689 .
2012-02-17 21:31:02 +02:00
Brett Cannon
ba17fe256e
Have importlib use os.replace() for atomic renaming.
...
Closes issue #13961 . Thanks to Charles-François Natali for the patch.
2012-02-17 09:26:53 -05:00
Brett Cannon
22e7c88057
Merge
2012-02-16 18:03:47 -05:00
Brett Cannon
3b1a06c1ea
importlib.__import__() now raises ValueError when level < 0.
...
This is to bring it more in line with what PEP 328 set out to do with
removing ambiguous absolute/relative import semantics.
2012-02-16 17:47:48 -05:00
Petri Lehtinen
17f1be6368
Merge branch '3.2'
...
Closes #13995 .
2012-02-16 21:44:26 +02:00
Petri Lehtinen
b3890226b3
sqlite3: Fix documentation errors concerning Cursor.rowcount
...
Closes #13995 .
2012-02-16 21:39:03 +02:00
Gregory P. Smith
5b791fb548
Issue #2489 : Fix bug in _copy loop that could consume 100% cpu on EOF.
2012-02-16 00:35:43 -08:00
Gregory P. Smith
58e7c1dc02
NEWS entry for previous commit.
2012-02-16 00:30:50 -08:00
Antoine Pitrou
04d4ee4e56
Issue #13014 : Fix a possible reference leak in SSLSocket.getpeercert().
2012-02-15 22:28:21 +01:00
Antoine Pitrou
2f5a163dfc
Issue #13014 : Fix a possible reference leak in SSLSocket.getpeercert().
2012-02-15 22:25:27 +01:00
Petri Lehtinen
be2cf338e9
Merge branch '3.2'
...
Issue #13491 .
2012-02-15 22:22:34 +02:00
Petri Lehtinen
1ca93954e1
Issue #13491 : Fix many errors in sqlite3 documentation
...
Initial patch by Johannes Vogel.
2012-02-15 22:21:01 +02:00
Éric Araujo
4575afcb53
Fix parsing of packaging’s build_ext --libraries option ( #1326113 )
2012-02-15 17:25:25 +01:00
Éric Araujo
1d175f7768
Merge fixes for #1326113 and #12297 from 3.2
2012-02-15 17:13:26 +01:00
Éric Araujo
b2f5c0a4c4
Fix parsing of build_ext --libraries option ( #1326113 )
2012-02-15 16:44:37 +01:00
Antoine Pitrou
8b4d64f256
Move NEWS entry to correct section.
2012-02-15 02:54:54 +01:00
Antoine Pitrou
552be9b214
Issue #13020 : Fix a reference leak when allocating a structsequence object fails.
...
Patch by Suman Saha.
2012-02-15 02:54:33 +01:00
Antoine Pitrou
37784ba5c0
Issue #13020 : Fix a reference leak when allocating a structsequence object fails.
...
Patch by Suman Saha.
2012-02-15 02:51:43 +01:00
Antoine Pitrou
15af7b4a4f
Issue #13015 : Fix a possible reference leak in defaultdict.__repr__.
...
Patch by Suman Saha.
2012-02-15 02:43:47 +01:00
Antoine Pitrou
f5f1fe0cb5
Issue #13015 : Fix a possible reference leak in defaultdict.__repr__.
...
Patch by Suman Saha.
2012-02-15 02:42:46 +01:00
Antoine Pitrou
06b57ef958
Issue #10287 : nntplib now queries the server's CAPABILITIES first before sending MODE READER, and only sends it if not already in READER mode.
...
Patch by Hynek Schlawack.
2012-02-14 23:30:35 +01:00
Antoine Pitrou
71135624d8
Issue #10287 : nntplib now queries the server's CAPABILITIES first before sending MODE READER, and only sends it if not already in READER mode.
...
Patch by Hynek Schlawack.
2012-02-14 23:29:34 +01:00
Meador Inge
ffeee3518a
Issue #13979 : Fix ctypes.util.find_library ldconfig regex
2012-02-13 22:08:39 -06:00
Florent Xicluna
a72a98f24a
Issue #13988 : cElementTree is deprecated and the _elementtree accelerator is automatically used whenever available.
2012-02-13 11:03:30 +01:00
Ezio Melotti
d1c7b1afe8
#13993 : merge with 3.2.
2012-02-13 11:42:29 +02:00
Ezio Melotti
5211ffe4df
#13993 : HTMLParser is now able to handle broken end tags when strict=False.
2012-02-13 11:24:50 +02:00
Gregory P. Smith
db66310e8f
Issue #13930 : Adds ability for 2to3 to write its output to a different
...
directory tree instead of overwriting the input files. Adds three command
line options: -o/--output-dir, -W/--write-unchanged-files and --add-suffix.
2012-02-12 15:56:49 -08:00
Gregory P. Smith
58f23ffb21
Issue #13930 : Adds ability for 2to3 to write its output to a different
...
directory tree instead of overwriting the input files. Adds three command
line options: -o/--output-dir, -W/--write-unchanged-files and --add-suffix.
Feature backports into stable release branches for 2to3 are allowed by
a special exemption:
http://mail.python.org/pipermail/python-dev/2011-December/115089.html
2012-02-12 15:50:21 -08:00
Petri Lehtinen
c7551a16c7
Merge branch '3.2'
...
Closes #9750
2012-02-12 21:06:57 +02:00
Petri Lehtinen
51d04d1ba8
Fix sqlite3.Connection.iterdump on tables/fields with reserved names or quotes
...
Closes #9750
2012-02-12 21:05:31 +02:00
Antoine Pitrou
425b8e85a9
Issue #10287 : nntplib now queries the server's CAPABILITIES again after authenticating (since the result may change, according to RFC 4643).
...
Patch by Hynek Schlawack.
2012-02-12 19:15:09 +01:00
Antoine Pitrou
54411c1784
Issue #10287 : nntplib now queries the server's CAPABILITIES again after authenticating (since the result may change, according to RFC 4643).
...
Patch by Hynek Schlawack.
2012-02-12 19:14:17 +01:00
Éric Araujo
b9df745ab5
Port the fix for #13193 to packaging
2012-02-12 05:01:42 +01:00
Éric Araujo
a9d2b64206
Merge fixes for #13193 and FAQ from 3.2
2012-02-12 04:58:46 +01:00
Éric Araujo
9ce366a5a6
Fix distutils.filelist.FileList under Windows ( #13193 ).
...
The code used to call os.path.join to build a regex but without escaping
the backslash, which lead to test failures on Windows. Antoine Pitrou
fixed it in 0a94e2f807c7 by enhancing the code to accept both / and \,
with proper escaping, but in my opinion this goes against the distutils
feature freeze, hence this change.
2012-02-12 04:52:21 +01:00
Nadeem Vawda
d1a107132c
Merge: #13989 : Document that GzipFile does not support text mode.
2012-02-11 23:54:51 +02:00
Nadeem Vawda
30d94b7aea
Issue #13989 : Document that GzipFile does not support text mode.
...
Also, give a more helpful error message when opened with an invalid mode string.
2012-02-11 23:45:10 +02:00
Ned Deily
7347df1504
Issue #13590 : merge
2012-02-10 13:08:44 +01:00
Ned Deily
9937748f0c
Issue #13590 : On OS X 10.7 and 10.6 with Xcode 4.2, building
...
Distutils-based packages with C extension modules may fail because
Apple has removed gcc-4.2, the version used to build python.org
64-bit/32-bit Pythons. If the user does not explicitly override
the default C compiler by setting the CC environment variable,
Distutils will now attempt to compile extension modules with clang
if gcc-4.2 is required but not found. Also as a convenience, if
the user does explicitly set CC, substitute its value as the default
compiler in the Distutils LDSHARED configuration variable for OS X.
(Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
SDK, neither of which are available in Xcode 4. This change does not
attempt to override settings to support their use with Xcode 4.)
2012-02-10 13:01:08 +01:00
Ezio Melotti
176630ec19
#13960 : merge with 3.2.
2012-02-10 10:50:49 +02:00
Ezio Melotti
fa3702dc28
#13960 : HTMLParser is now able to handle broken comments when strict=False.
2012-02-10 10:45:44 +02:00
Petri Lehtinen
bc35bebb45
Undocument and clean up sqlite3.OptimizedUnicode
...
Closes #13921 .
2012-02-09 21:09:03 +02:00
Senthil Kumaran
f0f9679d5c
merge from 3.2
...
Issue #9021 - Introduce copy module better in the docs.
2012-02-09 18:27:48 +08:00
Senthil Kumaran
5b14d732d8
Issue #9021 - Introduce copy module better. Doc changes suggested by Terry
...
Reedy.
2012-02-09 18:26:59 +08:00
Senthil Kumaran
0bfa963fbb
merged from 3.2
...
Issue #6005 : Examples in the socket library documentation use sendall, where
relevant, instead send method.
2012-02-09 17:55:56 +08:00
Senthil Kumaran
6e13f130a9
Fix Issue #6005 : Examples in the socket library documentation use sendall,
...
where relevant, instead send method.
2012-02-09 17:54:17 +08:00
Brett Cannon
32b66be879
Clarify a NEWS entry.
2012-02-08 18:53:46 -05:00
Brett Cannon
b4e63b3177
Use the cwd when the empty string is found in sys.path. This leads to
...
__file__ being an absolute path when the module is found in the
current directory.
2012-02-08 18:52:56 -05:00
Antoine Pitrou
bcf2b59fb5
Issue #13609 : Add two functions to query the terminal size:
...
os.get_terminal_size (low level) and shutil.get_terminal_size (high level).
Patch by Zbigniew Jędrzejewski-Szmek.
2012-02-08 23:28:36 +01:00
Victor Stinner
72476eae5f
Issue #13845 : Fix NEWS entry, the change is specific to Windows
2012-02-08 22:53:24 +01:00
Charles-François Natali
ed4a8fc095
Issue #8184 : multiprocessing: On Windows, don't set SO_REUSEADDR on Connection
...
sockets, and set FILE_FLAG_FIRST_PIPE_INSTANCE on named pipes, to make sure two
listeners can't bind to the same socket/pipe (or any existing socket/pipe).
2012-02-08 21:15:58 +01:00
Victor Stinner
09225b73c1
Issue #13845 : time.time() now uses GetSystemTimeAsFileTime() instead of ftime()
...
to have a resolution of 100 ns instead of 1 ms (the clock accuracy is between
0.5 ms and 15 ms).
2012-02-07 23:41:01 +01:00
Victor Stinner
8b30201f7d
Issue #13846 : Add time.monotonic(), monotonic clock.
2012-02-07 23:29:46 +01:00
Petri Lehtinen
96356d40b9
Merge branch '3.2'
2012-02-06 22:04:41 +02:00
Petri Lehtinen
4a84f58143
Issue #10811 : Fix recursive usage of cursors. Instead of crashing, raise a ProgrammingError now.
2012-02-06 22:04:18 +02:00
Charles-François Natali
7794090251
Following Nick's suggestion, rename posix.fdlistdir() to posix.flistdir(), to
...
be consistent with other functions accepting file descriptors (fdlistdir() was
added in 3.3, so hasn't been released yet).
2012-02-06 19:54:48 +01:00
Ned Deily
6b1aecfdbf
Issue #10881 : merge
2012-02-06 01:00:05 +01:00