[Help wanted, macOS] prompt_toolkit/input/vt100.py: `OSError: [Errno 45] Operation not supported`
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
Piste de recherche
Start with prompt_toolkit/input/vt100.py and the asyncio selector calls shown in the ptpython and fastanime tracebacks. Reproduce the failure on macOS versions below 10.6.8, then compare behavior with 10.6.8 and newer systems. Done means identifying and documenting a workable compatibility approach or confirming that no upstream change is requested.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Something does not work on macOS < 10.6.8 which leaves dependents of prompt-toolkit defunct.
The issue does not exist on 10.6.8, whether on x86, Rosetta or native powerpc.
I understand that 10.5 is old and there may not be much interest to support it and add dedicated fixes. So I do not ask to make any changes here in upstream. However, there are users of 10.4–10.5, and affected apps are end-user apps, which are desirable to have working.
Could someone suggest a solution? I can add a local patch into my fork of ports for PowerPC and use it conditionally on macOS version, so nothing gets messed up for 10.6+.
Details are below.
Example with radian:
36-137:~ svacchanda$ ptpython
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader
key = self._selector.get_key(fd)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/selectors.py", line 193, in get_key
raise KeyError("{!r} is not registered".format(fileobj)) from None
KeyError: '0 is not registered'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ptpython/repl.py", line 135, in run
text = self.read()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ptpython/python_input.py", line 1045, in read
result = self.app.run(pre_run=pre_run, in_thread=True)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 961, in run
raise exception
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 939, in run_in_thread
result = self.run(
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 978, in run
return loop.run_until_complete(
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 885, in run_async
return await _run_async(f)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 737, in _run_async
with self.input.raw_mode(), self.input.attach(
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 135, in __enter__
return next(self.gen)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/prompt_toolkit/input/vt100.py", line 176, in _attached_input
loop.add_reader(fd, callback_wrapper)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/selector_events.py", line 331, in add_reader
self._add_reader(fd, callback, *args)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/selector_events.py", line 258, in _add_reader
self._selector.register(fd, selectors.EVENT_READ,
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/selectors.py", line 523, in register
self._selector.control([kev], 0, 0)
OSError: [Errno 45] Operation not supported
See also: https://trac.macports.org/ticket/67046
Example with fastanime:
PMG5:~ matias$ fastanime --trace anilist
[bold yellow]Welcome to FastAnime![/bold yellow] No configuration file found.
Traceback (most recent call last):
File "/opt/local/bin/fastanime", line 8, in <module>
sys.exit(Cli())
~~~^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/fastanime/__init__.py", line 12, in Cli
run_cli()
~~~~~~~^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 1442, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 1827, in invoke
super().invoke(ctx)
~~~~~~~~~~~~~~^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/click/decorators.py", line 34, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/fastanime/cli/cli.py", line 106, in cli
else loader.load(cli_overrides)
~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/fastanime/cli/config/loader.py", line 88, in load
return self._handle_first_run()
~~~~~~~~~~~~~~~~~~~~~~^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/fastanime/cli/config/loader.py", line 55, in _handle_first_run
).execute()
~~~~~~~^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/InquirerPy/base/simple.py", line 330, in execute
result = self._run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/InquirerPy/base/complex.py", line 208, in _run
return self.application.run()
~~~~~~~~~~~~~~~~~~~~^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/prompt_toolkit/application/application.py", line 1002, in run
return asyncio.run(coro)
~~~~~~~~~~~^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/prompt_toolkit/application/application.py", line 886, in run_async
return await _run_async(f)
^^^^^^^^^^^^^^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/prompt_toolkit/application/application.py", line 734, in _run_async
with self.input.raw_mode(), self.input.attach(
~~~~~~~~~~~~~~~~~^
read_from_input_in_context
^^^^^^^^^^^^^^^^^^^^^^^^^^
), attach_winch_signal_handler(self._on_resize):
^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/contextlib.py", line 141, in __enter__
return next(self.gen)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/prompt_toolkit/input/vt100.py", line 165, in _attached_input
loop.add_reader(fd, callback_wrapper)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/selector_events.py", line 347, in add_reader
self._add_reader(fd, callback, *args)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/selector_events.py", line 279, in _add_reader
self._selector.register(fd, selectors.EVENT_READ,
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
(handle, None))
^^^^^^^^^^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/selectors.py", line 505, in register
self._selector.control([kev], 0, 0)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
OSError: [Errno 45] Operation not supported
P. S. Please do not close the issue immediately; if there is no response for a while, it can be closed as not planned.
- Langage dominant
- Python
- Étoiles
- 10.6k
- Forks
- 834
- Merge moyen
- 15 h 43 min
- PR mergées (30 j)
- 1
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de prompt-toolkit/python-prompt-toolkit
-
ANSI.format lets a C1 CSI set a colorPeut-être pris @SashaMIT l’a pris il y a 24 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
prompt-toolkit/python-prompt-toolkit#2113 ·
Les mainteneurs répondent en général sous 1 jour
-
Add CSharp Console to PROJECTS.rstPeut-être pris @jw9829 l’a pris il y a 28 jours. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100
prompt-toolkit/python-prompt-toolkit#2102 ·
Les mainteneurs répondent en général sous 1 jour
-
Document.translate_row_col_to_index does not clamp negative rows to zeroPeut-être pris @oodadoudou l’a pris il y a 43 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
prompt-toolkit/python-prompt-toolkit#2097 ·
Les mainteneurs répondent en général sous 1 jour
-
Modified arrow keys resolve to the opposite direction: ESC[1;6A is Ctrl+Shift+Up but maps to ControlShiftDown (10 entries)Peut-être pris @despotak l’a pris il y a 49 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 92/100
prompt-toolkit/python-prompt-toolkit#2092 ·
Les mainteneurs répondent en général sous 1 jour
-
TelnetServer recv error: Forcing an RST request to the telnet server can cause a crashPeut-être pris @liyimil l’a pris il y a 99 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
prompt-toolkit/python-prompt-toolkit#2073 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de prompt-toolkit/python-prompt-toolkit
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
conda-forge/conda-forge-bot#7025 ·
Les mainteneurs répondent en général sous 1 jour
-
chore(ci): publish.yml's release-job comment counts the hand-created Releases as all of themOuvertearea:ci
Difficulté 1/5 Moins d'une heure Accessibilité débutants 74/100
catincloud-labs/dagster-dex#149 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
home-assistant/core#188424 ·
Les mainteneurs répondent en général sous 1 jour
-
Review backlog (docs-currency): README 'CI run' link lands on a run whose overall badge is cancelledOuverteagent/reviewer needs-kind needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 63/100
projectbluefin/utah#880 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
redis/memtier_benchmark#850 ·
Les mainteneurs répondent en général sous 1 jour