Skip to content

Commit 69c69a6

Browse files
authored
PYTHON-2862 Remove versionchanged info for PyMongo <3.0 (#709)
1 parent 09aef81 commit 69c69a6

File tree

9 files changed

+2
-104
lines changed

9 files changed

+2
-104
lines changed

bson/__init__.py

-18
Original file line numberDiff line numberDiff line change
@@ -928,15 +928,6 @@ def decode_all(data, codec_options=DEFAULT_CODEC_OPTIONS):
928928
929929
Replaced `as_class`, `tz_aware`, and `uuid_subtype` options with
930930
`codec_options`.
931-
932-
.. versionchanged:: 2.7
933-
Added `compile_re` option. If set to False, PyMongo represented BSON
934-
regular expressions as :class:`~bson.regex.Regex` objects instead of
935-
attempting to compile BSON regular expressions as Python native
936-
regular expressions, thus preventing errors for some incompatible
937-
patterns, see `PYTHON-500`_.
938-
939-
.. _PYTHON-500: https://jira.mongodb.org/browse/PYTHON-500
940931
"""
941932
data, view = get_data_and_view(data)
942933
if not isinstance(codec_options, CodecOptions):
@@ -1191,15 +1182,6 @@ def decode(self, codec_options=DEFAULT_CODEC_OPTIONS):
11911182
11921183
Replaced `as_class`, `tz_aware`, and `uuid_subtype` options with
11931184
`codec_options`.
1194-
1195-
.. versionchanged:: 2.7
1196-
Added `compile_re` option. If set to False, PyMongo represented BSON
1197-
regular expressions as :class:`~bson.regex.Regex` objects instead of
1198-
attempting to compile BSON regular expressions as Python native
1199-
regular expressions, thus preventing errors for some incompatible
1200-
patterns, see `PYTHON-500`_.
1201-
1202-
.. _PYTHON-500: https://jira.mongodb.org/browse/PYTHON-500
12031185
"""
12041186
return decode(self, codec_options)
12051187

bson/binary.py

-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@
4949
5050
This is the new BSON binary subtype for UUIDs. The
5151
current default is :data:`OLD_UUID_SUBTYPE`.
52-
53-
.. versionchanged:: 2.1
54-
Changed to subtype 4.
5552
"""
5653

5754

bson/json_util.py

-23
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,6 @@
8484
Extended JSON converter for Python built on top of
8585
`libbson <https://github.com/mongodb/libbson>`_. `python-bsonjs` works best
8686
with PyMongo when using :class:`~bson.raw_bson.RawBSONDocument`.
87-
88-
.. versionchanged:: 2.8
89-
The output format for :class:`~bson.timestamp.Timestamp` has changed from
90-
'{"t": <int>, "i": <int>}' to '{"$timestamp": {"t": <int>, "i": <int>}}'.
91-
This new format will be decoded to an instance of
92-
:class:`~bson.timestamp.Timestamp`. The old format will continue to be
93-
decoded to a python dict as before. Encoding to the old format is no longer
94-
supported as it was never correct and loses type information.
95-
Added support for $numberLong and $undefined - new in MongoDB 2.6 - and
96-
parsing $date in ISO-8601 format.
97-
98-
.. versionchanged:: 2.7
99-
Preserves order when rendering SON, Timestamp, Code, Binary, and DBRef
100-
instances.
101-
102-
.. versionchanged:: 2.3
103-
Added dumps and loads helpers to automatically handle conversion to and
104-
from json and supports :class:`~bson.binary.Binary` and
105-
:class:`~bson.code.Code`
10687
"""
10788

10889
import base64
@@ -401,10 +382,6 @@ def dumps(obj, *args, **kwargs):
401382
402383
.. versionchanged:: 3.4
403384
Accepts optional parameter `json_options`. See :class:`JSONOptions`.
404-
405-
.. versionchanged:: 2.7
406-
Preserves order when rendering SON, Timestamp, Code, Binary, and DBRef
407-
instances.
408385
"""
409386
json_options = kwargs.pop("json_options", DEFAULT_JSON_OPTIONS)
410387
return json.dumps(_json_convert(obj, json_options), *args, **kwargs)

bson/max_key.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717

1818

1919
class MaxKey(object):
20-
"""MongoDB internal MaxKey type.
21-
22-
.. versionchanged:: 2.7
23-
``MaxKey`` now implements comparison operators.
24-
"""
20+
"""MongoDB internal MaxKey type."""
2521

2622
_type_marker = 127
2723

bson/min_key.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717

1818

1919
class MinKey(object):
20-
"""MongoDB internal MinKey type.
21-
22-
.. versionchanged:: 2.7
23-
``MinKey`` now implements comparison operators.
24-
"""
20+
"""MongoDB internal MinKey type."""
2521

2622
_type_marker = 255
2723

pymongo/collection.py

-26
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,6 @@ def __init__(self, database, name, create=False, codec_options=None,
138138
139139
collection.__my_collection__
140140
141-
.. versionchanged:: 2.2
142-
Removed deprecated argument: options
143-
144-
.. versionadded:: 2.1
145-
uuid_subtype attribute
146-
147141
.. mongodoc:: collections
148142
"""
149143
super(Collection, self).__init__(
@@ -1382,19 +1376,6 @@ def find(self, *args, **kwargs):
13821376
expression object.
13831377
Soft deprecated the ``manipulate`` option.
13841378
1385-
.. versionchanged:: 2.7
1386-
Added ``compile_re`` option. If set to False, PyMongo represented
1387-
BSON regular expressions as :class:`~bson.regex.Regex` objects
1388-
instead of attempting to compile BSON regular expressions as Python
1389-
native regular expressions, thus preventing errors for some
1390-
incompatible patterns, see `PYTHON-500`_.
1391-
1392-
.. versionchanged:: 2.3
1393-
Added the ``tag_sets`` and ``secondary_acceptable_latency_ms``
1394-
parameters.
1395-
1396-
.. _PYTHON-500: https://jira.mongodb.org/browse/PYTHON-500
1397-
13981379
.. mongodoc:: find
13991380
14001381
"""
@@ -2072,13 +2053,6 @@ def aggregate(self, pipeline, session=None, **kwargs):
20722053
.. versionchanged:: 3.0
20732054
The :meth:`aggregate` method always returns a CommandCursor. The
20742055
pipeline argument must be a list.
2075-
.. versionchanged:: 2.7
2076-
When the cursor option is used, return
2077-
:class:`~pymongo.command_cursor.CommandCursor` instead of
2078-
:class:`~pymongo.cursor.Cursor`.
2079-
.. versionchanged:: 2.6
2080-
Added cursor support.
2081-
.. versionadded:: 2.3
20822056
20832057
.. seealso:: :doc:`/examples/aggregation`
20842058

pymongo/cursor.py

-3
Original file line numberDiff line numberDiff line change
@@ -879,9 +879,6 @@ def hint(self, index):
879879
880880
:Parameters:
881881
- `index`: index to hint on (as an index specifier)
882-
883-
.. versionchanged:: 2.8
884-
The :meth:`~hint` method accepts the name of the index.
885882
"""
886883
self.__check_okay_to_chain()
887884
self.__set_hint(index)

pymongo/database.py

-18
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,6 @@ def create_collection(self, name, codec_options=None,
299299
.. versionchanged:: 3.0
300300
Added the codec_options, read_preference, and write_concern options.
301301
302-
.. versionchanged:: 2.2
303-
Removed deprecated argument: options
304-
305302
.. _create collection command:
306303
https://docs.mongodb.com/manual/reference/command/create
307304
"""
@@ -588,21 +585,6 @@ def command(self, command, value=1, check=True,
588585
BSON regular expression to a Python regular expression object.
589586
Added the `codec_options` parameter.
590587
591-
.. versionchanged:: 2.7
592-
Added `compile_re` option. If set to False, PyMongo represented BSON
593-
regular expressions as :class:`~bson.regex.Regex` objects instead of
594-
attempting to compile BSON regular expressions as Python native
595-
regular expressions, thus preventing errors for some incompatible
596-
patterns, see `PYTHON-500`_.
597-
598-
.. versionchanged:: 2.3
599-
Added `tag_sets` and `secondary_acceptable_latency_ms` options.
600-
.. versionchanged:: 2.2
601-
Added support for `as_class` - the class you want to use for
602-
the resulting documents
603-
604-
.. _PYTHON-500: https://jira.mongodb.org/browse/PYTHON-500
605-
606588
.. mongodoc:: commands
607589
"""
608590
if read_preference is None:

pymongo/uri_parser.py

-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ def parse_userinfo(userinfo):
4444
4545
:Paramaters:
4646
- `userinfo`: A string of the form <username>:<password>
47-
48-
.. versionchanged:: 2.2
49-
Now uses `urllib.unquote_plus` so `+` characters must be escaped.
5047
"""
5148
if '@' in userinfo or userinfo.count(':') > 1:
5249
raise InvalidURI("Username and password must be escaped according to "

0 commit comments

Comments
 (0)