Drop support for EOL Python 3.5
This commit is contained in:
parent
f61d4ed9d5
commit
a642650e17
|
@ -89,7 +89,7 @@ Features
|
|||
- Can run `unittest <https://docs.pytest.org/en/stable/unittest.html>`_ (or trial),
|
||||
`nose <https://docs.pytest.org/en/stable/nose.html>`_ test suites out of the box
|
||||
|
||||
- Python 3.5+ and PyPy3
|
||||
- Python 3.6+ and PyPy3
|
||||
|
||||
- Rich plugin architecture, with over 850+ `external plugins <http://plugincompat.herokuapp.com>`_ and thriving community
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Installation and Getting Started
|
||||
===================================
|
||||
|
||||
**Pythons**: Python 3.5, 3.6, 3.7, 3.8, 3.9, PyPy3
|
||||
**Pythons**: Python 3.6, 3.7, 3.8, 3.9, PyPy3
|
||||
|
||||
**Platforms**: Linux and Windows
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ Features
|
|||
|
||||
- Can run :ref:`unittest <unittest>` (including trial) and :ref:`nose <noseintegration>` test suites out of the box
|
||||
|
||||
- Python 3.5+ and PyPy 3
|
||||
- Python 3.6+ and PyPy 3
|
||||
|
||||
- Rich plugin architecture, with over 315+ `external plugins <http://plugincompat.herokuapp.com>`_ and thriving community
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ filterwarnings = [
|
|||
"ignore:.*U.*mode is deprecated:DeprecationWarning:(?!(pytest|_pytest))",
|
||||
# produced by pytest-xdist
|
||||
"ignore:.*type argument to addoption.*:DeprecationWarning",
|
||||
# produced by python >=3.5 on execnet (pytest-xdist)
|
||||
# produced on execnet (pytest-xdist)
|
||||
"ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning",
|
||||
# pytest's own futurewarnings
|
||||
"ignore::pytest.PytestExperimentalApiWarning",
|
||||
|
|
|
@ -99,7 +99,7 @@ class AssertionRewritingHook(importlib.abc.MetaPathFinder, importlib.abc.Loader)
|
|||
spec is None
|
||||
# this is a namespace package (without `__init__.py`)
|
||||
# there's nothing to rewrite there
|
||||
# python3.5 - python3.6: `namespace`
|
||||
# python3.6: `namespace`
|
||||
# python3.7+: `None`
|
||||
or spec.origin == "namespace"
|
||||
or spec.origin is None
|
||||
|
@ -1005,7 +1005,7 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
return res, outer_expl
|
||||
|
||||
def visit_Starred(self, starred: ast.Starred) -> Tuple[ast.Starred, str]:
|
||||
# From Python 3.5, a Starred node can appear in a function call.
|
||||
# A Starred node can appear in a function call.
|
||||
res, expl = self.visit(starred.value)
|
||||
new_starred = ast.Starred(res, starred.ctx)
|
||||
return new_starred, "*" + expl
|
||||
|
|
|
@ -497,9 +497,7 @@ class FDCapture(FDCaptureBinary):
|
|||
class CaptureResult(Generic[AnyStr]):
|
||||
"""The result of :method:`CaptureFixture.readouterr`."""
|
||||
|
||||
# Can't use slots in Python<3.5.3 due to https://bugs.python.org/issue31272
|
||||
if sys.version_info >= (3, 5, 3):
|
||||
__slots__ = ("out", "err")
|
||||
__slots__ = ("out", "err")
|
||||
|
||||
def __init__(self, out: AnyStr, err: AnyStr) -> None:
|
||||
self.out: AnyStr = out
|
||||
|
|
|
@ -443,7 +443,7 @@ def approx(expected, rel=None, abs=None, nan_ok: bool = False) -> ApproxBase:
|
|||
both ``a`` and ``b``, this test is symmetric (i.e. neither ``a`` nor
|
||||
``b`` is a "reference value"). You have to specify an absolute tolerance
|
||||
if you want to compare to ``0.0`` because there is no tolerance by
|
||||
default. Only available in python>=3.5. `More information...`__
|
||||
default. `More information...`__
|
||||
|
||||
__ https://docs.python.org/3/library/math.html#math.isclose
|
||||
|
||||
|
|
|
@ -162,11 +162,6 @@ class TestRaises:
|
|||
|
||||
class T:
|
||||
def __call__(self):
|
||||
# Early versions of Python 3.5 have some bug causing the
|
||||
# __call__ frame to still refer to t even after everything
|
||||
# is done. This makes the test pass for them.
|
||||
if sys.version_info < (3, 5, 2):
|
||||
del self
|
||||
raise ValueError
|
||||
|
||||
t = T()
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Sequence
|
||||
from typing import Union
|
||||
|
@ -346,44 +345,18 @@ class TestReportSerialization:
|
|||
from subprocess to main process creates an artificial exception, which ExceptionInfo
|
||||
can't obtain the ReprFileLocation from.
|
||||
"""
|
||||
# somehow in Python 3.5 on Windows this test fails with:
|
||||
# File "c:\...\3.5.4\x64\Lib\multiprocessing\connection.py", line 302, in _recv_bytes
|
||||
# overlapped=True)
|
||||
# OSError: [WinError 6] The handle is invalid
|
||||
#
|
||||
# so in this platform we opted to use a mock traceback which is identical to the
|
||||
# one produced by the multiprocessing module
|
||||
if sys.version_info[:2] <= (3, 5) and sys.platform.startswith("win"):
|
||||
testdir.makepyfile(
|
||||
"""
|
||||
# equivalent of multiprocessing.pool.RemoteTraceback
|
||||
class RemoteTraceback(Exception):
|
||||
def __init__(self, tb):
|
||||
self.tb = tb
|
||||
def __str__(self):
|
||||
return self.tb
|
||||
def test_a():
|
||||
try:
|
||||
raise ValueError('value error')
|
||||
except ValueError as e:
|
||||
# equivalent to how multiprocessing.pool.rebuild_exc does it
|
||||
e.__cause__ = RemoteTraceback('runtime error')
|
||||
raise e
|
||||
testdir.makepyfile(
|
||||
"""
|
||||
)
|
||||
else:
|
||||
testdir.makepyfile(
|
||||
"""
|
||||
from concurrent.futures import ProcessPoolExecutor
|
||||
from concurrent.futures import ProcessPoolExecutor
|
||||
|
||||
def func():
|
||||
raise ValueError('value error')
|
||||
def func():
|
||||
raise ValueError('value error')
|
||||
|
||||
def test_a():
|
||||
with ProcessPoolExecutor() as p:
|
||||
p.submit(func).result()
|
||||
"""
|
||||
)
|
||||
def test_a():
|
||||
with ProcessPoolExecutor() as p:
|
||||
p.submit(func).result()
|
||||
"""
|
||||
)
|
||||
|
||||
testdir.syspathinsert()
|
||||
reprec = testdir.inline_run()
|
||||
|
|
Loading…
Reference in New Issue