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

pytest-tornasync appears to be a *run-time* dependency? #728

Closed
dhirschfeld opened this issue Sep 26, 2020 · 3 comments
Closed

pytest-tornasync appears to be a *run-time* dependency? #728

dhirschfeld opened this issue Sep 26, 2020 · 3 comments

Comments

@dhirschfeld
Copy link

Adding voila as a dependency to a conda meta-package I'm building breaks our CI with the below error:

C:\agent\_work\1\s>exit /B 0 

Traceback (most recent call last):

  File "C:\Miniconda\envs\test-1512\lib\site-packages\_pytest\config\__init__.py", line 689, in import_plugin

    __import__(importspec)

ModuleNotFoundError: No module named 'pytest_tornasync'

Specifying pytest_tornasync as a direct dependency then fixes the CI.

@maartenbreddels
Copy link
Member

I'm wondering if this is jupyter_server:
https://github.com/jupyter/jupyter_server/blob/23b0a84ffb6599db97b37f66f80dba5c43f3a0c9/setup.py#L63

How can we reproduce this?

@adriendelsalle
Copy link

Hi!
I just faced the same issue.

Please find hereafter the reproducing steps @maartenbreddels

Installing jupyter_server instead of Voilà gives the same outputs due to the entrypoint you mentioned.
This issue should be transfered to the jupyter-server project.

I'm not sure that an entrypoint can be conditionally generated for an extras_require entry.

I hope this help!


  1. Use pytest

Using a simple_test.py file only containing a trivial assertion:

cat simple_test.py
def test_assert_true():
    assert True
conda create -n bug_pytest -c conda-forge pytest
conda activate bug_pytest 
pytest simple_test.py  # <-- runs fine
  1. Then install Voilà (or jupyter-server)
conda install -c conda-forge voila  # or jupyter_server
pytest simple_test.py  # <-- now throws an error
...
ImportError: Error importing plugin "pytest_tornasync": No module named 'pytest_tornasync'
  1. Finally install pytest_tornasync
pip install pytest_tornasync  # Not packaged with conda
pytest simple_test.py  # <-- ImportError fixed

@vidartf
Copy link
Contributor

vidartf commented Jan 6, 2021

I think this should be fixed in jupyter_server now ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants