PYTHON-2386 Drop support for Python 3.5

This commit is contained in:
Bernie Hackett 2021-02-03 13:55:59 -08:00
parent 0217ba32bd
commit 913860334e
15 changed files with 29 additions and 66 deletions

View File

@ -8,7 +8,7 @@ rm -rf validdist
mkdir -p validdist
mv dist/* validdist || true
for VERSION in 3.5 3.6 3.7 3.8 3.9; do
for VERSION in 3.6 3.7 3.8 3.9; do
PYTHON=/Library/Frameworks/Python.framework/Versions/$VERSION/bin/python3
rm -rf build

View File

@ -11,7 +11,7 @@ mv dist/* validdist || true
# Compile wheels
for PYTHON in /opt/python/*/bin/python; do
if [[ ! $PYTHON =~ (cp35|cp36|cp37|cp38|cp39) ]]; then
if [[ ! $PYTHON =~ (cp36|cp37|cp38|cp39) ]]; then
continue
fi
# https://github.com/pypa/manylinux/issues/49

View File

@ -19,7 +19,6 @@ ls dist
# Check for any unexpected files.
unexpected=$(find dist \! \( -iname dist -or \
-iname '*cp35*' -or \
-iname '*cp36*' -or \
-iname '*cp37*' -or \
-iname '*cp38*' -or \

View File

@ -8,7 +8,7 @@ rm -rf validdist
mkdir -p validdist
mv dist/* validdist || true
for VERSION in 35 36 37 38 39; do
for VERSION in 36 37 38 39; do
_pythons=(C:/Python/Python${VERSION}/python.exe \
C:/Python/32/Python${VERSION}/python.exe)
for PYTHON in "${_pythons[@]}"; do

View File

@ -1762,11 +1762,6 @@ axes:
values:
# Note: always display platform with python-version to avoid ambiguous display names.
# Linux
- id: "3.5"
display_name: "Python 3.5"
batchtime: 10080 # 7 days
variables:
PYTHON_BINARY: "/opt/python/3.5/bin/python3"
- id: "3.6"
display_name: "Python 3.6"
variables:
@ -1783,10 +1778,6 @@ axes:
display_name: "Python 3.9"
variables:
PYTHON_BINARY: "/opt/python/3.9/bin/python3"
- id: "pypy3.5"
display_name: "PyPy 3.5"
variables:
PYTHON_BINARY: "/opt/python/pypy3.5/bin/pypy3"
- id: "pypy3.6"
display_name: "PyPy 3.6"
variables:
@ -1799,10 +1790,6 @@ axes:
- id: python-version-windows
display_name: "Python"
values:
- id: "3.5"
display_name: "Python 3.5"
variables:
PYTHON_BINARY: "C:/python/Python35/python.exe"
- id: "3.6"
display_name: "Python 3.6"
variables:
@ -1823,10 +1810,6 @@ axes:
- id: python-version-windows-32
display_name: "Python"
values:
- id: "3.5"
display_name: "32-bit Python 3.5"
variables:
PYTHON_BINARY: "C:/python/32/Python35/python.exe"
- id: "3.6"
display_name: "32-bit Python 3.6"
variables:
@ -2116,7 +2099,7 @@ buildvariants:
matrix_spec:
platform: rhel62
# RHEL 6.2 does not support Python 3.7.x and later.
python-version: &rhel62-pythons ["3.5", "3.6", "pypy3.5", "pypy3.6"]
python-version: &rhel62-pythons ["3.6", "pypy3.6"]
auth: "*"
ssl: "*"
coverage: "*"
@ -2132,14 +2115,14 @@ buildvariants:
- matrix_name: "tests-pyopenssl"
matrix_spec:
platform: ubuntu-16.04
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9"]
python-version: ["3.6", "3.7", "3.8", "3.9"]
auth: "*"
ssl: "ssl"
pyopenssl: "*"
# Only test "noauth" with Python 3.7.
exclude_spec:
platform: ubuntu-16.04
python-version: ["3.5", "3.6", "3.8", "3.9"]
python-version: ["3.6", "3.8", "3.9"]
auth: "noauth"
ssl: "ssl"
pyopenssl: "*"
@ -2152,7 +2135,7 @@ buildvariants:
- matrix_name: "tests-pyopenssl-pypy"
matrix_spec:
platform: debian92
python-version: ["pypy3.5", "pypy3.6"]
python-version: ["pypy3.6"]
auth: "auth"
ssl: "ssl"
pyopenssl: "*"
@ -2187,7 +2170,7 @@ buildvariants:
matrix_spec:
platform: rhel62
# RHEL 6.2 does not support Python 3.7.x and later.
python-version: ["3.5", "3.6"]
python-version: ["3.6"]
auth-ssl: noauth-nossl
# TODO: dependency error for 'coverage-report' task:
# dependency tests-python-version-rhel62-test-encryption_.../test-2.6-standalone is not present in the project config
@ -2199,7 +2182,7 @@ buildvariants:
- matrix_name: "tests-pypy-debian-test-encryption"
matrix_spec:
platform: debian92
python-version: ["pypy3.5", "pypy3.6"]
python-version: ["pypy3.6"]
auth-ssl: noauth-nossl
encryption: "*"
display_name: "Encryption ${python-version} ${platform} ${auth-ssl}"
@ -2215,7 +2198,7 @@ buildvariants:
exclude_spec:
# These interpreters are always tested without extensions.
- platform: rhel62
python-version: ["pypy3.5", "pypy3.6"]
python-version: ["pypy3.6"]
c-extensions: "*"
auth-ssl: "*"
coverage: "*"
@ -2242,13 +2225,13 @@ buildvariants:
matrix_spec:
# Ubuntu 16.04 images have libsnappy-dev installed, and provides OpenSSL 1.0.2 for testing Python 3.7
platform: ubuntu-16.04
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "pypy3.5", "pypy3.6"]
python-version: ["3.6", "3.7", "3.8", "3.9", "pypy3.6"]
c-extensions: "*"
compression: "*"
exclude_spec:
# These interpreters are always tested without extensions.
- platform: ubuntu-16.04
python-version: ["pypy3.5", "pypy3.6"]
python-version: ["pypy3.6"]
c-extensions: "with-c-extensions"
compression: "*"
# PYTHON-2365 Some tests fail with CPython 3.8+ and python-snappy
@ -2281,7 +2264,7 @@ buildvariants:
exclude_spec:
# Don't test green frameworks on these Python versions.
- platform: rhel62
python-version: ["pypy3.5", "pypy3.6"]
python-version: ["pypy3.6"]
green-framework: "*"
auth-ssl: "*"
display_name: "${green-framework} ${python-version} ${platform} ${auth-ssl}"
@ -2420,7 +2403,7 @@ buildvariants:
matrix_spec:
platform: rhel62
# The toolchain doesn't currently include mod-wsgi
# built for CPython 3.5 or 3.8, mod-wsgi doesn't yet
# built for CPython 3.8, mod-wsgi doesn't yet
# claim to support 3.9. Python 3.7+ won't build on rhel6
# and we need to do some work to migrate mod-wsgi testing
# to a different OS. For now we're stuck just testing with
@ -2443,7 +2426,7 @@ buildvariants:
- matrix_name: "tests-doctests"
matrix_spec:
platform: rhel62
python-version: ["3.5"]
python-version: ["3.6"]
display_name: "Doctests ${python-version} ${platform}"
tasks:
- name: "doctests"
@ -2485,7 +2468,7 @@ buildvariants:
- matrix_name: "data-lake-spec-tests"
matrix_spec:
platform: ubuntu-16.04
python-version: ["3.5", "3.9"]
python-version: ["3.6", "3.9"]
auth: "auth"
c-extensions: "*"
display_name: "Atlas Data Lake ${python-version} ${c-extensions}"
@ -2507,7 +2490,7 @@ buildvariants:
- matrix_name: "ocsp-test"
matrix_spec:
platform: ubuntu-16.04
python-version: ["3.5", "3.8", "3.9"]
python-version: ["3.6", "3.9"]
mongodb-version: ["4.4", "latest"]
auth: "noauth"
ssl: "ssl"
@ -2519,7 +2502,7 @@ buildvariants:
- matrix_name: "ocsp-test-pypy"
matrix_spec:
platform: debian92
python-version: ["pypy3.5", "pypy3.6"]
python-version: ["pypy3.6"]
mongodb-version: ["4.4", "latest"]
auth: "noauth"
ssl: "ssl"
@ -2531,7 +2514,7 @@ buildvariants:
- matrix_name: "ocsp-test-windows"
matrix_spec:
platform: windows-64-vsMulti-small
python-version-windows: ["3.5", "3.9"]
python-version-windows: ["3.6", "3.9"]
mongodb-version: ["4.4", "latest"]
auth: "noauth"
ssl: "ssl"

View File

@ -22,15 +22,7 @@ createvirtualenv () {
else
. $VENVPATH/bin/activate
fi
# Upgrade to the latest versions of pip setuptools wheel so that
# pip can always download the latest cryptography+cffi wheels.
PYTHON_VERSION=$(python -c 'import sys;print("%s.%s" % sys.version_info[:2])')
if [[ $PYTHON_VERSION == "3.5" ]]; then
# pip 21 will drop support for 3.5.
python -m pip install --upgrade 'pip<21'
else
python -m pip install --upgrade pip
fi
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
}

View File

@ -1,11 +1,9 @@
language: python
python:
- 3.5
- 3.6
- 3.7
- 3.8
- pypy3.5
services:
- mongodb

View File

@ -19,7 +19,7 @@ that might not be of interest or that has already been addressed.
Supported Interpreters
----------------------
PyMongo supports CPython 3.5+ and PyPy3.5+. Language
PyMongo supports CPython 3.6+ and PyPy3.6+. Language
features not supported by all interpreters can not be used.
Style Guide

View File

@ -89,7 +89,7 @@ is incompatible with PyMongo.
Dependencies
============
PyMongo supports CPython 3.5+ and PyPy3.5+.
PyMongo supports CPython 3.6+ and PyPy3.6+.
Optional dependencies:

View File

@ -134,7 +134,7 @@ they are returned to the pool.
Does PyMongo support Python 3?
------------------------------
PyMongo supports CPython 3.5+ and PyPy3.5+. See the :doc:`python3` for details.
PyMongo supports CPython 3.6+ and PyPy3.6+. See the :doc:`python3` for details.
Does PyMongo support asynchronous frameworks like Gevent, asyncio, Tornado, or Twisted?
---------------------------------------------------------------------------------------

View File

@ -28,7 +28,7 @@ To upgrade using pip::
Dependencies
------------
PyMongo supports CPython 3.5+ and PyPy3.5+.
PyMongo supports CPython 3.6+ and PyPy3.6+.
Optional dependencies:
@ -133,7 +133,7 @@ See `http://bugs.python.org/issue11623 <http://bugs.python.org/issue11623>`_
for a more detailed explanation.
**Lion (10.7) and newer** - PyMongo's C extensions can be built against
versions of Python 3.5+ downloaded from python.org. In all cases Xcode must be
versions of Python 3.6+ downloaded from python.org. In all cases Xcode must be
installed with 'UNIX Development Support'.
**Xcode 5.1**: Starting with version 5.1 the version of clang that ships with

View File

@ -6,7 +6,7 @@ Python 3 FAQ
What Python 3 versions are supported?
-------------------------------------
PyMongo supports CPython 3.5+ and PyPy3.5+.
PyMongo supports CPython 3.6+ and PyPy3.6+.
Are there any PyMongo behavior changes with Python 3?
-----------------------------------------------------

View File

@ -38,7 +38,4 @@ if hasattr(_ssl, "VERIFY_CRL_CHECK_LEAF"):
# making it the obvious version to start using SSLConext.check_hostname.
# Python 3.6 might have been a good version, but it suffers
# from https://bugs.python.org/issue32185.
# We'll use our bundled match_hostname for older Python
# versions, which also supports IP address matching
# with Python < 3.5.
CHECK_HOSTNAME_SAFE = _sys.version_info[:2] >= (3, 7)

View File

@ -5,8 +5,8 @@ import sys
import warnings
if sys.version_info[:2] < (3, 5):
raise RuntimeError("Python version >= 3.5 required.")
if sys.version_info[:2] < (3, 6):
raise RuntimeError("Python version >= 3.6 required.")
# Hack to silence atexit traceback in some Python versions
@ -327,7 +327,7 @@ setup(
keywords=["mongo", "mongodb", "pymongo", "gridfs", "bson"],
install_requires=[],
license="Apache License, Version 2.0",
python_requires=">=3.5",
python_requires=">=3.6",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
@ -337,7 +337,6 @@ setup(
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",

View File

@ -504,11 +504,6 @@ class TestSpec(SpecRunner):
desc = test['description'].lower()
if 'type=symbol' in desc:
self.skipTest('PyMongo does not support the symbol type')
if desc == 'explain a find with deterministic encryption':
# PyPy and Python 3.6+ have ordered dict.
if sys.version_info[:2] < (3, 6) and 'PyPy' not in sys.version:
self.skipTest(
'explain test does not work without ordered dict')
def setup_scenario(self, scenario_def):
"""Override a test's setup."""