test_ok2/changelog
Ran Benita 98891a5947 python: skip pytest_pycollect_makeitem work on certain names
When a Python object (module/class/instance) is collected, for each name
in `obj.__dict__` (and up its MRO) the pytest_pycollect_makeitem hook is
called for potentially creating a node for it.

These Python objects have a bunch of builtin attributes that are
extremely unlikely to be collected. But due to their pervasiveness,
dispatching the hook for them ends up being mildly expensive and also
pollutes PYTEST_DEBUG=1 output and such.

Let's just ignore these attributes.

On the pandas test suite commit 04e9e0afd476b1b8bed930e47bf60e,
collect only, irrelevant lines snipped, about 5% improvement:

Before:

```
         51195095 function calls (48844352 primitive calls) in 39.089 seconds

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
226602/54    0.145    0.000   38.940    0.721 manager.py:90(_hookexec)
    72227    0.285    0.000   20.146    0.000 python.py:424(_makeitem)
    72227    0.171    0.000   16.678    0.000 python.py:218(pytest_pycollect_makeitem)
```

After:

```
          48410921 function calls (46240870 primitive calls) in 36.950 seconds

    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
 181429/54    0.113    0.000   36.777    0.681 manager.py:90(_hookexec)
     27054    0.130    0.000   17.755    0.001 python.py:465(_makeitem)
     27054    0.121    0.000   16.219    0.001 python.py:218(pytest_pycollect_makeitem)
```
2020-08-26 17:43:57 +03:00
..
1477.doc.rst Remove faq.rst from docs (#7635) 2020-08-12 14:47:34 -03:00
5585.breaking.rst Remove resultlog plugin 2020-08-19 08:14:28 -03:00
6981.deprecation.rst Reintroduce warnings postponed in 6.0 (#7637) 2020-08-22 11:17:50 -03:00
7097.deprecation.rst Reintroduce warnings postponed in 6.0 (#7637) 2020-08-22 11:17:50 -03:00
7148.bugfix.rst capture: fix disabled()/global_and_fixture_disabled() enabling capturing when it was disabled 2020-08-16 23:21:45 +03:00
7210.deprecation.rst Reintroduce warnings postponed in 6.0 (#7637) 2020-08-22 11:17:50 -03:00
7255.deprecation.rst Reintroduce warnings postponed in 6.0 (#7637) 2020-08-22 11:17:50 -03:00
7536.trivial.rst junitxml: convert from py.xml to xml.etree.ElementTree 2020-07-29 10:52:21 +03:00
7587.trivial.rst Stop using more-itertools 2020-07-30 20:19:24 +03:00
7591.bugfix.rst Only define gethookproxy, isinitpath on Session 2020-08-15 13:40:16 +03:00
7628.bugfix.rst Fix Module.name from full path without drive letter 2020-08-15 09:39:14 -03:00
7631.trivial.rst Add changelog for PR #7631 2020-08-14 11:02:44 +03:00
7638.bugfix.rst get_dirs_from_args handles paths with invalid syntax 2020-08-12 17:20:09 -03:00
7648.deprecation.rst Only define gethookproxy, isinitpath on Session 2020-08-15 13:40:16 +03:00
7671.trivial.rst python: skip pytest_pycollect_makeitem work on certain names 2020-08-26 17:43:57 +03:00
7672.bugfix.rst logging: fix handler level restored incorrectly if caplog.set_level is called more than once 2020-08-22 17:46:23 +03:00
7686.bugfix.rst python: fix empty parametrize() leading to "NotSetType.token" id 2020-08-25 22:01:43 +03:00
README.rst docs: use doc/en/_build/html for html output (#6842) 2020-02-29 00:47:30 +01:00
_template.rst Update CHANGELOG template to put issue links at the start of entries 2018-07-07 11:02:33 -03:00

README.rst

This directory contains "newsfragments" which are short files that contain a small **ReST**-formatted
text that will be added to the next ``CHANGELOG``.

The ``CHANGELOG`` will be read by **users**, so this description should be aimed to pytest users
instead of describing internal changes which are only relevant to the developers.

Make sure to use full sentences in the **past or present tense** and use punctuation, examples::

    Improved verbose diff output with sequences.

    Terminal summary statistics now use multiple colors.

Each file should be named like ``<ISSUE>.<TYPE>.rst``, where
``<ISSUE>`` is an issue number, and ``<TYPE>`` is one of:

* ``feature``: new user facing features, like new command-line options and new behavior.
* ``improvement``: improvement of existing functionality, usually without requiring user intervention (for example, new fields being written in ``--junitxml``, improved colors in terminal, etc).
* ``bugfix``: fixes a bug.
* ``doc``: documentation improvement, like rewording an entire session or adding missing docs.
* ``deprecation``: feature deprecation.
* ``breaking``: a change which may break existing suites, such as feature removal or behavior change.
* ``vendor``: changes in packages vendored in pytest.
* ``trivial``: fixing a small typo or internal change that might be noteworthy.

So for example: ``123.feature.rst``, ``456.bugfix.rst``.

If your PR fixes an issue, use that number here. If there is no issue,
then after you submit the PR and get the PR number you can add a
changelog using that instead.

If you are not sure what issue type to use, don't hesitate to ask in your PR.

``towncrier`` preserves multiple paragraphs and formatting (code blocks, lists, and so on), but for entries
other than ``features`` it is usually better to stick to a single paragraph to keep it concise.

You can also run ``tox -e docs`` to build the documentation
with the draft changelog (``doc/en/_build/html/changelog.html``) if you want to get a preview of how your change will look in the final release notes.