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

httpie: 2.2.0 -> 2.3.0 #102466

Closed
wants to merge 1 commit into from
Closed

Conversation

JesusMtnez
Copy link
Contributor

@JesusMtnez JesusMtnez commented Nov 2, 2020

Motivation for this change

Bump httpie to 2.3.0.

  • Add requests-toolbelt dependency
  • Update patch for test_docs.py
  • Removed already fixed patch for test_ssl.py
  • Disabled doCheck for darwin
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Nov 3, 2020

Result of nixpkgs-review pr 102466 run on x86_64-darwin 1

2 packages failed to build:
  • http-prompt
  • httpie

httpie 231 tests fail on darwin with sandbox enabled

https://termbin.com/zxhk

@mweinelt
Copy link
Member

mweinelt commented Nov 5, 2020

httpie 231 tests fail on darwin with sandbox enabled

https://termbin.com/zxhk

  doCheck = !stdenv.isDarwin

@JesusMtnez
Copy link
Contributor Author

@mweinelt could you elaborate a little bit more, please? I am learning nix and I do not know how to proceed to try to fix it 🤔

@mweinelt
Copy link
Member

In #102466 (comment) @SuperSandro2000 remarked that the tests are not working on Darwin, because their sandbox is somewhat limited. I then proposed to add

  doCheck = !stdenv.isDarwin

which conditionally enables the tests on every platform but Darwin.

@JesusMtnez
Copy link
Contributor Author

Thank you for the explanation. I will try to change that later

@SuperSandro2000
Copy link
Member

@JesusMtnez friendly ping

@Ma27
Copy link
Member

Ma27 commented Nov 26, 2020

It's also not building on linux though:

error: --- Error --- build-remote
build of '/nix/store/qzfb3px7rcav95f1mg7rh8n5r29hpmha-httpie-2.3.0.drv' on 'ssh-ng://builder-ng' failed: error: --- Error --- nix-daemon
builder for '/nix/store/qzfb3px7rcav95f1mg7rh8n5r29hpmha-httpie-2.3.0.drv' failed with exit code 1; last 10 log lines:
  http: error: NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7ffff286b8e0>: Failed to establish a new connection: [Errno -2] Name or service not known

  =========================== short test summary info ============================
  FAILED tests/test_uploads.py::test_chunked_json - urllib3.exceptions.NewConne...
  FAILED tests/test_uploads.py::test_chunked_form - urllib3.exceptions.NewConne...
  FAILED tests/test_uploads.py::test_chunked_stdin - urllib3.exceptions.NewConn...
  FAILED tests/test_uploads.py::TestMultipartFormDataFileUpload::test_multipart_chunked
  FAILED tests/test_uploads.py::TestRequestBodyFromFilePath::test_request_body_from_file_by_path_chunked
  ================== 5 failed, 337 passed, 4 skipped in 13.03s ===================

error: --- Error ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix
builder for '/nix/store/qzfb3px7rcav95f1mg7rh8n5r29hpmha-httpie-2.3.0.drv' failed with exit code 1

@JesusMtnez
Copy link
Contributor Author

I am seeing those too... Not sure how to debug those. It seems it is not able to resolve the service name for the tests, but I am not very familiar with python or this codebase to debug it. Any help would be much appreciated.

@JesusMtnez
Copy link
Contributor Author

From 2.2.0 to 2.3.0, they change the way they install requests to enable socks, using requests[socks] instead of requests, and not pysocks... Could it be related? 🤔 I haven't found the proper way of doing the same using the nix definition for requests package.

@@ -33,6 +24,8 @@ python3Packages.buildPythonApplication rec {
pytestCheckHook
];

doCheck = !stdenv.isDarwin
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
doCheck = !stdenv.isDarwin
doCheck = !stdenv.isDarwin;

@JesusMtnez
Copy link
Contributor Author

It seems dependencies are being provided successfully:

Processing ./httpie-2.3.0-py3-none-any.whl
Requirement already satisfied: Pygments>=2.5.2 in /nix/store/8fmm6n98ai12k3g9kbrv0bnxqxyja41j-python3.8-Pygments-2.7.2/lib/python3.8/site-packages (from httpie==2.3.0) (2.7.2)
Requirement already satisfied: requests-toolbelt>=0.9.1 in /nix/store/glfz5yfksfx7w692cnjxbmj9wyh1bms8-python3.8-requests-toolbelt-0.9.1/lib/python3.8/site-packages (from httpie==2.3.0) (0.9.1)
Requirement already satisfied: requests[socks]>=2.22.0 in /nix/store/978nzv1f9xw56dl0cjky34dbhjpgby3j-python3.8-requests-2.25.0/lib/python3.8/site-packages (from httpie==2.3.0) (2.25.0)
Requirement already satisfied: requests<3.0.0,>=2.0.1 in /nix/store/978nzv1f9xw56dl0cjky34dbhjpgby3j-python3.8-requests-2.25.0/lib/python3.8/site-packages (from requests-toolbelt>=0.9.1->httpie==2.3.0) (2.25.0)
Requirement already satisfied: certifi>=2017.4.17 in /nix/store/c6ppzc432a8q85ym8n9pxj9zd9jaw9qj-python3.8-certifi-2020.11.8/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.1->requests-toolbelt>=0.9.1->httpie==2.3.0) (2020.11.8)
Requirement already satisfied: idna<3,>=2.5 in /nix/store/z28lxlcs4dir3gpwvl23qysfkqdl7935-python3.8-idna-2.10/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.1->requests-toolbelt>=0.9.1->httpie==2.3.0) (2.10)
Requirement already satisfied: chardet<4,>=3.0.2 in /nix/store/l6752ijd11axzz235qwxwidfrc1h358k-python3.8-chardet-3.0.4/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.1->requests-toolbelt>=0.9.1->httpie==2.3.0) (3.0.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /nix/store/lza0dk6xdqzdmjirwvgkq3jnrc8abs1l-python3.8-urllib3-1.26.2/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.1->requests-toolbelt>=0.9.1->httpie==2.3.0) (1.26.2)
Requirement already satisfied: certifi>=2017.4.17 in /nix/store/c6ppzc432a8q85ym8n9pxj9zd9jaw9qj-python3.8-certifi-2020.11.8/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.1->requests-toolbelt>=0.9.1->httpie==2.3.0) (2020.11.8)
Requirement already satisfied: idna<3,>=2.5 in /nix/store/z28lxlcs4dir3gpwvl23qysfkqdl7935-python3.8-idna-2.10/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.1->requests-toolbelt>=0.9.1->httpie==2.3.0) (2.10)
Requirement already satisfied: chardet<4,>=3.0.2 in /nix/store/l6752ijd11axzz235qwxwidfrc1h358k-python3.8-chardet-3.0.4/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.1->requests-toolbelt>=0.9.1->httpie==2.3.0) (3.0.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /nix/store/lza0dk6xdqzdmjirwvgkq3jnrc8abs1l-python3.8-urllib3-1.26.2/lib/python3.8/site-packages (from requests<3.0.0,>=2.0.1->requests-toolbelt>=0.9.1->httpie==2.3.0) (1.26.2)
Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in /nix/store/x8qdgplbfvm7slv3npry93bw0kl8mvgi-python3.8-pysocks-1.7.1/lib/python3.8/site-packages (from requests[socks]>=2.22.0->httpie==2.3.0) (1.7.1)
Installing collected packages: httpie
Successfully installed httpie-2.3.0

@bbigras
Copy link
Contributor

bbigras commented Jan 21, 2021

Any progress on this?

@JesusMtnez
Copy link
Contributor Author

@bbigras I did not have much time this holidays, sorry. Also, not sure how to continue debugging this right now. Any ideas?

@SuperSandro2000 SuperSandro2000 mentioned this pull request Feb 8, 2021
10 tasks
@JesusMtnez JesusMtnez deleted the httpie branch March 24, 2021 04:51
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

5 participants