Message276416
Wow, this was news to me and I just ran into it in python 2.7. Checked in Python 3 and it's still there:
```
(py3)->torsten.landschoff@horatio:~$ python3 --version
Python 3.6.0a3+
(py3)->torsten.landschoff@horatio:~$ python3 -W error::sqlalchemy.exc.SAWarning -c "print()"
Invalid -W option ignored: invalid module name: 'sqlalchemy.exc'
```
I see no easy way to fix this. One way I thought about is to have hooks for importing of modules (called when a module is put into ``sys.modules``, not sure if there is something like this already) and have the warning system trigger on that.
There is no way to raise an exception before it is imported anyway... |
|
Date |
User |
Action |
Args |
2016-09-14 11:18:12 | torsten | set | recipients:
+ torsten, brett.cannon, pitrou, remram |
2016-09-14 11:18:12 | torsten | set | messageid: <1473851892.5.0.00921475920402.issue22543@psf.upfronthosting.co.za> |
2016-09-14 11:18:12 | torsten | link | issue22543 messages |
2016-09-14 11:18:12 | torsten | create | |
|