Skip to content
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

Deprecate --strict #7985

Merged
merged 1 commit into from Nov 6, 2020
Merged

Conversation

nicoddemus
Copy link
Member

Fix #7530

src/_pytest/config/__init__.py Outdated Show resolved Hide resolved
@The-Compiler
Copy link
Member

Thanks!

@The-Compiler The-Compiler merged commit 30287b4 into pytest-dev:master Nov 6, 2020
@nicoddemus nicoddemus deleted the deprecate-strict branch November 6, 2020 11:37
webknjaz added a commit to ansible/pylibssh that referenced this pull request Dec 16, 2020
The `--strict` option has been deprecated in v6.2.0 and will probably
resurface at some point in the future but at the moment it's
recommended to use `--strict-markers` instead, which is already
present.

So this change just comments out `--strict` for pytest runs not to
fail in the CI or dev envs.

Ref:
* pytest-dev/pytest#7530
* pytest-dev/pytest#7985
miketheman added a commit to miketheman/warehouse that referenced this pull request Nov 26, 2021
Current test warns:

    PytestDeprecationWarning: The --strict option is deprecated, use --strict-markers instead.

Marked as deprecated in pytest-dev/pytest#7985
Released in pytest 6.2.0

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
di added a commit to pypi/warehouse that referenced this pull request Dec 1, 2021
* Fix PytestCollectionWarning

When collecting tests, this class raises a warning since it's named
`Test*`:

    PytestCollectionWarning: cannot collect test class 'TestAdminFlagValues'
    because it has a __new__ constructor

Set an attribute that informs pytest to ignore this class, and thus
remove the warning.

Refs: https://docs.pytest.org/en/6.2.x/example/pythoncollection.html#customizing-test-collection
(last lines)

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* Fix PytestDeprecationWarning

Current test warns:

    PytestDeprecationWarning: The --strict option is deprecated, use --strict-markers instead.

Marked as deprecated in pytest-dev/pytest#7985
Released in pytest 6.2.0

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* Fix DeprecationWarning pyramid import

The import paths for these modules has changed in Pyramid 2.0, and
raises warnings.
There are other Pyramid 2.0 warnings, but are more involved than
changing an import path, and should be addressed as another commit.

Refs: Pylons/pyramid#3563

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* Fix DeprecationWarning for jinja.contextfilter

A few instances of this warning are raised:

    DeprecationWarning: 'contextfilter' is renamed to 'pass_context',
    the old name will be removed in Jinja 3.1.

Replace the usages accordingly.

Refs: pallets/jinja#1389

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* Fix DeprecationWarning for jinja.Markup

The pass-through import of markup.Markup() has been deprecated in Jinja
3.0, and will be removed in Jinja 3.1. Warnings raised:

    DeprecationWarning: 'jinja2.Markup' is deprecated and will be removed in Jinja 3.1.
    Import 'markupsafe.Markup' instead.

Replace the import paths.

TODO: Determine if the requirements/main.in needs to be changed as well.

Refs: pallets/jinja#1391

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* Fix DeprecationWarning for babel.numbers.from_number

Warnings raised:

    DeprecationWarning: Use babel.numbers.format_decimal() instead.

Deprecated since 2.6.0

Refs: python-babel/babel#538

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
domdfcoding pushed a commit to domdfcoding/warehouse that referenced this pull request Jun 7, 2022
* Fix PytestCollectionWarning

When collecting tests, this class raises a warning since it's named
`Test*`:

    PytestCollectionWarning: cannot collect test class 'TestAdminFlagValues'
    because it has a __new__ constructor

Set an attribute that informs pytest to ignore this class, and thus
remove the warning.

Refs: https://docs.pytest.org/en/6.2.x/example/pythoncollection.html#customizing-test-collection
(last lines)

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* Fix PytestDeprecationWarning

Current test warns:

    PytestDeprecationWarning: The --strict option is deprecated, use --strict-markers instead.

Marked as deprecated in pytest-dev/pytest#7985
Released in pytest 6.2.0

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* Fix DeprecationWarning pyramid import

The import paths for these modules has changed in Pyramid 2.0, and
raises warnings.
There are other Pyramid 2.0 warnings, but are more involved than
changing an import path, and should be addressed as another commit.

Refs: Pylons/pyramid#3563

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* Fix DeprecationWarning for jinja.contextfilter

A few instances of this warning are raised:

    DeprecationWarning: 'contextfilter' is renamed to 'pass_context',
    the old name will be removed in Jinja 3.1.

Replace the usages accordingly.

Refs: pallets/jinja#1389

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* Fix DeprecationWarning for jinja.Markup

The pass-through import of markup.Markup() has been deprecated in Jinja
3.0, and will be removed in Jinja 3.1. Warnings raised:

    DeprecationWarning: 'jinja2.Markup' is deprecated and will be removed in Jinja 3.1.
    Import 'markupsafe.Markup' instead.

Replace the import paths.

TODO: Determine if the requirements/main.in needs to be changed as well.

Refs: pallets/jinja#1391

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

* Fix DeprecationWarning for babel.numbers.from_number

Warnings raised:

    DeprecationWarning: Use babel.numbers.format_decimal() instead.

Deprecated since 2.6.0

Refs: python-babel/babel#538

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
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.

Deprecate --strict
3 participants