Skip to content
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

Always pass module_globals dict to linecache methods to support PEP-302 loaders #65

Closed
wants to merge 2 commits into from

Conversation

@borman
Copy link
Contributor

borman commented Jun 8, 2019

Without module_globals, getline()/getlines() only try to load source
from filesystem. In order to find source for non-filesystem modules,
module_globals should be passed, which allows linecache to query module
loader (found via __loader__ global name in module).

…02 loaders.

Without `module_globals`, getline()/getlines() only try to load source
from filesystem. In order to find source for non-filesystem modules,
`module_globals` should be passed, which allows linecache to query module
loader (found via `__loader__` global name in module).
@ionelmc

This comment has been minimized.

Copy link
Owner

ionelmc commented Jun 8, 2019

Hmm good catch. Please add yourself to AUTHORS and maybe CHANGELOG.rst.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jun 8, 2019

Codecov Report

Merging #65 into master will not change coverage.
The diff coverage is 88.88%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #65   +/-   ##
=======================================
  Coverage   75.77%   75.77%           
=======================================
  Files          13       13           
  Lines        2039     2039           
  Branches      198      198           
=======================================
  Hits         1545     1545           
  Misses        445      445           
  Partials       49       49
Impacted Files Coverage Δ
src/hunter/_event.pyx 67.62% <100%> (ø) ⬆️
src/hunter/event.py 63.07% <75%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c86be40...b6bda79. Read the comment docs.

@borman

This comment has been minimized.

Copy link
Contributor Author

borman commented Jun 8, 2019

Please add yourself to AUTHORS and maybe CHANGELOG.rst.

Updated.

@ionelmc

This comment has been minimized.

Copy link
Owner

ionelmc commented Jun 9, 2019

Included in master as 4510d1a and e8e18ad. Thanks!

@ionelmc ionelmc closed this Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.