diff options
Diffstat (limited to 'dev-python/flask')
-rw-r--r-- | dev-python/flask/Manifest | 5 | ||||
-rw-r--r-- | dev-python/flask/files/flask-3.1.0-py314.patch | 93 | ||||
-rw-r--r-- | dev-python/flask/flask-3.1.0.ebuild | 7 | ||||
-rw-r--r-- | dev-python/flask/flask-3.1.1.ebuild | 58 |
4 files changed, 161 insertions, 2 deletions
diff --git a/dev-python/flask/Manifest b/dev-python/flask/Manifest index 81b340e39a89..98839aef3a5a 100644 --- a/dev-python/flask/Manifest +++ b/dev-python/flask/Manifest @@ -1,3 +1,6 @@ +AUX flask-3.1.0-py314.patch 3106 BLAKE2B 549b9bde6fc8c5beb54387209182fe069aa24181aa68c41ecf0aa51c5f1ef01f3bde57b49390f972f6d7d36bf0ea08b75826ba0aba8eff8e90f02ab60c02ee8d SHA512 2236546b2ca4aaa5647a0a74f5257967d43d63ff217af3c3fd377b1fed7c80e9b9836f3f60a1a098e460b86d9846f19936bd4e966e073f0e24a6ba99509aeaa0 DIST flask-3.1.0.tar.gz 680824 BLAKE2B 2897fb3cc7631341001c955119bf0a697db1a9dfd6ff0e1078f882fb030779eb0d15c64d4e9626d6a54bc50627c463f73d58b34e449b149106ac76ff878cd506 SHA512 dd1d9113f57d62cd8fb5d33a6fb6258761a39c3df41d174e52f454abfbfc2da4b6a88b142196bd0681637fe53982d95762b023acddbed00f10805c4266194e24 -EBUILD flask-3.1.0.ebuild 1366 BLAKE2B 36dc9839de4a535b86e9033b6f116b6735df352018d470d766fadeba0218ff0b0beb99dfc9782e411cfdcac486c2495a94fd3ae12af2f95e67a650899238d1b0 SHA512 10329f7d0bcf15b2973aad31df36eaddadce98dd39c841a91caa307ebca544602b1570f613722aa946e9b12ff7f2c6279893da2fed3ea153004edda39e4e6d6a +DIST flask-3.1.1.tar.gz 753440 BLAKE2B 272ffc7c97ed68c8929e4b9aa41b6efac0beb205471e60e5a14030328be28fe629fe35d02440920abedc27d288ba20d36221c83aa6f64ef090d6ed3b248576bd SHA512 b582b71e10f72c2096f4a665a8182775165f48eece8bcded9ca5791bc575e3333ac913fb355279f0bee93fc57c16f9a8b635b329bfd71ed42df2b288c1a69741 +EBUILD flask-3.1.0.ebuild 1458 BLAKE2B a09385c1cbd5825f1956143edd5e1efbcbca32f47122e98e213a7d058fe4d73e6a6111f7ea648e5796d7ae7f6be2f1681d29a3a7eb6976e707b804af45593b2c SHA512 27cbd14a7ac5d618077ba6ae2783ca7e9876368fef3d36e0c82fc0849840e7f9b3f7d388f353c6be3c95d36baa52737049af9abe1ef2ee8b7ed6cb8ad43b6ea1 +EBUILD flask-3.1.1.ebuild 1372 BLAKE2B d1c3d0743b26eb31c1726cddb5daff65c181aa15c2eca1b9561b4dec9f5d91f3725721fd285d94f95574dff90d074ab7d0eb587e3dbf0bc6c1a03040e334477d SHA512 f491db118deff936a2bc0543b33d1036e8c962246dd3025ee096efe4aa366ff87239f2cf0f9d9ad8c663e1e4a3fcafc4c5180cfef9e99745f191acd2b11e5975 MISC metadata.xml 386 BLAKE2B b449c54b966bc8943f7b7b12d6126867a89a2759eb749c08f7ad53a174e93ecad07f09b5e30c8562c63ab05df75a82e2f48f550ea8cf3a546f5afc2eef5a896d SHA512 123334db31948046e47f3cdbe0237cdec3dc2207485c8243d1e34e065436995423b6a89909563a6158741a8cc62a7fdad95923870a7114cf69e58ef715e7ec5c diff --git a/dev-python/flask/files/flask-3.1.0-py314.patch b/dev-python/flask/files/flask-3.1.0-py314.patch new file mode 100644 index 000000000000..a03ef8cd9d56 --- /dev/null +++ b/dev-python/flask/files/flask-3.1.0-py314.patch @@ -0,0 +1,93 @@ +https://github.com/pallets/flask/issues/5692 +https://github.com/pallets/flask/pull/5702 + +From 41ec5760a2c55a099c3a1733fdd36fbb1258a02b Mon Sep 17 00:00:00 2001 +From: David Lord <davidism@gmail.com> +Date: Sat, 29 Mar 2025 15:42:58 -0700 +Subject: [PATCH] remove tests about deprecated pkgutil.get_loader + +--- + tests/conftest.py | 32 -------------------------------- + tests/test_instance_config.py | 6 +++--- + 2 files changed, 3 insertions(+), 35 deletions(-) + +diff --git a/tests/conftest.py b/tests/conftest.py +index 58cf85d8a5..214f520338 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -1,5 +1,4 @@ + import os +-import pkgutil + import sys + + import pytest +@@ -96,37 +95,6 @@ def leak_detector(): + assert leaks == [] + + +-@pytest.fixture(params=(True, False)) +-def limit_loader(request, monkeypatch): +- """Patch pkgutil.get_loader to give loader without get_filename or archive. +- +- This provides for tests where a system has custom loaders, e.g. Google App +- Engine's HardenedModulesHook, which have neither the `get_filename` method +- nor the `archive` attribute. +- +- This fixture will run the testcase twice, once with and once without the +- limitation/mock. +- """ +- if not request.param: +- return +- +- class LimitedLoader: +- def __init__(self, loader): +- self.loader = loader +- +- def __getattr__(self, name): +- if name in {"archive", "get_filename"}: +- raise AttributeError(f"Mocking a loader which does not have {name!r}.") +- return getattr(self.loader, name) +- +- old_get_loader = pkgutil.get_loader +- +- def get_loader(*args, **kwargs): +- return LimitedLoader(old_get_loader(*args, **kwargs)) +- +- monkeypatch.setattr(pkgutil, "get_loader", get_loader) +- +- + @pytest.fixture + def modules_tmp_path(tmp_path, monkeypatch): + """A temporary directory added to sys.path.""" +diff --git a/tests/test_instance_config.py b/tests/test_instance_config.py +index 1918bd999d..835a87844d 100644 +--- a/tests/test_instance_config.py ++++ b/tests/test_instance_config.py +@@ -63,7 +63,7 @@ def create_namespace(package): + + + def test_installed_module_paths( +- modules_tmp_path, modules_tmp_path_prefix, purge_module, site_packages, limit_loader ++ modules_tmp_path, modules_tmp_path_prefix, purge_module, site_packages + ): + (site_packages / "site_app.py").write_text( + "import flask\napp = flask.Flask(__name__)\n" +@@ -78,7 +78,7 @@ def test_installed_module_paths( + + + def test_installed_package_paths( +- limit_loader, modules_tmp_path, modules_tmp_path_prefix, purge_module, monkeypatch ++ modules_tmp_path, modules_tmp_path_prefix, purge_module, monkeypatch + ): + installed_path = modules_tmp_path / "path" + installed_path.mkdir() +@@ -97,7 +97,7 @@ def test_installed_package_paths( + + + def test_prefix_package_paths( +- limit_loader, modules_tmp_path, modules_tmp_path_prefix, purge_module, site_packages ++ modules_tmp_path, modules_tmp_path_prefix, purge_module, site_packages + ): + app = site_packages / "site_package" + app.mkdir() + diff --git a/dev-python/flask/flask-3.1.0.ebuild b/dev-python/flask/flask-3.1.0.ebuild index 06a06caa4ba6..b6dc0aac1278 100644 --- a/dev-python/flask/flask-3.1.0.ebuild +++ b/dev-python/flask/flask-3.1.0.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=flit -PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 ) +PYTHON_COMPAT=( python3_{11..14} pypy3_11 ) inherit distutils-r1 @@ -40,6 +40,11 @@ BDEPEND=" ) " +PATCHES=( + # https://github.com/pallets/flask/pull/5702 + "${FILESDIR}/${PN}-3.1.0-py314.patch" +) + distutils_enable_sphinx docs \ dev-python/pallets-sphinx-themes \ dev-python/sphinx-issues \ diff --git a/dev-python/flask/flask-3.1.1.ebuild b/dev-python/flask/flask-3.1.1.ebuild new file mode 100644 index 000000000000..a43f09e05357 --- /dev/null +++ b/dev-python/flask/flask-3.1.1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=flit +PYTHON_COMPAT=( python3_{11..14} pypy3_11 ) + +inherit distutils-r1 + +DESCRIPTION="A microframework based on Werkzeug, Jinja2 and good intentions" +HOMEPAGE=" + https://palletsprojects.com/p/flask/ + https://github.com/pallets/flask/ + https://pypi.org/project/Flask/ +" +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/mitsuhiko/flask.git" + inherit git-r3 +else + inherit pypi + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +LICENSE="BSD" +SLOT="0" +IUSE="examples" + +RDEPEND=" + >=dev-python/blinker-1.9[${PYTHON_USEDEP}] + >=dev-python/click-8.1.3[${PYTHON_USEDEP}] + >=dev-python/itsdangerous-2.2.0[${PYTHON_USEDEP}] + >=dev-python/jinja2-3.1.2[${PYTHON_USEDEP}] + >=dev-python/werkzeug-3.1.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + >=dev-python/asgiref-3.2[${PYTHON_USEDEP}] + !!dev-python/shiboken2[${PYTHON_USEDEP}] + ) +" + +distutils_enable_sphinx docs \ + dev-python/pallets-sphinx-themes \ + dev-python/sphinx-issues \ + dev-python/sphinx-tabs \ + dev-python/sphinxcontrib-log-cabinet +distutils_enable_tests pytest + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest +} + +python_install_all() { + use examples && dodoc -r examples + distutils-r1_python_install_all +} |