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
In 473465e, I updated the code to use a new interface for entry points. When I did, I tested in on Python 3.9. But when I pushed it for release, the tests were failing on Python 3.6 with:
> for ep in metadata.entry_points(group='keyring.backends'):
E TypeError: 'group' is an invalid keyword argument for this function
In this test, metadata.entry_points is monkey-patched to importlib_metadata.EntryPoints, a tuple subclass.
Investigating further, I learned that on Python 3.7+, tuple subclasses accept and ignore arbitrary keyword arguments, but on Python 3.6, those arguments are rejected.
$ python3.8 -c "type('Foo', (tuple,), {})(name='xyz')"
$ python3.9 -c "type('Foo', (tuple,), {})(name='xyz')"
$ python3.7 -c "type('Foo', (tuple,), {})(name='xyz')"
$ python3.6 -c "type('Foo', (tuple,), {})(name='xyz')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: 'name' is an invalid keyword argument for this function
The text was updated successfully, but these errors were encountered:
In 473465e, I updated the code to use a new interface for entry points. When I did, I tested in on Python 3.9. But when I pushed it for release, the tests were failing on Python 3.6 with:
In this test,
metadata.entry_points
is monkey-patched toimportlib_metadata.EntryPoints
, a tuple subclass.Investigating further, I learned that on Python 3.7+, tuple subclasses accept and ignore arbitrary keyword arguments, but on Python 3.6, those arguments are rejected.
The text was updated successfully, but these errors were encountered: