-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
testTypedPkgSimpleEditable is failing on master #15446
Comments
Yeah, I also noticed this test is being really flaky recently on Python 3.11. Here is an example run https://github.com/python/mypy/actions/runs/5261122966/jobs/9508885603 @ethanhs Since you are an expert on PEP 561, could you please check? |
Yep! I'll take a look at this later today! It looks like the package is failing to install, which might be related to a change in pip or one of its dependencies? I'll have to dig into it. |
Thanks! I also suspect it's some third-party package being updated, but none of pip, setuptools, tox, and wheel had updates in the last few days. Python 3.11.4 just came out though, so maybe something changed there? |
👍🏻 Looked though the logs. The Github action runner started using The issue also seems to be related to setuptools recent Adding something here, does work. Just not sure that's correct. @ethanhs Would appreciate if you could take a closer look at it. Lines 55 to 59 in cfec717
if editable:
install_cmd.append("-e")
install_cmd.append(".")
+ if editable:
+ install_cmd.extend(["--config-settings", "editable_mode=compat"])
|
The last good run from this morning: https://github.com/python/mypy/actions/runs/5276828348/jobs/9544075850 |
@cdce8p good find! I don't think I want to rely on the compat mode because they seem to want to remove it. So I think this is basically #13392. For now I think we should just disable this test and I'm going to leave a comment in the other issue that we should stop supporting editable installs. |
If it's just the setuptools issue again, we could just change what build backend we use in CI. Most other build backends don't do the magical import hooks thing for editable installs... |
Fixes python#15446 setuptools has broken how editable installs work. It seems like most other build backends continue to use static pth files, so let's just switch to another one.
Some more background. I bisected the issue to the pip update in Python 3.11.4 python/cpython@a59dc1f. A bit surprising IMO since I believed the venv pip version would be used, but that somehow doesn't seem to be the case. Pip Remove setup.py install fallback when building a wheel failed for projects without pyproject.toml. ([#8368](https://github.com/pypa/pip/issues/8368)) https://pip.pypa.io/en/stable/news/#deprecations-and-removals |
If we want to preserve testing the old behavior with setuptools, adding a # test-data/packages/typedpkg/pyproject.toml
[build-system]
requires = ["setuptools~=62.3", "wheel"]
build-backend = "setuptools.build_meta" Note the old setuptools version which still supports the editable installs. |
Fixes #15446 setuptools has broken how editable installs work. It seems like most other build backends continue to use static pth files, so let's just switch to another one.
I merged #15451 without a detailed review to unbreak master. I hope somebody else with more context on PEP 561 packages will take another look at the PR. |
@cdce8p A little off topic, but just wanted to say thanks for all your work on mypy. I couldn't find any contact information for you on your profile, but there's a mypy contributor discord and would love for you to be in it if you're interested. Let me know at {my username}@gmail.com and I can send you an invite. |
Fixes #15446 setuptools has broken how editable installs work. It seems like most other build backends continue to use static pth files, so let's just switch to another one.
https://build.opensuse.org/request/show/1099368 by user sebix + anag+factory - Update to 1.4.1 - disable pep561 tests, as they fail on Python 3.11.4, see python/mypy#15446
e.g. https://github.com/python/mypy/actions/runs/5279780403/jobs/9550964906
Seems to have started today. Cross-ref #15444 (comment)
The text was updated successfully, but these errors were encountered: