dev-python/yarl: Bump to 1.5.0

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2020-07-27 07:24:58 +02:00
parent ae12fc5af2
commit ba65b655d6
3 changed files with 83 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST yarl-1.4.2.tar.gz 163521 BLAKE2B ababd1d35bca51a84c8d189266ef5d35f7a4dc65c84c4097a260e86fb838b1a35d2a639c1cf2a407aac8e68c5f67222aae6fa1f6cbfa5cb71dd851b385bae45a SHA512 036562b645d7b9b3ed4a749decb189587b41ab13b5dda5ff461b00eebadf1ecdbd8d5ae06932cc7d8b7ff551cd630f8671eb0f6c854b20996cda4a6897994fa0
DIST yarl-1.5.0.tar.gz 172945 BLAKE2B bc8ee2fcbdf615366747dbdd9730cffb64476da1f62aec3948ee5acbd28c7a523905f3a233f19fa390f401a4b635d4b9b1758e3802b2ed3edf37637ff47360e7 SHA512 2e6aeb7c2d254395558c6ad689376f63da5bfec3213e4879fd096d1c60cba3653e3b4dc4793d8583ee37c4c75a3a4a69d6f00db73de88ee13c989e8bd44198e6

View File

@@ -0,0 +1,52 @@
From 47478e942992aaaa26c2defc3294cac45ede2cfe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Mon, 27 Jul 2020 07:13:19 +0200
Subject: [PATCH] Require typing_extensions for py<3.8 only
All the names imported from typing_extensions are available already
in Python 3.8, so there is no need to use the additional dependency
there. Furthermore, typing_extensions currently do not support
Python 3.9, effectively blocking yarl from doing so. To solve this,
use external typing_extensions only for py<3.8, and just use builtin
typing in 3.8+.
---
requirements/test.txt | 2 +-
setup.py | 3 ++-
yarl/__init__.pyi | 7 ++++++-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/setup.py b/setup.py
index 41d684d..1ed5bfe 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,8 @@ with fname.open(encoding="utf8") as fp:
except IndexError:
raise RuntimeError("Unable to determine version.")
-install_requires = ["multidict>=4.0", "idna>=2.0", "typing_extensions>=3.7.4"]
+install_requires = ["multidict>=4.0", "idna>=2.0",
+ "typing_extensions>=3.7.4;python_version<\"3.8\""]
def read(name):
diff --git a/yarl/__init__.pyi b/yarl/__init__.pyi
index b3b58ec..eb4a12f 100644
--- a/yarl/__init__.pyi
+++ b/yarl/__init__.pyi
@@ -1,7 +1,12 @@
from typing import overload, Any, Tuple, Optional, Mapping, Union, Sequence, Type
-from typing_extensions import TypedDict, Final, final
import multidict
from functools import _CacheInfo
+import sys
+
+if sys.hexversion >= 0x03080000:
+ from typing import TypedDict, Final, final
+else:
+ from typing_extensions import TypedDict, Final, final
_QueryVariable = Union[str, int]
_Query = Union[
--
2.27.0

View File

@@ -0,0 +1,30 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6..9} )
inherit distutils-r1
DESCRIPTION="Yet another URL library"
HOMEPAGE="https://github.com/aio-libs/yarl/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
RDEPEND="
>=dev-python/multidict-4.0[${PYTHON_USEDEP}]
>=dev-python/idna-2.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
>=dev-python/typing-extensions-3.7.4[${PYTHON_USEDEP}]
' python3_{6,7})
"
distutils_enable_tests pytest
PATCHES=(
"${FILESDIR}"/${PN}-1.4.2-test-without-coverage.patch
"${FILESDIR}"/${P}-typing_ext.patch
)