-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat: support PEP 723 with a toml load function #811
Conversation
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Should we fail the session instead of raising ValueError? Nox can be more opinionated about the error handling than say a library, and it would avoid the traceback. |
Hmm, we could, but most of the improperly configured calls seem to also raise ValueError, such as Line 219 in 956f10c
and Lines 388 to 393 in 956f10c
|
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
b64bbc3
to
61cefde
Compare
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
72981db
to
6ca7088
Compare
Current name (from the issue) is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Do we want to mark this as a provisional API in some way?
It feels like new territory. We may want to adapt to evolving packaging standards and move around or rename things without going through deprecation.
I think what we've added here is pretty conservative. If we add more things here, then possibly. If we have a (But happy to call this provisional too if you prefer) |
Co-authored-by: Claudio Jolowicz <cjolowicz@gmail.com>
This is the suggestion from #808. As detailed there, I think this is a flexible first step that will help noxfile authors support PEP 723 in scripts, and could have a followup later that provides a more integrated solution.
This also allows noxfile authors to finally integrate with pyproject.toml on all versions of Python, rather than requiring nox be installed on Python 3.11+, by ensuring that a toml library is always present. You might need to read the version, etc. from
pyproject.toml
in your noxfile, and now you can.I made all the errors ValueError because that's what the PEP did in the example implementation. Happy to make them something else if there's something better.