Commit Graph

180 Commits

Author SHA1 Message Date
Anthony Sottile
ff81fbb938 Ensure files end in a newline 2017-08-31 22:26:39 -07:00
A. Jesse Jiryu Davis
cfb30e91c0 PYTHON-1362 - Add find/aggregate_raw_batches()
Rename find_raw to find_raw_batches, and add aggregate_raw_batches.
Rename RawBSONCursor and RawBSONCommandCursor to RawBatchCursor and
RawBatchCommandCursor.
2017-08-25 15:26:16 -04:00
A. Jesse Jiryu Davis
0534596dc5 PYTHON-1362 - Add raw_batches option to find() 2017-08-25 15:24:16 -04:00
Shane Harvey
b7893b7ec4 3.5 changelog and documentation fixes. 2017-08-08 09:32:09 -07:00
Shane Harvey
9388281795 PYTHON-1306 Deprecate MongoClient.get_default_database.
PYTHON-1304 Make name optional for MongoClient.get_database.
2017-07-25 17:16:34 -07:00
A. Jesse Jiryu Davis
7b1cbace17 PYTHON-1217 - Deprecate the "modifiers" find option 2017-07-24 12:40:15 -04:00
Bernie Hackett
53bd24bfc3 PYTHON-1260 - Deprecate the group helper 2017-07-18 10:54:33 -07:00
Shane Harvey
a1ff056933 Add MongoClient properties to documentation 2017-02-21 13:26:55 -08:00
Bernie Hackett
1a45a0fa08 Changelog for PyMongo 3.4 2016-09-16 14:31:20 -07:00
Bernie Hackett
708a85657d PYTHON-1113 - Small doc fixes 2016-09-07 15:32:10 -07:00
Luke Lovett
0fbdf85f53 PYTHON-1113 - Index collation documentation into API docs. 2016-09-07 15:15:15 -07:00
Bernie Hackett
eb7f2e625a PYTHON-1138 - Improve SDAM monitoring documentation 2016-09-01 17:49:30 -07:00
Bernie Hackett
82db71e1e8 PYTHON-1068 - Support for BSON Decimal128 2016-08-29 15:07:07 -07:00
Shane Harvey
57d1ccde2f PYTHON-1111 Add JSONOptions for dumps and loads
PYTHON-767 Support JSON strict mode $date output
PYTHON-1039 Support JSON strict mode $numberLong output
PYTHON-1103 Support JSON strict mode UUID output
PYTHON-1111 Support custom document class in loads
PYTHON-1111 Support tz_aware and tzinfo in loads
Refactor milliseconds to datetime conversions
2016-07-27 11:32:59 -07:00
Bernie Hackett
7afca2faa9 PYTHON-1067 - Minor doc fixes 2016-06-14 11:32:24 -07:00
aherlihy
d98a745700 PYTHON-1067 - Implement SDAM Monitoring 2016-06-14 15:20:19 +02:00
Bernie Hackett
c6907bd40d PYTHON-1086 - Fix find_one documentation 2016-05-18 14:57:30 -07:00
Bernie Hackett
275e8c3a9e Documentation and changelog updates for 3.2 2015-11-18 20:26:49 -08:00
Bernie Hackett
28885b25e8 PYTHON-952 - API improvements
This commit implements the following simplifications and improvements:

- The Subscriber ABC has been renamed to CommandListener
- The subscribe function has been renamed to register
- The COMMAND constant has been removed
- The get_subscribers function has been removed
- Command listeners can now be registered per MongoClient instance
  instead of just globally
2015-10-09 17:03:51 -07:00
Bernie Hackett
f0a85a4869 PYTHON-952 - Basic command monitoring
This commit adds support for publishing events when commands
(ismaster, findAndModify, listCollections, etc.) start and
succeed or fail. See the new module, pymongo.monitoring, for
details.

This commit only adds basic infrastructure and support for
monitoring generic commands. Support for monitoring queries,
getMores, killCursors, and write operations are forthcoming.
2015-08-11 11:39:03 -07:00
Bernie Hackett
4cb6815397 PYTHON-923 - Add changelog entry about bson.int64.Int64 2015-05-07 16:31:15 -07:00
Bernie Hackett
d2f9807cd1 PYTHON-857 - Remove MongoClient.(min|max)_wire_version.
The min_wire_version and max_wire_version attributes have
always been racy when connected to a mixed version replica set
or any sharded cluster. When connected to a mongos all you know
is the wire version of that mongos, not the shards behind it.
With mongos load balancing this problem is even worse, since
each operation could possibly be executed on a different mongo
version during an upgrade.
2015-03-24 14:38:25 -07:00
Bernie Hackett
14ce3af058 PYTHON-861 - Implement list_indexes. 2015-03-16 08:00:58 -07:00
Bernie Hackett
9c4d01701b PYTHON-861 - Implement create_indexes. 2015-03-16 07:56:46 -07:00
Bernie Hackett
f93c73aa73 PYTHON-861 - create/ensure index changes
- Deprecate ensure_index
- Remove caching from create_index
- In create_index, remove support for the cache_for param, and the
  bucket_size and drop_dups aliases (they all remain in ensure_index)
- GridFS uses create_index
- Fix up tests.
2015-03-14 13:38:13 -07:00
Bernie Hackett
4fd6f8a0b1 PYTHON-854 max_pool_size -> maxPoolSize
With this change the max_pool_size named parameter to
MongoClient is removed. It is replaced by the maxPoolSize
MongoDB URI option, which can be passed in a URI, or as a
keyword argument to MongoClient.
2015-03-09 10:08:13 -07:00
Bernie Hackett
6bacdaafaa PYTHON-851 - Clean up MongoClient properties. 2015-03-08 20:23:07 -07:00
A. Jesse Jiryu Davis
ea8ca5ec7d PYTHON-852 - Mongos load balancing.
The behavior for a list of mongoses is changed from "high availability" to
"load balancing". Before, the client connected to the lowest-latency mongos in
the list, and used it until a network error prompted it to re-evaluate all
mongoses' latencies and reconnect to one of them. In PyMongo 3, the client
monitors its network latency to all the mongoses continuously, and distributes
operations evenly among those with the lowest latency. See
high_availability.rst.
2015-03-08 08:25:13 -04:00
Bernie Hackett
c60a4cd84b Fix ReturnDocument examples. 2015-03-05 11:45:00 -08:00
Bernie Hackett
d69f76d380 Finalize option locations and exports.
- Move ReturnDocument to pymongo.collection.
- Change ReturnDocument.Before to ReturnDocument.BEFORE
- Change ReturnDocument.After to ReturnDocument.AFTER
- Add pymongo.cursor.CursorType.
- Move pymongo.cursor.NON_TAILABLE and friends to attributes of CursorType.
- read_preferences.ReadPreference is once again an "enum".
- Fix docs for read_preferences.ReadPreference.
- Rename pymongo.options to pymongo.operations.
- Export CursorType, ReturnDocument, WriteConcern, and public classes
  from pymongo.opertions through pymongo/__init__.py
- Fix up a number of documentation issues in the process.
2015-03-05 11:35:46 -08:00
A. Jesse Jiryu Davis
7f42430978 PYTHON-847 Remove disconnect(), synonym of MongoClient.close().
close() seems more standard among MongoDB drivers.
2015-02-25 14:52:34 -05:00
A. Jesse Jiryu Davis
e7a1b261cd PYTHON-848 Remove MongoClient.alive.
The ``alive`` method is removed since it no longer
provides meaningful information; even if the client is disconnected,
it may discover a server in time to fulfill the next operation.
2015-02-25 14:51:06 -05:00
Bernie Hackett
b559ab0b46 PYTHON-835 - Consistent method signatures. 2015-02-24 13:44:16 -08:00
Bernie Hackett
839893939e PYTHON-821 - Deprecated legacy API.
This commit deprecates insert, update, save, and remove. Each
now raises DeprecationWarning at stacklevel 2. This change also
updates all tutorials and example documentation to use the new
CRUD API, tests the deprecations, and fixes up a few more tests
that were still using the legacy API.
2015-02-20 15:41:45 -08:00
Bernie Hackett
13f20bb45a PYTHON-821 - Add insert_many to built docs. 2015-02-12 18:02:06 -08:00
Bernie Hackett
4d6bdb1097 PYTHON-821 - Implement delete_one and delete_many. 2015-02-12 11:04:58 -08:00
Bernie Hackett
e7866dbd19 PYTHON-821 - Implement replace_one, update_one, and update_many. 2015-02-11 20:01:16 -08:00
Bernie Hackett
b9cd7b627b PYTHON-821 - Introduce results and options modules. 2015-02-11 13:52:51 -08:00
Bernie Hackett
df4e5269b3 PYTHON-821 - Implement insert_one. 2015-02-11 12:48:50 -08:00
Bernie Hackett
7416e6595c PYTHON-821 - Implement find_one_and_*.
This change also deprecates find_and_modify. Migrate
to find_one_and_delete, find_one_and_update, and/or
find_one_and_replace.
2015-02-10 12:09:47 -08:00
Bernie Hackett
be0ad8dec3 PYTHON-821 - Implement Collection.bulk_write. 2015-02-03 13:46:17 -08:00
A. Jesse Jiryu Davis
a2c13090d8 PYTHON-826 Move codec_options submodule from pymongo to bson. 2015-02-02 09:38:49 -05:00
behackett
c07e543e58 PYTHON-820 - API changes for find/find_one to comply with CRUD spec.
- Changed parameter names (default values and behaviors remain the same):
  - spec (spec_or_id in find_one) -> filter
  - fields -> projection
  - partial -> allow_partial_results

- The "timeout" option is renamed to "no_cursor_timeout" with its default
  changed to False.

- The tailable, await_data, and exhaust options will be replaced with a
  cursor_type option. Valid values:
  - cursor.NON_TAILABLE
  - cursor.TAILABLE
  - cursor.TAILABLE_AWAIT
  - cursor.EXHAUST

- The following options are added:
  - oplog_replay (bool - default False) - only valid with tailable cursors
    against the oplog.
  - modifiers (document - default None) - A dict of query modifiers. See
    http://docs.mongodb.org/manual/reference/operator/query-modifier/#modifiers for
    options.

- The following options are removed, replaced by the "modifiers" option:
  - max_scan
  - snapshot

- The as_class option is removed. Use Collection.with_options instead.
2015-01-19 22:10:56 -08:00
Bernie Hackett
755d5c74eb PYTHON-814 - API and behavior changes for Database.command.
Database.command no longer obeys Database.read_preference or
Database.codec_options. Explicit parameters have been added
for both options. See the ticket for a full explanation.
2015-01-09 13:18:36 -08:00
Bernie Hackett
4e13a39db9 PYTHON-812 - Make local threshold global and immutable. 2015-01-08 11:21:54 -08:00
Bernie Hackett
811864de88 Add codec_options to MongoReplicaSetClient docs. 2014-12-29 16:36:49 -08:00
Bernie Hackett
f968f58ac6 PYTHON-805 - Fix docs for find() and Cursor. 2014-12-29 16:25:55 -08:00
Bernie Hackett
a3fb2462bb PYTHON-801 - Remove BaseObject.uuid_subtype 2014-12-29 07:34:07 -08:00
Bernie Hackett
7e4ebde147 PYTHON-801 - Add STANDARD and PYTHON_LEGACY to bson.binary
And use them in place of UUID_SUBTYPE and OLD_UUID_SUBTYPE. This
change also cleans up and clarifies the documentation for
JAVA_LEGACY and CSHARP_LEGACY. None of these are binary subtypes,
but instead UUID representations in the Python, C#, and Java drivers.
2014-12-24 09:52:58 -08:00
Bernie Hackett
bf048c22f1 PYTHON-677 - WriteConcern docs. 2014-12-20 22:34:47 -08:00