Skip to content

Commit 7584d2d

Browse files
committed
Revert "Merge branch 'master' of github.com:mongodb/mongo-python-driver into DRIVERS-3218"
This reverts commit c1fe2e3, reversing changes made to f51e8a5.
1 parent c1fe2e3 commit 7584d2d

Some content is hidden

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

44 files changed

+696
-3668
lines changed

.evergreen/remove-unimplemented-tests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ PYMONGO=$(dirname "$(cd "$(dirname "$0")" || exit; pwd)")
33

44
rm $PYMONGO/test/transactions/legacy/errors-client.json # PYTHON-1894
55
rm $PYMONGO/test/connection_monitoring/wait-queue-fairness.json # PYTHON-1873
6+
rm $PYMONGO/test/client-side-encryption/spec/unified/fle2v2-BypassQueryAnalysis.json # PYTHON-5143
7+
rm $PYMONGO/test/client-side-encryption/spec/unified/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.json # PYTHON-5143
8+
rm $PYMONGO/test/client-side-encryption/spec/unified/localSchema.json # PYTHON-5143
9+
rm $PYMONGO/test/client-side-encryption/spec/unified/maxWireVersion.json # PYTHON-5143
10+
rm $PYMONGO/test/unified-test-format/valid-pass/poc-queryable-encryption.json # PYTHON-5143
611
rm $PYMONGO/test/discovery_and_monitoring/unified/pool-clear-application-error.json # PYTHON-4918
712
rm $PYMONGO/test/discovery_and_monitoring/unified/pool-clear-checkout-error.json # PYTHON-4918
813
rm $PYMONGO/test/discovery_and_monitoring/unified/pool-clear-min-pool-size-error.json # PYTHON-4918

.evergreen/run-mongodb-oidc-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [ ${OIDC_ENV} == "k8s" ]; then
88
SUB_TEST_NAME=$K8S_VARIANT-remote
99
else
1010
SUB_TEST_NAME=$OIDC_ENV-remote
11-
sudo apt-get install -y python3-dev build-essential
11+
apt-get install -y python3-dev build-essential
1212
fi
1313

1414
bash ./.evergreen/just.sh setup-tests auth_oidc $SUB_TEST_NAME

.evergreen/run-tests.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@ else
2626
fi
2727

2828
# List the packages.
29-
uv sync ${UV_ARGS} --reinstall --quiet
29+
uv sync ${UV_ARGS} --reinstall
3030
uv pip list
3131

32+
# Ensure we go back to base environment after the test.
33+
trap "uv sync" EXIT HUP
34+
3235
# Start the test runner.
3336
uv run ${UV_ARGS} .evergreen/scripts/run_tests.py "$@"
3437

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ jobs:
3838
build-mode: none
3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v5
41+
uses: actions/checkout@v4
4242
with:
4343
ref: ${{ inputs.ref }}
4444
persist-credentials: false
4545
- uses: actions/setup-python@v5
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3
49+
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # 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@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3
66+
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3
6767
with:
6868
category: "/language:${{matrix.language}}"

.github/workflows/dist.yml

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

4646
steps:
4747
- name: Checkout pymongo
48-
uses: actions/checkout@v5
48+
uses: actions/checkout@v4
4949
with:
5050
fetch-depth: 0
5151
persist-credentials: false
@@ -108,7 +108,7 @@ jobs:
108108
name: Make SDist
109109
runs-on: macos-13
110110
steps:
111-
- uses: actions/checkout@v5
111+
- uses: actions/checkout@v4
112112
with:
113113
fetch-depth: 0
114114
persist-credentials: false

.github/workflows/test-python.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919
static:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v5
22+
- uses: actions/checkout@v4
2323
with:
2424
persist-credentials: false
25+
- name: Install just
26+
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
2527
- name: Install uv
26-
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v5
28+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
2729
with:
2830
enable-cache: true
2931
python-version: "3.9"
30-
- name: Install just
31-
run: uv tool install rust-just
3232
- name: Install Python dependencies
3333
run: |
3434
just install
@@ -61,11 +61,11 @@ jobs:
6161

6262
name: CPython ${{ matrix.python-version }}-${{ matrix.os }}
6363
steps:
64-
- uses: actions/checkout@v5
64+
- uses: actions/checkout@v4
6565
with:
6666
persist-credentials: false
6767
- name: Install uv
68-
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v5
68+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
6969
with:
7070
enable-cache: true
7171
python-version: ${{ matrix.python-version }}
@@ -80,16 +80,16 @@ jobs:
8080
runs-on: ubuntu-latest
8181
name: DocTest
8282
steps:
83-
- uses: actions/checkout@v5
83+
- uses: actions/checkout@v4
8484
with:
8585
persist-credentials: false
86+
- name: Install just
87+
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
8688
- name: Install uv
87-
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v5
89+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
8890
with:
8991
enable-cache: true
9092
python-version: "3.9"
91-
- name: Install just
92-
run: uv tool install rust-just
9393
- id: setup-mongodb
9494
uses: mongodb-labs/drivers-evergreen-tools@master
9595
with:
@@ -105,16 +105,16 @@ jobs:
105105
name: Docs Checks
106106
runs-on: ubuntu-latest
107107
steps:
108-
- uses: actions/checkout@v5
108+
- uses: actions/checkout@v4
109109
with:
110110
persist-credentials: false
111111
- name: Install uv
112-
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v5
112+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
113113
with:
114114
enable-cache: true
115115
python-version: "3.9"
116116
- name: Install just
117-
run: uv tool install rust-just
117+
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
118118
- name: Install dependencies
119119
run: just install
120120
- name: Build docs
@@ -124,16 +124,16 @@ jobs:
124124
name: Link Check
125125
runs-on: ubuntu-latest
126126
steps:
127-
- uses: actions/checkout@v5
127+
- uses: actions/checkout@v4
128128
with:
129129
persist-credentials: false
130130
- name: Install uv
131-
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v5
131+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
132132
with:
133133
enable-cache: true
134134
python-version: "3.9"
135135
- name: Install just
136-
run: uv tool install rust-just
136+
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
137137
- name: Install dependencies
138138
run: just install
139139
- name: Build docs
@@ -146,16 +146,16 @@ jobs:
146146
matrix:
147147
python: ["3.9", "3.11"]
148148
steps:
149-
- uses: actions/checkout@v5
149+
- uses: actions/checkout@v4
150150
with:
151151
persist-credentials: false
152152
- name: Install uv
153-
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v5
153+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
154154
with:
155155
enable-cache: true
156156
python-version: "${{matrix.python}}"
157157
- name: Install just
158-
run: uv tool install rust-just
158+
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
159159
- name: Install dependencies
160160
run: |
161161
just install
@@ -167,7 +167,7 @@ jobs:
167167
runs-on: ubuntu-latest
168168
name: "Make an sdist"
169169
steps:
170-
- uses: actions/checkout@v5
170+
- uses: actions/checkout@v4
171171
with:
172172
persist-credentials: false
173173
- uses: actions/setup-python@v5
@@ -225,11 +225,11 @@ jobs:
225225
runs-on: ubuntu-latest
226226
name: Test using minimum dependencies and supported Python
227227
steps:
228-
- uses: actions/checkout@v5
228+
- uses: actions/checkout@v4
229229
with:
230230
persist-credentials: false
231231
- name: Install uv
232-
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v5
232+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
233233
with:
234234
python-version: '3.9'
235235
- id: setup-mongodb
@@ -251,11 +251,11 @@ jobs:
251251
runs-on: ubuntu-latest
252252
name: Test async's minimum dependencies and Python
253253
steps:
254-
- uses: actions/checkout@v5
254+
- uses: actions/checkout@v4
255255
with:
256256
persist-credentials: false
257257
- name: Install uv
258-
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v5
258+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v5
259259
with:
260260
python-version: '3.9'
261261
- id: setup-mongodb

.github/workflows/zizmor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
security-events: write
1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v4
1818
with:
1919
persist-credentials: false
2020
- name: Run zizmor 🌈
21-
uses: zizmorcore/zizmor-action@7f2abfff7488a44086dba64ed2f5a9b431508079
21+
uses: zizmorcore/zizmor-action@383d31df2eb66a2f42db98c9654bdc73231f3e3a

bson/decimal128.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020

2121
import decimal
2222
import struct
23-
from decimal import Decimal
2423
from typing import Any, Sequence, Tuple, Type, Union
2524

26-
from bson.codec_options import TypeDecoder, TypeEncoder
27-
2825
_PACK_64 = struct.Struct("<Q").pack
2926
_UNPACK_64 = struct.Struct("<Q").unpack
3027

@@ -61,42 +58,6 @@
6158
_VALUE_OPTIONS = Union[decimal.Decimal, float, str, Tuple[int, Sequence[int], int]]
6259

6360

64-
class DecimalEncoder(TypeEncoder):
65-
"""Converts Python :class:`decimal.Decimal` to BSON :class:`Decimal128`.
66-
67-
For example::
68-
opts = CodecOptions(type_registry=TypeRegistry([DecimalEncoder()]))
69-
bson.encode({"d": decimal.Decimal('1.0')}, codec_options=opts)
70-
71-
.. versionadded:: 4.15
72-
"""
73-
74-
@property
75-
def python_type(self) -> Type[Decimal]:
76-
return Decimal
77-
78-
def transform_python(self, value: Any) -> Decimal128:
79-
return Decimal128(value)
80-
81-
82-
class DecimalDecoder(TypeDecoder):
83-
"""Converts BSON :class:`Decimal128` to Python :class:`decimal.Decimal`.
84-
85-
For example::
86-
opts = CodecOptions(type_registry=TypeRegistry([DecimalDecoder()]))
87-
bson.decode(data, codec_options=opts)
88-
89-
.. versionadded:: 4.15
90-
"""
91-
92-
@property
93-
def bson_type(self) -> Type[Decimal128]:
94-
return Decimal128
95-
96-
def transform_bson(self, value: Any) -> decimal.Decimal:
97-
return value.to_decimal()
98-
99-
10061
def create_decimal128_context() -> decimal.Context:
10162
"""Returns an instance of :class:`decimal.Context` appropriate
10263
for working with IEEE-754 128-bit decimal floating point values.

doc/changelog.rst

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
11
Changelog
22
=========
3-
Changes in Version 4.15.0 (XXXX/XX/XX)
4-
--------------------------------------
5-
PyMongo 4.15 brings a number of changes including:
6-
7-
- Added :class:`bson.decimal128.DecimalEncoder` and :class:`bson.decimal128.DecimalDecoder`
8-
to support encoding and decoding of BSON Decimal128 values to decimal.Decimal values using the TypeRegistry API.
9-
10-
Changes in Version 4.14.1 (2025/08/19)
11-
--------------------------------------
12-
13-
Version 4.14.1 is a bug fix release.
14-
15-
- Fixed a bug in ``MongoClient.append_metadata()`` and ``AsyncMongoClient.append_metadata()``
16-
that allowed duplicate ``DriverInfo.name`` to be appended to the metadata.
17-
18-
Issues Resolved
19-
...............
20-
21-
See the `PyMongo 4.14.1 release notes in JIRA`_ for the list of resolved issues
22-
in this release.
23-
24-
.. _PyMongo 4.14.1 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=45256
253

264
Changes in Version 4.14.0 (2025/08/06)
275
--------------------------------------
@@ -56,14 +34,6 @@ PyMongo 4.14 brings a number of changes including:
5634
- Changed :meth:`~pymongo.uri_parser.parse_uri`'s ``options`` return value to be
5735
type ``dict`` instead of ``_CaseInsensitiveDictionary``.
5836

59-
Issues Resolved
60-
...............
61-
62-
See the `PyMongo 4.14 release notes in JIRA`_ for the list of resolved issues
63-
in this release.
64-
65-
.. _PyMongo 4.14 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=43041
66-
6737
Changes in Version 4.13.2 (2025/06/17)
6838
--------------------------------------
6939

0 commit comments

Comments
 (0)