Brett Cannon [Sat, 16 Aug 2008 21:47:07 +0000 (21:47 +0000)]
Silence the DeprecationWarning raised by importing mimetools in BaseHTTPServer.
This does have an unfortunate side-effect of silencing the warning for all
subsequent code that imports mimetools as well since the warning is only
executed upon the first import of mimetools.
Dramatically simplifies the fix_imports pattern, resulting in a reduction of the test_all_fixers runtime from 122+ secs to 59 secs (a good predictor of 2to3 performance).
........
Thomas Heller [Thu, 14 Aug 2008 19:10:48 +0000 (19:10 +0000)]
issue #3554: ctypes.string_at and ctypes.wstring_at must use the
pythonapi calling convention so that the GIL is held and error return
values are checked.
Facundo Batista [Thu, 14 Aug 2008 16:51:00 +0000 (16:51 +0000)]
Issue 1432. Fixes a bug caused because of the evolution
of the RFC that describes the behaviour. Note that we now
have the same behaviour than the current browsers.
Brett Cannon [Thu, 14 Aug 2008 05:55:18 +0000 (05:55 +0000)]
Fix markup for various binary operation examples where the operands were bolded
and the operator was made literal, leading to non-valid reST. Changed to have
the entire expression just be a literal bit of text.
Brett Cannon [Thu, 14 Aug 2008 05:00:03 +0000 (05:00 +0000)]
Silence the DeprecationWarning of rfc822 triggered by its importation in
mimetools.
This has an unfortunate side-effect of potentially not letting any warning
about rfc822's deprecation be seen by user-visible code if rfc822 is not
imported before mimetools. This is because modules are cached in sys.modules
and thus do not have their deprecation triggered more than once. But this
silencing would have happened by other code that silences the use of mimetools
or rfc822 anyway in the stdlib or user code, and thus seems justified to be
done here.
- PC/VC6/_bsddb.dsp:
removed '/nodefaultlib:"msvcrt"' to fix linker error.
- PC/VC6/_msi.dsp, PC/VC6/pcbuild.dsw:
added new module support.
- PC/VC6/_sqlite3.dsp:
/D "MODULE_NAME=\"sqlite3\""
caused extra leading space like
#define MODULE_NAME " sqlite3"
so uses
/D MODULE_NAME=\"sqlite3\"
instead.
- PC/VC6/python.dsp:
changed stack size to 2MB to avoid stack overflow on
some tests.
Martin v. Löwis [Tue, 12 Aug 2008 14:49:50 +0000 (14:49 +0000)]
Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,
by denying s# to parse objects that have a releasebuffer procedure,
and introducing s*.
More module might need to get converted to use s*.
Nick Coghlan [Mon, 11 Aug 2008 15:45:58 +0000 (15:45 +0000)]
Issue 2235: Py3k warnings are now emitted for classes that will no longer inherit a__hash__ implementation from a parent class in Python 3.x. The standard library and test suite have been updated to not emit these warnings.
Brett Cannon [Sat, 9 Aug 2008 23:06:16 +0000 (23:06 +0000)]
Suppress the warning in asynchat from using buffer() when running udner -3.
Naively removing the usage causes a large number of test failures, so it was
just easier to suppress the warning.
Brett Cannon [Fri, 8 Aug 2008 04:27:28 +0000 (04:27 +0000)]
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.
Brett Cannon [Fri, 8 Aug 2008 04:19:32 +0000 (04:19 +0000)]
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).
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.
#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.
Brett Cannon [Mon, 4 Aug 2008 21:52:25 +0000 (21:52 +0000)]
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.
Mark Dickinson [Mon, 4 Aug 2008 21:30:09 +0000 (21:30 +0000)]
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')).