Skip to content

Commit

Permalink
Merge pkg_resources workaround
Browse files Browse the repository at this point in the history
Merge branch 'pkg_resources_bugfix' of github.com:raquel-ucl/pytest into pkg-resources

This is an odd case and doesn't really make sense, it is working around a bug
in maven/jython and the old version or weird packaging of setuptools they use.
But we used to do this in the past so might as well keep doing this.
  • Loading branch information
flub committed Sep 19, 2016
2 parents 2bafa74 + 8f516d2 commit f484e7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Punyashloka Biswal
Quentin Pradet
Ralf Schmitt
Raphael Pierzina
Raquel Alegre
Roberto Polli
Romain Dorgueil
Roman Bolshakov
Expand Down
5 changes: 2 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

*

Expand Down
2 changes: 1 addition & 1 deletion _pytest/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import types
import warnings

import pkg_resources
import py
# DON't import pytest here because it causes import cycle troubles
import sys, os
Expand Down Expand Up @@ -952,6 +951,7 @@ def _consider_importhook(self, args, entrypoint_name):
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)
Expand Down

0 comments on commit f484e7c

Please sign in to comment.