{"action":"closed","number":2876,"pull_request":{"url":"https://api.github.com/repos/pypa/pipenv/pulls/2876","id":217122533,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3MTIyNTMz","html_url":"https://github.com/pypa/pipenv/pull/2876","diff_url":"https://github.com/pypa/pipenv/pull/2876.diff","patch_url":"https://github.com/pypa/pipenv/pull/2876.patch","issue_url":"https://api.github.com/repos/pypa/pipenv/issues/2876","number":2876,"state":"closed","locked":false,"title":"Added inotifier to watch  on a thread. Needs refinement","user":{"login":"owenstranathan","id":6653174,"node_id":"MDQ6VXNlcjY2NTMxNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6653174?v=4","gravatar_id":"","url":"https://api.github.com/users/owenstranathan","html_url":"https://github.com/owenstranathan","followers_url":"https://api.github.com/users/owenstranathan/followers","following_url":"https://api.github.com/users/owenstranathan/following{/other_user}","gists_url":"https://api.github.com/users/owenstranathan/gists{/gist_id}","starred_url":"https://api.github.com/users/owenstranathan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owenstranathan/subscriptions","organizations_url":"https://api.github.com/users/owenstranathan/orgs","repos_url":"https://api.github.com/users/owenstranathan/repos","events_url":"https://api.github.com/users/owenstranathan/events{/privacy}","received_events_url":"https://api.github.com/users/owenstranathan/received_events","type":"User","site_admin":false},"body":"##### The issue\r\n\r\nWhen in an active virtualenv ,changes to `.env` file require manual deactivation/reactivation\r\nIt would be great if this was automatic.\r\n\r\nrelated to [Issue #1015](https://github.com/pypa/pipenv/issues/1015)\r\n\r\n##### The fix\r\nAt first I wanted a command to manually retrigger the load, but since commands are run from a child process it's not possible to export the values to the parent environment.\r\n\r\nMy solution is to use pyinotify to spawn a thread to watch the dotenv file and manually send the new env to the opened shell in the callback.\r\n\r\nI'm not convinced that this is the best solution but it \"technically works\".\r\nCurrently this PR sends a line exporting the values in the subshell. This is not ideal and I'm looking for suggestions on how to improve this in anyway. Does pexpect offer something to set the process's environment?\r\n\r\nI'm not sure how important/desirable this behavior is to everyone who uses pipenv. Perhaps this should be configurable, so it only happens when you specifiy it. Please advise.\r\n\r\n##### The checklist\r\n\r\n- [ x ] Associated issue\r\n\r\n* [ ] A news fragment in the `news/` directory to describe this fix with the extension `.bugfix`, `.feature`, `.behavior`, `.doc`. `.vendor`. or `.trivial` (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.  <- Don't really understand this, would welcome guidance\r\n","created_at":"2018-09-20T22:16:46Z","updated_at":"2018-11-25T19:30:41Z","closed_at":"2018-11-25T19:30:41Z","merged_at":null,"merge_commit_sha":"359580a0403ed47c3e2d054620567af843ccecb8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pypa/pipenv/pulls/2876/commits","review_comments_url":"https://api.github.com/repos/pypa/pipenv/pulls/2876/comments","review_comment_url":"https://api.github.com/repos/pypa/pipenv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pypa/pipenv/issues/2876/comments","statuses_url":"https://api.github.com/repos/pypa/pipenv/statuses/88c68464d59b15a61fd5c188d683d5723ea16b50","head":{"label":"owenstranathan:reload-dotenv","ref":"reload-dotenv","sha":"88c68464d59b15a61fd5c188d683d5723ea16b50","user":{"login":"owenstranathan","id":6653174,"node_id":"MDQ6VXNlcjY2NTMxNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6653174?v=4","gravatar_id":"","url":"https://api.github.com/users/owenstranathan","html_url":"https://github.com/owenstranathan","followers_url":"https://api.github.com/users/owenstranathan/followers","following_url":"https://api.github.com/users/owenstranathan/following{/other_user}","gists_url":"https://api.github.com/users/owenstranathan/gists{/gist_id}","starred_url":"https://api.github.com/users/owenstranathan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owenstranathan/subscriptions","organizations_url":"https://api.github.com/users/owenstranathan/orgs","repos_url":"https://api.github.com/users/owenstranathan/repos","events_url":"https://api.github.com/users/owenstranathan/events{/privacy}","received_events_url":"https://api.github.com/users/owenstranathan/received_events","type":"User","site_admin":false},"repo":{"id":149642067,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk2NDIwNjc=","name":"pipenv","full_name":"owenstranathan/pipenv","private":false,"owner":{"login":"owenstranathan","id":6653174,"node_id":"MDQ6VXNlcjY2NTMxNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6653174?v=4","gravatar_id":"","url":"https://api.github.com/users/owenstranathan","html_url":"https://github.com/owenstranathan","followers_url":"https://api.github.com/users/owenstranathan/followers","following_url":"https://api.github.com/users/owenstranathan/following{/other_user}","gists_url":"https://api.github.com/users/owenstranathan/gists{/gist_id}","starred_url":"https://api.github.com/users/owenstranathan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owenstranathan/subscriptions","organizations_url":"https://api.github.com/users/owenstranathan/orgs","repos_url":"https://api.github.com/users/owenstranathan/repos","events_url":"https://api.github.com/users/owenstranathan/events{/privacy}","received_events_url":"https://api.github.com/users/owenstranathan/received_events","type":"User","site_admin":false},"html_url":"https://github.com/owenstranathan/pipenv","description":" Python Development Workflow for Humans.","fork":true,"url":"https://api.github.com/repos/owenstranathan/pipenv","forks_url":"https://api.github.com/repos/owenstranathan/pipenv/forks","keys_url":"https://api.github.com/repos/owenstranathan/pipenv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owenstranathan/pipenv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owenstranathan/pipenv/teams","hooks_url":"https://api.github.com/repos/owenstranathan/pipenv/hooks","issue_events_url":"https://api.github.com/repos/owenstranathan/pipenv/issues/events{/number}","events_url":"https://api.github.com/repos/owenstranathan/pipenv/events","assignees_url":"https://api.github.com/repos/owenstranathan/pipenv/assignees{/user}","branches_url":"https://api.github.com/repos/owenstranathan/pipenv/branches{/branch}","tags_url":"https://api.github.com/repos/owenstranathan/pipenv/tags","blobs_url":"https://api.github.com/repos/owenstranathan/pipenv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owenstranathan/pipenv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owenstranathan/pipenv/git/refs{/sha}","trees_url":"https://api.github.com/repos/owenstranathan/pipenv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owenstranathan/pipenv/statuses/{sha}","languages_url":"https://api.github.com/repos/owenstranathan/pipenv/languages","stargazers_url":"https://api.github.com/repos/owenstranathan/pipenv/stargazers","contributors_url":"https://api.github.com/repos/owenstranathan/pipenv/contributors","subscribers_url":"https://api.github.com/repos/owenstranathan/pipenv/subscribers","subscription_url":"https://api.github.com/repos/owenstranathan/pipenv/subscription","commits_url":"https://api.github.com/repos/owenstranathan/pipenv/commits{/sha}","git_commits_url":"https://api.github.com/repos/owenstranathan/pipenv/git/commits{/sha}","comments_url":"https://api.github.com/repos/owenstranathan/pipenv/comments{/number}","issue_comment_url":"https://api.github.com/repos/owenstranathan/pipenv/issues/comments{/number}","contents_url":"https://api.github.com/repos/owenstranathan/pipenv/contents/{+path}","compare_url":"https://api.github.com/repos/owenstranathan/pipenv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owenstranathan/pipenv/merges","archive_url":"https://api.github.com/repos/owenstranathan/pipenv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owenstranathan/pipenv/downloads","issues_url":"https://api.github.com/repos/owenstranathan/pipenv/issues{/number}","pulls_url":"https://api.github.com/repos/owenstranathan/pipenv/pulls{/number}","milestones_url":"https://api.github.com/repos/owenstranathan/pipenv/milestones{/number}","notifications_url":"https://api.github.com/repos/owenstranathan/pipenv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owenstranathan/pipenv/labels{/name}","releases_url":"https://api.github.com/repos/owenstranathan/pipenv/releases{/id}","deployments_url":"https://api.github.com/repos/owenstranathan/pipenv/deployments","created_at":"2018-09-20T16:55:44Z","updated_at":"2018-11-22T04:57:45Z","pushed_at":"2018-11-22T04:57:41Z","git_url":"git://github.com/owenstranathan/pipenv.git","ssh_url":"git@github.com:owenstranathan/pipenv.git","clone_url":"https://github.com/owenstranathan/pipenv.git","svn_url":"https://github.com/owenstranathan/pipenv","homepage":"https://docs.pipenv.org/","size":216066,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pypa:master","ref":"master","sha":"19cc73125f8009b45087d5533c1c2fc37d178cb0","user":{"login":"pypa","id":647025,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzAyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/647025?v=4","gravatar_id":"","url":"https://api.github.com/users/pypa","html_url":"https://github.com/pypa","followers_url":"https://api.github.com/users/pypa/followers","following_url":"https://api.github.com/users/pypa/following{/other_user}","gists_url":"https://api.github.com/users/pypa/gists{/gist_id}","starred_url":"https://api.github.com/users/pypa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypa/subscriptions","organizations_url":"https://api.github.com/users/pypa/orgs","repos_url":"https://api.github.com/users/pypa/repos","events_url":"https://api.github.com/users/pypa/events{/privacy}","received_events_url":"https://api.github.com/users/pypa/received_events","type":"Organization","site_admin":false},"repo":{"id":79510167,"node_id":"MDEwOlJlcG9zaXRvcnk3OTUxMDE2Nw==","name":"pipenv","full_name":"pypa/pipenv","private":false,"owner":{"login":"pypa","id":647025,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzAyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/647025?v=4","gravatar_id":"","url":"https://api.github.com/users/pypa","html_url":"https://github.com/pypa","followers_url":"https://api.github.com/users/pypa/followers","following_url":"https://api.github.com/users/pypa/following{/other_user}","gists_url":"https://api.github.com/users/pypa/gists{/gist_id}","starred_url":"https://api.github.com/users/pypa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypa/subscriptions","organizations_url":"https://api.github.com/users/pypa/orgs","repos_url":"https://api.github.com/users/pypa/repos","events_url":"https://api.github.com/users/pypa/events{/privacy}","received_events_url":"https://api.github.com/users/pypa/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pypa/pipenv","description":" Python Development Workflow for Humans.","fork":false,"url":"https://api.github.com/repos/pypa/pipenv","forks_url":"https://api.github.com/repos/pypa/pipenv/forks","keys_url":"https://api.github.com/repos/pypa/pipenv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pypa/pipenv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pypa/pipenv/teams","hooks_url":"https://api.github.com/repos/pypa/pipenv/hooks","issue_events_url":"https://api.github.com/repos/pypa/pipenv/issues/events{/number}","events_url":"https://api.github.com/repos/pypa/pipenv/events","assignees_url":"https://api.github.com/repos/pypa/pipenv/assignees{/user}","branches_url":"https://api.github.com/repos/pypa/pipenv/branches{/branch}","tags_url":"https://api.github.com/repos/pypa/pipenv/tags","blobs_url":"https://api.github.com/repos/pypa/pipenv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pypa/pipenv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pypa/pipenv/git/refs{/sha}","trees_url":"https://api.github.com/repos/pypa/pipenv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pypa/pipenv/statuses/{sha}","languages_url":"https://api.github.com/repos/pypa/pipenv/languages","stargazers_url":"https://api.github.com/repos/pypa/pipenv/stargazers","contributors_url":"https://api.github.com/repos/pypa/pipenv/contributors","subscribers_url":"https://api.github.com/repos/pypa/pipenv/subscribers","subscription_url":"https://api.github.com/repos/pypa/pipenv/subscription","commits_url":"https://api.github.com/repos/pypa/pipenv/commits{/sha}","git_commits_url":"https://api.github.com/repos/pypa/pipenv/git/commits{/sha}","comments_url":"https://api.github.com/repos/pypa/pipenv/comments{/number}","issue_comment_url":"https://api.github.com/repos/pypa/pipenv/issues/comments{/number}","contents_url":"https://api.github.com/repos/pypa/pipenv/contents/{+path}","compare_url":"https://api.github.com/repos/pypa/pipenv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pypa/pipenv/merges","archive_url":"https://api.github.com/repos/pypa/pipenv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pypa/pipenv/downloads","issues_url":"https://api.github.com/repos/pypa/pipenv/issues{/number}","pulls_url":"https://api.github.com/repos/pypa/pipenv/pulls{/number}","milestones_url":"https://api.github.com/repos/pypa/pipenv/milestones{/number}","notifications_url":"https://api.github.com/repos/pypa/pipenv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pypa/pipenv/labels{/name}","releases_url":"https://api.github.com/repos/pypa/pipenv/releases{/id}","deployments_url":"https://api.github.com/repos/pypa/pipenv/deployments","created_at":"2017-01-20T00:44:02Z","updated_at":"2018-11-25T16:12:12Z","pushed_at":"2018-11-25T19:08:04Z","git_url":"git://github.com/pypa/pipenv.git","ssh_url":"git@github.com:pypa/pipenv.git","clone_url":"https://github.com/pypa/pipenv.git","svn_url":"https://github.com/pypa/pipenv","homepage":"https://docs.pipenv.org/","size":227463,"stargazers_count":14734,"watchers_count":14734,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1076,"mirror_url":null,"archived":false,"open_issues_count":171,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1076,"open_issues":171,"watchers":14734,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pypa/pipenv/pulls/2876"},"html":{"href":"https://github.com/pypa/pipenv/pull/2876"},"issue":{"href":"https://api.github.com/repos/pypa/pipenv/issues/2876"},"comments":{"href":"https://api.github.com/repos/pypa/pipenv/issues/2876/comments"},"review_comments":{"href":"https://api.github.com/repos/pypa/pipenv/pulls/2876/comments"},"review_comment":{"href":"https://api.github.com/repos/pypa/pipenv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pypa/pipenv/pulls/2876/commits"},"statuses":{"href":"https://api.github.com/repos/pypa/pipenv/statuses/88c68464d59b15a61fd5c188d683d5723ea16b50"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":false,"mergeable_state":"unstable","merged_by":null,"comments":1,"review_comments":2,"maintainer_can_modify":false,"commits":3,"additions":26,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"techalchemy"}}