Skip to content

Commit 4716752

Browse files
committed
Drop Python 3.5 support
Also drop linting environment, as we are using pre-commit.ci now.
1 parent 3425616 commit 4716752

File tree

5 files changed

+16
-29
lines changed

5 files changed

+16
-29
lines changed

.github/workflows/main.yml

+2-22
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
python: ["3.5", "3.6", "3.7", "3.8", "3.9"]
13+
python: ["3.6", "3.7", "3.8", "3.9"]
1414
os: [ubuntu-latest, windows-latest]
1515
include:
16-
- python: "3.5"
17-
tox_env: "py35"
1816
- python: "3.6"
1917
tox_env: "py36"
2018
- python: "3.7"
@@ -38,31 +36,13 @@ jobs:
3836
run: |
3937
tox -e ${{ matrix.tox_env }}
4038
41-
linting:
42-
43-
runs-on: ubuntu-latest
44-
45-
steps:
46-
- uses: actions/checkout@v1
47-
- name: Set up Python
48-
uses: actions/setup-python@v1
49-
with:
50-
python-version: "3.7"
51-
- name: Install tox
52-
run: |
53-
python -m pip install --upgrade pip
54-
pip install tox
55-
- name: Linting
56-
run: |
57-
tox -e linting
58-
5939
deploy:
6040

6141
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
6242

6343
runs-on: ubuntu-latest
6444

65-
needs: [build, linting]
45+
needs: build
6646

6747
steps:
6848
- uses: actions/checkout@v1

CHANGELOG.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
3.5.2 (UNRELEASED)
1+
3.6.0 (2021-04-24)
22
------------------
33

4+
* pytest-mock no longer supports Python 3.5.
5+
46
* Correct type annotations for ``mocker.patch.object`` to also include the string form.
57
Thanks `@plannigan`_ for the PR (`#235`_).
68

9+
* ``reset_all`` now supports ``return_value`` and ``side_effect`` keyword arguments. Thanks `@alex-marty`_ for the PR (`#214`_).
10+
11+
.. _@alex-marty: https://github.com/alex-marty
712
.. _@plannigan: https://github.com/plannigan
13+
.. _#214: https://github.com/pytest-dev/pytest-mock/pull/214
814
.. _#235: https://github.com/pytest-dev/pytest-mock/pull/235
915

1016
3.5.1 (2021-01-10)

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
package_data={
1313
"pytest_mock": ["py.typed"],
1414
},
15-
python_requires=">=3.5",
15+
python_requires=">=3.6",
1616
install_requires=["pytest>=5.0"],
1717
use_scm_version={"write_to": "src/pytest_mock/_version.py"},
1818
setup_requires=["setuptools_scm"],
@@ -31,7 +31,6 @@
3131
"License :: OSI Approved :: MIT License",
3232
"Operating System :: OS Independent",
3333
"Programming Language :: Python :: 3",
34-
"Programming Language :: Python :: 3.5",
3534
"Programming Language :: Python :: 3.6",
3635
"Programming Language :: Python :: 3.7",
3736
"Programming Language :: Python :: 3.8",

src/pytest_mock/plugin.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ def __init__(self, config: Any) -> None:
6060
if hasattr(mock_module, "seal"):
6161
self.seal = mock_module.seal
6262

63-
def resetall(self, *, return_value: bool = False, side_effect: bool = False) -> None:
63+
def resetall(
64+
self, *, return_value: bool = False, side_effect: bool = False
65+
) -> None:
6466
"""
6567
Call reset_mock() on all patchers started by this fixture.
66-
68+
6769
:param bool return_value: Reset the return_value of mocks.
6870
:param bool side_effect: Reset the side_effect of mocks.
6971
"""

tests/test_pytest_mock.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ def test_mocker_resetall(mocker: MockerFixture) -> None:
191191
assert not open.called
192192
assert listdir.return_value == "foo"
193193
assert list(open.side_effect) == ["baz"]
194-
194+
195195
mocker.resetall(return_value=True, side_effect=True)
196-
196+
197197
assert isinstance(listdir.return_value, mocker.Mock)
198198
assert open.side_effect is None
199199

0 commit comments

Comments
 (0)