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

MAINT: pipes.quote → shlex.quote #23977

Merged
merged 1 commit into from
Jun 22, 2023
Merged

Conversation

DimitriPapadopoulos
Copy link
Contributor

pipes.quote has long been deprecated, according to the pipes.quote documentation from Python 2.7.15:

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.

and the pipes documentation from Python 3.11:

Deprecated since version 3.11, will be removed in version 3.13: The pipes module is deprecated (see PEP 594 for details). Please use the subprocess module instead.

pipes.quote has long been deprecated, according to the pipes.quote
documentation from Python 2.7.15:
	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.
and the pipes documentation from Python 3.11:
	Deprecated since version 3.11, will be removed in
	version 3.13: The pipes module is deprecated (see
	PEP 594 for details). Please use the subprocess
	module instead.
@seberg
Copy link
Member

seberg commented Jun 19, 2023

Considering all of distutils is staged for removal, I am tempted to just not do this unless it's annoying.

@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Jun 20, 2023

It's annoying in the context of #23976, where I suggest applying pyupgrade to NumPy, to enforce contemporary Python.

Ideally we could disable certain classes of suggestions or apply pyupgrade to new contributions . The former is difficult because pyupgrade is "uncompromising" like black: it has very few options and no way to disable specific classes of suggestions. I doubt the latter is possible, it's not easy to analyse a patch vs. complete Python code.

@charris charris merged commit 87b0f08 into numpy:main Jun 22, 2023
57 checks passed
@charris
Copy link
Member

charris commented Jun 22, 2023

Thanks @DimitriPapadopoulos .

@DimitriPapadopoulos DimitriPapadopoulos deleted the shlex.quote branch June 22, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants