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

Avoids using str.removeprefix and str.removesuffix #169

Merged
merged 2 commits into from
May 17, 2023

Conversation

JasonWeill
Copy link
Collaborator

@JasonWeill JasonWeill commented May 12, 2023

Replaces str.removeprefix and str.removesuffix, which are not available in Python 3.8, with a regular expression to remove initial commas from output. Fixes #167.

@JasonWeill JasonWeill added bug Something isn't working @jupyter-ai/magics labels May 12, 2023
@dlqqq
Copy link
Member

dlqqq commented May 14, 2023

Let's hold off on merging this though; it would be nice to have a CI workflow that captures this failure to make sure we never introduce a regression that breaks py38 again.

@JasonWeill JasonWeill changed the title Avoids using str.removeprefix Avoids using str.removeprefix and str.removesuffix May 15, 2023
@dlqqq dlqqq merged commit 6d8ec5b into jupyterlab:main May 17, 2023
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
* Replaces "removeprefix" with regex

* Removes "removesuffix" function
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
* Replaces "removeprefix" with regex

* Removes "removesuffix" function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @jupyter-ai/magics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python3.8, AttributeError: 'str' object has no attribute 'removeprefix'
2 participants