Commit Graph

40272 Commits

Author SHA1 Message Date
Nick Coghlan a510748085 Issue 643841: better documentation of the special method lookup process, especially for new-style classes. Also removes the warnings about not being authoritative for new-style classes - the language reference actually covers those fairly well now (albeit in a fashion that isn't always particularly easy to follow). 2008-08-04 12:40:59 +00:00
Gregory P. Smith d868be8805 Adds a sanity check to avoid a *very rare* infinite loop due to a corrupt tls
key list data structure in the thread startup path.

This change is a companion to r60148 which already successfully dealt with a
similar issue on thread shutdown.

In particular this loop has been observed happening from this call path:
 #0  in find_key ()
 #1  in PyThread_set_key_value ()
 #2  in _PyGILState_NoteThreadState ()
 #3  in PyThreadState_New ()
 #4  in t_bootstrap ()
 #5  in pthread_start_thread ()

I don't know how this happens but it does, *very* rarely.  On more than
one hardware platform.  I have not been able to reproduce it manually.
(A flaky mutex implementation on the system in question is one hypothesis).

As with r60148, the spinning we managed to observe in the wild was due to a
single list element pointing back upon itself.
2008-08-04 07:33:37 +00:00
Georg Brandl e7829a5b1b Clarify the meaning of the select() parameters and sync
names with docstring.
2008-08-04 07:31:50 +00:00
Georg Brandl 40df8ecdd5 Template is always "tmp". 2008-08-04 07:23:29 +00:00
Georg Brandl 143de623e7 Fix markup. 2008-08-04 06:29:36 +00:00
Andrew M. Kuchling 70a6dbd46e Bug 3228: Explicitly supply the file mode to avoid creating executable files,
and add corresponding tests.
Possible 2.5 backport candidate
2008-08-04 01:43:43 +00:00
Gregory P. Smith 0879250284 issue1606: Add warnings to the subprocess documentation about common pitfalls
of using pipes that cause deadlocks.
2008-08-04 01:03:50 +00:00
Brett Cannon 814820bb28 Remove assignment to True/False and use of dict.has_key() to silence warnings
while running under -3.
2008-08-04 00:50:11 +00:00
Brett Cannon 9bd059ff4e Silence warnings under -3 about using dict.has_key() for modulefinder. 2008-08-04 00:27:29 +00:00
Brett Cannon 5dd504df28 Remove dict.has_key() usage in xml.dom.minidom to silence warnings while
running under -3.
2008-08-04 00:23:58 +00:00
Gregory P. Smith a36f8fefb0 - Issue #1857: subprocess.Popen.poll gained an additional _deadstate keyword
argument in python 2.5, this broke code that subclassed Popen to include its
  own poll method.  Fixed my moving _deadstate to an _internal_poll method.
2008-08-04 00:13:29 +00:00
Brett Cannon e6bfe80b67 Remove dict.has_key() and apply() usage from the logging package to silence
warnings when run under -3.
2008-08-04 00:09:43 +00:00
Brett Cannon 36bed8a25f Remove a use of callable() in fileinput to silence a -3 warning. 2008-08-03 23:52:32 +00:00
Brett Cannon c66b03a4c1 Move filecmp from using dict.has_key() to dict.__contains__() to silence
warnings triggered under -3.
2008-08-03 23:46:46 +00:00
Brett Cannon 8161498817 Remove a dict.has_key() usage in email._parseaddr found while running -3. 2008-08-03 23:40:13 +00:00
Brett Cannon 1f571c6e60 Remove Barry's love of deprecated syntax to silence warnings in the email
package, when run under -3, about using <>.
2008-08-03 23:27:32 +00:00
Brett Cannon b2f49ff88d Remove a dict.has_key() use in DocXMLRPCServer that comes up under -3. 2008-08-03 22:59:46 +00:00
Brett Cannon 0a0f608244 Remove a dict.has_key() and callable() usage in SimpleXMLRPCServer as triggered
under -3 through test_xmlrpc.
2008-08-03 22:57:23 +00:00
Brett Cannon c3ce0e53ad Silence -3 warnings in pstats: a dict.has_key() usage and backport solution to
move from list.sort(cmp=) to key=.
2008-08-03 22:52:42 +00:00
Brett Cannon cc2f7b4994 Remove a dict.has_key() usage in profile to silence a -3 DeprecationWarning. 2008-08-03 22:38:19 +00:00
Brett Cannon 52f03c5d20 Remove a use of list.sort(cmp=) to silence a -3 DeprecationWarning in
cookielib.
2008-08-03 22:34:25 +00:00
Georg Brandl 60fffcf854 Note the removal of several committers. 2008-08-03 22:28:55 +00:00
Georg Brandl 1113803c5a #3495: use current version. 2008-08-03 09:21:18 +00:00
Brett Cannon aca98b0a2c Silence SyntaxWarning and DeprecationWarning in pydoc triggered by tuple
unpacking in parameter lists and using callable(). Found through -3.
2008-08-03 00:58:51 +00:00
Brett Cannon 89318d89d6 Silence some SyntaxWarnings for tuple unpacking in a parameter list for
urlparse when run under -3.
2008-08-03 00:51:02 +00:00
Antoine Pitrou 92a6240198 Preemptively backport the relevant parts of r65420 2008-08-02 21:58:05 +00:00
Lars Gustäbel 727bd0b687 Issue #3039: Fix TarFileCompat.writestr() which always raised an
AttributeError since __slots__ were added to zipfile.ZipInfo in
r46967 two years ago.
Add a warning about the removal of TarFileCompat in Python 3.0.
2008-08-02 11:26:39 +00:00
Martin v. Löwis aabf404ecc Issue #799428: Fix Tkinter.Misc._nametowidget to unwrap
Tcl command objects.
2008-08-02 07:20:25 +00:00
Brett Cannon 97b1fb6a98 Remove a __getitem__() removal on an exception to silence a warning triggered
under -3.
2008-08-02 03:37:50 +00:00
Brett Cannon 0d89407a0d Remove a dict.has_key() use to silence a warning when running under -3. 2008-08-02 03:32:13 +00:00
Brett Cannon 926779e758 Remove a dict.has_key() use to silence a warning raised under -3. 2008-08-02 03:28:42 +00:00
Brett Cannon 50bb7e12ec Remove a tuple unpacking in a parameter list to remove a SyntaxWarning raised
while running under -3.
2008-08-02 03:15:20 +00:00
Brett Cannon 2005050152 Remove a tuple unpacking in a parameter list to suppress the SyntaxWarning with
-3.
2008-08-02 03:13:46 +00:00
Benjamin Peterson 8df0e4ffc3 fix compile error on Windows 2008-08-02 03:11:16 +00:00
Benjamin Peterson 80790287ab revert last revision; code was right 2008-08-02 03:05:11 +00:00
Benjamin Peterson 1af6fb5298 fix indentation that caused logic bug 2008-08-02 02:57:17 +00:00
Georg Brandl 290d3d994a This should really be a comment. 2008-08-01 20:13:29 +00:00
Georg Brandl 632f631c48 Add the grammar to the reference manual, since the new docs don't
have the feature of putting all the small EBNF snippets together
into one big file.
2008-08-01 20:04:43 +00:00
Jesse Noller 1299e36a70 Submit fix for issue3393: Memory corruption in multiprocessing module 2008-08-01 19:46:50 +00:00
Martin v. Löwis 8dbf3649e2 Generate the PatternGrammar pickle during "make install".
Fixes part of #3131.
2008-08-01 14:10:26 +00:00
Mark Dickinson dadcd1fd50 Tone down math.fsum warning. 2008-08-01 09:13:07 +00:00
Brett Cannon 52597be2a1 Remove a use of callable() to silence the warning triggered under -3. 2008-08-01 01:45:49 +00:00
Brett Cannon f5eb2ff100 Silence (Syntax|Deprecation)Warning for 'inspect'. Had to remove tuple
unpacking in a parameter list and set some constants by hand that were pulled
from the 'compiler' package.
2008-08-01 01:40:24 +00:00
Brett Cannon c6a30ecf7a Remove use of tuple unpacking and dict.has_key() so as to silence
SyntaxWarning as triggered by -3.
2008-08-01 01:36:47 +00:00
Brett Cannon 791ec1fc13 Remove assignment to True/False to silence the SyntaxWarning that is triggered
by -3.
2008-08-01 01:34:05 +00:00
Brett Cannon 5400b6b2e2 Fix a DeprecationWarning about __getitem__() and exceptions in the 'traceback' module. 2008-08-01 01:21:50 +00:00
Amaury Forgeot d'Arc 06847b13ca Correct a crash when two successive unicode allocations fail with a MemoryError:
the freelist contained half-initialized objects with freed pointers.

The comment
/* XXX UNREF/NEWREF interface should be more symmetrical */
was copied from tupleobject.c, and appears in some other places.
I sign the petition.
2008-07-31 23:39:05 +00:00
Amaury Forgeot d'Arc ad9604003c Remove a dummy test that was checked in by mistake 2008-07-31 21:35:03 +00:00
Amaury Forgeot d'Arc 39fd672dfe #3479: unichr(2**32) used to return u'\x00'.
The argument was fetched in a long, but PyUnicode_FromOrdinal takes an int.

(why doesn't gcc issue a truncation warning in this case?)
2008-07-31 21:28:03 +00:00
Neal Norwitz e7d8be80ba Security patches from Apple: prevent int overflow when allocating memory 2008-07-31 17:17:14 +00:00