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

Rename module mod_pywebsocket to pywebsocket3 #33

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

whimboo
Copy link
Contributor

@whimboo whimboo commented Nov 7, 2023

To release the package on PyPI (#30) the module has to be renamed to pywebsocket3.

@ricea can you please have a look? Please note that not all tests are passing right now but that also happens on master, so it's not a regression from this PR.

Failures:

....................................[2023-11-07 11:04:27,524] [WARNING] mod_pywebsocket.request_handler.WebSocketRequestHandler: 127.0.0.1 - code 404, message File not found
....E.......................................WARNING 11:04:29 stream.py:253] Payload length is not encoded using the minimal number of bytes (1 is encoded using 8 bytes)
......................./Users/henrik/code/pywebsocket3/test/../mod_pywebsocket/msgutil.py:126: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  self.setDaemon(True)
../Users/henrik/code/pywebsocket3/test/../mod_pywebsocket/msgutil.py:189: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  self.setDaemon(True)
................../Users/henrik/.pyenv/versions/3.10.11/lib/python3.10/random.py:370: DeprecationWarning: non-integer arguments to randrange() have been deprecated since Python 3.10 and will be removed in a subsequent version
  return self.randrange(a, b+1)
...................../Users/henrik/code/pywebsocket3/test/test_mock.py:88: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  self.setDaemon(True)
..........
======================================================================
ERROR: test_unmasked_frame (test_endtoend.EndToEndHyBiTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/henrik/code/pywebsocket3/test/../test/client_for_testing.py", line 710, in assert_connection_closed
    error_number, message = e
TypeError: cannot unpack non-iterable ConnectionResetError object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/henrik/code/pywebsocket3/test/test_endtoend.py", line 295, in test_unmasked_frame
    self._run_test(_unmasked_frame_check_procedure)
  File "/Users/henrik/code/pywebsocket3/test/test_endtoend.py", line 226, in _run_test
    self._run_test_with_options(test_function, self._options)
  File "/Users/henrik/code/pywebsocket3/test/test_endtoend.py", line 219, in _run_test_with_options
    test_function(client)
  File "/Users/henrik/code/pywebsocket3/test/test_endtoend.py", line 115, in _unmasked_frame_check_procedure
    client.assert_connection_closed()
  File "/Users/henrik/code/pywebsocket3/test/../test/client_for_testing.py", line 716, in assert_connection_closed
    raise e
  File "/Users/henrik/code/pywebsocket3/test/../test/client_for_testing.py", line 703, in assert_connection_closed
    read_data = receive_bytes(self._socket, 1)
  File "/Users/henrik/code/pywebsocket3/test/../test/client_for_testing.py", line 136, in receive_bytes
    new_received_bytes = socket.recv(remaining)
ConnectionResetError: [Errno 54] Connection reset by peer

@ricea
Copy link
Collaborator

ricea commented Nov 9, 2023

Sorry for the delayed response. I want to figure out why the tests are failing and hopefully fix them before landing this.

@whimboo
Copy link
Contributor Author

whimboo commented Nov 14, 2023

@ricea would you need some help in figuring that out?

@whimboo
Copy link
Contributor Author

whimboo commented Nov 17, 2023

@ricea I've added a new commit which fixes the problem. Reason here is that the ConnectionError class doesn't have a message attribute and as such unpack failed. Now all the tests are passing.

@ricea
Copy link
Collaborator

ricea commented Nov 20, 2023

Thanks! Greatly appreciated!

Copy link
Collaborator

@ricea ricea left a comment

Choose a reason for hiding this comment

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

Very very nice. lgtm. Before I land it, do you have any ideas how to make the transition easier for downstream users? I guess they can just do s/mod_pywebsocket/pywebsocket3/ so it shouldn't be a huge burden.

setup.py Show resolved Hide resolved
@whimboo
Copy link
Contributor Author

whimboo commented Nov 20, 2023

Very very nice. lgtm. Before I land it, do you have any ideas how to make the transition easier for downstream users? I guess they can just do s/mod_pywebsocket/pywebsocket3/ so it shouldn't be a huge burden.

Did you ever thought about using GitHub actions to run the tests? It would be much safer to rely on the CI results when code is getting updated. But it may not block the release?

@ricea
Copy link
Collaborator

ricea commented Nov 21, 2023

Did you ever thought about using GitHub actions to run the tests? It would be much safer to rely on the CI results when code is getting updated. But it may not block the release?

In the past we used Travis CI but that's not permitted for Google orgs any more.

@ricea ricea merged commit ebd0a81 into GoogleChromeLabs:master Nov 21, 2023
1 check passed
@whimboo whimboo deleted the rename_module branch November 21, 2023 08:27
@whimboo whimboo mentioned this pull request Nov 21, 2023
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.

2 participants