This repository was archived by the owner on Aug 29, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Adopt to pytest 7.x #61
Open
wiget
wants to merge
1
commit into
shopkeep:master
Choose a base branch
from
wiget:pytest7
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
pytest 7.x deprecated few things and also dropped support for python 2.7 This change also add testing on python 3.9 and 3.10, and run flake8 on latest python in CI
|
@kevincowan @paulka - Does Shopkeep intend to keep maintaining this plugin? It would be great if this and a couple of the other open PRs could be merged to ensure the plugin isn't broken by future updates |
|
I've been tryingto test this PR against pytest 8.1.0 and looks like it pytest fails + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-black-0.3.12-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-black-0.3.12-2.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network'
Traceback (most recent call last):
File "/usr/bin/pytest", line 8, in <module>
sys.exit(console_main())
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 195, in console_main
code = main()
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 153, in main
config = _prepareconfig(args, plugins)
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 335, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
File "/usr/lib/python3.9/site-packages/pluggy/_hooks.py", line 501, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/usr/lib/python3.9/site-packages/pluggy/_manager.py", line 119, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/usr/lib/python3.9/site-packages/pluggy/_callers.py", line 138, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "/usr/lib/python3.9/site-packages/pluggy/_callers.py", line 121, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
File "/usr/lib/python3.9/site-packages/_pytest/helpconfig.py", line 105, in pytest_cmdline_parse
config = yield
File "/usr/lib/python3.9/site-packages/pluggy/_callers.py", line 102, in _multicall
res = hook_impl.function(*args)
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1141, in pytest_cmdline_parse
self.parse(args)
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1490, in parse
self._preparse(args, addopts=addopts)
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1377, in _preparse
self.pluginmanager.load_setuptools_entrypoints("pytest11")
File "/usr/lib/python3.9/site-packages/pluggy/_manager.py", line 415, in load_setuptools_entrypoints
self.register(plugin, name=ep.name)
File "/usr/lib/python3.9/site-packages/_pytest/config/__init__.py", line 497, in register
plugin_name = super().register(plugin, name)
File "/usr/lib/python3.9/site-packages/pluggy/_manager.py", line 167, in register
self._verify_hook(hook, hookimpl)
File "/usr/lib/python3.9/site-packages/pluggy/_manager.py", line 342, in _verify_hook
raise PluginValidationError(
pluggy._manager.PluginValidationError: Plugin 'black' for hook 'pytest_collect_file'
hookimpl definition: pytest_collect_file(file_path, path, parent)
Argument(s) {'path'} are declared in the hookimpl but can not be found in the hookspec |
Author
|
Cześć @kloczek pytest 8.1.0 version was broken and it's yanked. Please use 8.1.1 PS: Nice to meet you again after long years. |
|
Yep with 8.1.1 everything is OK. |
jaraco
added a commit
to coherent-oss/pytest-black
that referenced
this pull request
Dec 15, 2024
Adds support for Pytest 7.
Contributor
|
This has been merged into coherent-oss/pytest-black and released as v0.5.0. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
pytest 7.x deprecated few things and also dropped support for python 2.7
This change also add testing on python 3.9 and 3.10, and run flake8 on
latest python in CI