-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
python3Packages: deprecate 'format = "other/pyproject"' #355654
base: staging
Are you sure you want to change the base?
Conversation
@@ -154,6 +154,7 @@ in | |||
, ... } @ attrs: | |||
|
|||
assert (pyproject != null) -> (format == null); | |||
assert lib.assertMsg (format != "other") "${namePrefix}${attrs.pname}: `format = \"other\"` is deprecated. Use `pyproject = false` instead."; |
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.
Might be better to keep lib.warn
for a release, and change to assert/throw in the next.
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.
Since these changes are just replacements, and the release included is 25.05 in 6 months, I think we could throw an error.
We easily miss warnings, and I'm exhausted of pointing them out in reviews.
But if someone else also suggests lib.warn
, I'll make the change.
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.
Since these changes are just replacements, and the release included is 25.05 in 6 months, I think we could throw an error.
That will still be a show stopper for people using unstable channel. Such changes are not completely unacceptable, but we generally don't do this.
We easily miss warnings, and I'm exhausted of pointing them out in reviews.
Ofborg will turn it into an error so such new patterns won't be accepted into Nixpkgs.
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.
Ok, let's change it to warn. I found the evaluation errors around home-assistant, so I'll commit it along with this fix.
Thanks for your review.
I guess when converting |
In many cases, simply change Also, to change |
d9c55c4
to
61d861f
Compare
You need tree-sitter and a Nix evaluator. Not impossible but will be more complex than a simple grep. |
Good point. Yes, I have a fork of |
I was first confused by the commit titles and thought we abort evaluation instead of just logging a warning. |
generated by following command rg 'format = "other"' -l | xargs -n 1 sed -i 's/format = "other"/pyproject = false/g' Note: python27Packages should not adopt this change, because the builder for python2 cannot recognize the "pyproject" attribute
generated by following command rg 'format = "pyproject"' -l | xargs -n 1 sed -i 's/format = "pyproject"/pyproject = true/g' Note: python27Packages.backports-functools-lru-cache should not adopt this change, because the builder for python2 cannot recognize the "pyproject" attribute
61d861f
to
a85486a
Compare
Thanks, updated the commit messages. |
generated by following command
rg 'format = "other"' -l | xargs -n 1 sed -i 's/format = "other"/pyproject = false/g'
The following commits enabled assertions for
format = "other/pyproject"
5d6d563
460c25c
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.