You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #991, toolkit selection is broken on Python 3.9. Running the test suite shows:
(pyface) mdickinson@mirzakhani pyface % python -V
Python 3.9.6
(pyface) mdickinson@mirzakhani pyface % python -m unittest
E
======================================================================
ERROR: pyface (unittest.loader._FailedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/mdickinson/Enthought/ETS/pyface/pyface/__init__.py", line 61, in load_tests
from pyface.toolkit import toolkit_object # noqa: F401
File "/Users/mdickinson/Enthought/ETS/pyface/pyface/toolkit.py", line 23, in <module>
toolkit = toolkit_object = find_toolkit("pyface.toolkits")
File "/Users/mdickinson/Enthought/ETS/pyface/pyface/base_toolkit.py", line 259, in find_toolkit
plugin for plugin in importlib_metadata.entry_points().select(group=entry_point)
AttributeError: 'dict' object has no attribute 'select'
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)
The issue is that in Python 3.9, importlib.metadata doesn't provide the select interface (it's new in Python 3.10).
I think in the short term, #991 should be reverted while we figure out the right fix. That may be to ignore the deprecation warnings, or we may want to deliberately continue to use importlib_metadata instead of importlib.metadata on Python 3.9. (It's annoying to have to do so, though - we'd really like to be able to drop use of importlib_metadata sooner rather than later.)
Since #991, toolkit selection is broken on Python 3.9. Running the test suite shows:
The issue is that in Python 3.9,
importlib.metadata
doesn't provide theselect
interface (it's new in Python 3.10).I think in the short term, #991 should be reverted while we figure out the right fix. That may be to ignore the deprecation warnings, or we may want to deliberately continue to use
importlib_metadata
instead ofimportlib.metadata
on Python 3.9. (It's annoying to have to do so, though - we'd really like to be able to drop use ofimportlib_metadata
sooner rather than later.)Related: python/importlib_metadata#298
The text was updated successfully, but these errors were encountered: