Skip to content

Commit 7931b5b

Browse files
authored
Merge pull request #4171 from RonnyPfannschmidt/release-3.9.1
Release 3.9.1
2 parents 2c00f8a + c5bbf8a commit 7931b5b

38 files changed

+272
-74
lines changed

CHANGELOG.rst

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,163 @@ with advance notice in the **Deprecations** section of releases.
1818
1919
.. towncrier release notes start
2020
21+
pytest 3.9.1 (2018-10-16)
22+
=========================
23+
24+
Features
25+
--------
26+
27+
- `#4159 <https://github.com/pytest-dev/pytest/issues/4159>`_: For test-suites containing test classes, the information about the subclassed
28+
module is now output only if a higher verbosity level is specified (at least
29+
"-vv").
30+
31+
32+
pytest 3.9.0 (2018-10-15 - not published due to a release automation bug)
33+
=========================================================================
34+
35+
Deprecations
36+
------------
37+
38+
- `#3616 <https://github.com/pytest-dev/pytest/issues/3616>`_: The following accesses have been documented as deprecated for years, but are now actually emitting deprecation warnings.
39+
40+
* Access of ``Module``, ``Function``, ``Class``, ``Instance``, ``File`` and ``Item`` through ``Node`` instances. Now
41+
users will this warning::
42+
43+
usage of Function.Module is deprecated, please use pytest.Module instead
44+
45+
Users should just ``import pytest`` and access those objects using the ``pytest`` module.
46+
47+
* ``request.cached_setup``, this was the precursor of the setup/teardown mechanism available to fixtures. You can
48+
consult `funcarg comparision section in the docs <https://docs.pytest.org/en/latest/funcarg_compare.html>`_.
49+
50+
* Using objects named ``"Class"`` as a way to customize the type of nodes that are collected in ``Collector``
51+
subclasses has been deprecated. Users instead should use ``pytest_collect_make_item`` to customize node types during
52+
collection.
53+
54+
This issue should affect only advanced plugins who create new collection types, so if you see this warning
55+
message please contact the authors so they can change the code.
56+
57+
* The warning that produces the message below has changed to ``RemovedInPytest4Warning``::
58+
59+
getfuncargvalue is deprecated, use getfixturevalue
60+
61+
62+
- `#3988 <https://github.com/pytest-dev/pytest/issues/3988>`_: Add a Deprecation warning for pytest.ensuretemp as it was deprecated since a while.
63+
64+
65+
66+
Features
67+
--------
68+
69+
- `#2293 <https://github.com/pytest-dev/pytest/issues/2293>`_: Improve usage errors messages by hiding internal details which can be distracting and noisy.
70+
71+
This has the side effect that some error conditions that previously raised generic errors (such as
72+
``ValueError`` for unregistered marks) are now raising ``Failed`` exceptions.
73+
74+
75+
- `#3332 <https://github.com/pytest-dev/pytest/issues/3332>`_: Improve the error displayed when a ``conftest.py`` file could not be imported.
76+
77+
In order to implement this, a new ``chain`` parameter was added to ``ExceptionInfo.getrepr``
78+
to show or hide chained tracebacks in Python 3 (defaults to ``True``).
79+
80+
81+
- `#3849 <https://github.com/pytest-dev/pytest/issues/3849>`_: Add ``empty_parameter_set_mark=fail_at_collect`` ini option for raising an exception when parametrize collects an empty set.
82+
83+
84+
- `#3964 <https://github.com/pytest-dev/pytest/issues/3964>`_: Log messages generated in the collection phase are shown when
85+
live-logging is enabled and/or when they are logged to a file.
86+
87+
88+
- `#3985 <https://github.com/pytest-dev/pytest/issues/3985>`_: Introduce ``tmp_path`` as a fixture providing a Path object.
89+
90+
91+
- `#4013 <https://github.com/pytest-dev/pytest/issues/4013>`_: Deprecation warnings are now shown even if you customize the warnings filters yourself. In the previous version
92+
any customization would override pytest's filters and deprecation warnings would fall back to being hidden by default.
93+
94+
95+
- `#4073 <https://github.com/pytest-dev/pytest/issues/4073>`_: Allow specification of timeout for ``Testdir.runpytest_subprocess()`` and ``Testdir.run()``.
96+
97+
98+
- `#4098 <https://github.com/pytest-dev/pytest/issues/4098>`_: Add returncode argument to pytest.exit() to exit pytest with a specific return code.
99+
100+
101+
- `#4102 <https://github.com/pytest-dev/pytest/issues/4102>`_: Reimplement ``pytest.deprecated_call`` using ``pytest.warns`` so it supports the ``match='...'`` keyword argument.
102+
103+
This has the side effect that ``pytest.deprecated_call`` now raises ``pytest.fail.Exception`` instead
104+
of ``AssertionError``.
105+
106+
107+
- `#4149 <https://github.com/pytest-dev/pytest/issues/4149>`_: Require setuptools>=30.3 and move most of the metadata to ``setup.cfg``.
108+
109+
110+
111+
Bug Fixes
112+
---------
113+
114+
- `#2535 <https://github.com/pytest-dev/pytest/issues/2535>`_: Improve error message when test functions of ``unittest.TestCase`` subclasses use a parametrized fixture.
115+
116+
117+
- `#3057 <https://github.com/pytest-dev/pytest/issues/3057>`_: ``request.fixturenames`` now correctly returns the name of fixtures created by ``request.getfixturevalue()``.
118+
119+
120+
- `#3946 <https://github.com/pytest-dev/pytest/issues/3946>`_: Warning filters passed as command line options using ``-W`` now take precedence over filters defined in ``ini``
121+
configuration files.
122+
123+
124+
- `#4066 <https://github.com/pytest-dev/pytest/issues/4066>`_: Fix source reindenting by using ``textwrap.dedent`` directly.
125+
126+
127+
- `#4102 <https://github.com/pytest-dev/pytest/issues/4102>`_: ``pytest.warn`` will capture previously-warned warnings in Python 2. Previously they were never raised.
128+
129+
130+
- `#4108 <https://github.com/pytest-dev/pytest/issues/4108>`_: Resolve symbolic links for args.
131+
132+
This fixes running ``pytest tests/test_foo.py::test_bar``, where ``tests``
133+
is a symlink to ``project/app/tests``:
134+
previously ``project/app/conftest.py`` would be ignored for fixtures then.
135+
136+
137+
- `#4132 <https://github.com/pytest-dev/pytest/issues/4132>`_: Fix duplicate printing of internal errors when using ``--pdb``.
138+
139+
140+
- `#4135 <https://github.com/pytest-dev/pytest/issues/4135>`_: pathlib based tmpdir cleanup now correctly handles symlinks in the folder.
141+
142+
143+
- `#4152 <https://github.com/pytest-dev/pytest/issues/4152>`_: Display the filename when encountering ``SyntaxWarning``.
144+
145+
146+
147+
Improved Documentation
148+
----------------------
149+
150+
- `#3713 <https://github.com/pytest-dev/pytest/issues/3713>`_: Update usefixtures documentation to clarify that it can't be used with fixture functions.
151+
152+
153+
- `#4058 <https://github.com/pytest-dev/pytest/issues/4058>`_: Update fixture documentation to specify that a fixture can be invoked twice in the scope it's defined for.
154+
155+
156+
- `#4064 <https://github.com/pytest-dev/pytest/issues/4064>`_: According to unittest.rst, setUpModule and tearDownModule were not implemented, but it turns out they are. So updated the documentation for unittest.
157+
158+
159+
- `#4151 <https://github.com/pytest-dev/pytest/issues/4151>`_: Add tempir testing example to CONTRIBUTING.rst guide
160+
161+
162+
163+
Trivial/Internal Changes
164+
------------------------
165+
166+
- `#2293 <https://github.com/pytest-dev/pytest/issues/2293>`_: The internal ``MarkerError`` exception has been removed.
167+
168+
169+
- `#3988 <https://github.com/pytest-dev/pytest/issues/3988>`_: Port the implementation of tmpdir to pathlib.
170+
171+
172+
- `#4063 <https://github.com/pytest-dev/pytest/issues/4063>`_: Exclude 0.00 second entries from ``--duration`` output unless ``-vv`` is passed on the command-line.
173+
174+
175+
- `#4093 <https://github.com/pytest-dev/pytest/issues/4093>`_: Fixed formatting of string literals in internal tests.
176+
177+
21178
pytest 3.8.2 (2018-10-02)
22179
=========================
23180

changelog/2293.feature.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

changelog/2293.trivial.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/2535.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/3057.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/3332.feature.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

changelog/3616.deprecation.rst

Lines changed: 0 additions & 22 deletions
This file was deleted.

changelog/3713.doc.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/3849.feature.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/3946.bugfix.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)