Skip to content

Commit 3d7ea70

Browse files
authored
PYTHON-2786 [v3.13] Drop support for Python 3.4 (#865)
1 parent a051d2b commit 3d7ea70

13 files changed

+30
-60
lines changed

.evergreen/build-manylinux-internal.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ mv dist/* validdist || true
1111

1212
# Compile wheels
1313
for PYTHON in /opt/python/*/bin/python; do
14-
if [[ ! $PYTHON =~ (cp27|cp34|cp35|cp36|cp37|cp38|cp39|cp310) ]]; then
14+
if [[ ! $PYTHON =~ (cp27|cp35|cp36|cp37|cp38|cp39|cp310) ]]; then
1515
continue
1616
fi
1717
# https://github.com/pypa/manylinux/issues/49

.evergreen/build-manylinux.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ docker version
99
# pip versions.
1010
BUILD_WITH_TAG="$1"
1111
if [ -n "$BUILD_WITH_TAG" ]; then
12-
# 2020-03-20-2fda31c Was the last release to include Python 3.4.
13-
images=(quay.io/pypa/manylinux1_x86_64:2020-03-20-2fda31c \
14-
quay.io/pypa/manylinux1_i686:2020-03-20-2fda31c \
15-
quay.io/pypa/manylinux1_x86_64:2021-05-05-b64d921 \
12+
images=(quay.io/pypa/manylinux1_x86_64:2021-05-05-b64d921 \
1613
quay.io/pypa/manylinux1_i686:2021-05-05-b64d921 \
1714
quay.io/pypa/manylinux2014_x86_64:2021-05-05-1ac6ef3 \
1815
quay.io/pypa/manylinux2014_i686:2021-05-05-1ac6ef3 \
@@ -39,7 +36,6 @@ ls dist
3936
# Check for any unexpected files.
4037
unexpected=$(find dist \! \( -iname dist -or \
4138
-iname '*cp27*' -or \
42-
-iname '*cp34*' -or \
4339
-iname '*cp35*' -or \
4440
-iname '*cp36*' -or \
4541
-iname '*cp37*' -or \

.evergreen/build-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ rm -rf validdist
88
mkdir -p validdist
99
mv dist/* validdist || true
1010

11-
for VERSION in 27 34 35 36 37 38 39 310; do
11+
for VERSION in 27 35 36 37 38 39 310; do
1212
_pythons=(C:/Python/Python${VERSION}/python.exe \
1313
C:/Python/32/Python${VERSION}/python.exe)
1414
for PYTHON in "${_pythons[@]}"; do

.evergreen/config.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,10 +2007,6 @@ axes:
20072007
display_name: "Python 2.7"
20082008
variables:
20092009
PYTHON_BINARY: "/opt/python/2.7/bin/python"
2010-
- id: "3.4"
2011-
display_name: "Python 3.4"
2012-
variables:
2013-
PYTHON_BINARY: "/opt/python/3.4/bin/python3"
20142010
- id: "3.5"
20152011
display_name: "Python 3.5"
20162012
batchtime: 10080 # 7 days
@@ -2074,10 +2070,6 @@ axes:
20742070
display_name: "Python 2.7"
20752071
variables:
20762072
PYTHON_BINARY: "C:/python/Python27/python.exe"
2077-
- id: "3.4"
2078-
display_name: "Python 3.4"
2079-
variables:
2080-
PYTHON_BINARY: "C:/python/Python34/python.exe"
20812073
- id: "3.5"
20822074
display_name: "Python 3.5"
20832075
variables:
@@ -2110,10 +2102,6 @@ axes:
21102102
display_name: "32-bit Python 2.7"
21112103
variables:
21122104
PYTHON_BINARY: "C:/python/32/Python27/python.exe"
2113-
- id: "3.4"
2114-
display_name: "32-bit Python 3.4"
2115-
variables:
2116-
PYTHON_BINARY: "C:/python/32/Python34/python.exe"
21172105
- id: "3.5"
21182106
display_name: "32-bit Python 3.5"
21192107
variables:
@@ -2412,7 +2400,7 @@ buildvariants:
24122400
matrix_spec:
24132401
platform: awslinux
24142402
# RHEL 6.2 does not support Python 3.7.x and later.
2415-
python-version: &amazon1-pythons ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3.5", "pypy3.6", "pypy3.7", "jython2.7"]
2403+
python-version: &amazon1-pythons ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3.5", "pypy3.6", "pypy3.7", "jython2.7"]
24162404
auth: "*"
24172405
ssl: "*"
24182406
coverage: "*"
@@ -2451,14 +2439,14 @@ buildvariants:
24512439
- matrix_name: "tests-pyopenssl"
24522440
matrix_spec:
24532441
platform: awslinux
2454-
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9"]
2442+
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"]
24552443
auth: "*"
24562444
ssl: "ssl"
24572445
pyopenssl: "*"
24582446
# Only test "noauth" with Python 3.7.
24592447
exclude_spec:
24602448
platform: awslinux
2461-
python-version: ["2.7", "3.4", "3.5", "3.6", "3.8", "3.9"]
2449+
python-version: ["2.7", "3.5", "3.6", "3.8", "3.9"]
24622450
auth: "noauth"
24632451
ssl: "ssl"
24642452
pyopenssl: "*"
@@ -2518,7 +2506,7 @@ buildvariants:
25182506
matrix_spec:
25192507
platform: awslinux
25202508
# RHEL 6.2 does not support Python 3.7.x and later.
2521-
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9"]
2509+
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9"]
25222510
auth-ssl: noauth-nossl
25232511
# TODO: dependency error for 'coverage-report' task:
25242512
# dependency tests-python-version-rhel62-test-encryption_.../test-2.6-standalone is not present in the project config
@@ -2556,7 +2544,7 @@ buildvariants:
25562544
- matrix_name: "tests-python-version-compression"
25572545
matrix_spec:
25582546
platform: [awslinux]
2559-
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3.5", "pypy3.6", "pypy3.7", "jython2.7"]
2547+
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3.5", "pypy3.6", "pypy3.7", "jython2.7"]
25602548
c-extensions: "*"
25612549
compression: "*"
25622550
exclude_spec:
@@ -2680,9 +2668,8 @@ buildvariants:
26802668
python-version: *amazon1-pythons
26812669
auth-ssl: "auth-ssl"
26822670
exclude_spec:
2683-
# Python 3.4 doesn't support OpenSSL 1.1.0+ so won't build on Debian 9+.
26842671
- platform: debian92
2685-
python-version: ["3.4", "jython2.7"]
2672+
python-version: ["jython2.7"]
26862673
auth-ssl: "auth-ssl"
26872674
display_name: "${python-version} OpenSSL 1.1.0 ${platform} ${auth-ssl}"
26882675
tasks:
@@ -2791,7 +2778,7 @@ buildvariants:
27912778
- matrix_name: "tests-mod-wsgi"
27922779
matrix_spec:
27932780
platform: awslinux
2794-
python-version: ["2.7", "3.4", "3.6", "3.7", "3.8", "3.9"]
2781+
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9"]
27952782
mod-wsgi-version: "*"
27962783
exclude_spec:
27972784
# mod-wsgi 3.5 won't build against CPython 3.8+
@@ -2814,7 +2801,7 @@ buildvariants:
28142801
- matrix_name: "tests-doctests"
28152802
matrix_spec:
28162803
platform: awslinux
2817-
python-version: ["2.7", "3.4"]
2804+
python-version: ["2.7", "3.5"]
28182805
display_name: "Doctests ${python-version} ${platform}"
28192806
tasks:
28202807
- name: "doctests"
@@ -2878,7 +2865,7 @@ buildvariants:
28782865
- matrix_name: "data-lake-spec-tests"
28792866
matrix_spec:
28802867
platform: rhel70
2881-
python-version: ["2.7", "3.4", "3.6"]
2868+
python-version: ["2.7", "3.6"]
28822869
auth: "auth"
28832870
c-extensions: "*"
28842871
display_name: "Atlas Data Lake ${python-version} ${c-extensions}"
@@ -2901,7 +2888,7 @@ buildvariants:
29012888
- matrix_name: "ocsp-test"
29022889
matrix_spec:
29032890
platform: awslinux
2904-
python-version: ["2.7", "3.4", "pypy3.5", "pypy3.6", "pypy3.7", "3.8", "3.9"]
2891+
python-version: ["2.7", "pypy3.5", "pypy3.6", "pypy3.7", "3.8", "3.9"]
29052892
mongodb-version: ["4.4", "5.0", "latest"]
29062893
auth: "noauth"
29072894
ssl: "ssl"
@@ -2926,7 +2913,7 @@ buildvariants:
29262913
- matrix_name: "ocsp-test-windows"
29272914
matrix_spec:
29282915
platform: windows-64-vsMulti-small
2929-
python-version-windows: ["2.7", "3.4", "3.9"]
2916+
python-version-windows: ["2.7", "3.5", "3.9"]
29302917
mongodb-version: ["4.4", "5.0", "latest"]
29312918
auth: "noauth"
29322919
ssl: "ssl"
@@ -2973,7 +2960,7 @@ buildvariants:
29732960
platform: awslinux
29742961
mongodb-version: ["5.0", "latest"]
29752962
auth-ssl: "*"
2976-
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3.5", "pypy3.7"]
2963+
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3.5", "pypy3.7"]
29772964
loadbalancer: "*"
29782965
display_name: "Load Balancer ${platform} ${python-version} ${mongodb-version} ${auth-ssl}"
29792966
tasks:

.evergreen/run-tests.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,9 @@ $PYTHON -c 'import sys; print(sys.version)'
229229

230230
# Run the tests with coverage if requested and coverage is installed.
231231
# Only cover CPython. Jython and PyPy report suspiciously low coverage.
232-
# Also skip CPython 3.4. It's not supported by coverage 5+, which uses
233-
# a new and incompatible data format.
234232
PYTHON_VERSION=$($PYTHON -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
235233
COVERAGE_ARGS=""
236-
if [ -n "$COVERAGE" -a $PYTHON_IMPL = "CPython" -a $PYTHON_VERSION != "3.4" ]; then
234+
if [ -n "$COVERAGE" -a $PYTHON_IMPL = "CPython" ]; then
237235
if $PYTHON -m coverage --version; then
238236
echo "INFO: coverage is installed, running tests with coverage..."
239237
COVERAGE_ARGS="-m coverage run --branch"
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# cffi==1.14.3 was the last installable release on RHEL 6.2 with Python 3.4
2-
cffi==1.14.3;python_version=="3.4"
3-
cffi>=1.12.0,<2;python_version!="3.4"
1+
cffi>=1.12.0
42
cryptography>=2,<3.4;python_version=="2.7"
5-
cryptography>=2,<2.9;python_version=="3.4"
63
cryptography>=2,<3.3;python_version=="3.5"
74
cryptography>=2;python_version>"3.5"
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
-r test-cryptography-requirements.txt
2-
pyopenssl>=17.2.0,<20;python_version=="3.4"
3-
pyopenssl>=17.2.0;python_version!="3.4"
4-
attrs<=20.3.0;python_version=="3.4"
5-
service-identity==18.1.0;python_version=="3.4"
6-
service-identity>=18.1.0;python_version!="3.4"
7-
requests<2.22;python_version=="3.4"
8-
requests<3.0;python_version!="3.4"
2+
pyopenssl>=17.2.0
3+
service-identity>=18.1.0
4+
requests<3.0

.evergreen/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ createvirtualenv () {
2626
# Upgrade to the latest versions of pip setuptools wheel so that
2727
# pip can always download the latest cryptography+cffi wheels.
2828
PYTHON_VERSION=$(python -c 'import sys;print("%s.%s" % sys.version_info[:2])')
29-
if [[ $PYTHON_VERSION == "2.7" || $PYTHON_VERSION == "3.4" || $PYTHON_VERSION == "3.5" ]]; then
29+
if [[ $PYTHON_VERSION == "2.7" || $PYTHON_VERSION == "3.5" ]]; then
3030
# Use get-pip for EOL Python versions.
3131
curl --retry 3 -L https://bootstrap.pypa.io/pip/$PYTHON_VERSION/get-pip.py | python
3232
else

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ is incompatible with PyMongo.
8989
Dependencies
9090
============
9191

92-
PyMongo supports CPython 2.7, 3.4+, PyPy, and PyPy3.5+.
92+
PyMongo supports CPython 2.7, 3.5+, PyPy, and PyPy3.5+.
9393

94-
**WARNING** Support for Python 2.7, 3.4 and 3.5 is deprecated. Those Python
94+
**WARNING** Support for Python 2.7 and 3.5 is deprecated. Those Python
9595
versions will not be supported by PyMongo 4.
9696

9797
Optional dependencies:

doc/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ they are returned to the pool.
130130
Does PyMongo support Python 3?
131131
------------------------------
132132

133-
PyMongo supports CPython 3.4+ and PyPy3.5+. See the :doc:`python3` for details.
133+
PyMongo supports CPython 3.5+ and PyPy3.5+. See the :doc:`python3` for details.
134134

135135
Does PyMongo support asynchronous frameworks like Gevent, asyncio, Tornado, or Twisted?
136136
---------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)