commit: 0f5bfb047c8f5b5dd878200bdf9fa36f1aaec9e3 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com> AuthorDate: Sat Nov 23 01:10:31 2019 +0000 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> CommitDate: Sat Nov 23 01:11:42 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f5bfb04
dev-python/flask: Add python3_8 with upstream patch Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> dev-python/flask/files/flask-1.1.1-py38.patch | 38 +++++++++++++++++++++++++++ dev-python/flask/flask-1.1.1.ebuild | 7 ++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/dev-python/flask/files/flask-1.1.1-py38.patch b/dev-python/flask/files/flask-1.1.1-py38.patch new file mode 100644 index 00000000000..a03aa445137 --- /dev/null +++ b/dev-python/flask/files/flask-1.1.1-py38.patch @@ -0,0 +1,38 @@ +commit c367a86cc5be70da4928b276d0218f98df6e854d +Author: Fernanda GuimarĂ£es <fernandaguimarae...@gmail.com> +Date: Mon Oct 28 21:37:25 2019 -0300 + + Test test_send_from_directory_bad_request no longer fails in Python 3.8. + +diff --git a/tests/test_helpers.py b/tests/test_helpers.py +index 78a56221..21735af1 100644 +--- a/tests/test_helpers.py ++++ b/tests/test_helpers.py +@@ -11,6 +11,7 @@ + import datetime + import io + import os ++import sys + import uuid + + import pytest +@@ -780,12 +781,17 @@ class TestSendfile(object): + assert rv.data.strip() == b"Hello Subdomain" + rv.close() + +- def test_send_from_directory_bad_request(self, app, req_ctx): ++ def test_send_from_directory_null_character(self, app, req_ctx): + app.root_path = os.path.join( + os.path.dirname(__file__), "test_apps", "subdomaintestmodule" + ) + +- with pytest.raises(BadRequest): ++ if sys.version_info >= (3, 8): ++ exception = NotFound ++ else: ++ exception = BadRequest ++ ++ with pytest.raises(exception): + flask.send_from_directory("static", "bad\x00") + + diff --git a/dev-python/flask/flask-1.1.1.ebuild b/dev-python/flask/flask-1.1.1.ebuild index 6c634728d16..df477802402 100644 --- a/dev-python/flask/flask-1.1.1.ebuild +++ b/dev-python/flask/flask-1.1.1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy{,3} ) +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} ) inherit distutils-r1 @@ -35,6 +35,11 @@ DEPEND="${RDEPEND} doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') ) test? ( dev-python/pytest[${PYTHON_USEDEP}] )" +PATCHES=( + # taken from upstream git, will be in next release + "${FILESDIR}/flask-1.1.1-py38.patch" +) + python_check_deps() { use doc || return 0 has_version "dev-python/sphinx[${PYTHON_USEDEP}]"