[MacPorts] #67046: Python is broken on Leopard: KeyError: '0 is not registered', OSError: [Errno 22] Invalid argument when trying to run some dependents, related failures in tests
MacPorts
noreply at macports.org
Mon Mar 6 04:52:08 UTC 2023
#67046: Python is broken on Leopard: KeyError: '0 is not registered', OSError:
[Errno 22] Invalid argument when trying to run some dependents, related
failures in tests
---------------------------+------------------------------
Reporter: barracuda156 | Owner: jmroot
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords: powerpc, leopard
Port: python310 |
---------------------------+------------------------------
Changes (by barracuda156):
* owner: xeron => jmroot
Old description:
> Example is with trying to run `ptpython`, however the error is not in it,
> since another port, `radian`, also depending on `py-prompt_toolkit`,
> fails identically.
>
> {{{
> Last login: Mon Mar 6 04:05:32 on ttys000
> 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
> 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'
> }}}
>
> This repeats in a loop then.
> Initially I faced the error on 10.6, however it is now confirmed on
> 10.5.8, so I can open a legitimate ticket.
New description:
UPD. ''As it is seen from tests, Python itself is broken.''
Example is with trying to run `ptpython`, however the error is not in it,
since another port, `radian`, also depending on `py-prompt_toolkit`, fails
identically.
{{{
Last login: Mon Mar 6 04:05:32 on ttys000
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
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'
}}}
This repeats in a loop then.
Initially I faced the error on 10.6, however it is now confirmed on
10.5.8, so I can open a legitimate ticket.
--
--
Ticket URL: <https://trac.macports.org/ticket/67046#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list