Drop support for EOL Python 3.5
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user