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
Emit warning for invalid [tools.setuptools] table #4151
base: main
Are you sure you want to change the base?
Conversation
Hi @SnoopJ, thank you very much for the contribution. I agree that this makes setuptools more friendly towards the end user. For this change I guess it is fine, since it is small and trivial. But I think we do want to have that line covered in the tests1. Alternatively, users can also rely on linter's scrutiny for catching problems like this. Footnotes
|
To be clear, I have personally not had this problem in quite a while, but filed the originating issue and this contribution on behalf of a user who did have this problem and who I consider to be pretty sophisticated. A linter could certainly catch the problem, but I think the users who are most likely to have this problem are probably not even going to be aware that linters are an option.
Sure, I can look at getting it under coverage by the tests.
I agree with the general point that there's a limit to what Since the only action taken here is issuing a warning, the main maintenance burden I see (aside from test coverage) is to the legibility of the surrounding code, especially if |
Yeah, I agree that the change here is very minimal and straight forward so I think it is fine to add it to the code base (if we manage to get it covered in the tests). |
6fed6db
to
ac62a62
Compare
ac62a62
to
542d448
Compare
Having another look at this, resolving the test failures it introduces before I write a new test. Turns out that some of them are caused by this typo being present in the test suite, which does make me feel better about it as a feature. Not sure yet about the other failures. |
542d448
to
27d4499
Compare
Okay I've re-synchronized with The remaining failures are tests for inclusion of typing files when using the metadata that previously contained the typo: click to see failures
I don't know if this means that:
I'd like a maintainer to tell me which of those is correct, or perhaps tell me some obvious thing I've missed that means the typo in the metadata should not be corrected. |
This PR now also includes the test that was the main blocker to date. Disabling the |
4 test failures in CI, 3 of which were the expected problem with |
Looking further into
But it isn't clear to me from this and reviewing the discussion in #4021 if this means that functionality is provided by enabling However, having been through this history, I see that @abravalheri was closely involved in the integration of this feature and the corresponding test. What do you think? Are the |
Thank you very much @SnoopJ for having a look on this.
That would make sense to me... @Danie-1, it seems that we oversaw a spelling mistake in #4021. Could you help us to assess the impact here? |
It sounds like Maybe the best thing to do here is to file a new bug and mark the tests parameterized by |
I agree that fixing the bug about type information files might take quite a bit of work. The behavior that I intended was that the type information files should be added even when include-package-data is false. I will have a look at it. That was an embarrassing typo! |
Interestingly, I am having difficulty reproducing the problem I thought was here in order to file a separate issue. In other words, in an attempted reproduction, if I set It is possible that the breakage is exclusive to the test suite after all. Continuing to investigate. |
I am at this point confident that the problem is exclusive to the test suite. It is kinda tricky to figure out exactly how the tests should be tweaked to properly test this feature, but at least this isn't a new bug in I believe the crux of the problem is that the But I'm having difficulty understanding the difference in what the tests do and what a |
I have also found that the feature seems to work in practice, but doesn't seem to work in the tests. The tests pass if I change build_py = get_finalized_build_py()
outputs = get_outputs(build_py) to build_py = get_finalized_build_py()
build_py.run_command("build")
outputs = get_outputs(build_py) I don't really understand what all the different possible arguments to |
Well spotted, thanks! I can confirm that this results in a passing test, as does invoking the
As I understand it, it's "just" an interface to run the official |
Co-authored-by: Daniel Naylor <daniel@ggim.me>
Remaining failure in CI seems to be failure when provisioning the Cygwin environment, I see nothing that is actionable for me as the author of the PR. |
Summary of changes
This changeset adds a warning when the invalid
[tools.setuptools]
table is detected inpyproject.toml
metadata, as a hint to users that any data they've declared there is being ignored bysetuptools
.Closes #4150.
Pull Request Checklist
_ExperimentalConfiguration
warning in the affected module is also not tested. I'd be happy to write one if the maintainers would like one.newsfragments/
.(See documentation for details)