Conversation
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>
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>
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>
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>
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>
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>
ewjoachim
approved these changes
Nov 27, 2021
di
approved these changes
Nov 30, 2021
Member
|
Thanks @miketheman! If you wanted to continue farther down this path, #9707 might be a good next issue (there is a start at #9712 but it seems to have stalled). |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When running the test suite, I saw a bunch of deprecation warnings that looked to be relatively minimal to handle, so took a shot and cleaning up some of the output.
Each commit contains some text as to the change, and any links I could dig up with references to the source.
Reduced 175 warnings emitted in CI to 156.