Announcing importlib_resources 0.1

Barry Warsaw barry at python.org
Wed Dec 6 19:48:06 EST 2017


--Apple-Mail=_0B26B532-B293-4D6A-B887-30015D809C82
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
        charset=utf-8

Brett and I have been working on a little skunkworks project for a few = weeks,
 and it=E2=80=99s now time to announce the first release.  We=E2=80=99= re
calling it importlib_resources and its intent is to replace the =
=E2=80=9CBasic Resource Access=E2=80=9D APIs of pkg_resources with more =
efficient implementations based directly on importlib.

importlib_resources 0.1 provides support for Python 2.7, and 3.4-3.7.  = It
defines an ABC that loaders can implement to provide direct access to =
resources inside packages.  importlib_resources has fallbacks for file = system
 and zip file loaders, so it should work out of the box in most of = the places
 that pkg_resources is currently used.  We even have a = migration guide for
folks who want to drop pkg_resources altogether and = adopt
importlib_resources.  importlib_resources explicitly does not = support
pkg_resources features like entry points, working sets, etc.  = Still, we think
 the APIs provided will be good enough for most current = use cases.

http://importlib-resources.readthedocs.io/

We are calling it =E2=80=9Cimportlib_resources=E2=80=9D because we = intend to
port this into Python 3.7 under a new importlib.resources = subpackage, so
starting with Python 3.7, you will get this for free.  = The API is going to
officially be provisional, but I=E2=80=99ve already = done an experimental port
 of at least one big application (I=E2=80=99ll = let you guess which one :) and
 it=E2=80=99s fairly straightforward, if = not completely mechanical
unfortunately.  Take a look at the migration = guide for details:

http://importlib-resources.readthedocs.io/en/latest/migration.html

We also intend to include the ABC in Python 3.7:

http://importlib-resources.readthedocs.io/en/latest/abc.html

You can of course `pip install importlib_resources`.

We=E2=80=99re hosting the project on GitLab, and welcome feedback, bug = fixes,
 improvements, etc!

 * Project home: https://gitlab.com/python-devs/importlib_resources
 * Report bugs at: =
https://gitlab.com/python-devs/importlib_resources/issues
 * Code hosting: https://gitlab.com/python-devs/importlib_resources.git
 * Documentation: http://importlib_resources.readthedocs.io/

Cheers.
-Barry and Brett


--Apple-Mail=_0B26B532-B293-4D6A-B887-30015D809C82
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
        filename=signature.asc
Content-Type: application/pgp-signature;
        name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEhBcVftvnPZ6sHlObEm61Y6dLBr8FAlopftcACgkQEm61Y6dL
Br8PRw//YC5f2FPNftR/GPNgt/wMa63sSwRgdxORMoUi7iip9vja4+HagikzLD94
zcUSu7XmXdgMULqisZ8xE0vsSiBae79sOHidN142c9YZLuom6jqDX0RILYoxFw44
xdcy/CHQGV4pNG81s1G9g3iNTaiYh15zJg8fh59R5daxZIBopNTAm3Kugeq9K2Xf
qferhW5eQ0SgmyqLlDOcF8YgkH8F45b7CIa8p23amy4kVP1u305/Im/sVYTa5Bnn
mb9VqDb/s1Ii0OghWoTEeVD070Fx4b503rr8AjpqUzixwgLssJDn3rcLrGE3sBki
32EbeZ8gM+NZQAmzKCV9cfPbDPWxLMn0TTdobRWxg1QarU0qzZsw8F5m20t9SE0L
jBR2J1MdHdesuFEC4aNu3OoeTHH8whmVE/jcUYujdZa3RGX4/L6AmyNzYnwL9Qic
kylLgDAnR5wNSoXFarTkgnt9/n7nQer8cK34c3duKnw+85INyWVPKicKf4qp8Oc9
K3K3DzWFnhrE0OTiZrO/UWwEL/GGRkVI1mSFx04i4i90hMuZXbHBGa2S63TZD6Xt
Cxw0DdU5eT5sA+UoenJ0/a4S5jNvak858vX7NkAlXVr5npiha7teFiv4XWTNQHs5
Gt3BgQjQ1+v0ldF1Ujg/T+o3Z6eQFd3YdSku9Tgv7glcvf0UbNg=
=YMqE
-----END PGP SIGNATURE-----

--Apple-Mail=_0B26B532-B293-4D6A-B887-30015D809C82--



More information about the Python-announce-list mailing list