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

distutils package was removed in 3.12 #10249

Merged
merged 4 commits into from
Jun 4, 2023
Merged

distutils package was removed in 3.12 #10249

merged 4 commits into from
Jun 4, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jun 3, 2023

@sobolevn
Copy link
Member Author

sobolevn commented Jun 3, 2023

What should we do with

   /home/runner/work/typeshed/typeshed/stubs/babel/babel/messages/frontend.pyi:3:6 - error: Import "distutils.cmd" could not be resolved (reportMissingImports)
  /home/runner/work/typeshed/typeshed/stubs/babel/babel/messages/frontend.pyi:8:15 - error: Base class type is unknown, obscuring type of derived class (reportUntypedBaseClass)
/home/runner/work/typeshed/typeshed/stubs/cffi/cffi/api.pyi
  /home/runner/work/typeshed/typeshed/stubs/cffi/cffi/api.pyi:1:8 - error: Import "distutils.core" could not be resolved (reportMissingImports)

?

@github-actions

This comment has been minimized.

@sobolevn
Copy link
Member Author

sobolevn commented Jun 3, 2023

I think that METADATA.toml can be updated with versions = metadata field, to indicate that some python versions are not supported (yet or at all).

@AlexWaygood
Copy link
Member

AlexWaygood commented Jun 3, 2023

Maybe we could import those things from setuptools._distutils, and add a dependency on types-setuptools for those stubs packages?

@sobolevn
Copy link
Member Author

sobolevn commented Jun 3, 2023

@sobolevn
Copy link
Member Author

sobolevn commented Jun 3, 2023

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2023

Diff from mypy_primer, showing the effect of this PR on open source code:

apprise (https://github.com/caronc/apprise)
- setup.py:74: error: Argument "cmdclass" to "setup" has incompatible type "Dict[str, Type[babel.messages.frontend.Command]]"; expected "Mapping[str, Type[setuptools._distutils.cmd.Command]]"  [arg-type]

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM, though I'd appreciate a third opinion from somebody

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

This seems approximately fine to me and unlikely to cause regressions. We can later investigate what exactly these packages do whenever they claim 3.12 support.

@hauntsaninja hauntsaninja merged commit c1a857a into main Jun 4, 2023
@hauntsaninja hauntsaninja deleted the sobolevn-patch-5 branch June 4, 2023 05:08
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.

3 participants