Do not check requirements when loading entry points
Update the calls to pkg_resources to avoid forcing a requirements check
when the plugins are being loaded.
There are 2 versions of the entry point API in different releases of
setuptools. In one version, the require keyword argument can be passed
to load(). In the other, separate methods resolve() and require() need
to be used. This change updates the mock and fake objects to support
either, since the fakes are subclasses of the EntryPoint class in
pkg_resources.
It would be better to replace the calls to pkg_resources with stevedore,
which provides a more stable API, abstracts away this difference, and
provides an API for creating test managers directly. That change would
have required more extensive updates to the test suite, though, and
since I'm not as familiar with this code base as others will be, I will
leave those changes for someone else.
Reviewed: https:/ /review. openstack. org/186111 /git.openstack. org/cgit/ openstack/ python- novaclient/ commit/ ?id=e649cea843b 8453d268da8ea74 ea180f513d5ea3
Committed: https:/
Submitter: Jenkins
Branch: master
commit e649cea843b8453 d268da8ea74ea18 0f513d5ea3
Author: Doug Hellmann <email address hidden>
Date: Wed May 27 18:08:02 2015 +0000
Do not check requirements when loading entry points
Update the calls to pkg_resources to avoid forcing a requirements check
when the plugins are being loaded.
There are 2 versions of the entry point API in different releases of
setuptools. In one version, the require keyword argument can be passed
to load(). In the other, separate methods resolve() and require() need
to be used. This change updates the mock and fake objects to support
either, since the fakes are subclasses of the EntryPoint class in
pkg_resources.
It would be better to replace the calls to pkg_resources with stevedore,
which provides a more stable API, abstracts away this difference, and
provides an API for creating test managers directly. That change would
have required more extensive updates to the test suite, though, and
since I'm not as familiar with this code base as others will be, I will
leave those changes for someone else.
Change-Id: I2a9aeb53ccad04 c7fa687f2534030 6b84218f9ff
Partial-bug: #1457100