Commit Graph

61 Commits

Author SHA1 Message Date
Steven Silvester
a319075ba7
PYTHON-3197 Update docs.mongodb.com links in source, API & Reference documentation (#926) 2022-04-13 14:11:13 -05:00
Steven Silvester
a0fe7c03af
PYTHON-3120 Set up flake8 linting (#868) 2022-02-17 06:44:08 -06:00
Steven Silvester
5578999a90
PYTHON-1834 Use a code formatter (#852) 2022-02-09 06:44:28 -06:00
Steven Silvester
dd6c140d43
PYTHON-3060 Add typings to pymongo package (#831) 2022-02-02 21:12:36 -06:00
Shane Harvey
bf992c20a6
PYTHON-2554 Support aggregate $merge and $out executing on secondaries (#774) 2021-12-07 16:26:01 -08:00
Bernie Hackett
ad4315134c PYTHON-2803 Get rid of most uses of 'master'
This change also resolves PYTHON-2848 for MongoDB 4.0.
2021-09-13 12:50:49 -07:00
Bernie Hackett
a94504bde9 PYTHON-2726 Document read preference quirks 2021-06-28 13:08:07 -07:00
Bernie Hackett
6c2d629006 PYTHON-2133 Remove Py2 compatibility from pymongo 2021-01-19 21:15:20 -08:00
Shane Harvey
56925fd97f
PYTHON-1321 Remove MongoReplicaSetClient (#552) 2021-01-15 17:11:15 -08:00
Shane Harvey
6e39ae04c3 PYTHON-2170 Add support for 4.4 hedged reads 2020-05-07 17:26:00 -07:00
Bernie Hackett
ba7c95a9df PYTHON-1462 - Import ABCs from collections.abc 2018-02-12 19:42:44 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Shane Harvey
9468c119a3 PYTHON-1335 Improve __slots__ usage.
__slots__ must be defined in all classes in the hierarchy to avoid __dict__
and __weakref__ overhead.
2017-08-03 14:57:43 -07:00
Michael Elovskikh
9f07ff35a1 PYTHON-1334 Don't change readpreference value at uri parsing (#325) 2017-07-25 17:43:51 -07:00
A. Jesse Jiryu Davis
91f2f973af PYTHON-1192 - Minimum maxStalenessSeconds is 90.
Revert code to parse "idleWritePeriodMillis" from ismaster, and revert
changes that allowed maxStalenessSeconds to be a float.
2016-11-22 13:19:34 -05:00
A. Jesse Jiryu Davis
87708a2f96 PYTHON-1169 - Default maxStalenessSeconds is -1. 2016-11-08 21:52:04 -05:00
A. Jesse Jiryu Davis
873dc22f64 PYTHON-1185 - maxStalenessSeconds can be a float.
PyMongo had cast to int before sending to mongos.
2016-11-08 21:52:04 -05:00
A. Jesse Jiryu Davis
f4922da97c PYTHON-1104 - maxStalenessMS -> maxStalenessSeconds. 2016-11-08 21:52:04 -05:00
Bernie Hackett
5f16e33a6d PYTHON-1150 - Add maxStalenessMS to $readPreference 2016-09-19 11:09:41 -07:00
Bernie Hackett
1a45a0fa08 Changelog for PyMongo 3.4 2016-09-16 14:31:20 -07:00
A. Jesse Jiryu Davis
5933730588 PYTHON-1104 Implement maxStalenessMS. 2016-07-22 14:12:40 -04:00
A. Jesse Jiryu Davis
553f887ef7 PYTHON-1104 Change server-selector signature.
Preparation for maxStalenessMS implementation: selectors now take a
TopologyDescription, not a list of ServerDescriptions.
2016-06-20 15:27:17 -07:00
aherlihy
aab0bd5c46 PYTHON-962 - NotImplemented instead of NotImplementedError 2015-07-21 12:13:46 -04:00
A. Jesse Jiryu Davis
c31d4808bf PYTHON-922 - Read preferences support copy and pickle. 2015-05-04 21:43:36 -04:00
Bernie Hackett
aec685b374 Fix up copyright dates. 2015-03-25 11:55:02 -07:00
Bernie Hackett
a5cdb2f652 PYTHON-798 - Improve docs and add examples. 2015-03-19 13:03:48 -07:00
Bernie Hackett
3bcbe0682d PYTHON-858 - Clean up high availability docs. 2015-03-11 19:28:54 -07:00
A. Jesse Jiryu Davis
d80c5a8e39 Merge pull request #254 from aherlihy/squashed-PYTHON-815
Python 815: Added Server-Selection YAML tests.
2015-03-08 08:24:19 -04:00
aherlihy
ec213e0067 PYTHON-815: Added YAML tests for server selection. 2015-03-06 15:21:24 -05: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
Bernie Hackett
8f0bd0a6d4 PYTHON-850 - Change some uses of ConfigurationError to Type/ValueError. 2015-02-26 16:02:25 -08:00
Bernie Hackett
7164ba2f41 PYTHON-839 - Better validation error messages. 2015-02-25 10:14:29 -08:00
A. Jesse Jiryu Davis
acd90be727 Reset average round trip time if a server is disconnected.
The Server Discovery And Monitoring Spec says if a server "changes from a known
type to Unknown its RTT is set to null."
2015-01-26 15:38:24 -05: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
a788b1f1aa PYTHON-811 - latencyThresholdMS -> localThresholdMS 2015-01-08 11:21:44 -08:00
A. Jesse Jiryu Davis
ecc55f502a New method to calculate average round trip time.
Replace 5-sample moving average with exponentially weighted average,
required by the upcoming Server Selection Spec. Move responsibility for
tracking the average from ServerDescription to Monitor. Now the
ServerDescription only knows the average at the time it was created.
2014-12-03 16:30:35 -05:00
A. Jesse Jiryu Davis
ff7958ad38 PYTHON-525 Helpful connection error messages. 2014-11-18 12:14:35 -05:00
A. Jesse Jiryu Davis
026757fd0d Unused imports. 2014-11-17 16:12:18 -05:00
A. Jesse Jiryu Davis
f3546cc77b PYTHON-525 Update replica set docs for new MongoClient.
Also improve RST markup and fix duplicate reference targets in docstrings.
2014-09-26 19:30:47 -04:00
A. Jesse Jiryu Davis
a0330f7b63 PYTHON-525 Update ReadPreference doc. 2014-09-24 16:09:36 -04:00
A. Jesse Jiryu Davis
1236e58bc4 Fix docs for latency_threshold_ms. 2014-09-24 16:09:36 -04:00
A. Jesse Jiryu Davis
735a1247ca PYTHON-525 Deprecate MongoReplicaSetClient.
MongoClient now supports all MongoReplicaSetClient's features.
Fix bugs and add features in the new MongoClient to bring it up
to spec. MongoReplicaSetClient is now a deprecated stub that
subclasses MongoClient.

Introduce new errors, NetworkTimeout and NotMasterError, to
communicate events that MongoClient must handle specially.
2014-09-16 15:33:19 -04:00
A. Jesse Jiryu Davis
3027853cd9 PYTHON-525 Server selection implemented within ReadPreference classes. 2014-08-28 16:49:33 -04:00
Luke Lovett
17fb3a2a02 PYTHON-505 Allow C extensions to encode any mapping type, not just dicts. 2014-08-13 16:16:25 +00:00
Bernie Hackett
be35ff71a2 PYTHON-719 Read preference backward compatibility
This commit does a few things:

- Adds tag_sets back (deprecated)
- Adds secondary_acceptable_latency_ms back (deprecated)
- Makes acceptable latency a per read preference setting
- Cleans up read preference instance generation
- Adds latencyThresholdMS as an alias for secondaryAcceptableLatencyMS.
The name may change before 3.0 is released.
2014-06-27 15:05:20 -07:00
Bernie Hackett
92e7eea8de Fix an issue with mongos read preferences. 2014-06-25 17:42:27 -07:00
Bernie Hackett
f5c71a5376 PYTHON-672 - Add __ne__ to read preferences 2014-04-22 17:31:26 -07:00
behackett
e0b52baf8e PYTHON-672 - Make read preference a class
This commit introduces the following changes:

- Each read preference is now a class.
- Read preferences other than Primary accept a tag_sets parameter.
- The tag_sets attribute of MongoClient, Database, and Collection has
  been removed. Use the tag_sets parameter of the new classes instead.
- The read_preferences.ReadPreference constant still exists and should
continue to work as expected for most users.
2014-04-14 16:28:07 -07:00
A. Jesse Jiryu Davis
7a2f40a31c Collection.parallel_scan should obey read preference. 2014-02-13 18:32:32 -05:00