pythonPackages.b2sdk: 1.6.0 -> 1.7.0#122138
Conversation
|
@ofborg build backblaze-b2 |
pkgs/top-level/python-packages.nix
Outdated
There was a problem hiding this comment.
Yeah I'm not sure, happy to rename it, nothing else is using it anyway.
There was a problem hiding this comment.
I think it was from python2, not 2.0
There was a problem hiding this comment.
I'll rename it then, backblaze is using it from python 3.
There was a problem hiding this comment.
that being said, this is a form of pinning, and b2sdk should really just adopt the newer version of arrow
Pinning within python-modules is highly discouraged. This will potentially introduce incompatible versions in a user's environment as either the new pinned version or the original version will be imported at runtime, breaking one of the packages.
The preference to handling this is to relax version bounds in the "install_requires" field. (could be in setup.py, pyproject.toml, requirements or others). In most cases, packages are still compatible with small API changes which may warrant a major version bump. We use test suites to verify that the package still works correctly.
If the package is still incompatible with the latest major version, then the most proper way to handle this is make an issue with the upstream package to adopt the latest major version. Or if upstream is not very responsive, you are free patch the source to make it compatible.
In very few circumstances, two versions of the same package are allowed to exist if the packages are extremely difficult to package. Some examples of this are tensorflow, which has huge ecosystems built around it and is hard to package. Another is django, which has 2 actively developed versions, and large ecosystems built around each.
One exception to this is applications, due to the way buildPythonApplication and toPythonApplication functions work, the related derivations will not bleed dependencies between packages. If the package doesn't need to be imported by other python modules, then this package would be a good candidate to convert into application. You can look at https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/admin/awscli/default.nix as an example of using an overlay within a python application.
Info on buildPythonApplication can be found here.
Info on toPythonApplication can be found here.
|
Result of 9 packages built:
|
|
Result of 1 package failed to build:9 packages built successfully:
4 suggestions:
Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. Result of 1 package failed to build:9 packages built successfully:
3 suggestions:
Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. |
There was a problem hiding this comment.
default behavior
| doCheck = true; |
There was a problem hiding this comment.
Please add yourself as a maintainer when adding a new package.
https://nixos.org/manual/nixpkgs/stable/#reviewing-contributions-new-packages
There was a problem hiding this comment.
I saw a lot of other python packages didn't have maintainers, so I didn't realise this was the same as top level packages.
There was a problem hiding this comment.
looks a little cleaner, IMO
| preBuild = '' | |
| export SETUPTOOLS_SCM_PRETEND_VERSION="${version}" | |
| ''; | |
| SETUPTOOLS_SCM_PRETEND_VERSION= version; |
pkgs/top-level/python-packages.nix
Outdated
There was a problem hiding this comment.
I think it was from python2, not 2.0
|
@uri-canva please fix the evaluation error on darwin |
|
Result of 9 packages built:
|
|
#121250 was already covers |
|
Nice! I should I searched before starting on this. I have tested it on darwin and it's broken, but I'll wait for it to picked up by hydra to double check that it's not something wrong with my local setup: https://hydra.nixos.org/job/nixpkgs/gnome/backblaze-b2.x86_64-darwin/all. |
|
Oh no. If it is broken on darwin let me know and I'll revert it. Was this change good on darwin? I didn't notice any obvious differences other than the arrow patch. |
|
This change is good on darwin, but the build was broken on darwin in a different way before your PR, I'm not sure if your PR layered a new break on top of it, or switched it, I will check now. |
|
Ok, tested again, it all works on darwin, so false alarm. Thanks @fabaff @volta001. |
Motivation for this change
Upgrade b2sdk.
Fix backblaze-b2 on darwin.
Failure: https://hydra.nixos.org/build/142494474
ZHF: #122042
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)