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

p4p cython issue #14

Closed
rosesyrett opened this issue Sep 12, 2023 · 3 comments
Closed

p4p cython issue #14

rosesyrett opened this issue Sep 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@rosesyrett
Copy link
Collaborator

rosesyrett commented Sep 12, 2023

Running pytest with python 3.8 fails, both locally and in CI. Pytest fails to collect all tests, all of them having identical error messages. Here is an example of such a message:

__________________ ERROR collecting tests/panda/test_panda.py __________________
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/_pytest/runner.py", line 341, in from_call
    result: Optional[TResult] = func()
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/_pytest/runner.py", line 372, in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/_pytest/python.py", line 531, in collect
    self._inject_setup_module_fixture()
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/_pytest/python.py", line 545, in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/_pytest/python.py", line 310, in obj
    self._obj = obj = self._getobj()
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/_pytest/python.py", line 528, in _getobj
    return self._importtestmodule()
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/_pytest/python.py", line 617, in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/_pytest/pathlib.py", line 567, in import_path
    importlib.import_module(module_name)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/_pytest/assertion/rewrite.py", line 178, in exec_module
    exec(co, module.__dict__)
  File "/home/runner/work/ophyd-async/ophyd-async/tests/panda/test_panda.py", line 9, in <module>
    from ophyd_async.panda import PandA, PVIEntry, SeqTable, SeqTrigger, pvi
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/ophyd_async/panda/__init__.py", line 1, in <module>
    from .panda import (
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/ophyd_async/panda/panda.py", line 23, in <module>
    from p4p.client.thread import Context
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/p4p/__init__.py", line 14, in <module>
    from .wrapper import Value, Type
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/p4p/wrapper.py", line 5, in <module>
    from . import _p4p
  File "src/p4p/_p4p.pyx", line 605, in init p4p._p4p
AttributeError: type object 'p4p._p4p.ClientProvider' has no attribute '__reduce_cython__'
@coretl
Copy link
Collaborator

coretl commented Sep 12, 2023

This may be epics-base/p4p#102.

For reference it has numpy==1.24.4 and p4p==4.1.10

@rosesyrett
Copy link
Collaborator Author

could this be related to: python/cpython#84787 ?

@rosesyrett rosesyrett added the bug Something isn't working label Sep 14, 2023
@callumforrester
Copy link
Contributor

Fixed by dropping Python3.8 support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants