Skip to content

[Python] Remove pin for pytest-cython 0.2.2 #45239

@raulcd

Description

@raulcd

Describe the enhancement requested

This is a follow up for:

pytest-cython fixed the issue here:

And it was released under 0.3.1, see notes here;
https://github.com/lgpage/pytest-cython/releases/tag/v0.3.1

I did try to remove it on this commit but it fails with errors like:

 HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_ ERROR collecting opt/conda/envs/arrow/lib/python3.10/site-packages/pyarrow/_parquet.pyx _
import file mismatch:
imported module 'pyarrow._parquet' has this __file__ attribute:
  /opt/conda/envs/arrow/lib/python3.10/site-packages/pyarrow/_parquet.cpython-310-x86_64-linux-gnu.so
which is not the same as the test file we want to collect:
  /opt/conda/envs/arrow/lib/python3.10/site-packages/pyarrow/_parquet.pyx
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_ ERROR collecting opt/conda/envs/arrow/lib/python3.10/site-packages/pyarrow/_pyarrow_cpp_tests.pyx _
import file mismatch:
imported module 'pyarrow._pyarrow_cpp_tests' has this __file__ attribute:
  /opt/conda/envs/arrow/lib/python3.10/site-packages/pyarrow/_pyarrow_cpp_tests.cpython-310-x86_64-linux-gnu.so
which is not the same as the test file we want to collect:
  /opt/conda/envs/arrow/lib/python3.10/site-packages/pyarrow/_pyarrow_cpp_tests.pyx
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
_ ERROR collecting opt/conda/envs/arrow/lib/python3.10/site-packages/pyarrow/_s3fs.pyx _
import file mismatch:
imported module 'pyarrow._s3fs' has this __file__ attribute:
  /opt/conda/envs/arrow/lib/python3.10/site-packages/pyarrow/_s3fs.cpython-310-x86_64-linux-gnu.so
which is not the same as the test file we want to collect:
  /opt/conda/envs/arrow/lib/python3.10/site-packages/pyarrow/_s3fs.pyx

Probably due to some old pytest versions used:

 Downloading numpydoc-1.1.0-py3-none-any.whl (47 kB)
Installing collected packages: archery, numpydoc
  DEPRECATION: Legacy editable install of archery[numpydoc]==0.1.0 from file:///arrow/dev/archery (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457
  Running setup.py develop for archery
  Attempting uninstall: numpydoc
    Found existing installation: numpydoc 1.8.0
    Uninstalling numpydoc-1.8.0:
      Successfully uninstalled numpydoc-1.8.0
Successfully installed archery numpydoc-1.1.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Collecting pytest~=7.4
  Downloading pytest-7.4.4-py3-none-any.whl.metadata (7.9 kB)
Requirement already satisfied: iniconfig in /opt/conda/envs/arrow/lib/python3.10/site-packages (from pytest~=7.4) (2.0.0)
Requirement already satisfied: packaging in /opt/conda/envs/arrow/lib/python3.10/site-packages (from pytest~=7.4) (24.2)
Requirement already satisfied: pluggy<2.0,>=0.12 in /opt/conda/envs/arrow/lib/python3.10/site-packages (from pytest~=7.4) (1.5.0)
Requirement already satisfied: exceptiongroup>=1.0.0rc8 in /opt/conda/envs/arrow/lib/python3.10/site-packages (from pytest~=7.4) (1.2.2)
Requirement already satisfied: tomli>=1.0.0 in /opt/conda/envs/arrow/lib/python3.10/site-packages (from pytest~=7.4) (2.2.1)
Downloading pytest-7.4.4-py3-none-any.whl (325 kB)
Installing collected packages: pytest
  Attempting uninstall: pytest
    Found existing installation: pytest 8.3.4
    Uninstalling pytest-8.3.4:
      Successfully uninstalled pytest-8.3.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pytest-cython 0.3.1 requires pytest>=8, but you have pytest 7.4.4 which is incompatible.

Component(s)

Python

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions