Skip to content

Commit 90923df

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents d3da880 + 4697436 commit 90923df

File tree

8 files changed

+27
-20
lines changed

8 files changed

+27
-20
lines changed

.evergreen/scripts/setup-dev-env.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ HERE="$( cd -- "$HERE" > /dev/null 2>&1 && pwd )"
77
ROOT=$(dirname "$(dirname $HERE)")
88
pushd $ROOT > /dev/null
99

10+
# Bail early if running on GitHub Actions.
11+
if [ -n "${GITHUB_ACTION:-}" ]; then
12+
exit 0
13+
fi
14+
1015
# Source the env files to pick up common variables.
1116
if [ -f $HERE/env.sh ]; then
1217
. $HERE/env.sh

.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@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3
49+
uses: github/codeql-action/init@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # 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@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3
66+
uses: github/codeql-action/analyze@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # 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
@@ -99,7 +99,7 @@ jobs:
9999

100100
make_sdist:
101101
name: Make SDist
102-
runs-on: macos-13
102+
runs-on: macos-latest
103103
steps:
104104
- uses: actions/checkout@v5
105105
with:

.github/workflows/test-python.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
persist-credentials: false
2828
- name: Install uv
29-
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5
29+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
3030
with:
3131
enable-cache: true
3232
python-version: "3.10"
@@ -68,7 +68,7 @@ jobs:
6868
with:
6969
persist-credentials: false
7070
- name: Install uv
71-
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5
71+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
7272
with:
7373
enable-cache: true
7474
python-version: ${{ matrix.python-version }}
@@ -87,7 +87,7 @@ jobs:
8787
with:
8888
persist-credentials: false
8989
- name: Install uv
90-
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5
90+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
9191
with:
9292
enable-cache: true
9393
python-version: "3.10"
@@ -112,7 +112,7 @@ jobs:
112112
with:
113113
persist-credentials: false
114114
- name: Install uv
115-
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5
115+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
116116
with:
117117
enable-cache: true
118118
python-version: "3.10"
@@ -131,7 +131,7 @@ jobs:
131131
with:
132132
persist-credentials: false
133133
- name: Install uv
134-
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5
134+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
135135
with:
136136
enable-cache: true
137137
python-version: "3.10"
@@ -153,7 +153,7 @@ jobs:
153153
with:
154154
persist-credentials: false
155155
- name: Install uv
156-
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5
156+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
157157
with:
158158
enable-cache: true
159159
python-version: "${{matrix.python}}"
@@ -174,7 +174,7 @@ jobs:
174174
with:
175175
persist-credentials: false
176176
- name: Install uv
177-
uses: astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6 # v5
177+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
178178
with:
179179
enable-cache: true
180180
python-version: "3.10"
@@ -264,7 +264,7 @@ jobs:
264264
with:
265265
persist-credentials: false
266266
- name: Install uv
267-
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v5
267+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
268268
with:
269269
python-version: "3.10"
270270
- id: setup-mongodb

.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@0696496a48b64e0568faa46ddaf5f6fe48b83b04
21+
uses: zizmorcore/zizmor-action@da5ac40c5419dcf7f21630fb2f95e725ae8fb9d5

bson/_cbsonmodule.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,26 +1657,28 @@ void handle_invalid_doc_error(PyObject* dict) {
16571657
}
16581658

16591659
if (evalue && PyErr_GivenExceptionMatches(etype, InvalidDocument)) {
1660-
PyObject *msg = PyObject_Str(evalue);
1660+
msg = PyObject_Str(evalue);
16611661
if (msg) {
16621662
const char * msg_utf8 = PyUnicode_AsUTF8(msg);
16631663
if (msg_utf8 == NULL) {
16641664
goto cleanup;
16651665
}
1666-
PyObject *new_msg = PyUnicode_FromFormat("Invalid document: %s", msg_utf8);
1666+
new_msg = PyUnicode_FromFormat("Invalid document: %s", msg_utf8);
16671667
if (new_msg == NULL) {
16681668
goto cleanup;
16691669
}
16701670
// Add doc to the error instance as a property.
1671-
PyObject *new_evalue = PyObject_CallFunctionObjArgs(InvalidDocument, new_msg, dict, NULL);
1671+
new_evalue = PyObject_CallFunctionObjArgs(InvalidDocument, new_msg, dict, NULL);
16721672
Py_DECREF(evalue);
16731673
Py_DECREF(etype);
16741674
etype = InvalidDocument;
16751675
InvalidDocument = NULL;
16761676
if (new_evalue) {
16771677
evalue = new_evalue;
1678+
new_evalue = NULL;
16781679
} else {
16791680
evalue = msg;
1681+
msg = NULL;
16801682
}
16811683
}
16821684
PyErr_NormalizeException(&etype, &evalue, &etrace);

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mockupdb = [
6060
perf = ["simplejson>=3.17.0"]
6161
typing = [
6262
"mypy==1.18.2",
63-
"pyright==1.1.405",
63+
"pyright==1.1.406",
6464
"typing_extensions",
6565
"pip"
6666
]

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)