Skip to content

Commit a6f43ff

Browse files
authored
Merge branch 'master' into PYTHON-5488
2 parents 30f4ac1 + 61e9047 commit a6f43ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+241
-7339
lines changed

.evergreen/generated_configs/variants.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,55 +535,71 @@ buildvariants:
535535
display_name: "* MongoDB v4.2"
536536
run_on:
537537
- rhel87-small
538+
expansions:
539+
VERSION: "4.2"
538540
tags: [coverage_tag]
539541
- name: mongodb-v4.4
540542
tasks:
541543
- name: .server-version
542544
display_name: "* MongoDB v4.4"
543545
run_on:
544546
- rhel87-small
547+
expansions:
548+
VERSION: "4.4"
545549
tags: [coverage_tag]
546550
- name: mongodb-v5.0
547551
tasks:
548552
- name: .server-version
549553
display_name: "* MongoDB v5.0"
550554
run_on:
551555
- rhel87-small
556+
expansions:
557+
VERSION: "5.0"
552558
tags: [coverage_tag]
553559
- name: mongodb-v6.0
554560
tasks:
555561
- name: .server-version
556562
display_name: "* MongoDB v6.0"
557563
run_on:
558564
- rhel87-small
565+
expansions:
566+
VERSION: "6.0"
559567
tags: [coverage_tag]
560568
- name: mongodb-v7.0
561569
tasks:
562570
- name: .server-version
563571
display_name: "* MongoDB v7.0"
564572
run_on:
565573
- rhel87-small
574+
expansions:
575+
VERSION: "7.0"
566576
tags: [coverage_tag]
567577
- name: mongodb-v8.0
568578
tasks:
569579
- name: .server-version
570580
display_name: "* MongoDB v8.0"
571581
run_on:
572582
- rhel87-small
583+
expansions:
584+
VERSION: "8.0"
573585
tags: [coverage_tag]
574586
- name: mongodb-rapid
575587
tasks:
576588
- name: .server-version
577589
display_name: "* MongoDB rapid"
578590
run_on:
579591
- rhel87-small
592+
expansions:
593+
VERSION: rapid
580594
tags: [coverage_tag]
581595
- name: mongodb-latest
582596
tasks:
583597
- name: .server-version
584598
display_name: "* MongoDB latest"
585599
run_on:
586600
- rhel87-small
601+
expansions:
602+
VERSION: latest
587603
tags: [coverage_tag]
588604

589605
# Stable api tests

.evergreen/scripts/generate_config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ def create_server_version_variants() -> list[BuildVariant]:
7474
for version in ALL_VERSIONS:
7575
display_name = get_variant_name("* MongoDB", version=version)
7676
variant = create_variant(
77-
[".server-version"], display_name, host=DEFAULT_HOST, tags=["coverage_tag"]
77+
[".server-version"],
78+
display_name,
79+
version=version,
80+
host=DEFAULT_HOST,
81+
tags=["coverage_tag"],
7882
)
7983
variants.append(variant)
8084
return variants

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3
49+
uses: github/codeql-action/init@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3
5050
with:
5151
languages: ${{ matrix.language }}
5252
build-mode: ${{ matrix.build-mode }}
@@ -63,6 +63,6 @@ jobs:
6363
pip install -e .
6464
6565
- name: Perform CodeQL Analysis
66-
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3
66+
uses: github/codeql-action/analyze@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3
6767
with:
6868
category: "/language:${{matrix.language}}"

.github/workflows/dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142
name: Download Wheels
143143
steps:
144144
- name: Download all workflow run artifacts
145-
uses: actions/download-artifact@v4
145+
uses: actions/download-artifact@v5
146146
- name: Flatten directory
147147
working-directory: .
148148
run: |

.github/workflows/release-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
id-token: write
7777
steps:
7878
- name: Download all the dists
79-
uses: actions/download-artifact@v4
79+
uses: actions/download-artifact@v5
8080
with:
8181
name: all-dist-${{ github.run_id }}
8282
path: dist/

.github/workflows/test-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ jobs:
195195
timeout-minutes: 20
196196
steps:
197197
- name: Download sdist
198-
uses: actions/download-artifact@v4
198+
uses: actions/download-artifact@v5
199199
- name: Unpack SDist
200200
shell: bash
201201
run: |

.github/workflows/zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
with:
1919
persist-credentials: false
2020
- name: Run zizmor 🌈
21-
uses: zizmorcore/zizmor-action@383d31df2eb66a2f42db98c9654bdc73231f3e3a
21+
uses: zizmorcore/zizmor-action@c17832b972c15fd5f3d5065a7e16ad761a0a10d2

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ implementation on top of `pymongo`.
1616

1717
PyMongo supports MongoDB 4.0, 4.2, 4.4, 5.0, 6.0, 7.0, and 8.0. PyMongo follows [semantic versioning](https://semver.org/spec/v2.0.0.html) for its releases.
1818

19+
## Documentation
20+
21+
Documentation is available at
22+
[mongodb.com](https://www.mongodb.com/docs/languages/python/pymongo-driver/current/).
23+
24+
[API documentation](https://pymongo.readthedocs.io/en/stable/api/) and the [full changelog](https://pymongo.readthedocs.io/en/stable/changelog.html) for each release is available at [readthedocs.io](https://pymongo.readthedocs.io/en/stable/index.html).
25+
1926
## Support / Feedback
2027

2128
For issues with, questions about, or feedback for PyMongo, please look
@@ -191,13 +198,6 @@ ObjectId('4aba160ee23f6b543e000002')
191198
[8, 11]
192199
```
193200

194-
## Documentation
195-
196-
Documentation is available at
197-
[pymongo.readthedocs.io](https://pymongo.readthedocs.io/en/stable/).
198-
199-
See the [contributing guide](./CONTRIBUTING.md#documentation) for how to build the documentation.
200-
201201
## Learning Resources
202202

203203
- MongoDB Learn - [Python

bson/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
the microsecond field is truncated.
5959
.. [#dt2] all datetime.datetime instances are encoded as UTC. By default, they
6060
are decoded as *naive* but timezone aware datetimes are also supported.
61-
See :doc:`/examples/datetimes` for examples.
61+
See `Dates and Times <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/dates-and-times/#dates-and-times>`_ for examples.
6262
.. [#dt3] To enable decoding a bson UTC datetime to a :class:`~bson.datetime_ms.DatetimeMS`
63-
instance see :ref:`handling-out-of-range-datetimes`.
64-
.. [#uuid] For :py:class:`uuid.UUID` encoding and decoding behavior see :doc:`/examples/uuid`.
63+
instance see `handling out of range datetimes <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/dates-and-times/#handling-out-of-range-datetimes>`_.
64+
.. [#uuid] For :py:class:`uuid.UUID` encoding and decoding behavior see `<https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#universally-unique-ids--uuids->`_.
6565
.. [#re] :class:`~bson.regex.Regex` instances and regular expression
6666
objects from ``re.compile()`` are both saved as BSON regular expressions.
6767
BSON regular expressions are decoded as :class:`~bson.regex.Regex`

bson/binary.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class UuidRepresentation:
7979
:class:`~bson.binary.Binary` instance will be returned instead of a
8080
:class:`uuid.UUID` instance.
8181
82-
See :ref:`unspecified-representation-details` for details.
82+
See `unspecified representation details <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#unspecified>`_ for details.
8383
8484
.. versionadded:: 3.11
8585
"""
@@ -91,7 +91,7 @@ class UuidRepresentation:
9191
and decoded from BSON binary, using RFC-4122 byte order with
9292
binary subtype :data:`UUID_SUBTYPE`.
9393
94-
See :ref:`standard-representation-details` for details.
94+
See `standard representation details <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#standard>`_ for details.
9595
9696
.. versionadded:: 3.11
9797
"""
@@ -103,7 +103,7 @@ class UuidRepresentation:
103103
and decoded from BSON binary, using RFC-4122 byte order with
104104
binary subtype :data:`OLD_UUID_SUBTYPE`.
105105
106-
See :ref:`python-legacy-representation-details` for details.
106+
See `python legacy representation details <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#python_legacy>`_ for details.
107107
108108
.. versionadded:: 3.11
109109
"""
@@ -115,7 +115,7 @@ class UuidRepresentation:
115115
and decoded from BSON binary subtype :data:`OLD_UUID_SUBTYPE`,
116116
using the Java driver's legacy byte order.
117117
118-
See :ref:`java-legacy-representation-details` for details.
118+
See `Java Legacy UUID <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#java_legacy>`_ for details.
119119
120120
.. versionadded:: 3.11
121121
"""
@@ -127,7 +127,7 @@ class UuidRepresentation:
127127
and decoded from BSON binary subtype :data:`OLD_UUID_SUBTYPE`,
128128
using the C# driver's legacy byte order.
129129
130-
See :ref:`csharp-legacy-representation-details` for details.
130+
See `C# Legacy UUID <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#csharp_legacy>`_ for details.
131131
132132
.. versionadded:: 3.11
133133
"""
@@ -328,7 +328,7 @@ def from_uuid(
328328
:param uuid_representation: A member of
329329
:class:`~bson.binary.UuidRepresentation`. Default:
330330
:const:`~bson.binary.UuidRepresentation.STANDARD`.
331-
See :ref:`handling-uuid-data-example` for details.
331+
See `UUID representations <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#universally-unique-ids--uuids->`_ for details.
332332
333333
.. versionadded:: 3.11
334334
"""
@@ -377,7 +377,7 @@ def as_uuid(self, uuid_representation: int = UuidRepresentation.STANDARD) -> UUI
377377
:param uuid_representation: A member of
378378
:class:`~bson.binary.UuidRepresentation`. Default:
379379
:const:`~bson.binary.UuidRepresentation.STANDARD`.
380-
See :ref:`handling-uuid-data-example` for details.
380+
See `UUID representations <https://www.mongodb.com/docs/languages/python/pymongo-driver/current/data-formats/uuid/#universally-unique-ids--uuids->`_ for details.
381381
382382
.. versionadded:: 3.11
383383
"""

0 commit comments

Comments
 (0)