Note that the warnings should be the first thing in the module.
This commit is contained in:
parent
3b3bb5f4cc
commit
c9e5488451
|
@ -927,8 +927,9 @@ In Python 2.6
|
||||||
/////////////
|
/////////////
|
||||||
|
|
||||||
#. Add the following code to the deprecated module if it is
|
#. Add the following code to the deprecated module if it is
|
||||||
implemented in Python (adjusting the
|
implemented in Python as the first piece of executed code
|
||||||
module name and the ``warnings`` import and needed)::
|
(adjusting the module name and the ``warnings`` import and
|
||||||
|
needed)::
|
||||||
|
|
||||||
from warnings import warnpy3k
|
from warnings import warnpy3k
|
||||||
warnpy3k("the XXX module has been removed in Python 3.0",
|
warnpy3k("the XXX module has been removed in Python 3.0",
|
||||||
|
|
Loading…
Reference in New Issue