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

Fix deprecation warning in re.sub for Python 3.13 #287

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

stinodego
Copy link
Contributor

@stinodego stinodego commented Dec 14, 2024

I know xlsx2csv doesn't officially support Python 3.13, but there is no reason it couldn't!

We support xlsx2csv as an engine in Polars and we'd like to support Python 3.13. Currently, using xlsx2csv works fine but it throws a deprecation warning: re.sub now expects the count parameter as a keyword argument rather than positional.

I checked earlier versions of Python (3.4 onwards and 2.7) and it seems that in all cases, the parameter is named count, so using a keyword argument here shouldn't break anything.

It was a simple fix, hopefully this can be a tiny step towards Python 3.13 support!

@stinodego stinodego marked this pull request as ready for review December 14, 2024 09:41
@dilshod dilshod merged commit 5038b39 into dilshod:master Dec 14, 2024
@dilshod
Copy link
Owner

dilshod commented Dec 14, 2024

let me know if you need a new version published

@stinodego
Copy link
Contributor Author

let me know if you need a new version published

There's no real need for a new release - we'll add something in Polars to handle the warning for now. Just figured I'd contribute here since it was such an easy fix.

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