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

Replace pipes.quote with shlex.quote #3298

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

shadchin
Copy link
Contributor

Description

The shlex.quote() API is available from Python 3.3 on; pipes.quote() was never documented, and is removed in Python 3.13.

Motivation and Context

Support Python 3.13

The `shlex.quote()` API is available from Python 3.3 on; `pipes.quote()` was never documented, and is removed in Python 3.13.
@shadchin shadchin requested review from dlstadther and a team as code owners July 21, 2024 17:21
Copy link
Collaborator

@dlstadther dlstadther left a comment

Choose a reason for hiding this comment

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

pipes.quote() was documented in the Python 2.7 docs with the note

Deprecated since version 2.7: Prior to Python 2.7, this function was not publicly documented. It is finally exposed publicly in Python 3.3 as the quote function in the shlex module.

So even though shlex.quote comes with the warning Warning The shlex module is only designed for Unix shells., given that it is equivalent to pipes.quote, this should have no change of behavior. (also shlex.quote was added in Python 3.3 and Luigi only "officially" supports 3.6+, we're still good here).

Thanks for this contribution!

@dlstadther dlstadther merged commit 9e0898e into spotify:master Jul 22, 2024
48 checks passed
@shadchin shadchin deleted the python313 branch July 23, 2024 04:48
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