-
Notifications
You must be signed in to change notification settings - Fork 104
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
Port txmongo to Python 3.3+ #124
Conversation
Nice job! Wow, I've missed a moment when Trial was ported ty Py3 |
Trial is ported in trunk -- 15.4 will be the first release, which is why the travis only works on trunk. Fixing up the auth tests now... |
Seems like all tests which talk to DB are hanging |
Thanks for this! :) Seems to be hanging on python33 and python34 though, We'll have to dig a bit deeper on that. |
I have "PASSED (skips=1, successes=144)" on local 3.3 and 3.4. The authentication tests were busted which I think caused a knock-on. Lets see how these go. |
That's strange, but when I run tests with Py3 on vagrant machine, all tests which talk to DB are hanging. But if I change "localhost" to "127.0.0.1" in test files, they work well (except auth tests which is distinct issue). Seems like same thing breaks tests on Travis. |
Try updating, the auth tests work now with the latest branch. I'm about to jet back to Perth, and this patch probably needs a bit more work -- making all trunk builds on allowed failures, moving pyflakes off allowed failures, and some code cleanup + fixing that minor coverage regression. |
from twisted.trial import unittest | ||
import txmongo | ||
from txmongo.protocol import MongoClientProtocol | ||
import txmongo.filter as qf | ||
|
||
if _PY3: | ||
from twisted.python.compat import xrange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be cleaner to just use range
instead of xrange
Seems like name resolution is broken in Twisted trunk. Following code works on Twisted 15.3.0, but fails on trunk:
That's why all our tests that try to connect to MongoDB on We can work around this by changing "localhost" to "127.0.0.1", but I'd prefer to wait when Twisted trunk will be fixed. |
@@ -2,7 +2,7 @@ | |||
# Use of this source code is governed by the Apache License that can be | |||
# found in the LICENSE file. | |||
|
|||
import types | |||
from __future__ import absolute_import, division |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have no division operations in this file :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going off the Twisted py3 porting standards (https://twistedmatrix.com/trac/wiki/Plan/Python3#Reviewerchecklist) where it's in there regardless. If that's an issue, I can change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I don't mind at all. Just thought this is a trace of some changes that were reverted.
The tests pass! Just have to figure out what coveralls is complaining about... |
That coveralls decreased by 0.02% is no big deal, we're still above 95%. Hawky, you feel comfortable with merging it anyway? :) |
I think it's in a merging state, if you do. :) |
Coveralls is not an issue: we have 3 lines in @hawkowl, I saw you have fixed Twisted trunk to make (in particular) DNS resolution work. Thanks! |
Good to go for us, thank you very much @hawkowl :D |
No problem :) |
No description provided.