Merge pull request #1564 from dairiki/backport.pr1541
Backport. #1541 to 1.5-branch
| | |
| | | the ``pyramid.renderers.JSON`` renderer if there is no request object to |
| | | derive a callback from. See https://github.com/Pylons/pyramid/pull/1562 |
| | | |
| | | - Prevent "parameters to load are deprecated" ``DeprecationWarning`` |
| | | from setuptools>=11.3. See https://github.com/Pylons/pyramid/pull/1541 |
| | | |
| | | .. _changes_1.5.2: |
| | | |
| | | 1.5.2 (2014-11-09) |
| | |
| | | - Amit Mane, 2014/01/23 |
| | | |
| | | - Fenton Travers, 2014/05/06 |
| | | |
| | | - Geoffrey T. Dairiki, 2015/02/06 |
| | |
| | | value = package.__name__ |
| | | else: |
| | | value = package.__name__ + value |
| | | return pkg_resources.EntryPoint.parse( |
| | | 'x=%s' % value).load(False) |
| | | # Calling EntryPoint.load with an argument is deprecated. |
| | | # See https://pythonhosted.org/setuptools/history.html#id8 |
| | | ep = pkg_resources.EntryPoint.parse('x=%s' % value) |
| | | if hasattr(ep, 'resolve'): |
| | | # setuptools>=10.2 |
| | | return ep.resolve() # pragma: NO COVER |
| | | else: |
| | | return ep.load(False) # pragma: NO COVER |
| | | |
| | | def _zope_dottedname_style(self, value, package): |
| | | """ package.module.attr style """ |