Skip to content
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.httpie-ntlm: init at 1.0.2 #169302

Merged
merged 4 commits into from
May 12, 2022

Conversation

kfollesdal
Copy link
Contributor

Description of changes

Add missing python package httpie-ntlm, NTLM auth plugin for HTTPie.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@kfollesdal
Copy link
Contributor Author

Result of nixpkgs-review pr 169302 run on x86_64-linux 1

1 package failed to build:
  • python310Packages.httpie-ntlm
1 package built:
  • python39Packages.httpie-ntlm

@kfollesdal kfollesdal force-pushed the httpie-ntlm branch 2 times, most recently from 6a6532e to 0f03775 Compare April 19, 2022 10:59
@kfollesdal
Copy link
Contributor Author

Result of nixpkgs-review pr 169302 run on x86_64-linux 1

1 package built:
  • python39Packages.httpie-ntlm

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/849

@kfollesdal
Copy link
Contributor Author

Result of nixpkgs-review pr 169302 run on x86_64-linux 1

1 package built:
  • python39Packages.httpie-ntlm

pname = "httpie-ntlm";
version = "1.0.2";
format = "setuptools";
disabled = pythonAtLeast "3.10";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
disabled = pythonAtLeast "3.10";

Why shouldn't it work with python 3.11? if we use httpie from the same pythonPackages it will always have the same python version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SuperSandro2000, thank you for good questions. httpie is a python application, it is built with default python version in nixpkgs, at the moment python39 (https://github.com/NixOS/nixpkgs/blob/nixos-21.11/pkgs/tools/networking/httpie/default.nix)

Since httpie is a dependency to httpie-ntlm and httpie only exist for python39 in nixpkgs. httpie-ntlm will fail if trying to build in any another python version. E.g nixpkgs-review (#169302 (comment))

This is way I proposed to use disabled = ! isPy39;, to only build for python39.

You proposed to use pythonAtLeast or pythonOlder. So I used disabled = pythonAtLeast "3.10"; to avoid python310 og bigger. But it will allow python38 that fails to build.

At the moment I have reverted back to disabled = ! isPy39;, which I think is the cleanest solution. Do you have a proposal to a better solution?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want this. If we bump python3Packages to 3.10 it will silently break for no good reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SuperSandro2000 thanks for follow up :-) Maybe I have misunderstood, correct me if wrong. I have now removed the disable line. So now the package can be built as long httpie exist for given python version and fail if not. I can see that all PR checks have passed. But nixpkgs-review fail for python 3.10 as expected.

@kfollesdal
Copy link
Contributor Author

Result of nixpkgs-review pr 169302 run on x86_64-linux 1

1 package built:
  • python39Packages.httpie-ntlm

@kfollesdal
Copy link
Contributor Author

Result of nixpkgs-review pr 169302 run on x86_64-linux 1

1 package failed to build:
  • python310Packages.httpie-ntlm
1 package built:
  • python39Packages.httpie-ntlm

@SuperSandro2000
Copy link
Member

Now I know what the problem is: You are using httpie which is outside of python3Packages. You cannot draw httpie in like that. I think the best solution is to move the plugin out of python3Packages or httpie back in.

@kfollesdal
Copy link
Contributor Author

Result of nixpkgs-review pr 169302 run on x86_64-linux 1

5 packages built:
  • http-prompt
  • httpie (python39Packages.httpie)
  • python310Packages.httpie
  • python310Packages.httpie-ntlm
  • python39Packages.httpie-ntlm

@kfollesdal
Copy link
Contributor Author

Now I know what the problem is: You are using httpie which is outside of python3Packages. You cannot draw httpie in like that. I think the best solution is to move the plugin out of python3Packages or httpie back in.

@SuperSandro2000 Thanks for you patience :-) I have now made httpie available as an python package, have also updated it to latest version. Now everything seems to work as expected.

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should be it

pkgs/development/python-modules/httpie/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/httpie/default.nix Outdated Show resolved Hide resolved
@ofborg ofborg bot requested a review from SuperSandro2000 May 12, 2022 14:39
@SuperSandro2000 SuperSandro2000 merged commit 5eb5ae4 into NixOS:master May 12, 2022
@kfollesdal kfollesdal deleted the httpie-ntlm branch May 12, 2022 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants