Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@srittau
Copy link
Collaborator

@srittau srittau commented Mar 28, 2025

Also re-export missing distutils command install_data
and remove duplicate stublist allow entries

Also re-export missing distutils command `install_data`
and remove duplicate stublist allow entries
@srittau srittau requested a review from Avasam March 28, 2025 14:32
@srittau
Copy link
Collaborator Author

srittau commented Mar 28, 2025

Closes: #13732

@github-actions

This comment has been minimized.

@Avasam
Copy link
Collaborator

Avasam commented Mar 28, 2025

Closes: #13732

Closing keywords have to be in the original post (you can see the bot's PR didn't get linked)
image

Copy link
Collaborator

@Avasam Avasam left a comment

Choose a reason for hiding this comment

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

#13685 (comment)

From what I can see, here's the only public typing related changes:

  • setuptools/_distutils/command/install.py's install.config_vars is now a ChainMap
  • setuptools/_distutils/compilers/C/msvc.py added back the accidentally removed shared_lib_format property
  • warn_dash_deprecation and make_option_lowercase have been removed from setuptools/dist.py

So this patch should still be applied (at least setuptools/setuptools/_distutils/compilers/C/msvc.pyi)

diff --git a/stubs/setuptools/setuptools/_distutils/command/install.pyi b/stubs/setuptools/setuptools/_distutils/command/install.pyi
index 059116834..67502f9d0 100644
--- a/stubs/setuptools/setuptools/_distutils/command/install.pyi
+++ b/stubs/setuptools/setuptools/_distutils/command/install.pyi
@@ -1,5 +1,6 @@
 from _typeshed import Incomplete
-from typing import ClassVar
+from collections import ChainMap
+from typing import Any, ClassVar
 
 from ..cmd import Command
 
@@ -34,7 +35,7 @@ class install(Command):
     build_lib: Incomplete
     record: Incomplete
     def initialize_options(self) -> None: ...
-    config_vars: Incomplete
+    config_vars: ChainMap[str, Any]  # Any: Same as sysconfig.get_config_vars
     install_libbase: Incomplete
     def finalize_options(self) -> None: ...
     def dump_dirs(self, msg) -> None: ...
diff --git a/stubs/setuptools/setuptools/_distutils/compilers/C/msvc.pyi b/stubs/setuptools/setuptools/_distutils/compilers/C/msvc.pyi
index 99d107c63..44f5c85b8 100644
--- a/stubs/setuptools/setuptools/_distutils/compilers/C/msvc.pyi
+++ b/stubs/setuptools/setuptools/_distutils/compilers/C/msvc.pyi
@@ -10,10 +10,8 @@ class Compiler(base.Compiler):
     obj_extension: ClassVar[str]
     static_lib_extension: ClassVar[str]
     shared_lib_extension: ClassVar[str]
-    # This was accidentally removed upstream and should be back pretty soon.
-    # shared_lib_format: ClassVar[str]
-    # static_lib_format = shared_lib_format
-    static_lib_format: ClassVar[str]
+    shared_lib_format: ClassVar[str]
+    static_lib_format = shared_lib_format
     exe_extension: ClassVar[str]
     initialized: bool
     def initialize(self, plat_name: str | None = None) -> None: ...

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@Avasam Avasam merged commit 71e01e3 into python:main Mar 28, 2025
43 checks passed
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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