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

Only import distutils if it is needed #10203

Merged
merged 1 commit into from
Mar 11, 2021

Conversation

freundTech
Copy link
Contributor

Description

distutils is deprecated in python 3.10, so we only import it if it is
needed, which should only be python < 3.2

Test Plan

All tests still pass. This is a trivial change and shouldn't cause any problems.

distutils is deprecated in python 3.10, so we only import it if it is
needed, which should only be python < 3.2
@JelleZijlstra
Copy link
Member

Mypy doesn't support Python < 3.2, so maybe this branch can just be removed?

@JelleZijlstra
Copy link
Member

Never mind, this file has to work in Python 2 because it's used for finding site-packages in Python 2.

@JelleZijlstra JelleZijlstra merged commit 020998d into python:master Mar 11, 2021
@freundTech freundTech mentioned this pull request Mar 11, 2021
21 tasks
@freundTech freundTech deleted the fix-deprecated-distutils branch March 12, 2021 23:34
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