KEMBAR78
Special __file__ handling for Python 2 (fixes #130) by smsearcy · Pull Request #152 · theskumar/python-dotenv · GitHub
Skip to content

Conversation

@smsearcy
Copy link
Contributor

In Python 2 the extension returned by __file__ can be either .pyc or .pyo in addition to .py, which means #109 does not always work in Python 2.

This fixes #130 and might be related to #124.

I added the current_file variable because modifying __file__ didn't seem like a good idea (if it's even possible, I didn't try it).

@coveralls
Copy link

coveralls commented Nov 15, 2018

Coverage Status

Coverage decreased (-0.9%) to 87.586% when pulling abcbcff on smsearcy:GH-130 into b881091 on theskumar:master.

@theskumar theskumar force-pushed the master branch 2 times, most recently from f628767 to f9863d3 Compare December 16, 2018 13:18
@bbc2 bbc2 mentioned this pull request Dec 31, 2018
Updated tests to show that this works.
@smsearcy
Copy link
Contributor Author

I rebased master into this branch and re-enabled the test that had been marked xfail because it works now. Coveralls hasn't updated but this should have increased the coverage, not sure how to trigger that to re-run.

@bbc2 bbc2 merged commit a409657 into theskumar:master Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

find_dotenv() unable to find .env

3 participants