Éric Araujo
f71654521b
Merge from 3.2
2012-02-25 17:26:44 +01:00
Éric Araujo
b46562480b
Add test file for scripts in Tools ( #13447 ).
...
When people find bugs in scripts such as reindent.py, msgfmt.py or
pygettext.py, we have to try to reproduce the bug manually, apply a fix
and test manually again. The alternative is to only read the code and
trust that it works. This test file is a way to stop that
unsatisfactory state of things and write proper unit tests instead.
2012-02-25 16:57:04 +01:00
Nadeem Vawda
afdac030e3
Use assertEqual in test_strptime for better failure messages (cf. issue #14113 ).
2012-02-25 15:58:36 +02: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
Victor Stinner
6f73874edd
Close #14095 : type.__new__() doesn't remove __qualname__ key from the class
...
dict anymore if the key is present. Reject also non-string qualified names.
And fix reference leaks in type.__new__().
2012-02-25 01:22:36 +01:00
Victor Stinner
abc649ddbe
Issue #14107 : fix bigmem tests on str.capitalize(), str.swapcase() and
...
str.title(). Compute correctly how much memory is required for the test
(memuse).
2012-02-25 00:43:27 +01:00
Victor Stinner
90f50d4df9
Issue #13706 : Fix format(float, "n") for locale with non-ASCII decimal point (e.g. ps_aF)
2012-02-24 01:44:47 +01:00
Victor Stinner
41a863cb81
Issue #13706 : Fix format(int, "n") for locale with non-ASCII thousands separator
...
* Decode thousands separator and decimal point using PyUnicode_DecodeLocale()
(from the locale encoding), instead of decoding them implicitly from latin1
* Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used
* Change _PyUnicode_InsertThousandsGrouping() API to return the maximum
character if unicode is NULL
* Replace MIN/MAX macros by Py_MIN/Py_MAX
* stringlib/undef.h undefines STRINGLIB_IS_UNICODE
* stringlib/localeutil.h only supports Unicode
2012-02-24 00:37:51 +01:00
Nadeem Vawda
197e22c1d7
Simplify zlib bigmem tests.
2012-02-23 14:23:17 +02:00
Nadeem Vawda
bc8c8175cc
Fix previous fix (for test_zlib) to work on 32-bit systems.
2012-02-23 14:16:15 +02:00
Nadeem Vawda
b063a48406
Issue #13873 : Fix crash in test_zlib on bigmem buildbot.
2012-02-23 13:36:25 +02:00
Ross Lagerwall
e7ad419058
Fix sporadic test_subprocess regression introduced by 834650d63130.
2012-02-22 06:02:07 +02:00
Antoine Pitrou
c09424255a
Fix (presumably) test_hash under big-endian systems (PPC).
2012-02-22 03:33:56 +01:00
Antoine Pitrou
679be99a85
Fix (presumably) test_hash under big-endian systems (PPC).
2012-02-22 03:33:56 +01:00
Antoine Pitrou
658d1963e1
Additional debug info in case of failure
2012-02-22 02:46:58 +01:00
Antoine Pitrou
037615e1ef
unload() should be sufficient
2012-02-22 02:30:09 +01:00
Antoine Pitrou
abe72d7eb3
Try to debug sporadic test failures
2012-02-22 01:11:31 +01:00
Benjamin Peterson
c9f54cf512
enable hash randomization by default
2012-02-21 16:08:05 -05:00
Antoine Pitrou
bc499d26a8
Actually run the new tests.
2012-02-21 19:18:10 +01:00
Antoine Pitrou
07c65884c6
Add a test that memoryviews have hash randomization enabled.
2012-02-21 19:14:26 +01: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
802505d05e
Merge more test vs hashing-order fixes from 3.2.
2012-02-21 00:34:05 +01: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
178e5ea305
Disable an inspect test: it depends on dict ordering which parameter is reported as duplicate.
2012-02-21 00:32:36 +01:00
Antoine Pitrou
95a97b7c0c
Delete the iterator, which could accidentally keep a temporary reference to the yielded element.
2012-02-21 00:00:06 +01:00
Antoine Pitrou
e9f637b062
Make "regrtest -j" "-R"-aware
2012-02-20 23:49:07 +01:00
Georg Brandl
e5a0e0a75f
Fix obscure failures of datetime-related tests due to the datetime tests failing to restore the system state completely after testing the pure-Python versions.
2012-02-20 23:37:36 +01:00
Georg Brandl
16684eb624
Fix dbm_gnu test relying on set order.
2012-02-20 22:48:06 +01:00
Georg Brandl
61470246d0
Remove setting hash seed to regrtest's random seed and re-execv()ing: this doesn't preserve Python flags and fails from a temp directory.
2012-02-20 22:06:02 +01:00
Georg Brandl
27fe226eb1
Another test_dis dict order dependency.
2012-02-20 22:03:28 +01:00
Georg Brandl
b9dafe618f
Merge with 3.1.
2012-02-20 21:43:25 +01:00
Georg Brandl
a108227c47
Fix test_dis dependency on dict order.
2012-02-20 21:41:03 +01:00
Georg Brandl
c425a94899
Fix use of deprecated assert_ method.
2012-02-20 21:37:22 +01:00
Georg Brandl
242631da86
Fix "sys.path modified" warning in test_strlit, by not replacing sys.path itself, only its contents.
2012-02-20 21:36:28 +01:00
Georg Brandl
a86b262d1e
Fix bad inheritance in test_subprocess that led to a number of tests being executed twice.
2012-02-20 21:34:57 +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
Benjamin Peterson
a3ed11bd34
don't rely on the order of module clearing
2012-02-20 15:20:37 -05: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
dff46faa95
Fix use of assertRaises following c760bd844222 (spotted by Alex Gaynor).
2012-02-20 19:46:26 +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
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
85c71ae882
fix test now that staticmethod and classmethod are bigger
2012-02-19 19:16:47 -05:00
Antoine Pitrou
c135fa424e
Fix last remaining build issues of _ssl under old OpenSSLs. Patch by Vinay.
2012-02-19 21:22:39 +01:00
Benjamin Peterson
b900d6a78c
initialize __dict__ if needed
2012-02-19 10:17:30 -05:00
Benjamin Peterson
01d7eba316
allow arbitrary attributes on classmethod and staticmethod ( closes #14051 )
2012-02-19 01:10:25 -05:00
Jesus Cea
fbc6f943e0
Test for issue #13500
2012-02-19 03:54:29 +01:00
Jesus Cea
14ed7f23c2
Test for issue #13500
2012-02-19 03:52:23 +01: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