diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2024-10-14 17:45:09 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2024-10-14 17:45:09 +0000 |
| commit | abefd80492c661f0c1b5eb55c6551a4513c55ea3 (patch) | |
| tree | 0c3845f86a493e0835c37460fa2d9eca95e32d76 /dev-python/pexpect | |
| parent | 1d3a2ec7ac730b4259170ac04c4ec28c83bdfef0 (diff) | |
| download | baldeagleos-repo-abefd80492c661f0c1b5eb55c6551a4513c55ea3.tar.gz baldeagleos-repo-abefd80492c661f0c1b5eb55c6551a4513c55ea3.tar.xz baldeagleos-repo-abefd80492c661f0c1b5eb55c6551a4513c55ea3.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pexpect')
| -rw-r--r-- | dev-python/pexpect/files/pexpect-4.9.0-py313.patch | 37 | ||||
| -rw-r--r-- | dev-python/pexpect/pexpect-4.9.0.ebuild | 15 |
2 files changed, 42 insertions, 10 deletions
diff --git a/dev-python/pexpect/files/pexpect-4.9.0-py313.patch b/dev-python/pexpect/files/pexpect-4.9.0-py313.patch new file mode 100644 index 000000000000..838cfdd22d86 --- /dev/null +++ b/dev-python/pexpect/files/pexpect-4.9.0-py313.patch @@ -0,0 +1,37 @@ +From 95d09c54d2502d8d48f2da591089ceb6d09df056 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz> +Date: Wed, 29 May 2024 12:21:52 +0200 +Subject: [PATCH] Force NO_COLOR=1 to fix test failures with Python 3.13+ REPL + +Python 3.13+ has colors now. Always setting this variable should be safe. +--- + pexpect/replwrap.py | 2 +- + tests/test_replwrap.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pexpect/replwrap.py b/pexpect/replwrap.py +index 08dbd5e8..c8714a23 100644 +--- a/pexpect/replwrap.py ++++ b/pexpect/replwrap.py +@@ -35,7 +35,7 @@ def __init__(self, cmd_or_spawn, orig_prompt, prompt_change, + continuation_prompt=PEXPECT_CONTINUATION_PROMPT, + extra_init_cmd=None): + if isinstance(cmd_or_spawn, basestring): +- self.child = pexpect.spawn(cmd_or_spawn, echo=False, encoding='utf-8') ++ self.child = pexpect.spawn(cmd_or_spawn, echo=False, encoding='utf-8', env={'NO_COLOR': '1'}) + else: + self.child = cmd_or_spawn + if self.child.echo: +diff --git a/tests/test_replwrap.py b/tests/test_replwrap.py +index ddafa5d6..5ac782a4 100644 +--- a/tests/test_replwrap.py ++++ b/tests/test_replwrap.py +@@ -124,7 +124,7 @@ def test_no_change_prompt(self): + if platform.python_implementation() == 'PyPy': + raise unittest.SkipTest(skip_pypy) + +- child = pexpect.spawn(sys.executable, echo=False, timeout=5, encoding='utf-8') ++ child = pexpect.spawn(sys.executable, echo=False, timeout=5, encoding='utf-8', env={'NO_COLOR': '1'}) + # prompt_change=None should mean no prompt change + py = replwrap.REPLWrapper(child, u">>> ", prompt_change=None, + continuation_prompt=u"... ") diff --git a/dev-python/pexpect/pexpect-4.9.0.ebuild b/dev-python/pexpect/pexpect-4.9.0.ebuild index a13dad16dd62..7c556949490d 100644 --- a/dev-python/pexpect/pexpect-4.9.0.ebuild +++ b/dev-python/pexpect/pexpect-4.9.0.ebuild @@ -29,6 +29,11 @@ distutils_enable_tests pytest distutils_enable_sphinx doc \ dev-python/sphinxcontrib-github-alt +PATCHES=( + # https://github.com/pexpect/pexpect/pull/794 + "${FILESDIR}/${P}-py313.patch" +) + src_test() { # workaround new readline defaults echo "set enable-bracketed-paste off" > "${T}"/inputrc || die @@ -47,16 +52,6 @@ python_test() { tests/test_env.py::TestCaseEnv::test_spawn_uses_env ) - case ${EPYTHON} in - python3.13) - EPYTEST_DESELECT+=( - # TODO: changes in python3.13's prompt? - tests/test_replwrap.py::REPLWrapTestCase::test_python - tests/test_replwrap.py::REPLWrapTestCase::test_no_change_prompt - ) - ;; - esac - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 epytest } |
