-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Enable absolute imports for modules using Queue. #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When running on Linux with code on a case-insensitive file system, imports of the `Queue` module fail because python resolves the wrong file (It is trying to use a relative import of `queue.py` in the kafka directory). This change forces absolute imports via PEP328.
ping? |
Hi @mumrah - are you willing to consider this PR? Or do I need to come up with a different solution? |
@jcrobak I'm fine with this change, but I don't have a local linux machine to test it on. Have you run the integration tests with this change? |
Also, sorry for the long delay |
Thanks @mumrah. I have run the unit tests on mac and linux. It seems as though they were also run as part of the travis ci build, right? https://travis-ci.org/mumrah/kafka-python/builds/12852012 |
Yea, TravisCI built this PR fine, but the problem you describe wasn't being shown previously - so can't really say if it worked just from Travis. To clarify, the unit tests are currently disabled and the integration tests that actually start up ZooKeeper and Kafka are the ones I'm interested in. Are these the tests you ran? Thanks |
Gotcha. Yes, I've verified that this fixes the issue I've seen.
Yeah, that seems to be which runs when I execute |
That looks like the mostly broken unit tests. Take at look at how Travis runs the integration tests and make sure things pass |
Sorry for the delay. I can't get the integration tests to run via But the fact that local tox and travis builds are both passing seems to be a pretty strong indication that my code didn't introduce an import-related regression. |
👍 Ran into this issue. |
Enable absolute imports for modules using Queue.
When running on Linux with code on a case-insensitive file system,
imports of the
Queue
module fail because python resolves thewrong file (It is trying to use a relative import of
queue.py
inthe kafka directory). This change forces absolute imports via PEP328.