diff --git a/doc/changelog.rst b/doc/changelog.rst index ef96658e7a..6089f6f680 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -4,6 +4,11 @@ Changelog Changes in Version 3.13.0 ------------------------- +Version 3.13 provides an upgrade path to PyMongo 4.x. Most of the API changes +from PyMongo 4.0 have been backported in a backward compatible way, allowing +applications to be written against PyMongo >= 3.13, rather then PyMongo 3.x or +PyMongo 4.x. See the `PyMongo 4 Migration Guide`_ for detailed examples. + Notable improvements .................... - Added :attr:`pymongo.mongo_client.MongoClient.options` for read-only access @@ -43,11 +48,11 @@ Deprecations - Deprecated :attr:`pymongo.mongo_client.MongoClient.retry_reads`. Use :attr:`~pymongo.mongo_client.options.retry_reads` instead. - Deprecated :attr:`pymongo.mongo_client.MongoClient.max_bson_size`, -:attr:`pymongo.mongo_client.MongoClient.max_message_size`, and -:attr:`pymongo.mongo_client.MongoClient.max_write_batch_size`. These helpers -were incorrect when in ``loadBalanced=true mode`` and ambiguous in clusters -with mixed versions. Use the `hello command`_ to get the authoritative -value from the remote server instead. Code like this:: + :attr:`pymongo.mongo_client.MongoClient.max_message_size`, and + :attr:`pymongo.mongo_client.MongoClient.max_write_batch_size`. These helpers + were incorrect when in ``loadBalanced=true mode`` and ambiguous in clusters + with mixed versions. Use the `hello command`_ to get the authoritative + value from the remote server instead. Code like this:: max_bson_size = client.max_bson_size max_message_size = client.max_message_size @@ -65,6 +70,7 @@ can be changed to this:: See the `PyMongo 3.13.0 release notes in JIRA`_ for the list of resolved issues in this release. +.. _PyMongo 4 Migration Guide: https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html .. _PYTHON-3222: https://jira.mongodb.org/browse/PYTHON-3222 .. _PyMongo 3.13.0 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=31570 diff --git a/pymongo/collection.py b/pymongo/collection.py index 57d4454002..112a07d0bc 100644 --- a/pymongo/collection.py +++ b/pymongo/collection.py @@ -2053,8 +2053,6 @@ def count(self, filter=None, session=None, **kwargs): .. _$expr: https://docs.mongodb.com/manual/reference/operator/query/expr/ .. _$geoWithin: https://docs.mongodb.com/manual/reference/operator/query/geoWithin/ - .. _$center: https://docs.mongodb.com/manual/reference/operator/query/center/#op._S_center - .. _$centerSphere: https://docs.mongodb.com/manual/reference/operator/query/centerSphere/#op._S_centerSphere """ warnings.warn( "count is deprecated. Use estimated_document_count or " diff --git a/pymongo/mongo_client.py b/pymongo/mongo_client.py index 7c00a9ef18..ab1b9831c8 100644 --- a/pymongo/mongo_client.py +++ b/pymongo/mongo_client.py @@ -1157,6 +1157,7 @@ def max_pool_size(self): def min_pool_size(self): """**DEPRECATED**: The minimum required number of concurrent connections that the pool will maintain to each connected server. Default is 0. + .. versionchanged:: 3.13 Deprecated. """ diff --git a/setup.py b/setup.py index 734e47f33b..bdd39279bb 100755 --- a/setup.py +++ b/setup.py @@ -200,7 +200,7 @@ def output_difference(self, example, got, optionflags): except: pass - sphinx_args = ["-E", "-b", mode, "doc", path] + sphinx_args = ["-E", "-b", mode, "doc", path, "-W"] # sphinx.main calls sys.exit when sphinx.build_main exists. # Call build_main directly so we can check status and print