mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-11-16 04:30:53 -05:00
dev-python/questionary: drop 2.0.1
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
1 parent
e816f11e1f
commit
11c0d2d428
3 files changed
-96
No files matched your search
@@ -1,2 +1 @@
|
||||
DIST questionary-2.0.1.gh.tar.gz 350585 BLAKE2B ec8b617e2fadf1ac23dac6a1b770916ac18a4874c7fbf7c5c9645626ae46848de815d118c8bcc2da54479525045fe50d6edf7f3fa743bbc91d14528a3f941e51 SHA512 366baacbb0b1a16317ea164baf55c09f29580a0a818d24ece2cf2fc2f3f34362707f570b2b54638c10cb8f1ad5fb008a30a02bc4b017fad0c2845d6f739453f1
|
||||
DIST questionary-2.1.0.gh.tar.gz 354532 BLAKE2B 22f73572704758060044b663cc4875ad93ffdcde992e0e1c8fa02035dcc93cd6aa58a4fd1bb6dcfb79fdbc51051bf4a9d2c1e9de4fd9ff49ce93c7da2435fc0b SHA512 80e689164defd8025d4ce4bef787e861370b0335f126110b2a239efe07b83feacf1b6e6fc7f0d42a8410eac175289f1e6f88e2e369b656e312521daefe36d8de
|
||||
@@ -1,64 +0,0 @@
|
||||
Try to support prompt_toolkit >3.0.37
|
||||
|
||||
Fixes: https://github.com/tmbo/questionary/issues/344
|
||||
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -33,7 +33,7 @@ license = "MIT"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.8"
|
||||
-prompt_toolkit = ">=2.0,<=3.0.36" # once https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1726 is fixed, this can be changed to ">=2.0,<4.0"
|
||||
+prompt_toolkit = ">=2.0,<4.0"
|
||||
|
||||
[tool.poetry.group.docs]
|
||||
optional = true
|
||||
diff --git a/tests/prompts/test_common.py b/tests/prompts/test_common.py
|
||||
index d6ce51e..b6bbe1b 100644
|
||||
--- a/tests/prompts/test_common.py
|
||||
+++ b/tests/prompts/test_common.py
|
||||
@@ -1,8 +1,10 @@
|
||||
+import asyncio
|
||||
from unittest.mock import Mock
|
||||
from unittest.mock import call
|
||||
|
||||
import pytest
|
||||
from prompt_toolkit.document import Document
|
||||
+from prompt_toolkit.input.defaults import create_pipe_input
|
||||
from prompt_toolkit.output import DummyOutput
|
||||
from prompt_toolkit.styles import Attrs
|
||||
from prompt_toolkit.validation import ValidationError
|
||||
@@ -13,7 +15,6 @@ from questionary.prompts import common
|
||||
from questionary.prompts.common import InquirerControl
|
||||
from questionary.prompts.common import build_validator
|
||||
from questionary.prompts.common import print_formatted_text
|
||||
-from tests.utils import execute_with_input_pipe
|
||||
from tests.utils import prompt_toolkit_version
|
||||
|
||||
|
||||
@@ -72,7 +73,7 @@ def test_blank_line_fix():
|
||||
|
||||
ic = InquirerControl(["a", "b", "c"])
|
||||
|
||||
- def run(inp):
|
||||
+ async def run(inp):
|
||||
inp.send_text("")
|
||||
layout = common.create_inquirer_layout(
|
||||
ic, get_prompt_tokens, input=inp, output=DummyOutput()
|
||||
@@ -86,7 +87,15 @@ def test_blank_line_fix():
|
||||
== 1000000000000000000000000000001
|
||||
)
|
||||
|
||||
- execute_with_input_pipe(run)
|
||||
+ if prompt_toolkit_version < (3, 0, 29):
|
||||
+ inp = create_pipe_input()
|
||||
+ try:
|
||||
+ return asyncio.run(run(inp))
|
||||
+ finally:
|
||||
+ inp.close()
|
||||
+ else:
|
||||
+ with create_pipe_input() as inp:
|
||||
+ asyncio.run(run(inp))
|
||||
|
||||
|
||||
def test_prompt_highlight_coexist():
|
||||
@@ -1,31 +0,0 @@
|
||||
# Copyright 2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=poetry
|
||||
PYTHON_COMPAT=( python3_{11..13} pypy3 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Python library to build pretty command line user prompts"
|
||||
HOMEPAGE="
|
||||
https://pypi.org/project/questionary/
|
||||
https://github.com/tmbo/questionary
|
||||
"
|
||||
SRC_URI="https://github.com/tmbo/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RDEPEND="dev-python/prompt-toolkit[${PYTHON_USEDEP}]"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-2.0.1-prompt-toolkit.patch )
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
distutils_enable_sphinx docs \
|
||||
dev-python/sphinx-autodoc-typehints \
|
||||
dev-python/sphinx-copybutton \
|
||||
dev-python/sphinx-rtd-theme
|
||||
Reference in new issue
Block a user