Showing content from http://mail.python.org/pipermail/python-dev/attachments/20110317/6a4fed82/attachment.html below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
On 03/17/2011 07:23 PM, Terry Reedy wrote:<br>
<blockquote cite="mid:ilu55g$rei$1@dough.gmane.org" type="cite">As I
understand it, the Pyxxx to PyCapsule CAPI warning was put in 2.7.</blockquote>
<br>
In 2.7, the CObject constructor PyCObject_FromVoidPtr() threw a
PendingDeprecationWarning exception. Like other warnings, these
aren't active by default. This still caused two problems:<br>
<ul>
<li>If you enabled warnings, PyCObject_FromVoidPtr() would return
NULL. There is definitely code out there that assumes
PyCObject_FromVoidPtr() always succeeds and doesn't bother
checking the pointer it gets back. That's a bad assumption, the
code is therefore buggy--but exposing these heretofore unnoticed
bugs caused problems.</li>
<li>If you enabled warnings-as-errors, a PendingDeprecationWarning
is therefore an error. In some environments there's a
requirement that Python must build from scratch and pass its
unit test suite without errors, with warnings-as-errors turned
on. Python 2.7 shipped with one module still using
PyCObject_FromVoidPtr(), bsddb, as it's externally maintained.
(I wanted to change it to use PyCapsule for 2.7 but was told to
leave it alone.) bsddb's test threw the warning, the warning
was an error, now people had a problem.<br>
</li>
</ul>
In 2.7.1 PyCObject_FromVoidPtr() now calls PyErr_WarnPy3k(). This
means it's been promoted to throwing DeprecationWarning! But that's
also guarded with Py_Py3kWarningFlag so it's not active unless you
ask for that too (as with "-3" on the command-line, etc).<br>
<br>
<br>
/larry/<br>
</body>
</html>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4