Skip to content

[SPT-1668] Don't split comma-separated str values for *_any_of params - #1037

Merged
justinpolygon merged 2 commits into
masterfrom
justin/spt-1668
Oct 16, 2026
Merged

justinpolygon merged 2 commits into
masterfrom
justin/spt-1668

Conversation

@justinpolygon

@justinpolygon justinpolygon commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Passing a comma-separated string to any *_any_of argument, e.g. ticker_any_of="AAPL,VZ", split it into characters (A,A,P,L,,,V,Z) and silently returned the wrong data. _get_params now passes strings through unchanged and only joins lists. Lists work as before, so this isn't a breaking change.

Tests cover the string and list forms. SPT-1668

_get_params joined every *_any_of value with ",".join(val), which assumes
a list. The spec defines every any_of param as a comma-separated string,
and most methods type them as Optional[str], so passing e.g.
ticker_any_of="AAPL,VZ" sent ticker.any_of=A,A,P,L,,,V,Z and silently
returned data for the wrong tickers.

Only join non-str iterables. Lists, tuples, etc. behave as before.
Comment thread massive/rest/base.py
@justinpolygon
justinpolygon merged commit 34f2e1c into master Oct 16, 2026
7 checks passed
@justinpolygon
justinpolygon deleted the justin/spt-1668 branch October 16, 2026 19:55
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