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

Bump setuptools to 72.2.* #12461

Merged
merged 4 commits into from
Aug 20, 2024
Merged

Bump setuptools to 72.2.* #12461

merged 4 commits into from
Aug 20, 2024

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Jul 30, 2024

No description provided.

@srittau
Copy link
Collaborator Author

srittau commented Jul 30, 2024

Closes: #12458

This comment has been minimized.

Comment on lines 6 to 16
@deprecated(
"The test command is disabled and references to it are deprecated. Please remove any references to `setuptools.command.test` in all supported versions of the affected package."
)
class _test(Command):
description: ClassVar[str]
user_options: ClassVar[list[tuple[str, str, str]]]
test_suite: Incomplete
test_module: Incomplete
test_loader: Incomplete
test_runner: Incomplete
def initialize_options(self) -> None: ...
def finalize_options(self) -> None: ...
@NonDataProperty
def test_args(self) -> list[str]: ...
def with_project_on_sys_path(self, func) -> None: ...
def project_on_sys_path(self, include_dists=()): ...
@staticmethod
def paths_on_pythonpath(paths) -> None: ...
@staticmethod
def install_dists(dist): ...
def run(self) -> None: ...
def run_tests(self) -> None: ...

test = _test
Copy link
Collaborator

@Avasam Avasam Jul 30, 2024

Choose a reason for hiding this comment

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

This doesn't seem to propagate the static deprecation (at least not in pylance). Given it's a new private name anyway, I'd just mark test directly.
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The problem with that is that we'd have to ignore the stubtest errors and stubtest won't complain if the class is removed or we make an error.

Copy link
Collaborator

@Avasam Avasam Jul 31, 2024

Choose a reason for hiding this comment

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

The problem with that is that we'd have to ignore the stubtest errors

Are you sure? I'm running stubtest on setuptools locally on your branch with this change:

@deprecated(
    """\
The test command is disabled and references to it are deprecated. \
Please remove any references to `setuptools.command.test` in all supported versions of the affected package.\
"""
)
class test(Command):
    description: ClassVar[str]
    user_options: ClassVar[list[tuple[str, str, str]]]
    def initialize_options(self) -> None: ...
    def finalize_options(self) -> None: ...
    def run(self) -> None: ...

And it's passing as-is. Even changing an attribute of test to be missing or incorrect is picked up by stubtest. Let's say I remove description:

error: setuptools.command.test.test.description is not present in stub
Stub: in file E:\Users\Avasam\Documents\Git\typeshed\stubs\setuptools\setuptools\command\test.pyi
MISSING
Runtime:
'stub for old test command (do not use)'

Copy link
Collaborator

@Avasam Avasam Aug 19, 2024

Choose a reason for hiding this comment

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

@srittau Setuptools 73 has just been released. I'd like to sync the typeshed stubs to it as well.

If you still feel unsure about my suggestion, I can approve your PR as-is and make the suggestion separately.

This comment has been minimized.

Copy link
Contributor

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

@Avasam Avasam changed the title Bump setuptools to 72.1.* Bump setuptools to 72.2.* Aug 20, 2024
@Avasam Avasam merged commit b19d967 into python:main Aug 20, 2024
48 checks passed
@srittau srittau deleted the setuptools-72.1 branch August 20, 2024 21:09
max-muoto pushed a commit to max-muoto/typeshed that referenced this pull request Sep 8, 2024
Co-authored-by: Avasam <[email protected]>
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