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

Change tuple typing for recv #914

Merged
merged 1 commit into from
Jun 9, 2023
Merged

Conversation

danpawlik
Copy link
Contributor

Currently by executing simple command:

wsdump --nocert -r -t '{"logfile":"console.log"}' wss://localhost/api/tenant/internal/console-stream

It raises an error:

Traceback (most recent call last):
  File "/home/centos/.local/bin/wsdump", line 9, in <module>
    sys.exit(main())
  File "/home/centos/.local/lib/python3.9/site-packages/websocket/_wsdump.py", line 158, in main
    def recv() -> tuple(int, str):
TypeError: tuple expected at most 1 argument, got 2

According to the python doc [1], tuple should be in square brackets.

[1] https://docs.python.org/3/library/typing.html

Currently by executing simple command:

    wsdump --nocert -r -t '{"logfile":"console.log"}' wss://localhost/api/tenant/internal/console-stream

It raises an error:

    Traceback (most recent call last):
      File "/home/centos/.local/bin/wsdump", line 9, in <module>
        sys.exit(main())
      File "/home/centos/.local/lib/python3.9/site-packages/websocket/_wsdump.py", line 158, in main
        def recv() -> tuple(int, str):
    TypeError: tuple expected at most 1 argument, got 2

According to the python doc [1], tuple should be in square brackets.

[1] https://docs.python.org/3/library/typing.html
@TristanCacqueray
Copy link

@engn33r @RoryGlenn could you please have a look, it appears that the latest version is broken because of #908

@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.15 ⚠️

Comparison is base (7c39ddb) 83.72% compared to head (e0406ac) 83.57%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #914      +/-   ##
==========================================
- Coverage   83.72%   83.57%   -0.15%     
==========================================
  Files          13       13              
  Lines        1358     1358              
  Branches      256      256              
==========================================
- Hits         1137     1135       -2     
- Misses        145      148       +3     
+ Partials       76       75       -1     

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@engn33r
Copy link
Collaborator

engn33r commented Jun 9, 2023

Thanks for the PR. LGTM

@engn33r engn33r merged commit c448bc8 into websocket-client:master Jun 9, 2023
9 of 10 checks passed
sf-project-io pushed a commit to softwarefactory-project/sf-operator that referenced this pull request Jun 15, 2023
After merging pull-request [1], the ci test should be working
fine with the newest version.

[1] websocket-client/websocket-client#914

Change-Id: Iaa1b8376fe3d8d07ee1f67f0f7c3f0a338350d5a
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

Successfully merging this pull request may close these issues.

None yet

3 participants