[gentoo-commits] repo/gentoo:master commit in: dev-python/flask/files/, dev-python/flask/
commit: 0f5bfb047c8f5b5dd878200bdf9fa36f1aaec9e3 Author: Patrick McLean sony com> AuthorDate: Sat Nov 23 01:10:31 2019 + Commit: Patrick McLean gentoo org> CommitDate: Sat Nov 23 01:11:42 2019 + 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 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 000..a03aa445137 --- /dev/null +++ b/dev-python/flask/files/flask-1.1.1-py38.patch @@ -0,0 +1,38 @@ +commit c367a86cc5be70da4928b276d0218f98df6e854d +Author: Fernanda Guimarães +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}]"
[gentoo-commits] repo/gentoo:master commit in: dev-python/flask/files/, dev-python/flask/
commit: 849964d21582d2a1069edad36b7ef58baaf5f4dd Author: Michał Górny gentoo org> AuthorDate: Wed Jan 3 22:31:37 2018 + Commit: Michał Górny gentoo org> CommitDate: Wed Jan 3 23:35:17 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=849964d2 dev-python/flask: Clean old up dev-python/flask/Manifest | 3 -- .../flask/files/flask-0.10.1-is_package.patch | 13 - .../flask/files/flask-0.10.1-sort_json.patch | 54 .../flask/files/flask-0.10.1-test_appcontext.patch | 14 - dev-python/flask/flask-0.10.1-r1.ebuild| 42 --- dev-python/flask/flask-0.12.1.ebuild | 59 -- dev-python/flask/flask-0.12.ebuild | 54 7 files changed, 239 deletions(-) diff --git a/dev-python/flask/Manifest b/dev-python/flask/Manifest index c1af8385923..27d6d17b9fa 100644 --- a/dev-python/flask/Manifest +++ b/dev-python/flask/Manifest @@ -1,4 +1 @@ -DIST Flask-0.10.1.tar.gz 544247 BLAKE2B 986142e0a9e4668af462e211d7189114a8e75ec0bd433de9870c2fb1578ec3c565acdc0e724a1ea2eb88134323f53a5e774d266c8b15a7471734ec1c41a023f5 SHA512 0008d62d03a46b071c7d0510513d011a9bfd2b77df7f677371a446ca9805d16b1ee5e17dd8dd7cde6443a629370234e44735e20381de20a7da385969797f053f -DIST Flask-0.12.1.tar.gz 548511 BLAKE2B 4e67a397b48387561bce5a2fcfe503018ef6bf9ff29fd766fee4330a706e06927036251d9aff22f6a4bcf83ffe56e4eaa24b366c7ce91e51f36c460dbf2483b3 SHA512 23a376ed452bbf874eeeff959924bf8aee51fc9196af71092a7a457742a635fb3adaa958e61625522e93a14092e3bb88a22a74ef419513ca1ae93a1d08723ac5 DIST Flask-0.12.2.tar.gz 548510 BLAKE2B bd92d0e7e6ff36d371ffd958708517d16e41d1475af9153bf3d5234c33aa5c0ab415cbd254b711731cf8cffddac94b475f62d9fff2f9fe756b0fa30bb36d4343 SHA512 c00bb807e8fbc943e23a3721acf5b04320e7a58d658bca46bdf83a345b4c4d5729accae338505e134f01bc908adec9555fd94e8c87ef6f0367e6037215c06319 -DIST Flask-0.12.tar.gz 531923 BLAKE2B 022ac42d56ab811346de05a4eed90c8a212694ae35e293889d7338377001ccedb7e0e6461a4aa6df6721ce4245086cac64fe52bf5439278c17f59c911e6ad4dd SHA512 b8e9e005a850fcba413ad151998768ea0facb68f05855a1934cc6e4de1438cb59a4dd1bc74d2b04d52b3e837afa0a7785e98ae6c5af363a894c2be64773113f0 diff --git a/dev-python/flask/files/flask-0.10.1-is_package.patch b/dev-python/flask/files/flask-0.10.1-is_package.patch deleted file mode 100644 index 611d931d502..000 --- a/dev-python/flask/files/flask-0.10.1-is_package.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://github.com/mitsuhiko/flask/issues/487 -diff -ur Flask-0.10.1.orig/flask/helpers.py Flask-0.10.1/flask/helpers.py flask/helpers.py 2013-06-14 06:35:43.0 +0800 -+++ flask/helpers.py 2013-08-16 16:18:36.194006290 +0800 -@@ -679,7 +679,7 @@ - filename = sys.modules[import_name].__file__ - package_path = os.path.abspath(os.path.dirname(filename)) - # package_path ends with __init__.py for a package --if loader.is_package(root_mod_name): -+if package_path.endswith('__init__.py'): - package_path = os.path.dirname(package_path) - - site_parent, site_folder = os.path.split(package_path) diff --git a/dev-python/flask/files/flask-0.10.1-sort_json.patch b/dev-python/flask/files/flask-0.10.1-sort_json.patch deleted file mode 100644 index e78cd0dee82..000 --- a/dev-python/flask/files/flask-0.10.1-sort_json.patch +++ /dev/null @@ -1,54 +0,0 @@ -https://github.com/mitsuhiko/flask/commit/a2bc61b5ab19e899735f8945f68123b4cea570d5 -diff --git a/flask/testsuite/helpers.py b/flask/testsuite/helpers.py -index 636f67f..7de70c0 100644 a/flask/testsuite/helpers.py -+++ b/flask/testsuite/helpers.py -@@ -173,7 +173,33 @@ def index(): - c = app.test_client() - rv = c.get('/') - lines = [x.strip() for x in rv.data.strip().decode('utf-8').splitlines()] --self.assert_equal(lines, [ -+sorted_by_str = [ -+'{', -+'"values": {', -+'"0": "foo",', -+'"1": "foo",', -+'"10": "foo",', -+'"11": "foo",', -+'"12": "foo",', -+'"13": "foo",', -+'"14": "foo",', -+'"15": "foo",', -+'"16": "foo",', -+'"17": "foo",', -+'"18": "foo",', -+'"19": "foo",', -+'"2": "foo",', -+'"3": "foo",', -+'"4": "foo",', -+'"5": "foo",', -+'"6": "foo",', -+'"7": "foo",', -+'"8": "foo",', -+'"9": "foo"', -+'}', -+'}' -+] -+sorted_by_int = [ - '{', - '"values": {', - '"0": "foo",', -@@ -198,8 +224,12 @@ def index(): - '"19": "foo"', - '}', - '}' --]) -+] - -+try: -+self.assert_equal(lines, sorted_by_int) -+except AssertionError:
[gentoo-commits] repo/gentoo:master commit in: dev-python/flask/files/, dev-python/flask/
commit: 1abbfd2cf190c0b55fbd0a55f83de1ed3eeb8946 Author: Michał Górny gentoo org> AuthorDate: Wed Nov 30 17:11:31 2016 + Commit: Michał Górny gentoo org> CommitDate: Wed Nov 30 18:05:40 2016 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1abbfd2c dev-python/flask: Backport PyPy3 fix, #601298 dev-python/flask/files/flask-0.11.1-pypy3.patch| 45 ++ ...{flask-0.11.1.ebuild => flask-0.11.1-r1.ebuild} | 6 ++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/dev-python/flask/files/flask-0.11.1-pypy3.patch b/dev-python/flask/files/flask-0.11.1-pypy3.patch new file mode 100644 index ..8f27c34 --- /dev/null +++ b/dev-python/flask/files/flask-0.11.1-pypy3.patch @@ -0,0 +1,45 @@ +From 6e46d0cd3969f6c13ff61c95c81a975192232fed Mon Sep 17 00:00:00 2001 +From: Markus Unterwaditzer+Date: Mon, 13 Jun 2016 20:29:21 +0200 +Subject: [PATCH] Fix PyPy3 support and add bug references + +Fix #1841 +--- + flask/_compat.py | 18 +- + 2 files changed, 20 insertions(+), 5 deletions(-) + +diff --git a/flask/_compat.py b/flask/_compat.py +index bfe607d..071628f 100644 +--- a/flask/_compat.py b/flask/_compat.py +@@ -65,17 +65,25 @@ def __new__(cls, name, this_bases, d): + + + # Certain versions of pypy have a bug where clearing the exception stack +-# breaks the __exit__ function in a very peculiar way. This is currently +-# true for pypy 2.2.1 for instance. The second level of exception blocks +-# is necessary because pypy seems to forget to check if an exception +-# happened until the next bytecode instruction? ++# breaks the __exit__ function in a very peculiar way. The second level of ++# exception blocks is necessary because pypy seems to forget to check if an ++# exception happened until the next bytecode instruction? ++# ++# Relevant PyPy bugfix commit: ++# https://bitbucket.org/pypy/pypy/commits/77ecf91c635a287e88e60d8ddb0f4e9df4003301 ++# According to ronan on #pypy IRC, it is released in PyPy2 2.3 and later ++# versions. ++# ++# Ubuntu 14.04 has PyPy 2.2.1, which does exhibit this bug. + BROKEN_PYPY_CTXMGR_EXIT = False + if hasattr(sys, 'pypy_version_info'): + class _Mgr(object): + def __enter__(self): + return self + def __exit__(self, *args): +-sys.exc_clear() ++if hasattr(sys, 'exc_clear'): ++# Python 3 (PyPy3) doesn't have exc_clear ++sys.exc_clear() + try: + try: + with _Mgr(): diff --git a/dev-python/flask/flask-0.11.1.ebuild b/dev-python/flask/flask-0.11.1-r1.ebuild similarity index 93% rename from dev-python/flask/flask-0.11.1.ebuild rename to dev-python/flask/flask-0.11.1-r1.ebuild index b579284..dd9dff9 100644 --- a/dev-python/flask/flask-0.11.1.ebuild +++ b/dev-python/flask/flask-0.11.1-r1.ebuild @@ -33,9 +33,13 @@ DEPEND="${RDEPEND} S="${WORKDIR}/${MY_P}" python_prepare_all() { -# Prevent un-needed d'loading + # Prevent un-needed d'loading sed -e "s/ 'sphinx.ext.intersphinx',//" -i docs/conf.py || die + local PATCHES=( + "${FILESDIR}"/${P}-pypy3.patch + ) + distutils-r1_python_prepare_all }