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

Upgrade PyMongo to >=3, bump our version to 2.0.0 #29

Merged
merged 2 commits into from
Apr 26, 2017
Merged

Conversation

thieman
Copy link
Contributor

@thieman thieman commented Apr 26, 2017

cc @nrschultz @paetling

PyMongo 3 is chock full of deprecations, new APIs, and all sorts of other stuff. This PR is doing the minimum possible to get Monufacture 2.0 into a state where it can feasibly operate using PyMongo 3. Further changes will be needed to remove all deprecated features.

This only needed to deal with two breaking changes:

  1. The safe kwarg was removed across all methods.
  2. Connection was removed and MongoClient has taken its place

PyMongo 3 Migration Guide

@paetling
Copy link

taking a look

@@ -13,6 +13,6 @@
long_description="Monufacture is a factory framework with an API designed to make " +
"it as easy as possible to generate valid test data in MongoDB. " +
"Inspired by the excellent factory_girl Ruby Gem.",
install_requires=['pymongo<3.0.0', 'pytz'],
install_requires=['pymongo>=3.0.0,<4.0.0', 'pytz'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= seems risky. shouldn't we fix this to just == 3.0.0. Seems like any further upgrades will brake this code due to our us of deprecated features

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think he meant >=

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact version pegs are for applications. This is a library. Libraries need to be flexible in the versions they support.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See a classic Docker-py issue docker/docker-py#101

@paetling
Copy link

seems fine, just 1 question

@thieman thieman merged commit 348a9ff into master Apr 26, 2017
@thieman thieman deleted the tnt-pymongo-3 branch April 26, 2017 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants