{"action":"created","issue":{"url":"https://api.github.com/repos/python/mypy/issues/5701","repository_url":"https://api.github.com/repos/python/mypy","labels_url":"https://api.github.com/repos/python/mypy/issues/5701/labels{/name}","comments_url":"https://api.github.com/repos/python/mypy/issues/5701/comments","events_url":"https://api.github.com/repos/python/mypy/issues/5701/events","html_url":"https://github.com/python/mypy/issues/5701","id":365317485,"node_id":"MDU6SXNzdWUzNjUzMTc0ODU=","number":5701,"title":"sitecustomize/full sys.path  support","user":{"login":"llchan","id":51099,"node_id":"MDQ6VXNlcjUxMDk5","avatar_url":"https://avatars2.githubusercontent.com/u/51099?v=4","gravatar_id":"","url":"https://api.github.com/users/llchan","html_url":"https://github.com/llchan","followers_url":"https://api.github.com/users/llchan/followers","following_url":"https://api.github.com/users/llchan/following{/other_user}","gists_url":"https://api.github.com/users/llchan/gists{/gist_id}","starred_url":"https://api.github.com/users/llchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llchan/subscriptions","organizations_url":"https://api.github.com/users/llchan/orgs","repos_url":"https://api.github.com/users/llchan/repos","events_url":"https://api.github.com/users/llchan/events{/privacy}","received_events_url":"https://api.github.com/users/llchan/received_events","type":"User","site_admin":false},"labels":[{"id":21488358,"node_id":"MDU6TGFiZWwyMTQ4ODM1OA==","url":"https://api.github.com/repos/python/mypy/labels/feature","name":"feature","color":"84b6eb","default":false},{"id":513232552,"node_id":"MDU6TGFiZWw1MTMyMzI1NTI=","url":"https://api.github.com/repos/python/mypy/labels/priority-1-normal","name":"priority-1-normal","color":"fef2c0","default":false},{"id":608992726,"node_id":"MDU6TGFiZWw2MDg5OTI3MjY=","url":"https://api.github.com/repos/python/mypy/labels/topic-usability","name":"topic-usability","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-01T05:52:40Z","updated_at":"2018-10-01T15:56:27Z","closed_at":null,"author_association":"NONE","body":"Looking at sitepkgs.py, the current implementation only looks for PEP 561 packages in `site.usersitepackages()` and `site.getsitepackages()`. My environment has a sitecustomize.py that adds additional paths to `sys.path` based on some in-house env vars (not really my choice, I inherited this setup). Could we add a mypy flag to indicate that it should use the full sys.path? I don't really see a harm in including PYTHONPATH too.\r\n\r\nOn a related note, shouldnt user site packages have precedence over system site packages?"},"comment":{"url":"https://api.github.com/repos/python/mypy/issues/comments/425961016","html_url":"https://github.com/python/mypy/issues/5701#issuecomment-425961016","issue_url":"https://api.github.com/repos/python/mypy/issues/5701","id":425961016,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTk2MTAxNg==","user":{"login":"llchan","id":51099,"node_id":"MDQ6VXNlcjUxMDk5","avatar_url":"https://avatars2.githubusercontent.com/u/51099?v=4","gravatar_id":"","url":"https://api.github.com/users/llchan","html_url":"https://github.com/llchan","followers_url":"https://api.github.com/users/llchan/followers","following_url":"https://api.github.com/users/llchan/following{/other_user}","gists_url":"https://api.github.com/users/llchan/gists{/gist_id}","starred_url":"https://api.github.com/users/llchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llchan/subscriptions","organizations_url":"https://api.github.com/users/llchan/orgs","repos_url":"https://api.github.com/users/llchan/repos","events_url":"https://api.github.com/users/llchan/events{/privacy}","received_events_url":"https://api.github.com/users/llchan/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T15:56:27Z","updated_at":"2018-10-01T15:56:27Z","author_association":"NONE","body":"Thanks for the consideration. Just to make sure I'm explicit about it, it's not just PYTHONPATH that I'd like to see, but the full site.py logic that includes sitecustomize.py or maybe usercustomize.py.\r\n\r\nI would probably go with the \"filter things out from sys.path\" rather than the \"recreate the logic in site.py\" approach, so that future changes in site.py will likely work without replicating the logic in mypy, but there may be nuances I'm not considering."}}
{"actor":{"display_login":"llchan"}}