Commit Graph

40353 Commits

Author SHA1 Message Date
Antoine Pitrou de781a49d2 Fix slightly misleading statement in the NEWS file. 2008-08-09 12:43:23 +00:00
Skip Montanaro a032bf41f6 accept issue 3436 2008-08-08 22:52:51 +00:00
Georg Brandl b04d4853a7 Remove mention of backquotes in the tutorial. 2008-08-08 15:34:34 +00:00
Georg Brandl 463f39d9ac #3519: callee is an expression too. 2008-08-08 06:42:20 +00:00
Brett Cannon 3f92bc6f48 Remove buffer() usage in the socket module by just slicing directly on the
object. This removes all warnings for the module caused by running under -3.
2008-08-08 04:27:28 +00:00
Brett Cannon 03446c43ca Remove warnings generated for the suprocess module when run under -3. Required
commenting out True/False compatbility stuff, remove a use of apply(), and
remove a use of buffer() (just pulled the solution used in 3.0 which is direct
slicing).
2008-08-08 04:19:32 +00:00
Brett Cannon 0563a8ffd1 Change the warning emitted for using the buffer() object; memoryview() in 3.0
is not an equivalent.
2008-08-08 04:15:53 +00:00
Guido van Rossum d69390107a Patch by Ian Charnas from issue 3517.
Add F_FULLFSYNC if it exists (OS X only so far).
2008-08-07 18:51:38 +00:00
Antoine Pitrou 74022ab013 #1288615: Python code.interact() and non-ASCII input 2008-08-07 18:42:40 +00:00
Andrew M. Kuchling b2793a4766 Add some items 2008-08-07 01:47:34 +00:00
Brett Cannon 3aa2a49ec9 Add imp.reload(). This to help with transitioning to 3.0 the reload() built-in
has been removed there.
2008-08-06 22:28:09 +00:00
Mark Dickinson c777a412f1 Remove duplicate import 2008-08-06 21:36:57 +00:00
Mark Dickinson 9752195a71 Docstring typo 2008-08-06 20:12:30 +00:00
Georg Brandl 03894c5070 Fix longstringitem definition. #3505. 2008-08-06 17:20:41 +00:00
Guido van Rossum 8b762f05c7 Tracker issue 3487: sre "bytecode" verifier.
This is a verifier for the binary code used by the _sre module (this
is often called bytecode, though to distinguish it from Python bytecode
I put it in quotes).

I wrote this for Google App Engine, and am making the patch available as
open source under the Apache 2 license.  Below are the copyright
statement and license, for completeness.

# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

It's not necessary to include these copyrights and bytecode in the
source file.  Google has signed a contributor's agreement with the PSF
already.
2008-08-05 03:39:21 +00:00
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