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

BUG: Pytest Version >=8.1 #57718

Closed
3 tasks done
lopof opened this issue Mar 4, 2024 · 2 comments
Closed
3 tasks done

BUG: Pytest Version >=8.1 #57718

lopof opened this issue Mar 4, 2024 · 2 comments
Assignees
Labels
Bug CI Continuous Integration Closing Candidate May be closeable, needs more eyeballs Testing pandas testing functions or related to the test suite

Comments

@lopof
Copy link
Contributor

lopof commented Mar 4, 2024

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

pytest /path/to/any/test.py

Issue Description

With pytest version 8.1 this issue pops up locally at my test environment: pytest-dev/pytest#11779

Traceback (most recent call last):
  File "/home/tom/miniforge3/envs/pandas-dev/bin/pytest", line 10, in <module>
    sys.exit(console_main())
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/_pytest/config/__init__.py", line 195, in console_main
    code = main()
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/_pytest/config/__init__.py", line 153, in main
    config = _prepareconfig(args, plugins)
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/_pytest/config/__init__.py", line 335, in _prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/pluggy/_hooks.py", line 501, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/pluggy/_manager.py", line 119, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/pluggy/_callers.py", line 138, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/pluggy/_callers.py", line 121, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/_pytest/helpconfig.py", line 105, in pytest_cmdline_parse
    config = yield
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/pluggy/_callers.py", line 102, in _multicall
    res = hook_impl.function(*args)
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1141, in pytest_cmdline_parse
    self.parse(args)
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1490, in parse
    self._preparse(args, addopts=addopts)
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1377, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/pluggy/_manager.py", line 415, in load_setuptools_entrypoints
    self.register(plugin, name=ep.name)
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/_pytest/config/__init__.py", line 497, in register
    plugin_name = super().register(plugin, name)
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/pluggy/_manager.py", line 167, in register
    self._verify_hook(hook, hookimpl)
  File "/home/tom/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/pluggy/_manager.py", line 342, in _verify_hook
    raise PluginValidationError(
pluggy._manager.PluginValidationError: Plugin 'pytest_cython' for hook 'pytest_collect_file'
hookimpl definition: pytest_collect_file(path, parent)
Argument(s) {'path'} are declared in the hookimpl but can not be found in the hookspec

Expected Behavior

Run pytests without setup errors

Installed Versions

INSTALLED VERSIONS

commit : a38ecd5
python : 3.10.13.final.0
python-bits : 64
OS : Linux
OS-release : 6.5.0-21-generic
Version : #21~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 9 13:32:52 UTC 2
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 2.2.0.dev0+730.ga38ecd5b84.dirty
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.9.0
setuptools : 68.2.2
pip : 24.0
Cython : 3.0.8
pytest : 8.1.0
hypothesis : 6.98.17
sphinx : 6.2.1
blosc : None
feather : None
xlsxwriter : 3.1.9
lxml.etree : 5.1.0
html5lib : 1.1
pymysql : 1.4.6
psycopg2 : 2.9.9
jinja2 : 3.1.3
IPython : 8.22.1
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.12.3
bottleneck : 1.3.8
fastparquet : 2024.2.0
fsspec : 2024.2.0
gcsfs : 2024.2.0
matplotlib : 3.8.3
numba : 0.59.0
numexpr : 2.9.0
odfpy : None
openpyxl : 3.1.2
pyarrow : 15.0.0
pyreadstat : 1.2.6
python-calamine : None
pyxlsb : 1.0.10
s3fs : 2024.2.0
scipy : 1.12.0
sqlalchemy : 2.0.27
tables : 3.9.2
tabulate : 0.9.0
xarray : 2024.2.0
xlrd : 2.0.1
zstandard : 0.22.0
tzdata : 2024.1
qtpy : None
pyqt5 : None

@lopof lopof added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 4, 2024
@natmokval
Copy link
Contributor

natmokval commented Mar 4, 2024

thanks @lopof for reporting this.

the reason for this failure: in pytest version 8.1 py.path hook parameters are removed (see). The simplest thing we can do is to add in environment.yml additional dependency - pytest>=7.3.2,<8.1.0

However, it would be better to update usage of pytest so that it passes with the latest pytest version. I would like to work on this.

@rhshadrach
Copy link
Member

8.1 has been yanked, and it sounds like the maintainers will revert the removal for 8.1.1. I think this can be closed.

@rhshadrach rhshadrach added Testing pandas testing functions or related to the test suite CI Continuous Integration Closing Candidate May be closeable, needs more eyeballs and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CI Continuous Integration Closing Candidate May be closeable, needs more eyeballs Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants