Silence deprecation from setuptools re: 'entrypoint.load(False)'.
| | |
| | | |
| | | def _resolve(name): |
| | | if name: |
| | | return EntryPoint.parse('x=%s' % name).load(False) |
| | | return EntryPoint.parse('x=%s' % name).resolve() |
| | | |
| | | class WhoConfig: |
| | | def __init__(self, here): |
| | |
| | | def make_predicate_restriction(app, global_config, |
| | | predicate, enabled=True, **kw): |
| | | if isinstance(predicate, STRING_TYPES): |
| | | predicate = EntryPoint.parse('x=%s' % predicate).load(False) |
| | | predicate = EntryPoint.parse('x=%s' % predicate).resolve() |
| | | return PredicateRestriction(app, predicate, enabled, **kw) |
| | |
| | | """ Resolve a dotted name or setuptools entry point to a callable. |
| | | """ |
| | | from pkg_resources import EntryPoint |
| | | return EntryPoint.parse('x=%s' % dotted_or_ep).load(False) |
| | | return EntryPoint.parse('x=%s' % dotted_or_ep).resolve() |