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

Unpin the types-setuptools build dependency #14787

Merged
merged 5 commits into from
Feb 28, 2023

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Feb 26, 2023

The latest release of `types-setuptools` is causing type-check errors (and, therefore, build errors) on the `master` branch: see, e.g. https://github.com/python/mypy/actions/runs/4275505309/jobs/7442902732. python#14781 addressed some of the new errors, but didn't quite fix the build.
@AlexWaygood AlexWaygood changed the title Fix mypyc build errors on master Fix mypyc build errors on master caused by the latest release of types-setuptools Feb 26, 2023
@AlexWaygood
Copy link
Member Author

AlexWaygood commented Feb 26, 2023

Okay, it looks like this PR currently gets us to a place where the mypyc build succeeds (further than we get on master, at least!), but we then get a ton of failing mypyc tests when the test suite is run :(

@AlexWaygood AlexWaygood marked this pull request as draft February 26, 2023 15:44
AlexWaygood added a commit to AlexWaygood/mypy that referenced this pull request Feb 26, 2023
The mypyc build is failing on `master` due to the latest release of `types-setuptools`: see, e.g. https://github.com/python/mypy/actions/runs/4275505309/jobs/7442902732.

python#14787 fixes the _build_ but there's still a bunch of mypyc tests failing on that PR. I haven't got time to debug them right now (and I'm not a mypyc expert, anyway!), so this is a stopgap PR to pin `types-setuptools` so that we avoid the latest release.
@AlexWaygood
Copy link
Member Author

I haven't got time to debug the failing tests right now, so here's a stopgap PR pinning types-setuptools to avoid the latest release:

JelleZijlstra pushed a commit that referenced this pull request Feb 26, 2023
The mypyc build is failing on `master` due to the latest release of
`types-setuptools`: see, e.g.
https://github.com/python/mypy/actions/runs/4275505309/jobs/7442902732.

#14787 fixes the mypyc _build_, but there's still a bunch of mypyc tests
failing on that PR. I haven't got time to debug them right now (and I'm
also not particularly knowledgeable about mypyc!), so this is a stopgap
PR to pin `types-setuptools` so that we avoid the latest release.
mypyc/build.py Outdated

if not use_setuptools:
from distutils.core import Extension
from distutils.core import Extension as extension_class
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
from distutils.core import Extension as extension_class
import distutils.core
extension_class = distutils.core.Extension

Just a hunch

Copy link
Member Author

Choose a reason for hiding this comment

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

Trying it out now...

Copy link
Member Author

Choose a reason for hiding this comment

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

And it worked!

@AlexWaygood AlexWaygood changed the title Fix mypyc build errors on master caused by the latest release of types-setuptools Unpin the types-setuptools build dependency Feb 26, 2023
@github-actions
Copy link
Contributor

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

@AlexWaygood AlexWaygood marked this pull request as ready for review February 26, 2023 18:18
@@ -12,7 +12,7 @@ requires = [
"tomli>=1.1.0; python_version<'3.11'",
# the following is from build-requirements.txt
"types-psutil",
"types-setuptools<67.4.0.2", # TODO: fix build when using the latest version of types-setuptools
"types-setuptools",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need a lower bound?

Copy link
Member Author

@AlexWaygood AlexWaygood Feb 26, 2023

Choose a reason for hiding this comment

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

I don't think it needs one -- #14781 had successful CI runs with types-setuptools==67.4.0.1, e.g. https://github.com/python/mypy/actions/runs/4272132207/jobs/7437069696. But I can add one anyway to be sure, if you like -- it probably wouldn't hurt. Would you prefer that?

@hauntsaninja hauntsaninja merged commit 243f584 into python:master Feb 28, 2023
@AlexWaygood AlexWaygood deleted the patch-1 branch February 28, 2023 08:23
AlexWaygood added a commit to AlexWaygood/mypy that referenced this pull request Mar 2, 2023
- The latest release of `types-setuptools` started causing type-check
errors (and, therefore, mypyc build errors) on the `master` branch: see,
e.g.
https://github.com/python/mypy/actions/runs/4275505309/jobs/7442902732.
- python#14781 addressed some of the new errors, but didn't quite fix the
build.
- python#14788 then pinned the `types-setuptools` dependency as a temporary
stopgap measure.
- This PR now attempts to unpin `types-setuptools` and fix the build
errors in a more principled way.
JelleZijlstra pushed a commit that referenced this pull request Mar 2, 2023
The mypyc build was recently broken by a new release of
`types-setuptools`. This was fixed on `master` by the following two PRs:
- #14781
- #14787

However, the mypyc build is still broken on the 1.1 branch:
https://github.com/python/mypy/actions/runs/4311688115/jobs/7521345529.

This PR cherry-picks the two PRs that fixed the build to the 1.1 branch.

---------

Co-authored-by: Avasam <samuel.06@hotmail.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.

3 participants