PYTHON-1536 - PyMongo no longer supports PyPy3 < 3.5

This commit is contained in:
Bernie Hackett 2018-07-02 20:33:11 -07:00 committed by Bernie Hackett
parent a24d3f6e23
commit cbc81ee793
15 changed files with 21 additions and 40 deletions

View File

@ -1044,10 +1044,6 @@ axes:
display_name: "PyPy"
variables:
PYTHON_BINARY: "/opt/python/pypy/bin/pypy"
- id: "pypy3"
display_name: "PyPy 3"
variables:
PYTHON_BINARY: "/opt/python/pypy3/bin/pypy3"
- id: "pypy3.5"
display_name: "PyPy 3.5"
variables:
@ -1245,7 +1241,7 @@ buildvariants:
matrix_spec: {"python-version": "*", "c-extensions": "without-c-extensions", auth: "noauth", ssl: "nossl", coverage: "*"}
exclude_spec:
# These interpreters are always tested without extensions.
- python-version: ["pypy", "pypy3", "pypy3.5", "jython2.7"]
- python-version: ["pypy", "pypy3.5", "jython2.7"]
c-extensions: "without-c-extensions"
auth: "*"
ssl: "*"
@ -1265,7 +1261,7 @@ buildvariants:
matrix_spec: {"python-version": "*", "c-extensions": "*", "compression": "*"}
exclude_spec:
# These interpreters are always tested without extensions.
- python-version: ["pypy", "pypy3", "pypy3.5", "jython2.7"]
- python-version: ["pypy", "pypy3.5", "jython2.7"]
c-extensions: "with-c-extensions"
compression: "*"
- python-version: ["jython2.7"]
@ -1296,7 +1292,7 @@ buildvariants:
matrix_spec: {"python-version": "*", "green-framework": "*", auth-ssl: "*"}
exclude_spec:
# Don't test green frameworks on these Python versions.
- python-version: ["pypy", "pypy3", "pypy3.5", "jython2.7"]
- python-version: ["pypy", "pypy3.5", "jython2.7"]
green-framework: "*"
auth-ssl: "*"
display_name: "${green-framework} ${python-version} RHEL 6.2 (x86_64) ${auth-ssl}"

View File

@ -6,17 +6,11 @@ set -o errexit
export JAVA_HOME=/opt/java/jdk8
IMPL=$(${PYTHON_BINARY} -c "import platform, sys; sys.stdout.write(platform.python_implementation())")
PYTHON_VERSION=$(${PYTHON_BINARY} -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
if [ $IMPL = "Jython" -o $IMPL = "PyPy" ]; then
$PYTHON_BINARY -m virtualenv --never-download --no-wheel atlastest
. atlastest/bin/activate
trap "deactivate; rm -rf atlastest" EXIT HUP
pip install certifi
if [ $PYTHON_VERSION = "3.2" ]; then
# Portable pypy3.2 can't load CA certs from the system.
# https://github.com/squeaky-pl/portable-pypy/issues/15
export SSL_CERT_FILE=$(python -c "import certifi; print(certifi.where())")
fi
PYTHON=python
else
PYTHON=$PYTHON_BINARY

View File

@ -6,7 +6,7 @@ python:
- 3.5
- 3.6
- pypy
- pypy3
- 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 2.7, 3.4+, PyPy, and PyPy3. Language
PyMongo supports CPython 2.7, 3.4+, PyPy, and PyPy3.5+. Language
features not supported by all interpreters can not be used.
Style Guide

View File

@ -88,7 +88,7 @@ is incompatible with PyMongo.
Dependencies
============
PyMongo supports CPython 2.7, 3.4+, PyPy, and PyPy3.
PyMongo supports CPython 2.7, 3.4+, PyPy, and PyPy3.5+.
Optional dependencies:

View File

@ -20,15 +20,10 @@ PY3 = sys.version_info[0] == 3
if PY3:
import codecs
import collections.abc as abc
import _thread as thread
from io import BytesIO as StringIO
try:
import collections.abc as abc
except ImportError:
# PyPy3 (based on CPython 3.2)
import collections as abc
MAXSIZE = sys.maxsize
imap = map

View File

@ -10,6 +10,9 @@ Changes in Version 3.8.0
2.7 or newer from `SCL
<https://wiki.centos.org/AdditionalResources/Repositories/SCL>`_
.. warning:: PyMongo no longer supports PyPy3 versions older than 3.5. Users
must upgrade to PyPy3.5+.
Issues Resolved
...............

View File

@ -28,10 +28,6 @@ When using CPython < 2.7.9 or PyPy < 2.5.1:
- On Windows, the `wincertstore`_ module is required.
- On all other platforms, the `certifi`_ module is required.
Python 3.x
``````````
On Windows, the `wincertstore`_ module is required when using PyPy3 < 3.5.
.. _ipaddress: https://pypi.python.org/pypi/ipaddress
.. _wincertstore: https://pypi.python.org/pypi/wincertstore
.. _certifi: https://pypi.python.org/pypi/certifi
@ -185,7 +181,7 @@ root certificates::
open "/Applications/Python <YOUR PYTHON VERSION>/Install Certificates.command"
Users of older PyPy and PyPy3 portable versions may have to `set an environment
Users of older PyPy portable versions may have to `set an environment
variable <https://github.com/squeaky-pl/portable-pypy/issues/15>`_ to tell
OpenSSL where to find root certificates. This is easily done using the `certifi
module <https://pypi.org/project/certifi/>`_ from pypi::

View File

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

View File

@ -45,7 +45,7 @@ To upgrade do::
Dependencies
------------
PyMongo supports CPython 2.7, 3.4+, PyPy, and PyPy3.
PyMongo supports CPython 2.7, 3.4+, PyPy, and PyPy3.5+.
Optional dependencies:

View File

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

View File

@ -272,12 +272,11 @@ def _raise_connection_failure(address, error, msg_prefix=None):
if isinstance(error, socket.timeout):
raise NetworkTimeout(msg)
elif isinstance(error, SSLError) and 'timed out' in str(error):
# CPython 2.7, PyPy 2.x, and PyPy3 do not distinguish network
# CPython 2.7 and PyPy 2.x do not distinguish network
# timeouts from other SSLErrors (https://bugs.python.org/issue10272).
# Luckily, we can work around this limitation because the phrase
# 'timed out' appears in all the timeout related SSLErrors raised
# on the above platforms. CPython >= 3.2 and PyPy3.3 correctly raise
# socket.timeout.
# on the above platforms.
raise NetworkTimeout(msg)
else:
raise AutoReconnect(msg)

View File

@ -48,7 +48,7 @@ _PY37PLUS = sys.version_info[:2] >= (3, 7)
if HAVE_SSL:
try:
# Python 2.7.9+, 3.2+, PyPy 2.5.1+, etc.
# Python 2.7.9+, PyPy 2.5.1+, etc.
from ssl import SSLContext
except ImportError:
from pymongo.ssl_context import SSLContext

View File

@ -328,11 +328,11 @@ else:
{'tls': [], 'srv': ["dnspython>=1.13.0,<2.0.0"]})
if sys.platform == 'win32':
extras_require['gssapi'] = ["winkerberos>=0.5.0"]
if vi[0] == 2 and vi < (2, 7, 9) or vi[0] == 3 and vi < (3, 4):
if vi < (2, 7, 9):
extras_require['tls'].append("wincertstore>=0.2")
else:
extras_require['gssapi'] = ["pykerberos"]
if vi[0] == 2 and vi < (2, 7, 9):
if vi < (2, 7, 9):
extras_require['tls'].append("certifi")
extra_opts = {

View File

@ -151,11 +151,9 @@ def create_test(case_spec):
_DEPRECATED_BSON_TYPES[bson_type])
continue
# PyPy3 and Jython can't handle NaN with a payload from
# Jython can't handle NaN with a payload from
# struct.(un)pack if endianness is specified in the format string.
if not ((('PyPy' in sys.version and
sys.version_info[:2] < (3, 3)) or
sys.platform.startswith("java")) and
if not (sys.platform.startswith("java") and
description == 'NaN with payload'):
# Test round-tripping canonical bson.
self.assertEqual(encode_bson(decoded_bson), cB)