[Python-checkins] r47276 - python/trunk/Doc/whatsnew/whatsnew25.tex
andrew.kuchling
python-checkins at python.org
Thu Jul 6 15:57:29 CEST 2006
Author: andrew.kuchling
Date: Thu Jul 6 15:57:28 2006
New Revision: 47276
Modified:
python/trunk/Doc/whatsnew/whatsnew25.tex
Log:
ImportWarning is now silent by default
Modified: python/trunk/Doc/whatsnew/whatsnew25.tex
==============================================================================
--- python/trunk/Doc/whatsnew/whatsnew25.tex (original)
+++ python/trunk/Doc/whatsnew/whatsnew25.tex Thu Jul 6 15:57:28 2006
@@ -1170,19 +1170,12 @@
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:
More information about the Python-checkins
mailing list