Skip to content

Conversation

antoinevg
Copy link
Member

This PR adds a deprecation warning and support for using skiplist instead of blacklist when adding standard request handlers.

Example:

ep_control.add_standard_request_handlers(descriptors, blacklist=[
    # We have multiple interfaces so we will need to handle
    # SET_INTERFACE ourselves.
    lambda setup: (setup.type == USBRequestType.STANDARD) &
                  (setup.request == USBStandardRequests.SET_INTERFACE)
])

Becomes:

ep_control.add_standard_request_handlers(descriptors, skiplist=[
    # We have multiple interfaces so we will need to handle
    # SET_INTERFACE ourselves.
    lambda setup: (setup.type == USBRequestType.STANDARD) &
                  (setup.request == USBStandardRequests.SET_INTERFACE)
])

Also considered was ignorelist and ignore but I chose in favor of skiplist as it expresses both the intent and the type of the argument, as well as being shorter.

… 'blacklist' argument in favor of 'skiplist'
@mossmann mossmann requested a review from miek July 9, 2025 16:20
@antoinevg antoinevg requested a review from miek July 17, 2025 14:02
@miek miek merged commit 28030db into main Jul 17, 2025
14 checks passed
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