-
Notifications
You must be signed in to change notification settings - Fork 425
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
Fix tests for build environment relying on PYTHONPATH
#318
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some of the environment variables got accidentally lost.
d9fae2a
to
13303ca
Compare
Thanks for the suggestion, fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, I was about to push the same thing for Gentoo 👍
The missing variable is PYTHONPATH
: Without it setuptools easy-install-entry-script will happily use (say) dotenv 0.16.0 installed in the system rather than 0.17.0 in those two tests. So my vote for merging this before the next release. Thank you! 🙏
Related:
PS: @befeleme could you adjust the title of the pull request to make clear that this is a bugfix for the tests? Thank you! |
Overriding the whole environment would remove critical variables like `PYTHONPATH`. This would break tests on some systems like during Fedora or Gentoo packaging.
PYTHONPATH
Thank you for the fix! I just fixed some formatting and updated the changelog. I'll release this in a few minutes. |
Released as v0.17.1. |
Very nice, thank you! 👍 👍 |
Hey,
I want to update dotenv to 0.17.0 in Fedora, but realized the two newly introduced tests started failing in the build process.
This happens because defining
_env
replaces the existing environment, effectively unsetting many variables (which, in my case, means losing information where to look for the module to import). Instead of creating completely new contents, I propose copying existing environment and adding the tested key-value on the top of it.This will not affect the existing test suite but can help other packagers.