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

🐛 Remove call to removeprefix to fix python 3.8 #253

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

nateraw
Copy link
Contributor

@nateraw nateraw commented Mar 7, 2024

In stream.py we were using removeprefix, which was introduced in Python 3.9. This breaks compatibility with Python 3.8, which I believe we still want to support. This PR provides exact same functionality but without the call to that function.

Previously, we were .lstrip()-ing here, but I assume @mattt switched to removeprefix for a reason, so I didn't use that (as it would get rid of any and all whitespace, as opposed to a single space as we do here).

@nateraw nateraw requested a review from mattt March 7, 2024 04:30
Copy link
Member

@mattt mattt left a comment

Choose a reason for hiding this comment

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

Thanks, @nateraw!

@mattt mattt merged commit fba6d9e into main Mar 7, 2024
8 checks passed
@mattt mattt deleted the remove-call-to-removeprefix branch March 7, 2024 13:32
GothReigen pushed a commit that referenced this pull request Mar 11, 2024
In `stream.py` we were using `removeprefix`, which was introduced in
Python 3.9. This breaks compatibility with Python 3.8, which I believe
we still want to support. This PR provides exact same functionality but
without the call to that function.

Previously, we were `.lstrip()`-ing here, but I assume @mattt switched
to `removeprefix` for a reason, so I didn't use that (as it would get
rid of any and all whitespace, as opposed to a single space as we do
here).
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.

None yet

2 participants