[Twisted-Python] Deprecated Modules
![](https://secure.gravatar.com/avatar/cc57918c88bf891c3269ccff78b73095.jpg?s=120&d=mm&r=g)
If I import a deprecated module and then run the test-suite should I be seeing an error? I think that I should be seeing an error, but I am not. I am not sure if I am doing something wrong or if my local environment is weird. Thanks, RJ
![](https://secure.gravatar.com/avatar/d7875f8cfd8ba9262bfff2bf6f6f9b35.jpg?s=120&d=mm&r=g)
On 04/12/2013 02:43 AM, RJ Ewing wrote:
If I import a deprecated module and then run the test-suite should I be seeing an error? I think that I should be seeing an error, but I am not. I am not sure if I am doing something wrong or if my local environment is weird.
You should see a deprecation warning. If your Python command line includes certain options, or your set certain env variables (PYTHONWARNINGS) this might be converted into an exception.
![](https://secure.gravatar.com/avatar/b973c2a161019ba60c4f30ad598ced4d.jpg?s=120&d=mm&r=g)
On 2013-04-12 08:43, RJ Ewing wrote:
If I import a deprecated module and then run the test-suite should I be seeing an error? I think that I should be seeing an error, but I am not. I am not sure if I am doing something wrong or if my local environment is weird.
Twisted should always emit DeprecationWarnings for such uses. However, since Python 2.7, these are suppressed by default and you need to specifically enable the 'default' setting to see them again. Yeah. See <http://docs.python.org/dev/whatsnew/2.7.html#the-future-for-python-2-x> for details. -- ralphm
![](https://secure.gravatar.com/avatar/607cfd4a5b41fe6c886c978128b9c03e.jpg?s=120&d=mm&r=g)
On 11:14 am, ralphm@ik.nu wrote:
On 2013-04-12 08:43, RJ Ewing wrote:
If I import a deprecated module and then run the test-suite should I be seeing an error? I think that I should be seeing an error, but I am not. I am not sure if I am doing something wrong or if my local environment is weird.
Twisted should always emit DeprecationWarnings for such uses. However, since Python 2.7, these are suppressed by default and you need to specifically enable the 'default' setting to see them again. Yeah.
See <http://docs.python.org/dev/whatsnew/2.7.html#the-future-for- python-2-x> for details.
This is an unfortunate bug, though. See <http://tm.tl/6348>. Jean-Paul
![](https://secure.gravatar.com/avatar/cc57918c88bf891c3269ccff78b73095.jpg?s=120&d=mm&r=g)
Thank you. That was the problem. RJ On Fri, Apr 12, 2013 at 5:08 AM, <exarkun@twistedmatrix.com> wrote:
On 11:14 am, ralphm@ik.nu wrote:
On 2013-04-12 08:43, RJ Ewing wrote:
If I import a deprecated module and then run the test-suite should I be seeing an error? I think that I should be seeing an error, but I am not. I am not sure if I am doing something wrong or if my local environment is weird.
Twisted should always emit DeprecationWarnings for such uses. However, since Python 2.7, these are suppressed by default and you need to specifically enable the 'default' setting to see them again. Yeah.
See <http://docs.python.org/dev/whatsnew/2.7.html#the-future-for- python-2-x> for details.
This is an unfortunate bug, though. See <http://tm.tl/6348>.
Jean-Paul
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
participants (4)
-
exarkun@twistedmatrix.com
-
Itamar Turner-Trauring
-
Ralph Meijer
-
RJ Ewing