Here's a really fun one for you :) I've managed to create a situation where all function level imports in cursors.py fail if, and only if, called from inside a QThread with PyQt. By moving all function level imports in cursors.py to module level, the code works fine. And, when I say fail, I guess I really mean deadlock. The import line is executed, but never returns.
If it helps, I'm willing to send sample code that will reproduce the problem. Also, I created my own test class that did a function level import and it works fine inside the QThread so I'm pretty sure this is MySQLdb specific. Is the namespace being mangled in MySQLdb somewhere? Perhaps a namespace needs to be created that isn't getting created in this case?
Any ideas?
Greg Fortune
lists@gregfortune.com
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here's a really fun one for you :) I've managed to create a situation where all function level imports in cursors.py fail if, and only if, called from inside a QThread with PyQt. By moving all function level imports in cursors.py to module level, the code works fine. And, when I say fail, I guess I really mean deadlock. The import line is executed, but never returns.
If it helps, I'm willing to send sample code that will reproduce the problem. Also, I created my own test class that did a function level import and it works fine inside the QThread so I'm pretty sure this is MySQLdb specific. Is the namespace being mangled in MySQLdb somewhere? Perhaps a namespace needs to be created that isn't getting created in this case?
Any ideas?
Greg Fortune
lists@gregfortune.com
Ack, sorry. Forgot to mention the MySQLdb version :) Problem occurs under 0.9.1 and 0.9.2..
Greg
No idea. File a bug report with test cases.