Skip to content

Pkg resources bugfix #1854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Punyashloka Biswal
Quentin Pradet
Ralf Schmitt
Raphael Pierzina
Raquel Alegre
Roberto Polli
Romain Dorgueil
Roman Bolshakov
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

* Fix loader error when running ``pytest`` embedded in a zipfile.
Thanks `@mbachry`_ 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 @@ -950,6 +949,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'):
for entry in entrypoint.dist._get_metadata('RECORD'):
Expand Down