Repository navigation
Conversation
Subscribing to a wildcard such as A.* drops the other subscribed topics
on that channel. The match used t.startswith(channel), so it also
dropped topics on every channel whose name starts with the same
letters: subscribe("A.*") unsubscribed AM.AAPL. It also matched the
wildcard itself, so subscribing to A.* a second time unsubscribed it.
Compare the channel exactly, and skip the wildcard being subscribed.
unsubscribe() used the same match and gets the same fix. As before,
only topics already sent are checked.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #<issue: F1b>
Subscribing to a wildcard such as
A.*drops the other subscribed topics on the same channel. The match usedt.startswith(channel), so:subscribe("A.*")also droppedAM.AAPL, and likewise forXA.*/XAS.*andC.*/CA.*/CAS.*;subscribe("A.*")a second time unsubscribedA.*, because the wildcard matched itself.This PR compares the channel exactly and skips the wildcard itself, in
subscribe()andunsubscribe(). Nothing else changes: as before, only topics already sent are checked.Tests
test_websocket/test_wildcard.py: three unit tests that setsubsdirectly, with no server. All three fail onmaster.make testandmake lintpass on Python 3.10 and 3.14.Independent of the other PRs.