diff --git a/AUTHORS b/AUTHORS index c74aa4af6..636fe7f7b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -106,6 +106,7 @@ Punyashloka Biswal Quentin Pradet Ralf Schmitt Raphael Pierzina +Raquel Alegre Roberto Polli Romain Dorgueil Roman Bolshakov diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cc4067fc1..8933ec4d0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,13 +5,12 @@ in Python 2 (`#1905`_). Thanks `@philpep`_ for the report and `@nicoddemus`_ for the PR. -* - * Assertions are now being rewritten for plugins in development mode (``pip install -e``) (`#1934`_). Thanks `@nicoddemus`_ for the PR. -* +* Fix pkg_resources import error in Jython projects (`#1853`). + Thanks `@raquel-ucl`_ for the PR. * diff --git a/_pytest/config.py b/_pytest/config.py index 55ad538d3..661a8513d 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -5,7 +5,6 @@ import traceback import types import warnings -import pkg_resources import py # DON't import pytest here because it causes import cycle troubles import sys, os @@ -952,6 +951,7 @@ class Config(object): except SystemError: mode = 'plain' else: + import pkg_resources self.pluginmanager.rewrite_hook = hook for entrypoint in pkg_resources.iter_entry_points('pytest11'): # 'RECORD' available for plugins installed normally (pip install)