Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .evergreen/build-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rm -rf validdist
mkdir -p validdist
mv dist/* validdist || true

for VERSION in 3.6 3.7 3.8 3.9 3.10; do
for VERSION in 3.7 3.8 3.9 3.10; do
PYTHON=/Library/Frameworks/Python.framework/Versions/$VERSION/bin/python3
rm -rf build

Expand Down
2 changes: 1 addition & 1 deletion .evergreen/build-manylinux-internal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mv dist/* validdist || true

# Compile wheels
for PYTHON in /opt/python/*/bin/python; do
if [[ ! $PYTHON =~ (cp36|cp37|cp38|cp39|cp310) ]]; then
if [[ ! $PYTHON =~ (cp37|cp38|cp39|cp310) ]]; then
continue
fi
# https://github.com/pypa/manylinux/issues/49
Expand Down
1 change: 0 additions & 1 deletion .evergreen/build-manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ ls dist

# Check for any unexpected files.
unexpected=$(find dist \! \( -iname dist -or \
-iname '*cp36*' -or \
-iname '*cp37*' -or \
-iname '*cp38*' -or \
-iname '*cp39*' -or \
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/build-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rm -rf validdist
mkdir -p validdist
mv dist/* validdist || true

for VERSION in 36 37 38 39 310; do
for VERSION in 37 38 39 310; do
_pythons=("C:/Python/Python${VERSION}/python.exe" \
"C:/Python/32/Python${VERSION}/python.exe")
for PYTHON in "${_pythons[@]}"; do
Expand Down
77 changes: 35 additions & 42 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ functions:
# Coverage combine merges (and removes) all the coverage files and
# generates a new .coverage file in the current directory.
ls -la coverage/
/opt/python/3.6/bin/python3 -m coverage combine coverage/coverage.*
/opt/python/3.6/bin/python3 -m coverage html -d htmlcov
/opt/python/3.7/bin/python3 -m coverage combine coverage/coverage.*
/opt/python/3.7/bin/python3 -m coverage html -d htmlcov
# Upload the resulting html coverage report.
- command: shell.exec
params:
Expand Down Expand Up @@ -932,7 +932,7 @@ functions:
done
# Build source distribution.
cd src/
/opt/python/3.6/bin/python3 setup.py sdist
/opt/python/3.7/bin/python3 setup.py sdist
cp dist/* ../releases
- command: archive.targz_pack
params:
Expand Down Expand Up @@ -1324,7 +1324,7 @@ tasks:
commands:
- func: "run tests"
vars:
PYTHON_BINARY: /opt/python/3.6/bin/python3
PYTHON_BINARY: /opt/python/3.7/bin/python3

- name: "atlas-connect"
tags: ["atlas-connect"]
Expand Down Expand Up @@ -1945,10 +1945,6 @@ axes:
values:
# Note: always display platform with python-version to avoid ambiguous display names.
# Linux
- id: "3.6"
display_name: "Python 3.6"
variables:
PYTHON_BINARY: "/opt/python/3.6/bin/python3"
- id: "3.7"
display_name: "Python 3.7"
variables:
Expand All @@ -1965,10 +1961,6 @@ axes:
display_name: "Python 3.10"
variables:
PYTHON_BINARY: "/opt/python/3.10/bin/python3"
- id: "pypy3.6"
display_name: "PyPy 3.6"
variables:
PYTHON_BINARY: "/opt/python/pypy3.6/bin/pypy3"
- id: "pypy3.7"
display_name: "PyPy 3.7"
variables:
Expand All @@ -1977,6 +1969,10 @@ axes:
display_name: "PyPy 3.8"
variables:
PYTHON_BINARY: "/opt/python/pypy3.8/bin/pypy3"

- id: python-version-mac
display_name: "Python"
values:
- id: "system-python3"
display_name: "Python3"
variables:
Expand All @@ -1985,10 +1981,6 @@ axes:
- id: python-version-windows
display_name: "Python"
values:
- id: "3.6"
display_name: "Python 3.6"
variables:
PYTHON_BINARY: "C:/python/Python36/python.exe"
- id: "3.7"
display_name: "Python 3.7"
variables:
Expand All @@ -2009,10 +2001,6 @@ axes:
- id: python-version-windows-32
display_name: "Python"
values:
- id: "3.6"
display_name: "32-bit Python 3.6"
variables:
PYTHON_BINARY: "C:/python/32/Python36/python.exe"
- id: "3.7"
display_name: "32-bit Python 3.7"
variables:
Expand Down Expand Up @@ -2281,7 +2269,7 @@ buildvariants:
# Only test "noauth" with Python 3.7.
exclude_spec:
platform: ubuntu-18.04
python-version: ["3.6", "3.8", "3.9", "3.10", "pypy3.6", "pypy3.7", "pypy3.8"]
python-version: ["3.8", "3.9", "3.10", "pypy3.7", "pypy3.8"]
auth: "noauth"
ssl: "ssl"
pyopenssl: "*"
Expand Down Expand Up @@ -2334,7 +2322,7 @@ buildvariants:
exclude_spec:
# These interpreters are always tested without extensions.
- platform: ubuntu-18.04
python-version: ["pypy3.6", "pypy3.7", "pypy3.8"]
python-version: ["pypy3.7", "pypy3.8"]
c-extensions: "*"
auth-ssl: "*"
coverage: "*"
Expand All @@ -2350,7 +2338,7 @@ buildvariants:
exclude_spec:
# These interpreters are always tested without extensions.
- platform: ubuntu-18.04
python-version: ["pypy3.6", "pypy3.7", "pypy3.8"]
python-version: ["pypy3.7", "pypy3.8"]
c-extensions: "with-c-extensions"
compression: "*"
display_name: "${compression} ${c-extensions} ${python-version} ${platform}"
Expand Down Expand Up @@ -2379,7 +2367,7 @@ buildvariants:
exclude_spec:
# Don't test green frameworks on these Python versions.
- platform: ubuntu-18.04
python-version: ["pypy3.6", "pypy3.7", "pypy3.8", "system-python3"]
python-version: ["pypy3.7", "pypy3.8"]
green-framework: "*"
auth-ssl: "*"
display_name: "${green-framework} ${python-version} ${platform} ${auth-ssl}"
Expand All @@ -2405,7 +2393,7 @@ buildvariants:
matrix_spec:
platform: awslinux
# Python 3.10+ requires OpenSSL 1.1.1+
python-version: ["3.6", "3.7", "3.8", "3.9", "pypy3.6", "pypy3.7", "pypy3.8"]
python-version: ["3.7", "3.8", "3.9", "pypy3.7", "pypy3.8"]
auth-ssl: "*"
display_name: "OpenSSL 1.0.2 ${python-version} ${platform} ${auth-ssl}"
tasks:
Expand All @@ -2420,12 +2408,12 @@ buildvariants:
display_name: "Encryption ${platform} ${python-version-windows} ${auth-ssl}"
tasks: *encryption-server-versions

# Storage engine tests on Ubuntu 18.04 (x86_64) with Python 3.6.
# Storage engine tests on Ubuntu 18.04 (x86_64) with Python 3.7.
- matrix_name: "tests-storage-engines"
matrix_spec:
platform: ubuntu-18.04
storage-engine: "*"
python-version: 3.6
python-version: 3.7
display_name: "Storage ${storage-engine} ${python-version} ${platform}"
rules:
- if:
Expand All @@ -2452,12 +2440,12 @@ buildvariants:
- "test-3.6-standalone"
- "test-3.6-replica_set"

# enableTestCommands=0 tests on Ubuntu18 (x86_64) with Python 3.6.
# enableTestCommands=0 tests on Ubuntu18 (x86_64) with Python 3.7.
- matrix_name: "test-disableTestCommands"
matrix_spec:
platform: ubuntu-18.04
disableTestCommands: "*"
python-version: "3.6"
python-version: "3.7"
display_name: "Disable test commands ${python-version} ${platform}"
tasks:
- ".latest"
Expand All @@ -2483,7 +2471,7 @@ buildvariants:
- matrix_name: "tests-mod-wsgi"
matrix_spec:
platform: ubuntu-18.04
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
mod-wsgi-version: "*"
exclude_spec:
# mod-wsgi 3.5 won't build against CPython 3.8+
Expand All @@ -2498,7 +2486,7 @@ buildvariants:
- matrix_name: "mockupdb-tests"
matrix_spec:
platform: ubuntu-18.04
python-version: 3.6
python-version: 3.7
display_name: "MockupDB Tests"
tasks:
- name: "mockupdb"
Expand Down Expand Up @@ -2543,19 +2531,14 @@ buildvariants:
python-version: "*"
auth-ssl: auth-ssl
serverless: "*"
exclude_spec:
- platform: ubuntu-18.04
python-version: ["system-python3"]
auth-ssl: auth-ssl
serverless: "*"
display_name: "Serverless ${python-version} ${platform}"
tasks:
- "serverless_task_group"

- matrix_name: "data-lake-spec-tests"
matrix_spec:
platform: ubuntu-18.04
python-version: ["3.6", "3.10"]
python-version: ["3.7", "3.10"]
auth: "auth"
c-extensions: "*"
display_name: "Atlas Data Lake ${python-version} ${c-extensions}"
Expand All @@ -2565,7 +2548,7 @@ buildvariants:
- matrix_name: "stable-api-tests"
matrix_spec:
platform: ubuntu-18.04
python-version: ["3.6", "3.10"]
python-version: ["3.7", "3.10"]
auth: "auth"
versionedApi: "*"
display_name: "Versioned API ${versionedApi} ${python-version}"
Expand All @@ -2580,7 +2563,7 @@ buildvariants:
# OCSP stapling is not supported on Ubuntu 18.04.
# See https://jira.mongodb.org/browse/SERVER-51364.
platform: ubuntu-20.04
python-version: ["3.6", "3.10", "pypy3.6", "pypy3.8"]
python-version: ["3.7", "3.10", "pypy3.7", "pypy3.8"]
mongodb-version: ["4.4", "5.0", "latest"]
auth: "noauth"
ssl: "ssl"
Expand All @@ -2592,7 +2575,7 @@ buildvariants:
- matrix_name: "ocsp-test-windows"
matrix_spec:
platform: windows-64-vsMulti-small
python-version-windows: ["3.6", "3.10"]
python-version-windows: ["3.7", "3.10"]
mongodb-version: ["4.4", "5.0", "latest"]
auth: "noauth"
ssl: "ssl"
Expand All @@ -2616,14 +2599,24 @@ buildvariants:

- matrix_name: "aws-auth-test"
matrix_spec:
platform: [ubuntu-18.04, macos-1014]
python-version: ["system-python3"]
platform: [ubuntu-18.04]
python-version: ["3.7"]
display_name: "MONGODB-AWS Auth ${platform} ${python-version}"
tasks:
- name: "aws-auth-test-4.4"
- name: "aws-auth-test-5.0"
- name: "aws-auth-test-latest"

- matrix_name: "aws-auth-test-mac"
matrix_spec:
platform: [macos-1014]
python-version-mac: ["system-python3"]
display_name: "MONGODB-AWS Auth ${platform} ${python-version-mac}"
tasks:
- name: "aws-auth-test-4.4"
- name: "aws-auth-test-5.0"
- name: "aws-auth-test-latest"

- matrix_name: "aws-auth-test-windows"
matrix_spec:
platform: [windows-64-vsMulti-small]
Expand Down
28 changes: 7 additions & 21 deletions .evergreen/run-mongodb-aws-ecs-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,18 @@ fi
# Now we can safely enable xtrace
set -o xtrace

if command -v virtualenv ; then
VIRTUALENV=$(command -v virtualenv)
else
if ! python3 -m pip --version ; then
echo "Installing pip..."
apt-get update
apt install python3-pip -y
fi
echo "Installing virtualenv..."
python3 -m pip install --user virtualenv
VIRTUALENV='python3 -m virtualenv'
fi
# Install python3.7 with pip.
apt-get update
apt install python3.7 python3-pip -y

authtest () {
echo "Running MONGODB-AWS ECS authentication tests with $PYTHON"
$PYTHON --version

$VIRTUALENV -p $PYTHON --never-download venvaws
. venvaws/bin/activate

$PYTHON -m pip install --upgrade wheel setuptools pip
cd src
python -m pip install '.[aws]'
python test/auth_aws/test_auth_aws.py
$PYTHON -m pip install '.[aws]'
$PYTHON test/auth_aws/test_auth_aws.py
cd -
deactivate
rm -rf venvaws
}

PYTHON=$(command -v python3) authtest
PYTHON="python3.7" authtest
8 changes: 4 additions & 4 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ fi

if [ -z "$PYTHON_BINARY" ]; then
# Use Python 3 from the server toolchain to test on ARM, POWER or zSeries if a
# system python3 doesn't exist or exists but is older than 3.6.
if is_python_36 "$(command -v python3)"; then
# system python3 doesn't exist or exists but is older than 3.7.
if is_python_37 "$(command -v python3)"; then
PYTHON=$(command -v python3)
elif is_python_36 "$(command -v /opt/mongodbtoolchain/v3/bin/python3)"; then
elif is_python_37 "$(command -v /opt/mongodbtoolchain/v3/bin/python3)"; then
PYTHON=$(command -v /opt/mongodbtoolchain/v3/bin/python3)
else
echo "Cannot test without python3.6+ installed!"
echo "Cannot test without python3.7+ installed!"
fi
elif [ "$COMPRESSORS" = "snappy" ]; then
createvirtualenv $PYTHON_BINARY snappytest
Expand Down
10 changes: 5 additions & 5 deletions .evergreen/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ testinstall () {
fi
}

# Function that returns success if the provided Python binary is version 3.6 or later
# Function that returns success if the provided Python binary is version 3.7 or later
# Usage:
# is_python_36 /path/to/python
# is_python_37 /path/to/python
# * param1: Python binary
is_python_36() {
is_python_37() {
if [ -z "$1" ]; then
return 1
elif $1 -c "import sys; exit(sys.version_info[:2] < (3, 6))"; then
# runs when sys.version_info[:2] >= (3, 6)
elif $1 -c "import sys; exit(sys.version_info[:2] < (3, 7))"; then
# runs when sys.version_info[:2] >= (3, 7)
return 0
else
return 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.6", "3.10", "pypy-3.8"]
python-version: ["3.7", "3.10", "pypy-3.8"]
name: CPython ${{ matrix.python-version }}-${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ that might not be of interest or that has already been addressed.
Supported Interpreters
----------------------

PyMongo supports CPython 3.6+ and PyPy3.6+. Language
PyMongo supports CPython 3.7+ and PyPy3.7+. Language
features not supported by all interpreters can not be used.

Style Guide
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ is incompatible with PyMongo.
Dependencies
============

PyMongo supports CPython 3.6.2+ and PyPy3.6+.
PyMongo supports CPython 3.7+ and PyPy3.7+.

Optional dependencies:

Expand Down
Loading