diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2022-12-21 08:17:15 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2022-12-21 08:17:15 +0000 |
| commit | 04a40684996eb786b4f00df749111329c2d5ecae (patch) | |
| tree | e1f9988be72dc73f25723f59e11dfab9b3a02506 /dev-python/hypercorn | |
| parent | 40d4c212b4d1e943d43249ce936790aa19255eef (diff) | |
| download | baldeagleos-repo-04a40684996eb786b4f00df749111329c2d5ecae.tar.gz baldeagleos-repo-04a40684996eb786b4f00df749111329c2d5ecae.tar.xz baldeagleos-repo-04a40684996eb786b4f00df749111329c2d5ecae.zip | |
Adding metadata
Diffstat (limited to 'dev-python/hypercorn')
| -rw-r--r-- | dev-python/hypercorn/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/hypercorn/files/hypercorn-0.11.2-no-coverage.patch | 9 | ||||
| -rw-r--r-- | dev-python/hypercorn/files/hypercorn-0.13.2-no-coverage.patch | 11 | ||||
| -rw-r--r-- | dev-python/hypercorn/files/hypercorn-0.14.3-tomli.patch | 106 | ||||
| -rw-r--r-- | dev-python/hypercorn/hypercorn-0.14.3-r1.ebuild (renamed from dev-python/hypercorn/hypercorn-0.13.2.ebuild) | 31 | ||||
| -rw-r--r-- | dev-python/hypercorn/metadata.xml | 22 |
6 files changed, 129 insertions, 52 deletions
diff --git a/dev-python/hypercorn/Manifest b/dev-python/hypercorn/Manifest index 08d4946041ad..09c22ff73087 100644 --- a/dev-python/hypercorn/Manifest +++ b/dev-python/hypercorn/Manifest @@ -1 +1 @@ -DIST hypercorn-0.13.2.gh.tar.gz 151984 BLAKE2B b0176016819409cb6958a758041bfe710a008d141a52348ce545deb285cb9e6fc0a4c05321d021bfae5b9de96149db9302f9ce40d01b57c3176d6ad9aef61402 SHA512 c7f12c173b2e9da6108388b2a66b2abca7e26e0d2952e9f3828e94d37b9e3df6076395afd8438aaaa7e328f9a4b085d62f6efd28e2503c4db9bc1f430795048e +DIST hypercorn-0.14.3.gh.tar.gz 154930 BLAKE2B da827d586307ace6ef9ddb8ca4046ebc5c745df1d48152ed78b948751a7d472c73d5f8310e58266158af4739e14f2960a46c2e7fc7f12bf7629a3edb3821b58f SHA512 f0d69ab1883379058112907547e6f89a4a7114d7f4851b92f0c465d73def9cc15508e3981bda7e66ce3c00e896f7fb221b3dcd8bee6a51d8429572b678b7ade8 diff --git a/dev-python/hypercorn/files/hypercorn-0.11.2-no-coverage.patch b/dev-python/hypercorn/files/hypercorn-0.11.2-no-coverage.patch deleted file mode 100644 index 8c3f4210a6bd..000000000000 --- a/dev-python/hypercorn/files/hypercorn-0.11.2-no-coverage.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/setup.cfg -+++ b/setup.cfg -@@ -43,5 +43,5 @@ - ignore_missing_imports = True - - [tool:pytest] --addopts = --no-cov-on-fail --showlocals -+addopts = --showlocals - testpaths = tests diff --git a/dev-python/hypercorn/files/hypercorn-0.13.2-no-coverage.patch b/dev-python/hypercorn/files/hypercorn-0.13.2-no-coverage.patch deleted file mode 100644 index 78609bd739f8..000000000000 --- a/dev-python/hypercorn/files/hypercorn-0.13.2-no-coverage.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -88,7 +88,7 @@ - ignore_missing_imports = true - - [tool.pytest.ini_options] --addopts = "--no-cov-on-fail --showlocals --strict-markers" -+addopts = "--showlocals --strict-markers" - testpaths = ["tests"] - - [build-system] diff --git a/dev-python/hypercorn/files/hypercorn-0.14.3-tomli.patch b/dev-python/hypercorn/files/hypercorn-0.14.3-tomli.patch new file mode 100644 index 000000000000..a438680423a9 --- /dev/null +++ b/dev-python/hypercorn/files/hypercorn-0.14.3-tomli.patch @@ -0,0 +1,106 @@ +From 676612c73d3c231f823f88ea0995e80522db6178 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Mon, 19 Dec 2022 15:27:41 +0100 +Subject: [PATCH] Use tomllib/tomli for .toml support + +Replace the unmaintained and non-conformant `toml` library with +the built-in `tomllib` module in Python 3.11+, with fallback to `tomli` +(featuring the same ABI) in Python 3.10 and older. +--- + pyproject.toml | 2 +- + src/hypercorn/config.py | 10 +++++++--- + src/hypercorn/logging.py | 10 +++++++--- + tox.ini | 1 - + 4 files changed, 15 insertions(+), 8 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 71ceaff..1334fcf 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -30,7 +30,7 @@ h11 = "*" + h2 = ">=3.1.0" + priority = "*" + pydata_sphinx_theme = { version = "*", optional = true } +-toml = "*" ++tomli = { version = "*", python = "<3.11" } + trio = { version = ">=0.11.0", optional = true } + typing_extensions = { version = ">=3.7.4", python = "<3.8" } + uvloop = { version = "*", markers = "platform_system != 'Windows'", optional = true } +diff --git a/src/hypercorn/config.py b/src/hypercorn/config.py +index f9a9d66..ecfa1bd 100644 +--- a/src/hypercorn/config.py ++++ b/src/hypercorn/config.py +@@ -6,6 +6,7 @@ import logging + import os + import socket + import stat ++import sys + import types + import warnings + from dataclasses import dataclass +@@ -22,7 +23,10 @@ from time import time + from typing import Any, AnyStr, Dict, List, Mapping, Optional, Tuple, Type, Union + from wsgiref.handlers import format_date_time + +-import toml ++if sys.version_info >= (3, 11): ++ import tomllib ++else: ++ import tomli as tomllib + + from .logging import Logger + +@@ -355,8 +359,8 @@ class Config: + filename: The filename which gives the path to the file. + """ + file_path = os.fspath(filename) +- with open(file_path) as file_: +- data = toml.load(file_) ++ with open(file_path, "rb") as file_: ++ data = tomllib.load(file_) + return cls.from_mapping(data) + + @classmethod +diff --git a/src/hypercorn/logging.py b/src/hypercorn/logging.py +index 3c2c657..8ca6105 100644 +--- a/src/hypercorn/logging.py ++++ b/src/hypercorn/logging.py +@@ -9,7 +9,11 @@ from http import HTTPStatus + from logging.config import dictConfig, fileConfig + from typing import Any, IO, Mapping, Optional, TYPE_CHECKING, Union + +-import toml ++if sys.version_info >= (3, 11): ++ import tomllib ++else: ++ import tomli as tomllib ++ + + if TYPE_CHECKING: + from .config import Config +@@ -65,8 +69,8 @@ class Logger: + with open(config.logconfig[5:]) as file_: + dictConfig(json.load(file_)) + elif config.logconfig.startswith("toml:"): +- with open(config.logconfig[5:]) as file_: +- dictConfig(toml.load(file_)) ++ with open(config.logconfig[5:], "rb") as file_: ++ dictConfig(tomllib.load(file_)) + else: + log_config = { + "__file__": config.logconfig, +diff --git a/tox.ini b/tox.ini +index 675992b..0f636fb 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -47,7 +47,6 @@ basepython = python3.10 + deps = + mypy + pytest +- types-toml + commands = + mypy src/hypercorn/ tests/ + +-- +2.39.0 + diff --git a/dev-python/hypercorn/hypercorn-0.13.2.ebuild b/dev-python/hypercorn/hypercorn-0.14.3-r1.ebuild index 0e55e76bd8e0..aab057d5d9a6 100644 --- a/dev-python/hypercorn/hypercorn-0.13.2.ebuild +++ b/dev-python/hypercorn/hypercorn-0.14.3-r1.ebuild @@ -1,17 +1,16 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=poetry -PYTHON_COMPAT=( python3_{7,8,9,10,11} ) +PYTHON_COMPAT=( python3_{7,8,9,10,11} pypy3 ) + inherit distutils-r1 -DESCRIPTION="ASGI Server based on Hyper libraries and inspired by Gunicorn" +DESCRIPTION="A ASGI Server based on Hyper libraries and inspired by Gunicorn" HOMEPAGE=" - https://pgjones.gitlab.io/hypercorn - https://gitlab.com/pgjones/hypercorn - https://github.com/pgjones/hypercorn + https://github.com/pgjones/hypercorn/ https://pypi.org/project/hypercorn/ " SRC_URI=" @@ -21,28 +20,32 @@ SRC_URI=" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64" +KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86" RDEPEND=" dev-python/h11[${PYTHON_USEDEP}] >=dev-python/h2-3.1.0[${PYTHON_USEDEP}] dev-python/priority[${PYTHON_USEDEP}] - dev-python/toml[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + dev-python/tomli[${PYTHON_USEDEP}] + ' 3.{8..10}) >=dev-python/wsproto-0.14.0[${PYTHON_USEDEP}] " BDEPEND=" test? ( - dev-python/hypothesis[${PYTHON_USEDEP}] - >=dev-python/mock-4[${PYTHON_USEDEP}] dev-python/pytest-asyncio[${PYTHON_USEDEP}] dev-python/pytest-trio[${PYTHON_USEDEP}] dev-python/trio[${PYTHON_USEDEP}] ) " -PATCHES=( "${FILESDIR}/${P}-no-coverage.patch" ) - distutils_enable_tests pytest -distutils_enable_sphinx docs \ - dev-python/pydata-sphinx-theme +src_prepare() { + local PATCHES=( + "${FILESDIR}"/${P}-tomli.patch + ) + + sed -i -e 's:--no-cov-on-fail::' pyproject.toml || die + distutils-r1_src_prepare +} diff --git a/dev-python/hypercorn/metadata.xml b/dev-python/hypercorn/metadata.xml index 42520fae4c07..ea8988e8af6a 100644 --- a/dev-python/hypercorn/metadata.xml +++ b/dev-python/hypercorn/metadata.xml @@ -1,23 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>lssndrbarbieri@gmail.com</email> - <name>Alessandro Barbieri</name> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> </maintainer> - <longdescription lang="en"> -Hypercorn is an ASGI web server based on the sans-io hyper, h11, h2, and wsproto libraries -and inspired by Gunicorn. Hypercorn supports HTTP/1, HTTP/2, WebSockets (over HTTP/1 and -HTTP/2), ASGI/2, and ASGI/3 specifications. Hypercorn can utilise asyncio, uvloop, or trio -worker types. - -Hypercorn can optionally serve the current draft of the HTTP/3 specification -using the aioquic library. To enable this install the h3 optional extra, pip install -hypercorn[h3] and then choose a quic binding e.g. hypercorn --quic-bind localhost:4433 - -Hypercorn was initially part of Quart before being separated out into a -standalone ASGI server. Hypercorn forked from version 0.5.0 of Quart. - </longdescription> - <origin>gentoo-guru-overlay</origin> + <origin>gentoo-staging</origin> + <stabilize-allarches/> </pkgmetadata>
\ No newline at end of file |
