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

fix: handling of None messages from notify callback #236

Merged
merged 12 commits into from
Sep 7, 2023

Commits on Sep 4, 2023

  1. test(client): test early disconnect

    The test does not fails but outputs the following erroneous logs:
    
      ERROR    root:message_bus.py:1194 add match request failed. match="sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',path='/org/freedesktop/DBus',member='NameOwnerChanged'",
      WARNING  root:message_bus.py:584 a message handler threw an exception on shutdown
      Traceback (most recent call last):
        File "/home/mocramis/misc/dbus-fast/src/dbus_fast/aio/message_reader.py", line 22, in _message_reader
          message = unmarshaller._unmarshall()
        File "/home/mocramis/misc/dbus-fast/src/dbus_fast/_private/unmarshaller.py", line 742, in _unmarshall
          self._read_header()
        File "/home/mocramis/misc/dbus-fast/src/dbus_fast/_private/unmarshaller.py", line 611, in _read_header
          self._read_to_pos(HEADER_SIGNATURE_SIZE)
        File "/home/mocramis/misc/dbus-fast/src/dbus_fast/_private/unmarshaller.py", line 366, in _read_to_pos
          self._read_sock_without_fds(pos)
        File "/home/mocramis/misc/dbus-fast/src/dbus_fast/_private/unmarshaller.py", line 329, in _read_sock_without_fds
          raise EOFError()
      EOFError
    
      During handling of the above exception, another exception occurred:
    
      Traceback (most recent call last):
        File "/home/mocramis/misc/dbus-fast/src/dbus_fast/message_bus.py", line 582, in _finalize
          handler(None, err)
        File "/home/mocramis/misc/dbus-fast/src/dbus_fast/message_bus.py", line 737, in _reply_notify
          callback(reply, err)
        File "/home/mocramis/misc/dbus-fast/src/dbus_fast/message_bus.py", line 1197, in add_match_notify
          if msg.message_type == MessageType.ERROR:
      AttributeError: 'NoneType' object has no attribute 'message_type'
    
    However, trying to capture those logs seems to prevent the race
    condition from happening. Therefore, we just run the test for coverage.
    Remy Noel committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    2e5f27b View commit details
    Browse the repository at this point in the history
  2. ci: increase pytest runtime to 10 seconds

    previous added test pushed the testsuite above 5s on py38 ant py39/
    Remy Noel committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    119b27b View commit details
    Browse the repository at this point in the history
  3. fix: handling of None messages from notify callback

    This is especially common as BaseMessageBus._finalize calls handler(None, err)
    when an exception is raised.
    Remy Noel committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    3b4813a View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Configuration menu
    Copy the full SHA
    8b071cf View commit details
    Browse the repository at this point in the history
  2. chore: run tests with verbose

    bdraco committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    a7226ca View commit details
    Browse the repository at this point in the history
  3. chore: debug

    bdraco committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    b771403 View commit details
    Browse the repository at this point in the history
  4. chore: debug

    bdraco committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    1cfd138 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7b4e674 View commit details
    Browse the repository at this point in the history
  6. chore: remove

    bdraco committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    1e44979 View commit details
    Browse the repository at this point in the history
  7. Merge branch 'notify_callback_empty_message' of https://github.com/Mo…

    …cramis/dbus-fast into notify_callback_empty_message
    bdraco committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    52c6abf View commit details
    Browse the repository at this point in the history
  8. chore: remove

    bdraco committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    b4a4cd7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1da13ff View commit details
    Browse the repository at this point in the history