python3Packages.aiohttp: 3.11.18 -> 3.12.10
Diff: https://github.com/aio-libs/aiohttp/compare/refs/tags/v3.11.18...refs/tags/v3.12.10 Changelog: https://docs.aiohttp.org/en/v3.12.10/changes.html
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
isPyPy,
|
||||
|
||||
# build-system
|
||||
cython,
|
||||
cython_3_1,
|
||||
pkgconfig,
|
||||
setuptools,
|
||||
|
||||
# native dependencies
|
||||
@@ -30,8 +31,10 @@
|
||||
brotlicffi,
|
||||
|
||||
# tests
|
||||
blockbuster,
|
||||
freezegun,
|
||||
gunicorn,
|
||||
isal,
|
||||
proxy-py,
|
||||
pytest-codspeed,
|
||||
pytest-cov-stub,
|
||||
@@ -41,35 +44,34 @@
|
||||
python-on-whales,
|
||||
re-assert,
|
||||
trustme,
|
||||
zlib-ng,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiohttp";
|
||||
version = "3.11.18";
|
||||
version = "3.12.10";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aio-libs";
|
||||
repo = "aiohttp";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-+vnrYdUz1Stti9XE99InAouKN5kfTSaOuEG9Anxb3gs=";
|
||||
hash = "sha256-ciZGOOfVXYoLzYNIkota3MXMRMxlztf+mFFo0y9r+Lk=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(replaceVars ./unvendor-llhttp.patch {
|
||||
llhttpDev = lib.getDev llhttp;
|
||||
llhttpLib = lib.getLib llhttp;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
rm -r vendor
|
||||
patchShebangs tools
|
||||
touch .git # tools/gen.py uses .git to find the project root
|
||||
|
||||
# don't install Cython using pip
|
||||
substituteInPlace Makefile \
|
||||
--replace-fail "cythonize: .install-cython" "cythonize:"
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
cython
|
||||
cython_3_1
|
||||
pkgconfig
|
||||
setuptools
|
||||
];
|
||||
|
||||
@@ -77,6 +79,12 @@ buildPythonPackage rec {
|
||||
make cythonize
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
llhttp
|
||||
];
|
||||
|
||||
env.AIOHTTP_USE_SYSTEM_DEPS = true;
|
||||
|
||||
dependencies = [
|
||||
aiohappyeyeballs
|
||||
aiosignal
|
||||
@@ -94,8 +102,10 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
blockbuster
|
||||
freezegun
|
||||
gunicorn
|
||||
isal
|
||||
proxy-py
|
||||
pytest-codspeed
|
||||
pytest-cov-stub
|
||||
@@ -105,6 +115,7 @@ buildPythonPackage rec {
|
||||
python-on-whales
|
||||
re-assert
|
||||
trustme
|
||||
zlib-ng
|
||||
];
|
||||
|
||||
disabledTests =
|
||||
@@ -117,6 +128,8 @@ buildPythonPackage rec {
|
||||
"test_import_time"
|
||||
# racy
|
||||
"test_uvloop_secure_https_proxy"
|
||||
# Cannot connect to host example.com:443 ssl:default [Could not contact DNS servers]
|
||||
"test_tcp_connector_ssl_shutdown_timeout_passed_to_create_connection"
|
||||
]
|
||||
# these tests fail with python310 but succeeds with 11+
|
||||
++ lib.optionals isPy310 [
|
||||
@@ -145,7 +158,7 @@ buildPythonPackage rec {
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/aio-libs/aiohttp/blob/v${version}/CHANGES.rst";
|
||||
changelog = "https://docs.aiohttp.org/en/${src.tag}/changes.html";
|
||||
description = "Asynchronous HTTP Client/Server for Python and asyncio";
|
||||
license = licenses.asl20;
|
||||
homepage = "https://github.com/aio-libs/aiohttp";
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index b0a3ef32..f36132c6 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -79,7 +79,7 @@ vendor/llhttp/node_modules: vendor/llhttp/package.json
|
||||
generate-llhttp: .llhttp-gen
|
||||
|
||||
.PHONY: cythonize
|
||||
-cythonize: .install-cython $(PYXS:.pyx=.c) aiohttp/_websocket/reader_c.c
|
||||
+cythonize: $(PYXS:.pyx=.c) aiohttp/_websocket/reader_c.c
|
||||
|
||||
.install-deps: .install-cython $(PYXS:.pyx=.c) aiohttp/_websocket/reader_c.c $(call to-hash,$(CYS) $(REQS))
|
||||
@python -m pip install -r requirements/dev.in -c requirements/dev.txt
|
||||
diff --git a/aiohttp/_cparser.pxd b/aiohttp/_cparser.pxd
|
||||
index c2cd5a92..9184ac60 100644
|
||||
--- a/aiohttp/_cparser.pxd
|
||||
+++ b/aiohttp/_cparser.pxd
|
||||
@@ -1,7 +1,7 @@
|
||||
from libc.stdint cimport int32_t, uint8_t, uint16_t, uint64_t
|
||||
|
||||
|
||||
-cdef extern from "../vendor/llhttp/build/llhttp.h":
|
||||
+cdef extern from "@llhttpDev@/include/llhttp.h":
|
||||
|
||||
struct llhttp__internal_s:
|
||||
int32_t _index
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 2f024e87..feebc638 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -17,13 +17,6 @@ if sys.implementation.name != "cpython":
|
||||
NO_EXTENSIONS = True
|
||||
|
||||
|
||||
-if IS_GIT_REPO and not (HERE / "vendor/llhttp/README.md").exists():
|
||||
- print("Install submodules when building from git clone", file=sys.stderr)
|
||||
- print("Hint:", file=sys.stderr)
|
||||
- print(" git submodule update --init", file=sys.stderr)
|
||||
- sys.exit(2)
|
||||
-
|
||||
-
|
||||
# NOTE: makefile cythonizes all Cython modules
|
||||
|
||||
extensions = [
|
||||
@@ -33,12 +26,11 @@ extensions = [
|
||||
[
|
||||
"aiohttp/_http_parser.c",
|
||||
"aiohttp/_find_header.c",
|
||||
- "vendor/llhttp/build/c/llhttp.c",
|
||||
- "vendor/llhttp/src/native/api.c",
|
||||
- "vendor/llhttp/src/native/http.c",
|
||||
],
|
||||
define_macros=[("LLHTTP_STRICT_MODE", 0)],
|
||||
- include_dirs=["vendor/llhttp/build"],
|
||||
+ include_dirs=["@llhttpDev@/include"],
|
||||
+ library_dirs=["@llhttpLib@/lib"],
|
||||
+ libraries=["llhttp"],
|
||||
),
|
||||
Extension("aiohttp._http_writer", ["aiohttp/_http_writer.c"]),
|
||||
Extension("aiohttp._websocket.reader_c", ["aiohttp/_websocket/reader_c.c"]),
|
||||
Reference in New Issue
Block a user