Commit graph

40988 commits

Author SHA1 Message Date
Andrew M. Kuchling
110a48cf60 #3367: revert rev. 65539: this change causes test_parser to fail 2008-08-05 02:05:23 +00:00
Andrew M. Kuchling
efa61bc15f #3367 from Kristjan Valur Jonsson:
If a PyTokenizer_FromString() is called with an empty string, the
tokenizer's line_start member never gets initialized.  Later, it is
compared with the token pointer 'a' in parsetok.c:193 and that behavior
can result in undefined behavior.
2008-08-05 01:38:08 +00:00
Andrew M. Kuchling
10288e19bf Bug 3228: take a test from Niels Gustaebel's patch, and based on his patch, check for having os.stat available 2008-08-05 01:00:57 +00:00
Brett Cannon
7e30b67bf4 Add a note about all the modules/packages changed to silence -3 warnings. More
changes are needed once some decisions are made, but this is the work up to this
point.
2008-08-04 21:52:25 +00:00
Brett Cannon
211b3cdbdc Remove use of callable() from pickle to silence warnings under -3. 2008-08-04 21:34:34 +00:00
Brett Cannon
d13e4ba416 Remove tuple parameter unpacking in aifc to silence warnings under -3. 2008-08-04 21:33:00 +00:00
Brett Cannon
d250c8d666 Silence warnings under -3 triggered by wsgiref. 2008-08-04 21:30:53 +00:00
Mark Dickinson
b646757e01 Issue #1481296: (again!) Make conversion of a float NaN to an int or
long raise ValueError instead of returning 0.  Also, change the error
message for conversion of an infinity to an integer, replacing 'long' by
'integer', so that it's appropriate for both long(float('inf')) and
int(float('inf')).
2008-08-04 21:30:09 +00:00
Brett Cannon
ff6868cf10 Remove a use of callable() from Tkinter to silence warnings under -3. 2008-08-04 21:24:43 +00:00
Brett Cannon
132fc54069 Remove a dict.has_key() and list.sort(cmp=) usage from tarfile to silence
warnings under -3.
2008-08-04 21:23:07 +00:00
Brett Cannon
cf297cd73f Remove usage of apply() in sqlite3 to silence warnings under -3. 2008-08-04 21:19:41 +00:00
Brett Cannon
753ecb13db Remove dict.has_key() usage in the shelve module to silence warnings under -3. 2008-08-04 21:17:15 +00:00
Brett Cannon
5b3d3729ba Remove dict.has_key() usage in xml.sax to silence warnings under -3. 2008-08-04 21:10:50 +00:00
Brett Cannon
d9636e17cc Remove the use of callable() in re to silence warnings under -3. 2008-08-04 21:07:59 +00:00
Gregory P. Smith
33ede08cdd more cleanup ups of the recently added warnings in the subprocess docs. 2008-08-04 18:34:07 +00:00
Nick Coghlan
2a0c2b1368 Add missing NEWS entry for r65487 2008-08-04 12:47:17 +00:00
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