summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-07-06 13:57:28 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2006-07-06 13:57:28 (GMT)
commitbeb572b50ae7fc0ab95be8b91eab877bc630e874 (patch)
tree9a3ba75c038feeecf9acc2387cca05e1bb46168d /Doc/whatsnew
parent2d792254aef8855183e32144259c8c11e9b165dd (diff)
downloadcpython-beb572b50ae7fc0ab95be8b91eab877bc630e874.zip
cpython-beb572b50ae7fc0ab95be8b91eab877bc630e874.tar.gz
cpython-beb572b50ae7fc0ab95be8b91eab877bc630e874.tar.bz2
ImportWarning is now silent by default
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/whatsnew25.tex17
1 files changed, 5 insertions, 12 deletions
diff --git a/Doc/whatsnew/whatsnew25.tex b/Doc/whatsnew/whatsnew25.tex
index 234f0b3..22a1fe2 100644
--- a/Doc/whatsnew/whatsnew25.tex
+++ b/Doc/whatsnew/whatsnew25.tex
@@ -1170,19 +1170,12 @@ a line like this near the top of the source file:
to include an \file{__init__.py} module in a package directory.
Debugging this mistake can be confusing, and usually requires running
Python with the \programopt{-v} switch to log all the paths searched.
-In Python 2.5, a new \exception{ImportWarning} warning is raised when
+In Python 2.5, a new \exception{ImportWarning} warning is triggered when
an import would have picked up a directory as a package but no
-\file{__init__.py} was found. (Implemented by Thomas Wouters.)
-
-To suppress these warnings, you can either supply
-\code{\programopt{-W}'ignore:Not importing directory'} when running the Python
-interpreter, or use the \module{warnings} module to suppress the
-message:
-
-\begin{verbatim}
-warnings.filterwarnings('ignore', 'Not importing directory',
- ImportWarning)
-\end{verbatim}
+\file{__init__.py} was found. This warning is silently ignored by default;
+provide the \programopt{-Wd} option when running the Python executable
+to display the warning message.
+(Implemented by Thomas Wouters.)
\item The list of base classes in a class definition can now be empty.
As an example, this is now legal: