Skip to content
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

support for codec_options #177

Merged
merged 3 commits into from
Jul 25, 2016
Merged

Conversation

IlyaSkriblovsky
Copy link
Contributor

We have used pymongo.bulk._Bulk internal class to implement bulk ops. But since PyMongo 3.3.0 that was released a week ago, this class assumes that Collection has proper support of codec options.

This patch adds codec_options to ConnectionPool, Database and Collection classes and codec_options kwarg to Collection.with_options(). This fixes our test suite that is failing since PyMongo 3.3 release.

I've also added notice in NEWS.rst that Collection.with_options should be preferred now instead of as_class kwags to find. PyMongo had dropped as_class kwags in 3.0.

@coveralls
Copy link

coveralls commented Jul 20, 2016

Coverage Status

Coverage increased (+0.03%) to 95.657% when pulling bac889d on IlyaSkriblovsky:codec_options into 49cd126 on twisted:master.

@coveralls
Copy link

coveralls commented Jul 20, 2016

Coverage Status

Coverage decreased (-95.6%) to 0.0% when pulling 0b46eba on IlyaSkriblovsky:codec_options into 49cd126 on twisted:master.

@coveralls
Copy link

coveralls commented Jul 20, 2016

Coverage Status

Coverage increased (+0.03%) to 95.657% when pulling 62b947e on IlyaSkriblovsky:codec_options into 49cd126 on twisted:master.

@IlyaSkriblovsky
Copy link
Contributor Author

@psi29a Bret, it seems that in Twisted-trunk they changed something either in Trial or twisted.python.reflect and not trial tests command says that it "can't find 'tests' module". On my local machine it is easily solved by running it as follows: PYTHONPATH=.:$PYTHONPATH trial tests. Is it possible to add something to tox.ini to force Travis to add . into PYTHONPATH? Sorry, I'm not familiar with Travis configuration at all yet.

@psi29a
Copy link
Contributor

psi29a commented Jul 20, 2016

That's crap. I'll have a look at it when I can.

@coveralls
Copy link

coveralls commented Jul 21, 2016

Coverage Status

Coverage increased (+0.03%) to 95.657% when pulling 3cf15ab on IlyaSkriblovsky:codec_options into 49cd126 on twisted:master.

@coveralls
Copy link

coveralls commented Jul 21, 2016

Coverage Status

Coverage increased (+0.03%) to 95.657% when pulling 6ee34a7 on IlyaSkriblovsky:codec_options into 49cd126 on twisted:master.

@coveralls
Copy link

coveralls commented Jul 21, 2016

Coverage Status

Coverage remained the same at 95.657% when pulling 4406a29 on IlyaSkriblovsky:codec_options into a143424 on twisted:master.

@IlyaSkriblovsky
Copy link
Contributor Author

Finally tests fixed by #178 and this one

@IlyaSkriblovsky
Copy link
Contributor Author

@psi29a could you please take a look on the code of this patch when you will have a minute

@psi29a
Copy link
Contributor

psi29a commented Jul 24, 2016

So this no longer needs a fix for tox?

@IlyaSkriblovsky
Copy link
Contributor Author

Yes, tests issue with latest twisted fixed in another already merged PR. This one fixed regression with PyMongo 3.3. Please take a look on the code and merge it if it's OK. Thanks

@psi29a
Copy link
Contributor

psi29a commented Jul 25, 2016

Looks good to me, thank you!

That is some high quality documentation as well. :)

@psi29a psi29a merged commit 6b5c42d into twisted:master Jul 25, 2016
@IlyaSkriblovsky IlyaSkriblovsky deleted the codec_options branch February 23, 2017 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants