Commit graph

82468 commits

Author SHA1 Message Date
Mark Dickinson
23543ebd86 Merge docstring typo fix from 3.3 2013-09-09 10:34:56 +01:00
Mark Dickinson
51ef074d57 Docstring typo fix: Arithmentic -> Arithmetic. 2013-09-09 10:34:24 +01:00
Raymond Hettinger
42d9ea12b6 merge 2013-09-09 02:02:05 -05:00
Raymond Hettinger
fb92f393b0 Issue 18752: Make chain.from_iterable() more visible in the documentation. 2013-09-09 02:01:35 -05:00
Raymond Hettinger
223b9c36ad merge 2013-09-09 01:55:31 -05:00
Raymond Hettinger
ee09458e08 merge 2013-09-09 01:55:07 -05:00
Raymond Hettinger
1e21ebcc2a Issue 18301: The classmethod decorator didn't fit well with the rough-equivalent example code. 2013-09-09 01:54:27 -05:00
Ethan Furman
455bfdea2f Close #18980: Enum doc fixes. Patch from Elazar Gershuni. 2013-09-08 23:48:34 -07:00
Raymond Hettinger
8df58f7ae8 Issue 18752: Make chain.from_iterable() more visible in the documentation. 2013-09-09 01:29:40 -05:00
Tim Peters
c363a23eff Issue 18984: Remove ._stopped Event from Thread internals.
The fix for issue 18808 left us checking two things to be sure a Thread
was done:  an Event (._stopped) and a mutex (._tstate_lock).  Clumsy &
brittle.  This patch removes the Event, leaving just a happy lock :-)

The bulk of the patch removes two excruciating tests, which were
verifying sanity of the internals of the ._stopped Event after a fork.
Thanks to Antoine Pitrou for verifying that's the only real value
these tests had.

One consequence of moving from an Event to a mutex:  waiters (threads
calling Thread.join()) used to block each on their own unique mutex
(internal to the ._stopped event), but now all contend on the same
mutex (._tstate_lock).  These approaches have different performance
characteristics on different platforms.  I don't think it matters in
this context.
2013-09-08 18:44:40 -05:00
Serhiy Storchaka
050b62d1a6 Fix a typo. (closes #18953) 2013-09-08 20:43:02 +03:00
Serhiy Storchaka
c700180443 Fix a typo. (closes #18953) 2013-09-08 20:42:13 +03:00
Serhiy Storchaka
d86709ce91 Fixed tests with Tcl/Tk <8.5 (closes #18964). 2013-09-08 20:31:20 +03:00
Serhiy Storchaka
dfa689bfdd Fixed tests with Tcl/Tk <8.5 (closes #18964). 2013-09-08 20:29:37 +03:00
Jason R. Coombs
4a6524295d Issue #18978: Add tests to capture expected behavior for class-level method overrides. 2013-09-08 13:03:40 -04:00
Jason R. Coombs
aae6a1d76f Issue #18978: A more elegant technique for resolving the method 2013-09-08 12:54:33 -04:00
Jason R. Coombs
7dc4f4bbab Issue #18978: Allow Request.method to be defined at the class level. 2013-09-08 12:47:07 -04:00
Victor Stinner
4f7a36f84f Issue #18904: test_os and test_socket use unittest.skipIf() to check if fcntl
module is present (to record skipped tests)
2013-09-08 14:14:38 +02:00
Antoine Pitrou
5da7e7959e Issue #18808 again: fix the after-fork logic for not-yet-started or already-stopped threads.
(AFAICT, in theory, we must reset all the locks, not just those in use)
2013-09-08 13:19:06 +02:00
Charles-François Natali
6f6f4865d1 Merge. 2013-09-08 12:35:53 +02:00
Charles-François Natali
807ba8552a Issue #18963: skip test_selectors.test_above_fd_setsize on older OS X versions. 2013-09-08 12:31:32 +02:00
Charles-François Natali
833bf1fcb2 Issue #18935: Fix test_regrtest.test_timeout when built --without-threads (the
'--timeout' option requires faulthandler.dump_traceback_later).
2013-09-08 12:27:33 +02:00
Victor Stinner
a3c18d0f14 Issue #18904: test_socket: add inheritance tests using fcntl and FD_CLOEXEC 2013-09-08 11:53:09 +02:00
Victor Stinner
7ba6b0f943 Issue #18904: Improve os.get/set_inheritable() tests 2013-09-08 11:47:54 +02:00
Victor Stinner
8898350076 Close #18957: The PYTHONFAULTHANDLER environment variable now only enables the
faulthandler module if the variable is non-empty. Same behaviour than other
variables like PYTHONDONTWRITEBYTECODE.
2013-09-08 11:36:23 +02:00
Charles-François Natali
9437d7a7fe Issue #18963: Fix test_selectors.test_above_fd_setsize on OS X, where the
default RLIMIT_NOFILE hard limit can be RLIMIT_INFINITY.
2013-09-08 11:34:42 +02:00
Charles-François Natali
45e255167e Issue #18934: Use poll/select-based selectors for multiprocessing.Connection,
to avoid one extra FD per Connection.
2013-09-08 11:30:53 +02:00
Raymond Hettinger
742d8716ff Put the defines in the logical section and fix indentation. 2013-09-08 00:25:57 -07:00
Senthil Kumaran
f367962d86 merge from 3.3
Fix the dead link of IEEE_854-1987 standard with the Wikipedia entry.
Addresses issue #18438
2013-09-07 23:20:06 -07:00
Senthil Kumaran
4fec47e5ed Fix the dead link of IEEE_854-1987 standard with the Wikipedia entry.
Addresses issue #18438
2013-09-07 23:19:29 -07:00
Raymond Hettinger
583cd03fd1 Minor code beautification. 2013-09-07 22:06:35 -07:00
Raymond Hettinger
4ea9080da9 Improve code clarity by removing two unattractive macros. 2013-09-07 21:01:29 -07:00
Raymond Hettinger
8f8839e10a Remove the freelist scheme for setobjects.
The setobject freelist was consuming memory but not providing much value.
Even when a freelisted setobject was available, most of the setobject
fields still needed to be initialized and the small table still required
a memset().  This meant that the custom freelisting scheme for sets was
providing almost no incremental benefit over the default Python freelist
scheme used by _PyObject_Malloc() in Objects/obmalloc.c.
2013-09-07 20:26:50 -07:00
Nick Coghlan
ff6382b40d Merge #18952 fix from 3.3 2013-09-08 12:49:53 +10:00
Tim Peters
68d7f78703 Issue 18808: blind attempt to repair some buildbot failures.
test_is_alive_after_fork is failing on some old Linux kernels, but
passing on all newer ones.  Since virtually anything can go wrong
with locks when mixing threads with fork, replace the most likely
cause with a redundant simple data member.
2013-09-07 21:23:03 -05:00
Nick Coghlan
0494c2ae7f Close #18952: correctly download test support data
When test.support was converted to a package, it started silently
skipping the tests which needed to download support data to run.

This change refactors the affected code, and also tidies up
test.support.findfile to remove the unused *here* parameter, document
the *subdir* parameter and rename the *filename* parameter to avoid
shadowing the file builtin and be consistent with the documentation.

The unexpected skips were noticed and reported by Zachary Ware
2013-09-08 11:40:34 +10:00
Senthil Kumaran
b1424a2908 merge from 3.3
Correct Profile class usage example. Addresses issue #18033.
Patch contributed by Olivier Hervieu and Dmi Baranov.
2013-09-07 17:52:38 -07:00
Senthil Kumaran
21101f7038 Correct Profile class usage example. Addresses issue #18033.
Patch contributed by Olivier Hervieu and Dmi Baranov.
2013-09-07 17:51:58 -07:00
Raymond Hettinger
04fd9dd52b Small rearrangement to bring together the three functions for probing the hash table. 2013-09-07 17:41:01 -07:00
Raymond Hettinger
ae7b00e2d3 Move the overview comment to the top of the file. 2013-09-07 15:05:00 -07:00
Antoine Pitrou
7b4769937f Issue #18808: Thread.join() now waits for the underlying thread state to be destroyed before returning.
This prevents unpredictable aborts in Py_EndInterpreter() when some non-daemon threads are still running.
2013-09-07 23:38:37 +02:00
Senthil Kumaran
eda7c64151 Fix the merge conflict 2013-09-07 14:12:55 -07:00
Senthil Kumaran
2f2ae39037 merge from 3.3
Fix License URL display and add test to check for license url presence.
Fixes issue #18206 Patch contributed by  Berker Peksag and py.user
2013-09-07 14:09:48 -07:00
Senthil Kumaran
8ef519b24f Fix License URL display and add test to check for license url presence.
Fixes issue #18206 Patch contributed by  Berker Peksag and py.user
2013-09-07 13:59:17 -07:00
Senthil Kumaran
59b74ec5e3 merge from 3.3
Removing the mention of os.isatty mention as Unix only
Correct the wrong documentation.
2013-09-07 11:30:04 -07:00
Senthil Kumaran
1b90227c0d Removing the mention of os.isatty mention as Unix only
Correct the wrong documentation.
2013-09-07 11:28:58 -07:00
Richard Oudkerk
b988ee0632 Fix conversion from Py_ssize_t to int. 2013-09-07 17:40:45 +01:00
Ezio Melotti
84eadd8651 #18895: merge with 3.3. 2013-09-07 15:24:01 +03:00
Ezio Melotti
e64a91a890 #18895: split a sentence in unittest docs. 2013-09-07 15:23:36 +03:00
Ezio Melotti
0cd94428ad #18894: merge with 3.3. 2013-09-07 15:20:03 +03:00