diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-06-12 09:54:38 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-06-25 10:33:01 +0100 |
| commit | 62208bcb4920358b7921ab113857988d4c4e2200 (patch) | |
| tree | a2fafe99f407c10cf85fdc8b5af108b792d52104 /gnu/packages/python-web.scm | |
| parent | cbf3cc1e168b7dbca391b42471ad94cc3458adb6 (diff) | |
gnu: Add python-httpcore2.
* gnu/packages/python-web.scm (python-httpcore2): New variable.
Relates-to: guix/guix!9422
Diffstat (limited to 'gnu/packages/python-web.scm')
| -rw-r--r-- | gnu/packages/python-web.scm | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 9f59785b9e4..62392920edf 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm | |||
| @@ -1666,6 +1666,71 @@ resolution in a Python script without any changes to the hosts file or the use | |||
| 1666 | of a fake DNS resolver.") | 1666 | of a fake DNS resolver.") |
| 1667 | (license license:asl2.0))) | 1667 | (license license:asl2.0))) |
| 1668 | 1668 | ||
| 1669 | (define-public python-httpcore2 | ||
| 1670 | (package | ||
| 1671 | (name "python-httpcore2") | ||
| 1672 | (version "2.4.0") | ||
| 1673 | (source | ||
| 1674 | (origin | ||
| 1675 | (method git-fetch) | ||
| 1676 | (uri (git-reference | ||
| 1677 | (url "https://github.com/pydantic/httpx2") | ||
| 1678 | (commit (string-append "v" version)))) | ||
| 1679 | (file-name (git-file-name name version)) | ||
| 1680 | (sha256 | ||
| 1681 | (base32 "05mql79icxigldzw01hs77jpgihvzjahvniwncb7ji2rqzhjr42g")))) | ||
| 1682 | (build-system pyproject-build-system) | ||
| 1683 | (arguments | ||
| 1684 | (list | ||
| 1685 | #:phases | ||
| 1686 | #~(modify-phases %standard-phases | ||
| 1687 | (add-after 'unpack 'preparation | ||
| 1688 | (lambda _ | ||
| 1689 | (chdir "src/httpcore2") | ||
| 1690 | (copy-recursively "../../tests/httpcore2" "tests") | ||
| 1691 | (substitute* (find-files "tests" "\\.py$") | ||
| 1692 | (("tests\\.httpcore2") "tests") | ||
| 1693 | (("tests/httpcore2") "tests")))) | ||
| 1694 | (add-before 'build 'set-version | ||
| 1695 | (lambda _ | ||
| 1696 | (substitute* "pyproject.toml" | ||
| 1697 | ((".*uv-dynamic-versioning>.*") "") | ||
| 1698 | (("source.*uv-dynamic-versioning.*") "source = 'vcs'")) | ||
| 1699 | (substitute* "httpcore2/__init__.py" | ||
| 1700 | ((".*= version\\(.*") | ||
| 1701 | (format #f "__version__ = ~s~%" #$version)))))))) | ||
| 1702 | (native-inputs | ||
| 1703 | (list python-hatch-fancy-pypi-readme | ||
| 1704 | python-hatch-vcs | ||
| 1705 | python-hatchling | ||
| 1706 | python-pytest | ||
| 1707 | python-pytest-httpbin | ||
| 1708 | python-pytest-trio)) | ||
| 1709 | (propagated-inputs | ||
| 1710 | (list python-h11 | ||
| 1711 | python-truststore | ||
| 1712 | ;; [optional] | ||
| 1713 | python-anyio | ||
| 1714 | python-h2 | ||
| 1715 | python-socksio | ||
| 1716 | python-trio)) | ||
| 1717 | (home-page "https://github.com/pydantic/httpx2") | ||
| 1718 | (synopsis "Minimal low-level HTTP client") | ||
| 1719 | (description | ||
| 1720 | "The HTTP Core package provides a minimal low-level HTTP client, which | ||
| 1721 | does one thing only. Sending HTTP requests. | ||
| 1722 | |||
| 1723 | Some things HTTP Core does do: | ||
| 1724 | @itemize | ||
| 1725 | @item Sending HTTP requests. | ||
| 1726 | @item Thread-safe / task-safe connection pooling. | ||
| 1727 | @item HTTP(S) proxy & SOCKS proxy support. | ||
| 1728 | @item Supports HTTP/1.1 and HTTP/2. | ||
| 1729 | @item Provides both sync and async interfaces. | ||
| 1730 | @item Async backend support for @code{asyncio} and @code{trio}. | ||
| 1731 | @end itemize") | ||
| 1732 | (license license:bsd-3))) | ||
| 1733 | |||
| 1669 | (define-public python-httpretty | 1734 | (define-public python-httpretty |
| 1670 | (package | 1735 | (package |
| 1671 | (name "python-httpretty") | 1736 | (name "python-httpretty") |
