Commit Graph

19399 Commits

Author SHA1 Message Date
Éric Araujo 6ebea15e0b Merge fixes for #10526, #10359, #11254, #9100 and the bug without number 2011-10-08 02:57:45 +02:00
Éric Araujo fea2d04bb9 Fix distutils.sysconfig.get_makefile_filename when prefix != exec-prefix 2011-10-08 01:56:52 +02:00
Éric Araujo de504550af 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.
2011-10-08 01:55:07 +02:00
Éric Araujo 47a4521ece Fix distutils byte-compilation to comply with PEP 3147 (#11254).
Patch by Jeff Ramnani.  Tested with -B, -O and -OO.
2011-10-08 00:34:13 +02:00
Éric Araujo db95c7a60c Make C code in one distutils test comply with ISO C (#10359).
Patch by Hallvard B Furuseth.
2011-10-07 23:13:45 +02:00
Barry Warsaw 146177503c - Re-enable lib2to3's test_parser.py tests, though with an expected failure
(see issue 13125).
2011-10-07 15:26:54 -04:00
Barry Warsaw de8c723ddd Merged 2011-10-07 15:16:20 -04:00
Barry Warsaw 35d18782fb Trunk merge 2011-10-07 15:15:38 -04:00
Barry Warsaw cb9c5ba736 - Re-enable lib2to3's test_parser.py tests, though with an expected failure
(see issue 13125).
2011-10-07 15:14:53 -04:00
Ned Deily 532c363ac7 Merge with 3.2 2011-10-07 12:02:29 -07:00
Ned Deily 7010a07bd0 Issue #7367: Ensure test directory always gets removed. 2011-10-07 12:01:40 -07:00
Barry Warsaw 78f89d8c38 - 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).
2011-10-07 14:44:49 -04:00
Meador Inge 14c0f03b58 Issue #12943: python -m tokenize support has been added to tokenize. 2011-10-07 08:53:38 -05:00
Victor Stinner 1d972ad12a Mark 'abc'.expandtab() optimization as specific to CPython
Improve also str.replace(a, a) test
2011-10-07 13:31:46 +02:00
Antoine Pitrou ba7c226095 Make platform.libc_ver() less slow 2011-10-07 13:26:59 +02:00
Victor Stinner 59de0ee9e0 str.replace(a, a) is now returning str unchanged if a is a 2011-10-07 10:01:28 +02:00
Antoine Pitrou 0959554b39 Fix memory consumption estimate in test_unicode_repr_wide
(on Martin's buildbot it still seems a bit inaccurate)
2011-10-07 02:35:00 +02:00
Ned Deily 9403071277 merge from 3.2 2011-10-06 14:24:31 -07:00
Ned Deily ed27df7aaa Issue #7367: Fix pkgutil.walk_paths to skip directories whose
contents cannot be read.
2011-10-06 14:19:08 -07:00
Ned Deily caf5a22c5f Issue #7367: Add test case to test_pkgutil for walking path with
an unreadable directory.
2011-10-06 14:19:06 -07:00
Ned Deily 92a81a1eec Issue #7425: Refactor test_pydoc test case for '-k' behavior and add
new test cases for importing bad packages and unreadable packages dirs.
2011-10-06 14:19:03 -07:00
Antoine Pitrou 399df55496 Fix expected memory consumption for test_translate 2011-10-06 22:41:08 +02:00
Antoine Pitrou b6080b6967 Fix size estimate for test_unicode_repr 2011-10-06 22:32:10 +02:00
Antoine Pitrou a5d9917d21 Fix test_splitlines to reach its size estimate 2011-10-06 22:19:07 +02:00
Antoine Pitrou f81ad6fa5a Make the formula for this estimate more explicit 2011-10-06 22:09:18 +02:00
Antoine Pitrou 8ac582f746 Fix size estimation for test_bigmem.StrTest.test_format 2011-10-06 21:55:51 +02:00
Antoine Pitrou de21f84680 Fix the expected memory consumption for some tests 2011-10-06 21:46:23 +02:00
Charles-François Natali 47413c1171 Issue #10141: socket: add SocketCAN (PF_CAN) support. Initial patch by Matthias
Fuchs, updated by Tiago Gonçalves.
2011-10-06 19:47:44 +02:00
Antoine Pitrou c61c8d7a5e 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.
2011-10-06 19:04:12 +02:00
Antoine Pitrou eeb7eea1f9 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.
2011-10-06 18:57:27 +02:00
Antoine Pitrou 45d9c91d4b Issue #3163: The struct module gets new format characters 'n' and 'N'
supporting C integer types `ssize_t` and `size_t`, respectively.
2011-10-06 15:27:40 +02:00
Éric Araujo 0f4ee93b06 Branch merge 2011-10-06 13:22:21 +02:00
Éric Araujo bb2095f1e2 Branch merge 2011-10-06 13:10:34 +02:00
Éric Araujo 6fd287e6c2 Fix return code of “pysetup run COMMAND” (closes #12222) 2011-10-06 05:28:56 +02:00
Éric Araujo 8ed34a130e Minor: improve one test name, address pyflakes warnings 2011-10-06 05:18:41 +02:00
Éric Araujo fa23cc842c Add test that was promised in a comment but not actually written 2011-10-06 05:15:09 +02:00
Éric Araujo 9556a5bab2 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.
2011-10-06 05:10:09 +02:00
Éric Araujo 2c30e3999c 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.
2011-10-06 04:59:41 +02:00
Éric Araujo 76558e12ad Add regrtest check for caches in packaging.database (see #12167) 2011-10-06 02:44:19 +02:00
Amaury Forgeot d'Arc 3484c09c97 Merge from 3.2 2011-10-05 22:37:06 +02:00
Amaury Forgeot d'Arc 3e961a5fd1 Enable the only tests for sys.gettrace 2011-10-05 22:36:05 +02:00
Charles-François Natali 42c28cdd1d Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle
would be finalized after the reference to its underlying BufferedRWPair's
writer got cleared by the GC.
2011-10-05 19:53:43 +02:00
Senthil Kumaran 1b7da519b0 Issue13104 - Fix urllib.request.thishost() utility function. 2011-10-06 00:32:02 +08:00
Senthil Kumaran ad87fa6719 Issue #13073 - Address the review comments made by Ezio. 2011-10-05 23:26:49 +08:00
Éric Araujo 1079bdfde3 Merge 3.2 2011-10-05 01:52:45 +02:00
Éric Araujo 4300f69afd Update skip message printed by test.support.get_attribute.
This helper was changed to work with any object instead of only modules
(or technically something with a __name__ attribute, see code in 3.2)
but the message stayed as is.
2011-10-05 01:50:22 +02:00
Éric Araujo c4637714b0 Cosmetic fixes for whitespace and a regex in packaging.
The goal of the regex is to catch a (alpha), b (beta), c or rc
(release candidate), so the existing pattern puzzled me. Tests were
OK before and after the change.
2011-10-05 01:46:37 +02:00
Éric Araujo 763cc6eaee Add tests for comparing candidate and final versions in packaging (#11841).
This used to be buggy; Filip Gruszczyński contributed tests and a code
patch but the latter is not needed.
2011-10-05 01:41:14 +02:00
Éric Araujo 63ba97b586 Fix typo and case in a recently added test 2011-10-05 01:29:22 +02:00
Éric Araujo 56fab3daed Remove inline comment, no longer supported by configparser.
(Deleted rather than moved because multilib implementations vary.)
2011-10-05 01:14:02 +02:00
Charles-François Natali 035018d078 os.geteuid() may not be available... 2011-10-04 23:35:47 +02:00
Charles-François Natali 79164c8c71 Issue #11956: Always skip test_import.test_unwritable_directory when run as
root, since the semantics varies across Unix variants.
2011-10-04 20:40:58 +02:00
Charles-François Natali a13b1faa78 Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as
root (directory permissions are ignored).
2011-10-04 19:17:26 +02:00
Antoine Pitrou b7591d4780 Also fix pickletester 2011-10-04 16:18:15 +02:00
Antoine Pitrou 382e8b515c An embarassing litle typo 2011-10-04 16:07:27 +02:00
Antoine Pitrou e19aa388e8 When expandtabs() would be a no-op, don't create a duplicate string 2011-10-04 16:04:01 +02:00
Antoine Pitrou 87a484caf5 Migrate test_bigmem to PEP 393-compliant size calculations (hopefully) 2011-10-04 15:55:44 +02:00
Antoine Pitrou bf009f0bce Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation
if the underlying raw stream is unseekable, even if the seek could be
satisfied using the internal buffer.  Patch by John OConnor.
2011-10-04 12:28:52 +02:00
Antoine Pitrou 1e44fecc52 Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation
if the underlying raw stream is unseekable, even if the seek could be
satisfied using the internal buffer.  Patch by John O'Connor.
2011-10-04 12:26:20 +02:00
Antoine Pitrou 5b99df68b0 Collect stats a bit more often 2011-10-04 12:06:06 +02:00
Antoine Pitrou 75e78b6c77 Use the faulthandler module's infrastructure to write a GIL-less
memory watchdog for timely stats collection.
2011-10-04 11:51:23 +02:00
Antoine Pitrou 031487eb3b Fix test failure 2011-10-04 10:39:54 +02:00
Antoine Pitrou 1a3ff48c55 Start fixing test_bigmem:
- bigmemtest is replaced by precisionbigmemtest
- add a poor man's watchdog thread to print memory consumption
2011-10-04 10:28:37 +02:00
Antoine Pitrou 94190bb6e7 Start fixing test_bigmem:
- bigmemtest is replaced by precisionbigmemtest
- add a poor man's watchdog thread to print memory consumption
2011-10-04 10:22:36 +02:00
Antoine Pitrou 5a688dbf97 Issue #7689: Allow pickling of dynamically created classes when their
metaclass is registered with copyreg.  Patch by Nicolas M. Thiéry and
Craig Citro.
2011-10-04 09:25:28 +02:00
Antoine Pitrou ffd41d9f10 Issue #7689: Allow pickling of dynamically created classes when their
metaclass is registered with copyreg.  Patch by Nicolas M. Thiéry and
Craig Citro.
2011-10-04 09:23:04 +02:00
Meador Inge 29f43f7368 Issue #12881: ctypes: Fix segfault with large structure field names. 2011-10-03 21:48:30 -05:00
Meador Inge 1efb33a682 Issue #12881: ctypes: Fix segfault with large structure field names. 2011-10-03 21:44:22 -05:00
Amaury Forgeot d'Arc bbe7b0ad2a Fix a few ResourceWarnings in idle 2011-10-03 20:33:24 +02:00
Charles-François Natali b619bb27ed Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle
would be finalized after the reference to its underlying BufferedRWPair's
writer got cleared by the GC.
2011-10-05 19:55:56 +02:00
Senthil Kumaran 55a190fbbd merge from 3.2. Issue13104 - Fix urllib.request.thishost() utility function. 2011-10-06 00:32:52 +08:00
Senthil Kumaran 91a076a72f merge from 3.2. Issue #13073 - Address the review comments made by Ezio. 2011-10-05 23:27:37 +08:00
Antoine Pitrou 00b2c86d09 Fix text failures when ctypes is not available
(followup to Victor's 85d11cf67aa8 and 7a50e549bd11)
2011-10-05 13:01:41 +02:00
Charles-François Natali 09252c4938 os.geteuid() may not be available... 2011-10-04 23:36:49 +02:00
Charles-François Natali 5f99c912c8 Issue #11956: Always skip test_import.test_unwritable_directory when run as
root, since the semantics varies across Unix variants.
2011-10-04 20:41:52 +02:00
Charles-François Natali e39b112aea Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as
root (directory permissions are ignored).
2011-10-04 19:19:21 +02:00
Ezio Melotti a9860aeb08 #13054: fix usage of sys.maxunicode after PEP-393. 2011-10-04 19:06:00 +03:00
Charles-François Natali 8619cd7376 Issue #13001: Fix test_socket.testRecvmsgTrunc failure on FreeBSD < 8, which
doesn't always set the MSG_TRUNC flag when a truncated datagram is received.
2011-10-03 19:43:15 +02:00
Charles-François Natali 87b3c92b5b Introduce support.requires_freebsd_version decorator. 2011-10-03 19:40:37 +02:00
Antoine Pitrou 86aed0bbc6 Fix ResourceWarnings in the TIPC socket tests. 2011-10-02 23:33:19 +02:00
Antoine Pitrou 22cd021656 Fix ResourceWarnings in the TIPC socket tests. 2011-10-02 23:37:41 +02:00
Charles-François Natali 027f9a3600 Issue #13084: Fix a test_signal failure: the delivery order is only defined for
real-time signals.
2011-10-02 18:36:05 +02:00
R David Murray 1d30db459d merge #4147: minidom's toprettyxml no longer adds whitespace to text nodes. 2011-10-01 16:22:35 -04:00
R David Murray 791744b070 #4147: minidom's toprettyxml no longer adds whitespace to text nodes.
Patch by Dan Kenigsberg.
2011-10-01 16:19:51 -04:00
Antoine Pitrou a02a12c517 Issue #13034: When decoding some SSL certificates, the subjectAltName extension could be unreported. 2011-10-01 19:22:30 +02:00
Antoine Pitrou d8c347a8de Issue #13034: When decoding some SSL certificates, the subjectAltName extension could be unreported. 2011-10-01 19:20:25 +02:00
Victor Stinner 07ac3ebd7b Optimize unicode_subtype_new(): don't encode to wchar_t and decode from wchar_t
Rewrite unicode_subtype_new(): allocate directly the right type.
2011-10-01 16:16:43 +02:00
Benjamin Peterson 811c2f1369 remove "fast-path" for (i)adding strings
These were just an artifact of the old unicode concatenation hack and likely
just penalized other kinds of adding. Also, this fixes __(i)add__ on string
subclasses.
2011-09-30 21:31:21 -04:00
Victor Stinner 8dba4e004f array module uses the new Unicode API
* Use Py_UCS4* buffer instead of Py_UNICODE*
 * Use "I" or "L" format, instead of "u" format
2011-09-30 00:51:10 +02:00
Victor Stinner ef17f12a39 Fix test_codeccallbacks for Windows: check size of wchar_t, not sys.maxunicode 2011-09-29 20:01:55 +02:00
Victor Stinner 182d90d9ee Fix test_codecs for Windows: check size of wchar_t, not sys.maxunicode 2011-09-29 19:53:55 +02:00
Martin v. Löwis ff1ef074ed Re-enable test. 2011-09-29 13:49:10 +02:00
Ezio Melotti 9d3579b7d6 Remove now useless redefinition of chr/ord for narrow builds in test_multibytecodec_support.py. 2011-09-29 04:36:38 +03:00
Ezio Melotti f503673c4d Move UCS4-specific tests with the "normal" tests. 2011-09-29 03:14:56 +03:00
Ezio Melotti 48a2f8fd97 #13054: sys.maxunicode is now always 0x10FFFF. 2011-09-29 00:18:19 +03:00
Benjamin Peterson e56717c3d2 merge heads 2011-09-28 10:48:40 -04:00
Benjamin Peterson 19f6260710 this isn't fixed on windows yet... 2011-09-28 10:48:32 -04:00
Ezio Melotti d8b509b192 #13012: use splitlines(keepends=True/False) instead of splitlines(0/1). 2011-09-28 17:37:55 +03:00
Benjamin Peterson a6e50f589f this test works as expected now 2011-09-28 08:20:00 -04:00
Benjamin Peterson e28544ad5f revert unintended change 2011-09-28 08:19:25 -04:00