Skip to content

closes #8824 Changelog rewording for 7.0 #8826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 3, 2021

Conversation

ericluoliu
Copy link
Contributor

No description provided.

@The-Compiler The-Compiler linked an issue Jun 30, 2021 that may be closed by this pull request
Copy link
Member

@The-Compiler The-Compiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks! Just a couple of small remaining changes, as well as some remaining questions to other maintainers/contributors about things I'm not sure about.

As for dropping #8411, you'll need to remove the changelog/8411.trivial.rst file entirely (e.g. via git rm). We also agreed to move #8503 from internal to bugfix, which you can do by renaming 8503.trivial.rst to 8503.bugfix.rst (e.g. via git mv).

- Allowing no arguments to be passed in order to catch any exception (no argument defaults to `Warning`).
- Emit a deprecation warning if passed `None`.
- Allowing no arguments to be passed in order to catch any exception (no argument defaults to :class:`Warning`).
- Emit a deprecation warning if passed ``None``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be split off to a separate .deprecation.rst file? Or perhaps the whole thing should go under deprecations rather than improvements? @Zac-HD @olgarithms what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I think it probably makes most sense to move this entirely to a .deprecation.rst file, with a message like

:func:`pytest.warns(None) <pytest.warns>` is now deprecated because many people used
it to mean "this code does not emit warnings", but it actually had the effect of 
checking that the code emits at least one warning of any type - like ``pytest.warns()``
or ``pytest.warns(Warning)``.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with this decision too!

@@ -1,5 +1,5 @@
Fixed issue where `TestCase.setUpClass` is not called when a test has `/` in its name since pytest 6.2.0.
Fixed issue where :meth:`unittest.TestCase.setUpClass` is not called when a test has `/` in its name since pytest 6.2.0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Fixed issue where :meth:`unittest.TestCase.setUpClass` is not called when a test has `/` in its name since pytest 6.2.0.
Fixed issue where :meth:`unittest.TestCase.setUpClass` is not called when a test has ``/`` in its name since pytest 6.2.0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, no need to worry about ` vs `` because we configure the docs so they are equivalent:

pytest/doc/en/conf.py

Lines 102 to 103 in 5016375

# The reST default role (used for this markup: `text`) to use for all documents.
default_role = "literal"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO we should still be consistent though - right now we use an odd mix of both...

Copy link
Member

@nicoddemus nicoddemus Jul 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, just mentioning that to clarify that is not necessary to go hunting for those, unless inclined to spend time on it for consistency reasons, because otherwise the end result is the same.

- Allowing no arguments to be passed in order to catch any exception (no argument defaults to `Warning`).
- Emit a deprecation warning if passed `None`.
- Allowing no arguments to be passed in order to catch any exception (no argument defaults to :class:`Warning`).
- Emit a deprecation warning if passed ``None``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I think it probably makes most sense to move this entirely to a .deprecation.rst file, with a message like

:func:`pytest.warns(None) <pytest.warns>` is now deprecated because many people used
it to mean "this code does not emit warnings", but it actually had the effect of 
checking that the code emits at least one warning of any type - like ``pytest.warns()``
or ``pytest.warns(Warning)``.

Copy link
Member

@The-Compiler The-Compiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue left from a quick look, afterwards I think this should be ready!

@@ -1,4 +1,4 @@
Defining a custom pytest node type which is both an item and a collector now issues a warning.
Defining a custom pytest node type which is both an :class:`pytest.Item <Item>` and a :class:pytest.Collector <Collector>` now issues a warning.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Defining a custom pytest node type which is both an :class:`pytest.Item <Item>` and a :class:pytest.Collector <Collector>` now issues a warning.
Defining a custom pytest node type which is both an :class:`pytest.Item <Item>` and a :class:`pytest.Collector <Collector>` now issues a warning.

Last one hopefully! 🙂

Copy link
Member

@The-Compiler The-Compiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great now - thanks a lot @ericluoliu, one step closer to 7.0 again! 🎉

@The-Compiler The-Compiler merged commit 8c25a14 into pytest-dev:main Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changelog rewording for 7.0
5 participants