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 the affected project’s 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).
This backport has a very lenient dependency on importlib_metadata for older Pythons and is a single module implementation. If adding a dependency is a concern, this module may be vendored into the affected project.
Release files for backports.entry-points-selectable 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| backports.entry_points_selectable-1.3.0.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| backports.entry_points_selectable-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.1 kB
Release files / backports.entry_points_selectable-1.3.0.tar.gz
| Download URL | backports.entry_points_selectable-1.3.0.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17a8b44ae700fba548686dd274ddc91c060371565cd63806c20a1d33911746e6
|
|
BLAKE2b-256 checksum How to use checksums |
fc25dae014b114397a6f60578d7358bf5fcb103f71556e5363a50d7b42e9bc51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / backports.entry_points_selectable-1.3.0-py3-none-any.whl
| Download URL | backports.entry_points_selectable-1.3.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66f5da003eb4b283c7b60581bc8bb0baf0d810eb3e3068da786d3821b4d5746a
|
|
BLAKE2b-256 checksum How to use checksums |
5a78b3ba5d804ae21e26e6179bbe4e1338deaaba9d20161918f59e20e9d92ea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|