Skip to content

PYTHON-2262 Test Python 3.9 in Evergreen #485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 14, 2020
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
34 changes: 26 additions & 8 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,10 @@ axes:
display_name: "Python 3.8"
variables:
PYTHON_BINARY: "/opt/python/3.8/bin/python3"
- id: "3.9"
display_name: "Python 3.9"
variables:
PYTHON_BINARY: "/opt/python/3.9/bin/python3"
- id: "pypy"
display_name: "PyPy"
variables:
Expand Down Expand Up @@ -1821,6 +1825,10 @@ axes:
display_name: "Python 3.8"
variables:
PYTHON_BINARY: "C:/python/Python38/python.exe"
- id: "3.9"
display_name: "Python 3.9"
variables:
PYTHON_BINARY: "C:/python/Python39/python.exe"

- id: python-version-windows-32
display_name: "Python"
Expand Down Expand Up @@ -1849,6 +1857,10 @@ axes:
display_name: "32-bit Python 3.8"
variables:
PYTHON_BINARY: "C:/python/32/Python38/python.exe"
- id: "3.9"
display_name: "32-bit Python 3.9"
variables:
PYTHON_BINARY: "C:/python/32/Python39/python.exe"

# Choice of mod_wsgi version
- id: mod-wsgi-version
Expand Down Expand Up @@ -2142,14 +2154,14 @@ buildvariants:
- matrix_name: "tests-pyopenssl"
matrix_spec:
platform: ubuntu-16.04
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "pypy", "pypy3.5"]
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3.5"]
auth: "*"
ssl: "ssl"
pyopenssl: "*"
# Only test "noauth" with Python 3.7.
exclude_spec:
platform: ubuntu-16.04
python-version: ["2.7", "3.4", "3.5", "3.6", "pypy", "pypy3.5"]
python-version: ["2.7", "3.4", "3.5", "3.6", "3.8", "3.9", "pypy", "pypy3.5"]
auth: "noauth"
ssl: "ssl"
pyopenssl: "*"
Expand Down Expand Up @@ -2225,7 +2237,7 @@ buildvariants:
- matrix_name: "tests-python-version-ubuntu1604-without-c-extensions"
matrix_spec:
platform: ubuntu-16.04
python-version: &openssl-102-plus-pythons ["3.7", "3.8"]
python-version: &openssl-102-plus-pythons ["3.7", "3.8", "3.9"]
c-extensions: without-c-extensions
auth-ssl: noauth-nossl
display_name: "${c-extensions} ${python-version} ${platform} ${auth} ${ssl} ${coverage}"
Expand All @@ -2242,7 +2254,7 @@ 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: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "pypy", "pypy3.5", "pypy3.6", "jython2.7"]
python-version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3.5", "pypy3.6", "jython2.7"]
c-extensions: "*"
compression: "*"
exclude_spec:
Expand All @@ -2256,9 +2268,9 @@ buildvariants:
python-version: ["jython2.7"]
c-extensions: "*"
compression: ["snappy", "zstd"]
# Some tests fail with CPython 3.8 and python-snappy
# PYTHON-2365 Some tests fail with CPython 3.8+ and python-snappy
- platform: ubuntu-16.04
python-version: ["3.8"]
python-version: ["3.8", "3.9"]
c-extensions: "*"
compression: ["snappy"]
display_name: "${compression} ${c-extensions} ${python-version} ${platform}"
Expand Down Expand Up @@ -2311,7 +2323,7 @@ buildvariants:
- matrix_name: "tests-python-version-requires-openssl-102-plus-test-ssl"
matrix_spec:
platform: ubuntu-16.04
python-version: &openssl-102-plus-pythons ["3.7", "3.8"]
python-version: *openssl-102-plus-pythons
auth-ssl: "*"
display_name: "${python-version} OpenSSL 1.0.2 ${platform} ${auth-ssl}"
tasks:
Expand Down Expand Up @@ -2347,6 +2359,12 @@ buildvariants:
python-version-windows: "*"
auth-ssl: "*"
encryption: "*"
exclude_spec:
# PYTHON-2366 Skip 3.9 due to cryptography install failures
- platform: "*"
python-version-windows: ["3.9"]
auth-ssl: "*"
encryption: "*"
display_name: "Encryption ${platform} ${python-version-windows} ${auth-ssl}"
tasks: *encryption-server-versions

Expand Down Expand Up @@ -2509,7 +2527,7 @@ buildvariants:
- matrix_name: "ocsp-test"
matrix_spec:
platform: ubuntu-16.04
python-version: ["2.7", "3.4", "3.8", "pypy", "pypy3.5"]
python-version: ["2.7", "3.4", "3.8", "3.9", "pypy", "pypy3.5"]
mongodb-version: ["4.4", "latest"]
auth: "noauth"
ssl: "ssl"
Expand Down
17 changes: 17 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
Changelog
=========

Changes in Version 3.12.0
-------------------------

Version 3.12 adds support for Python 3.9 and includes a number of bug fixes.
Highlights include:

- Support for Python 3.9.
- New method :class:`bson.json_util.JSONOptions.with_options`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!


Issues Resolved
...............

See the `PyMongo 3.12.0 release notes in JIRA`_ for the list of resolved issues
in this release.

.. _PyMongo 3.12.0 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=29594

Changes in Version 3.11.0
-------------------------

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ def build_extension(self, ext):
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Database"],
Expand Down
2 changes: 1 addition & 1 deletion test/test_custom_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def fallback_encoder(value):

class TestBSONTypeEnDeCodecs(unittest.TestCase):
def test_instantiation(self):
msg = "Can't instantiate abstract class .* with abstract methods .*"
msg = "Can't instantiate abstract class"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of outright removing the latter half of this regex, might it be acceptable to use the following instead?
Can't instantiate abstract class .* with abstract method.* .*

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't Can't instantiate abstract class enough to ensure the TypeError is from instantiation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

def run_test(base, attrs, fail):
codec = type('testcodec', (base,), attrs)
if fail:
Expand Down