Compatibility shim providing selectable entry points for older implementations
Project description
Compatibility shim to ease adoption of importlib_metadata 3.6. Supplies forward-compatibility of “selectable” entry points even on older versions of importlib_metadata and importlib.metadata, and avoids usage that triggers deprecation warnings.
Use this shim for libraries or applications invoking entry_points() that run on Python older than 3.10 or where importlib_metadata is older than 3.6. In most cases, this shim is unnecessary and the easiest thing to do is simply require importlib_metadata >= 3.6 on all Pythons (or only those prior to 3.10a7). In some environments, a library may be constrained on which versions of importlib_metadata can be required, so this library bridges that gap.
To use this shim, add backports.entry_points_selectable to your project requirements. It will require importlib_metadata automatically where needed (prior to Python 3.8) but be satisfied by older versions. Projects should still require importlib_metadata as appropriate for API uses other than for entry_points.
Then in code, instead of from importlib.metadata import entry_points, use:
from backports.entry_points_selectable import entry_points
And then use the “selectable” features (pass keyword arguments to entry_points or invoke .select() on the result).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for backports.entry_points_selectable-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f30bcd19c5e2728ac93821d2b6ae0a325597e0ca12324fd91a39fa80e1cd0dd8 |
|
MD5 | 739c302962d8e35012673bcf89573f4e |
|
BLAKE2b-256 | 6b3fa0466ad0b536a1dbcf54ec79c4b0f92fdd8ede0407f9246486eadf9e13fb |
Hashes for backports.entry_points_selectable-1.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f60097faa317875ad76a4a47ae62dc3932df73a3cdad3968e6d573efa3707e3 |
|
MD5 | bb44849df1a14ec882876fa327e86aa6 |
|
BLAKE2b-256 | 0be35fa8f4aadda1757d8a0935f2b5b34e5f1e6a250d77e6ab46a45dfc5694b2 |