diff options
Diffstat (limited to 'dev-python/python-multipart')
4 files changed, 81 insertions, 0 deletions
diff --git a/dev-python/python-multipart/Manifest b/dev-python/python-multipart/Manifest new file mode 100644 index 000000000000..cd55e1387be0 --- /dev/null +++ b/dev-python/python-multipart/Manifest @@ -0,0 +1,4 @@ +AUX python-multipart-0.0.5-pyyaml.patch 987 BLAKE2B a2fe5fcc4bce4df83e86771eecbd1f81e144d3c1ff31bd61777ffaab33564904dff05f8ea741292eceaecb69208cf5b6b97e202e1cdbc9b77fee67f1235f323a SHA512 d7a4a630e38df4abc7858e892457a9d63c982d013f18554b3bec52a48c167bb14a534fccadb718600b17d8a7753b5153eed164c0fe3f8f46228847d0774dc8df +DIST python-multipart-0.0.5.gh.tar.gz 48018 BLAKE2B cfff5c1c57ada3ba3d50da71273435781d62d3907ca1b7e6180cd319f2680258b3e1e278dff760106e7ca9c116f4c5c7adf957601d6d8465bf300e6211b83773 SHA512 c2fabeb77a25119c4bbb71c3faa6de58e27ac2f0c768298eac62b519fc51e5d95fdea05c4f3846ed47205f297802982a001577a73b2feec2d9f585c784d6c3d7 +EBUILD python-multipart-0.0.5.ebuild 654 BLAKE2B dc28079fd2f9809a4821908ff347bbda1156c4a98e3d8d794c060d8b67ee980f354903ea45e69bd32955deb013dfa8392f00b984ce088fe5de3b71a1b3b0936f SHA512 5b0795be783a581bccfc2b05b451011172a0305f3a1a415ec692a7c1f94f09292fa156a4c15dc4326f3484abc2b6fcf5a4e301e213d959f26da7028d37dcf423 +MISC metadata.xml 409 BLAKE2B 3cdcb724c178e87f10b24cbf61160407378e90ae47789e77fd3a87e30513dac08998da154df7836f851a8cc74e6c130dfdd772bdbed2a8403da69eca8b24d4ac SHA512 6403064cacab7dc324278a5fd22f321bd1474542a66fbb2a30b30b8080f221147700f1d12073442bb8ced624b5c18fd4b3ee77cd0db087e0f758405392a92541 diff --git a/dev-python/python-multipart/files/python-multipart-0.0.5-pyyaml.patch b/dev-python/python-multipart/files/python-multipart-0.0.5-pyyaml.patch new file mode 100644 index 000000000000..5d189dd5f225 --- /dev/null +++ b/dev-python/python-multipart/files/python-multipart-0.0.5-pyyaml.patch @@ -0,0 +1,29 @@ +From 4831a3f9b5007145f2cb9e3020e83581523d4079 Mon Sep 17 00:00:00 2001 +From: Carl George <carl@george.computer> +Date: Tue, 19 Apr 2022 20:20:49 -0500 +Subject: [PATCH] Use yaml.safe_load instead of yaml.load (#46) + +yaml.load in PyYAML 6 requires a Loader argument. PyYAML recommends +using SafeLoader, which is implied if you call yaml.safe_load instead. + +https://github.com/yaml/pyyaml/pull/561 +https://msg.pyyaml.org/load + +Fixes #41 +--- + multipart/tests/test_multipart.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/multipart/tests/test_multipart.py b/multipart/tests/test_multipart.py +index 0e38c9c..ab33e7c 100644 +--- a/multipart/tests/test_multipart.py ++++ b/multipart/tests/test_multipart.py +@@ -716,7 +716,7 @@ def test_not_aligned(self): + test_data = f.read() + + with open(yaml_file, 'rb') as f: +- yaml_data = yaml.load(f) ++ yaml_data = yaml.safe_load(f) + + http_tests.append({ + 'name': fname, diff --git a/dev-python/python-multipart/metadata.xml b/dev-python/python-multipart/metadata.xml new file mode 100644 index 000000000000..7efb07682e6c --- /dev/null +++ b/dev-python/python-multipart/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <stabilize-allarches/> + <upstream> + <remote-id type="pypi">python-multipart</remote-id> + <remote-id type="github">andrew-d/python-multipart</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/python-multipart/python-multipart-0.0.5.ebuild b/dev-python/python-multipart/python-multipart-0.0.5.ebuild new file mode 100644 index 000000000000..6b9e2b9792cd --- /dev/null +++ b/dev-python/python-multipart/python-multipart-0.0.5.ebuild @@ -0,0 +1,35 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( pypy3 python3_{8..11} ) + +inherit distutils-r1 + +DESCRIPTION="A streaming multipart parser for Python" +HOMEPAGE=" + https://github.com/andrew-d/python-multipart/ + https://pypi.org/project/python-multipart/ +" +SRC_URI=" + https://github.com/andrew-d/python-multipart/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +BDEPEND=" + test? ( + dev-python/pyyaml[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${P}-pyyaml.patch +) |