Skip to content

Commit cc464f6

Browse files
authored
Merge master into features (#5248)
Merge master into features
2 parents 465b2d9 + 6a43c8c commit cc464f6

34 files changed

+262
-65
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ repos:
4545
- id: rst
4646
name: rst
4747
entry: rst-lint --encoding utf-8
48-
files: ^(CHANGELOG.rst|HOWTORELEASE.rst|README.rst|changelog/.*)$
48+
files: ^(CHANGELOG.rst|HOWTORELEASE.rst|README.rst|TIDELIFT.rst|changelog/.*)$
4949
language: python
5050
additional_dependencies: [pygments, restructuredtext_lint]
5151
- id: changelogs-rst

CHANGELOG.rst

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,139 @@ with advance notice in the **Deprecations** section of releases.
1818
1919
.. towncrier release notes start
2020
21+
pytest 4.5.0 (2019-05-11)
22+
=========================
23+
24+
Features
25+
--------
26+
27+
- `#4826 <https://github.com/pytest-dev/pytest/issues/4826>`_: A warning is now emitted when unknown marks are used as a decorator.
28+
This is often due to a typo, which can lead to silently broken tests.
29+
30+
31+
- `#4907 <https://github.com/pytest-dev/pytest/issues/4907>`_: Show XFail reason as part of JUnitXML message field.
32+
33+
34+
- `#5013 <https://github.com/pytest-dev/pytest/issues/5013>`_: Messages from crash reports are displayed within test summaries now, truncated to the terminal width.
35+
36+
37+
- `#5023 <https://github.com/pytest-dev/pytest/issues/5023>`_: New flag ``--strict-markers`` that triggers an error when unknown markers (e.g. those not registered using the `markers option`_ in the configuration file) are used in the test suite.
38+
39+
The existing ``--strict`` option has the same behavior currently, but can be augmented in the future for additional checks.
40+
41+
.. _`markers option`: https://docs.pytest.org/en/latest/reference.html#confval-markers
42+
43+
44+
- `#5026 <https://github.com/pytest-dev/pytest/issues/5026>`_: Assertion failure messages for sequences and dicts contain the number of different items now.
45+
46+
47+
- `#5034 <https://github.com/pytest-dev/pytest/issues/5034>`_: Improve reporting with ``--lf`` and ``--ff`` (run-last-failure).
48+
49+
50+
- `#5035 <https://github.com/pytest-dev/pytest/issues/5035>`_: The ``--cache-show`` option/action accepts an optional glob to show only matching cache entries.
51+
52+
53+
- `#5059 <https://github.com/pytest-dev/pytest/issues/5059>`_: Standard input (stdin) can be given to pytester's ``Testdir.run()`` and ``Testdir.popen()``.
54+
55+
56+
- `#5068 <https://github.com/pytest-dev/pytest/issues/5068>`_: The ``-r`` option learnt about ``A`` to display all reports (including passed ones) in the short test summary.
57+
58+
59+
- `#5108 <https://github.com/pytest-dev/pytest/issues/5108>`_: The short test summary is displayed after passes with output (``-rP``).
60+
61+
62+
- `#5172 <https://github.com/pytest-dev/pytest/issues/5172>`_: The ``--last-failed`` (``--lf``) option got smarter and will now skip entire files if all tests
63+
of that test file have passed in previous runs, greatly speeding up collection.
64+
65+
66+
- `#5177 <https://github.com/pytest-dev/pytest/issues/5177>`_: Introduce new specific warning ``PytestWarning`` subclasses to make it easier to filter warnings based on the class, rather than on the message. The new subclasses are:
67+
68+
69+
* ``PytestAssertRewriteWarning``
70+
71+
* ``PytestCacheWarning``
72+
73+
* ``PytestCollectionWarning``
74+
75+
* ``PytestConfigWarning``
76+
77+
* ``PytestUnhandledCoroutineWarning``
78+
79+
* ``PytestUnknownMarkWarning``
80+
81+
82+
- `#5202 <https://github.com/pytest-dev/pytest/issues/5202>`_: New ``record_testsuite_property`` session-scoped fixture allows users to log ``<property>`` tags at the ``testsuite``
83+
level with the ``junitxml`` plugin.
84+
85+
The generated XML is compatible with the latest xunit standard, contrary to
86+
the properties recorded by ``record_property`` and ``record_xml_attribute``.
87+
88+
89+
- `#5214 <https://github.com/pytest-dev/pytest/issues/5214>`_: The default logging format has been changed to improve readability. Here is an
90+
example of a previous logging message::
91+
92+
test_log_cli_enabled_disabled.py 3 CRITICAL critical message logged by test
93+
94+
This has now become::
95+
96+
CRITICAL root:test_log_cli_enabled_disabled.py:3 critical message logged by test
97+
98+
The formatting can be changed through the `log_format <https://docs.pytest.org/en/latest/reference.html#confval-log_format>`__ configuration option.
99+
100+
101+
- `#5220 <https://github.com/pytest-dev/pytest/issues/5220>`_: ``--fixtures`` now also shows fixture scope for scopes other than ``"function"``.
102+
103+
104+
105+
Bug Fixes
106+
---------
107+
108+
- `#5113 <https://github.com/pytest-dev/pytest/issues/5113>`_: Deselected items from plugins using ``pytest_collect_modifyitems`` as a hookwrapper are correctly reported now.
109+
110+
111+
- `#5144 <https://github.com/pytest-dev/pytest/issues/5144>`_: With usage errors ``exitstatus`` is set to ``EXIT_USAGEERROR`` in the ``pytest_sessionfinish`` hook now as expected.
112+
113+
114+
- `#5235 <https://github.com/pytest-dev/pytest/issues/5235>`_: ``outcome.exit`` is not used with ``EOF`` in the pdb wrapper anymore, but only with ``quit``.
115+
116+
117+
118+
Improved Documentation
119+
----------------------
120+
121+
- `#4935 <https://github.com/pytest-dev/pytest/issues/4935>`_: Expand docs on registering marks and the effect of ``--strict``.
122+
123+
124+
125+
Trivial/Internal Changes
126+
------------------------
127+
128+
- `#4942 <https://github.com/pytest-dev/pytest/issues/4942>`_: ``logging.raiseExceptions`` is not set to ``False`` anymore.
129+
130+
131+
- `#5013 <https://github.com/pytest-dev/pytest/issues/5013>`_: pytest now depends on `wcwidth <https://pypi.org/project/wcwidth>`__ to properly track unicode character sizes for more precise terminal output.
132+
133+
134+
- `#5059 <https://github.com/pytest-dev/pytest/issues/5059>`_: pytester's ``Testdir.popen()`` uses ``stdout`` and ``stderr`` via keyword arguments with defaults now (``subprocess.PIPE``).
135+
136+
137+
- `#5069 <https://github.com/pytest-dev/pytest/issues/5069>`_: The code for the short test summary in the terminal was moved to the terminal plugin.
138+
139+
140+
- `#5082 <https://github.com/pytest-dev/pytest/issues/5082>`_: Improved validation of kwargs for various methods in the pytester plugin.
141+
142+
143+
- `#5202 <https://github.com/pytest-dev/pytest/issues/5202>`_: ``record_property`` now emits a ``PytestWarning`` when used with ``junit_family=xunit2``: the fixture generates
144+
``property`` tags as children of ``testcase``, which is not permitted according to the most
145+
`recent schema <https://github.com/jenkinsci/xunit-plugin/blob/master/
146+
src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd>`__.
147+
148+
149+
- `#5239 <https://github.com/pytest-dev/pytest/issues/5239>`_: Pin ``pluggy`` to ``< 1.0`` so we don't update to ``1.0`` automatically when
150+
it gets released: there are planned breaking changes, and we want to ensure
151+
pytest properly supports ``pluggy 1.0``.
152+
153+
21154
pytest 4.4.2 (2019-05-08)
22155
=========================
23156

README.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,26 @@ Changelog
108108
Consult the `Changelog <https://docs.pytest.org/en/latest/changelog.html>`__ page for fixes and enhancements of each version.
109109

110110

111+
Support pytest
112+
--------------
113+
114+
You can support pytest by obtaining a `Tideflift subscription`_.
115+
116+
Tidelift gives software development teams a single source for purchasing and maintaining their software,
117+
with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.
118+
119+
120+
.. _`Tideflift subscription`: https://tidelift.com/subscription/pkg/pypi-pytest?utm_source=pypi-pytest&utm_medium=referral&utm_campaign=readme
121+
122+
123+
Security
124+
^^^^^^^^
125+
126+
pytest has never been associated with a security vunerability, but in any case, to report a
127+
security vulnerability please use the `Tidelift security contact <https://tidelift.com/security>`_.
128+
Tidelift will coordinate the fix and disclosure.
129+
130+
111131
License
112132
-------
113133

TIDELIFT.rst

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
========
2+
Tidelift
3+
========
4+
5+
pytest is a member of `Tidelift`_. This document describes how the core team manages
6+
Tidelift-related activities.
7+
8+
What is it
9+
==========
10+
11+
Tidelift aims to make Open Source sustainable by offering subscriptions to companies which rely
12+
on Open Source packages. This subscription allows it to pay maintainers of those Open Source
13+
packages to aid sustainability of the work.
14+
15+
Funds
16+
=====
17+
18+
It was decided in the `mailing list`_ that the Tidelift contribution will be split evenly between
19+
members of the `contributors team`_ interested in receiving funding.
20+
21+
The current list of contributors receiving funding are:
22+
23+
* `@asottile`_
24+
* `@blueyed`_
25+
* `@nicoddemus`_
26+
27+
Contributors interested in receiving a part of the funds just need to submit a PR adding their
28+
name to the list. Contributors that want to stop receiving the funds should also submit a PR
29+
in the same way.
30+
31+
The PR should mention `@pytest-dev/tidelift-admins`_ so appropriate changes
32+
can be made in the Tidelift platform.
33+
34+
After the PR has been accepted and merged, the contributor should register in the `Tidelift`_
35+
platform and follow the instructions there, including signing an `agreement`_.
36+
37+
Admins
38+
======
39+
40+
A few people have admin access to the Tidelift dashboard to make changes. Those people
41+
are part of the `@pytest-dev/tidelift-admins`_ team.
42+
43+
`Core contributors`_ interested in helping out with Tidelift maintenance are welcome! We don't
44+
expect much work here other than the occasional adding/removal of a contributor from receiving
45+
funds. Just drop a line to one of the `@pytest-dev/tidelift-admins`_ or use the mailing list.
46+
47+
48+
.. _`Tidelift`: https://tidelift.com
49+
.. _`mailing list`: https://mail.python.org/pipermail/pytest-dev/2019-May/004716.html
50+
.. _`contributors team`: https://github.com/orgs/pytest-dev/teams/contributors
51+
.. _`core contributors`: https://github.com/orgs/pytest-dev/teams/core/members
52+
.. _`@pytest-dev/tidelift-admins`: https://github.com/orgs/pytest-dev/teams/tidelift-admins/members
53+
.. _`agreement`: https://tidelift.com/docs/lifting/agreement
54+
55+
.. _`@asottile`: https://github.com/asottile
56+
.. _`@blueyed`: https://github.com/blueyed
57+
.. _`@nicoddemus`: https://github.com/nicoddemus

changelog/4826.feature.rst

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

changelog/4907.feature.rst

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

changelog/4935.doc.rst

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

changelog/4942.trivial.rst

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

changelog/5013.feature.rst

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

changelog/5013.trivial.rst

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

0 commit comments

Comments
 (0)