Skip to content

Conversation

@krassowski
Copy link
Member

Gets rid of Node 12 deprecation warnings

@krassowski
Copy link
Member Author

This PR and scheduled checks are failing on Python 3.11 with: ImportError: Error importing plugin "pytest_jupyter.jupyter_server": No module named 'pytest_jupyter'. I don't think pytest_jupyter is an explicit dependency in cookiecutter so I am a bit lost. @blink1073 is this something that needs to be fixed upstream in maintainer-tools or similar?

@fcollonval
Copy link
Member

We need to explicitly use it by adding the dependency there

test = [{% if cookiecutter.test.lower().startswith('y') %}

and switching the configuration there

pytest_plugins = ("jupyter_server.pytest_plugin", )

The later command is the reason of the error because it ends up loading that configuration file requiring pytest_jupyter:

https://github.com/jupyter-server/jupyter_server/blob/main/jupyter_server/pytest_plugin.py

test = [{% if cookiecutter.test.lower().startswith('y') %}
"coverage",
"pytest",
"pytest-asyncio",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need pytest-asyncio or pytest-tornasync if you're using pytest-jupyter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, you'd need pytest-asyncio in order to write async fixtures.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @blink1073

I removed pytest-tornasync

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@fcollonval fcollonval merged commit 283c1e0 into jupyterlab:4.0 Dec 14, 2022
@fcollonval
Copy link
Member

@meeseeksdev please backport to 3.0

meeseeksmachine pushed a commit to meeseeksmachine/extension-cookiecutter-ts that referenced this pull request Dec 15, 2022
fcollonval pushed a commit that referenced this pull request Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants