Skip to content

Commit 1b97edd

Browse files
authored
PYTHON-2262 Test Python 3.9 in Evergreen (#485)
1 parent c549740 commit 1b97edd

File tree

4 files changed

+45
-9
lines changed

4 files changed

+45
-9
lines changed

.evergreen/config.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,10 @@ axes:
17671767
display_name: "Python 3.8"
17681768
variables:
17691769
PYTHON_BINARY: "/opt/python/3.8/bin/python3"
1770+
- id: "3.9"
1771+
display_name: "Python 3.9"
1772+
variables:
1773+
PYTHON_BINARY: "/opt/python/3.9/bin/python3"
17701774
- id: "pypy"
17711775
display_name: "PyPy"
17721776
variables:
@@ -1821,6 +1825,10 @@ axes:
18211825
display_name: "Python 3.8"
18221826
variables:
18231827
PYTHON_BINARY: "C:/python/Python38/python.exe"
1828+
- id: "3.9"
1829+
display_name: "Python 3.9"
1830+
variables:
1831+
PYTHON_BINARY: "C:/python/Python39/python.exe"
18241832

18251833
- id: python-version-windows-32
18261834
display_name: "Python"
@@ -1849,6 +1857,10 @@ axes:
18491857
display_name: "32-bit Python 3.8"
18501858
variables:
18511859
PYTHON_BINARY: "C:/python/32/Python38/python.exe"
1860+
- id: "3.9"
1861+
display_name: "32-bit Python 3.9"
1862+
variables:
1863+
PYTHON_BINARY: "C:/python/32/Python39/python.exe"
18521864

18531865
# Choice of mod_wsgi version
18541866
- id: mod-wsgi-version
@@ -2142,14 +2154,14 @@ buildvariants:
21422154
- matrix_name: "tests-pyopenssl"
21432155
matrix_spec:
21442156
platform: ubuntu-16.04
2145-
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "pypy", "pypy3.5"]
2157+
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3.5"]
21462158
auth: "*"
21472159
ssl: "ssl"
21482160
pyopenssl: "*"
21492161
# Only test "noauth" with Python 3.7.
21502162
exclude_spec:
21512163
platform: ubuntu-16.04
2152-
python-version: ["2.7", "3.4", "3.5", "3.6", "pypy", "pypy3.5"]
2164+
python-version: ["2.7", "3.4", "3.5", "3.6", "3.8", "3.9", "pypy", "pypy3.5"]
21532165
auth: "noauth"
21542166
ssl: "ssl"
21552167
pyopenssl: "*"
@@ -2225,7 +2237,7 @@ buildvariants:
22252237
- matrix_name: "tests-python-version-ubuntu1604-without-c-extensions"
22262238
matrix_spec:
22272239
platform: ubuntu-16.04
2228-
python-version: &openssl-102-plus-pythons ["3.7", "3.8"]
2240+
python-version: &openssl-102-plus-pythons ["3.7", "3.8", "3.9"]
22292241
c-extensions: without-c-extensions
22302242
auth-ssl: noauth-nossl
22312243
display_name: "${c-extensions} ${python-version} ${platform} ${auth} ${ssl} ${coverage}"
@@ -2242,7 +2254,7 @@ buildvariants:
22422254
matrix_spec:
22432255
# Ubuntu 16.04 images have libsnappy-dev installed, and provides OpenSSL 1.0.2 for testing Python 3.7
22442256
platform: ubuntu-16.04
2245-
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "pypy", "pypy3.5", "pypy3.6", "jython2.7"]
2257+
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3.5", "pypy3.6", "jython2.7"]
22462258
c-extensions: "*"
22472259
compression: "*"
22482260
exclude_spec:
@@ -2256,9 +2268,9 @@ buildvariants:
22562268
python-version: ["jython2.7"]
22572269
c-extensions: "*"
22582270
compression: ["snappy", "zstd"]
2259-
# Some tests fail with CPython 3.8 and python-snappy
2271+
# PYTHON-2365 Some tests fail with CPython 3.8+ and python-snappy
22602272
- platform: ubuntu-16.04
2261-
python-version: ["3.8"]
2273+
python-version: ["3.8", "3.9"]
22622274
c-extensions: "*"
22632275
compression: ["snappy"]
22642276
display_name: "${compression} ${c-extensions} ${python-version} ${platform}"
@@ -2311,7 +2323,7 @@ buildvariants:
23112323
- matrix_name: "tests-python-version-requires-openssl-102-plus-test-ssl"
23122324
matrix_spec:
23132325
platform: ubuntu-16.04
2314-
python-version: &openssl-102-plus-pythons ["3.7", "3.8"]
2326+
python-version: *openssl-102-plus-pythons
23152327
auth-ssl: "*"
23162328
display_name: "${python-version} OpenSSL 1.0.2 ${platform} ${auth-ssl}"
23172329
tasks:
@@ -2347,6 +2359,12 @@ buildvariants:
23472359
python-version-windows: "*"
23482360
auth-ssl: "*"
23492361
encryption: "*"
2362+
exclude_spec:
2363+
# PYTHON-2366 Skip 3.9 due to cryptography install failures
2364+
- platform: "*"
2365+
python-version-windows: ["3.9"]
2366+
auth-ssl: "*"
2367+
encryption: "*"
23502368
display_name: "Encryption ${platform} ${python-version-windows} ${auth-ssl}"
23512369
tasks: *encryption-server-versions
23522370

@@ -2509,7 +2527,7 @@ buildvariants:
25092527
- matrix_name: "ocsp-test"
25102528
matrix_spec:
25112529
platform: ubuntu-16.04
2512-
python-version: ["2.7", "3.4", "3.8", "pypy", "pypy3.5"]
2530+
python-version: ["2.7", "3.4", "3.8", "3.9", "pypy", "pypy3.5"]
25132531
mongodb-version: ["4.4", "latest"]
25142532
auth: "noauth"
25152533
ssl: "ssl"

doc/changelog.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
Changelog
22
=========
33

4+
Changes in Version 3.12.0
5+
-------------------------
6+
7+
Version 3.12 adds support for Python 3.9 and includes a number of bug fixes.
8+
Highlights include:
9+
10+
- Support for Python 3.9.
11+
- New method :class:`bson.json_util.JSONOptions.with_options`.
12+
13+
Issues Resolved
14+
...............
15+
16+
See the `PyMongo 3.12.0 release notes in JIRA`_ for the list of resolved issues
17+
in this release.
18+
19+
.. _PyMongo 3.12.0 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=29594
20+
421
Changes in Version 3.11.0
522
-------------------------
623

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ def build_extension(self, ext):
420420
"Programming Language :: Python :: 3.6",
421421
"Programming Language :: Python :: 3.7",
422422
"Programming Language :: Python :: 3.8",
423+
"Programming Language :: Python :: 3.9",
423424
"Programming Language :: Python :: Implementation :: CPython",
424425
"Programming Language :: Python :: Implementation :: PyPy",
425426
"Topic :: Database"],

test/test_custom_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def fallback_encoder(value):
255255

256256
class TestBSONTypeEnDeCodecs(unittest.TestCase):
257257
def test_instantiation(self):
258-
msg = "Can't instantiate abstract class .* with abstract methods .*"
258+
msg = "Can't instantiate abstract class"
259259
def run_test(base, attrs, fail):
260260
codec = type('testcodec', (base,), attrs)
261261
if fail:

0 commit comments

Comments
 (0)