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
python-keystoneclient: Init at 4.1.0 (+ all openstack dependencies) #96624
Conversation
This probably won't built because of importlib-metadata < 1.7.0, waiting for ofborg to tell me. |
8e55e49
to
e5d9ab6
Compare
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.
My comments on the first module all apply for all the modules.
You should split these modules up into individual commits; and also, don't capitalize "Init".
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.
One commit per package.
e5d9ab6
to
5ea2e77
Compare
sorry, I sorted python-packages.nix please reabase on latest master and re-sort the entries please :) |
fd14838
to
6d5524a
Compare
Took a bit of time but conflicts have been fixed for each commits. |
Currently working on configuring the tox test suites. Don't merge this now. |
And now I've got a problem : What should I do ? |
You should file an issue upstream - ideally they can easily break the circular test dependency and make a new fixed release - that's been my experience before. Pending that, you can just skip tests in oslo-config. |
Filed an issue https://bugs.launchpad.net/oslo.config/+bug/1893978. I'll remove oslo-config tests for the moment. |
6d5524a
to
6b06d7e
Compare
6b06d7e
to
ab86760
Compare
I've resolved checkInputs for all packages until reaching one of the packages of the circular dependency issue. So for now none of them have doCheck = true for this reason. Merging can be done, I'll PR an update when openstack solves this issue. |
sha256 = "0ab8ic9bk644i8134z044kpcf6pvawqf4rq4xgv1p11msbs82ybq"; | ||
}; | ||
|
||
patches = [ ./tox-pass-system-pythonpath.patch ]; |
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.
tox overlaps with nix does, usually I just remove the tox.ini's before testing.
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.
Thanks for that, it makes it really easier !
]; | ||
|
||
# Circular dependencies on stestr, see https://bugs.launchpad.net/oslo.config/+bug/1893978 | ||
doCheck = false; |
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.
If tests are not available, then please use pythonImportsCheck
to import the most important modules. This isn't as good as unit tests, but will usually give a good indication of run-time errors. Please see pythonImportsCheck documentation for more information.
let | ||
pbr_5_5_0 = pbr.overrideAttrs (old: { | ||
version = "5.5.0"; | ||
name = "pbr-5.5.0"; | ||
src = fetchPypi { | ||
pname = "pbr"; | ||
version = "5.5.0"; | ||
sha256 = "1sl2w7zq33kzbh6im3lyl7jfwyddjkqmrx0y5b93v2n7a67xkgql"; | ||
}; | ||
}); | ||
in |
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.
having different versions of a python module can subtley break other packages at runtime.
This is only allowed with very few exceptions. Please try to remove it (relax version bounds on the package which is doing the pinning"
|
||
checkPhase = '' | ||
export UPPER_CONSTRAINTS_FILE="${upper-constraints}" | ||
tox |
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.
I would remove tox, and just do the test suite
''; | ||
|
||
# Circular dependencies on oslotest, see https://bugs.launchpad.net/oslo.config/+bug/1893978 | ||
doCheck = false; |
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.
If tests are not available, then please use pythonImportsCheck
to import the most important modules. This isn't as good as unit tests, but will usually give a good indication of run-time errors. Please see pythonImportsCheck documentation for more information.
doc8 | ||
fixtures | ||
oslo-i18n | ||
tox |
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.
I would just remove tox, and run the commands it was meant to run
let | ||
bandit_1_5_1 = bandit.overrideAttrs (old: { | ||
version = "1.5.1"; | ||
name = "bandit-1.5.1"; | ||
src = fetchPypi { | ||
pname = "bandit"; | ||
version = "1.5.1"; | ||
sha256 = "0k5sd4xgd6lp2ap1vd8nk5fabcdyw62cf9fmj791n7nyx77zl4wl"; | ||
}; | ||
}); | ||
in |
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.
shouldn't be allowed, see above
let | ||
pyModuleDeps = [ | ||
keystoneauth1 | ||
oslo-config | ||
oslo-i18n | ||
oslo-serialization | ||
pbr | ||
]; | ||
in |
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.
please just move below
let | ||
pyModuleDeps = [ | ||
keystoneauth1 | ||
oslo-config | ||
oslo-i18n | ||
oslo-serialization | ||
pbr | ||
]; | ||
in |
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.
please just put on propagatedBuildInputs
python-keystoneclient = disabledIf (!pythonOlder "3.8") (callPackage ../development/python-modules/python-keystoneclient { }); | ||
|
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.
please move into expression:
disabled = pythonAtLeast "3.8";
Currently working on your change requests, removed tox on oslo-config test suite but I now have another circular dependency graph ( a bit simpler this time) : |
I don't think having these packages in Nixpkgs is a good idea. We've had them in the past, and they were problematic because of incompatible dependencies. As commented by @jonringer, the same applies to this PR. Check e.g. |
Note that if all you need is a cli, and not importable libraries, you could use a tool such as poetry2nix. (Not saying anything about including that in Nixpkgs here though.) |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/pull-request-etiquette-when-submitting-lots-of-packages-at-once/9065/2 |
@SCOTT-HAMILTON please fix the eval issue. |
I think that @FRidh is right when he says that keystonclient is better out of nixpkgs. I still didn't get any answer from the ubuntu devs anyway regarding the circular deps. So despite having struggled a bit for this, I think it's better to close this PR. |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)