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

jupyter-server test failure with pytest-jupyter 0.10.0 #79

Closed
frenzymadness opened this issue Apr 4, 2024 · 2 comments
Closed

jupyter-server test failure with pytest-jupyter 0.10.0 #79

frenzymadness opened this issue Apr 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@frenzymadness
Copy link

I'm testing jupyter-server with the latest pytest-jupyter and it seems that they are not compatible. The problem is:

    def client_fetch(*parts, headers=None, params=None, **kwargs):
        if not headers:
            headers = {}
        if not params:
            params = {}
        # Handle URL strings
        path_url = url_escape(url_path_join(*parts), plus=False)
        base_path_url = url_path_join(jp_base_url, path_url)
        urlparts = urllib.parse.urlparse(f"ws://localhost:{jp_http_port}")
        urlparts = urlparts._replace(path=base_path_url, query=urllib.parse.urlencode(params))
        url = urlparts.geturl()
        # Add auth keys to header, if not overridden
        for key, value in jp_auth_header.items():
            headers.setdefault(key, value)
        # Make request.
        req = tornado.httpclient.HTTPRequest(url, headers=headers, connect_timeout=120)
>       return tornado.websocket.websocket_connect(req, **kwargs)
E       TypeError: websocket_connect() got an unexpected keyword argument 'body'

The new version of pytest-jupyter is passing the keyword arguments to tornado.websocket and jupyter-server has body in the arguments: https://github.com/jupyter-server/jupyter_server/blob/0b4d6678fde435d053a6896a6f23fbc0d41d00c7/tests/auth/test_authorizer.py#L225 and that seems to not be supported by tornado.

I'm not sure where this should be fixed so reporting it here.

@frenzymadness frenzymadness added the bug Something isn't working label Apr 4, 2024
Copy link

welcome bot commented Apr 4, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@frenzymadness
Copy link
Author

Fixed in #81

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

1 participant