Skip to content

Commit 7b2a009

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 524686a + 163514b commit 7b2a009

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.evergreen/install-dependencies.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ cp ${PROJECT_DIRECTORY}/test/certificates/* ${DRIVERS_TOOLS}/.evergreen/x509gen/
77
# Replace MongoOrchestration's client certificate.
88
cp ${PROJECT_DIRECTORY}/test/certificates/client.pem ${MONGO_ORCHESTRATION_HOME}/lib/client.pem
99

10-
# Ensure hatch is installed.
11-
bash ${PROJECT_DIRECTORY}/.evergreen/scripts/ensure-hatch.sh
12-
1310
if [ -w /etc/hosts ]; then
1411
SUDO=""
1512
else

.evergreen/scripts/ensure-hatch.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -eu
44

5+
HERE=$(dirname ${BASH_SOURCE:-$0})
6+
pushd "$(dirname "$(dirname $HERE)")" > /dev/null
7+
58
# Ensure hatch is available.
69
if [ ! -x "$(command -v hatch)" ]; then
710
# Install a virtual env with "hatch"
@@ -53,3 +56,4 @@ if [ ! -x "$(command -v hatch)" ]; then
5356
echo "Installing hatch... done."
5457
fi
5558
hatch --version
59+
popd > /dev/null

.evergreen/setup-spawn-host.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ if [ -z "$1" ]
88
fi
99

1010
target=$1
11+
remote_dir=/home/ec2-user/mongo-python-driver
1112

1213
echo "Copying files to $target..."
13-
rsync -az -e ssh --exclude '.git' --filter=':- .gitignore' -r . $target:/home/ec2-user/mongo-python-driver
14+
rsync -az -e ssh --exclude '.git' --filter=':- .gitignore' -r . $target:$remote_dir
1415
echo "Copying files to $target... done"
1516

16-
ssh $target /home/ec2-user/mongo-python-driver/.evergreen/scripts/setup-system.sh
17+
ssh $target $remote_dir/.evergreen/scripts/setup-system.sh
18+
ssh $target "PYTHON_BINARY=${PYTHON_BINARY:-} $remote_dir/.evergreen/scripts/ensure-hatch.sh"

.evergreen/sync-spawn-host.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ fi
88
target=$1
99

1010
echo "Syncing files to $target..."
11+
rsync -haz -e ssh --exclude '.git' --filter=':- .gitignore' -r . $target:/home/ec2-user/mongo-python-driver
1112
# shellcheck disable=SC2034
1213
fswatch -o . | while read f; do rsync -hazv -e ssh --exclude '.git' --filter=':- .gitignore' -r . $target:/home/ec2-user/mongo-python-driver; done
1314
echo "Syncing files to $target... done."

pymongo/pyopenssl_context.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ def _call(self, call: Callable[..., _T], *args: Any, **kwargs: Any) -> _T:
125125
try:
126126
return call(*args, **kwargs)
127127
except BLOCKING_IO_ERRORS as exc:
128-
if is_async:
128+
# Do not retry if the connection is in non-blocking mode.
129+
if is_async or timeout == 0:
129130
raise exc
130131
# Check for closed socket.
131132
if self.fileno() == -1:

0 commit comments

Comments
 (0)