{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/pip/issues/3661","repository_url":"https://api.github.com/repos/pypa/pip","labels_url":"https://api.github.com/repos/pypa/pip/issues/3661/labels{/name}","comments_url":"https://api.github.com/repos/pypa/pip/issues/3661/comments","events_url":"https://api.github.com/repos/pypa/pip/issues/3661/events","html_url":"https://github.com/pypa/pip/issues/3661","id":153828672,"number":3661,"title":"DistInfoDistribution._compute_dependencies does not handle unsafe extra properly","user":{"login":"blueyed","id":9766,"avatar_url":"https://avatars.githubusercontent.com/u/9766?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-09T17:34:10Z","updated_at":"2016-05-09T17:49:21Z","closed_at":null,"body":"* Pip version: 8.1.1\r\n* Python version: 3.5.1\r\n* Operating System: Arch Linux\r\n\r\n### Description:\r\n\r\nI've noticed that there's a problem with `DistInfoDistribution._compute_dependencies` and `extras` that are not lower-case (i.e. mangled with `safe_extra`).\r\n\r\nThe issue seems to be that `safe_extra` is used on `extra`, which turns `GFK` into `gfk` ([source](https://github.com/pypa/pip/blob/67f534d3e36bd91e5e8f03615886d200786fb4b4/pip/_vendor/pkg_resources/__init__.py#L2890)), but then the lookup fails (where the original name is used).\r\n\r\n### What I've run:\r\n\r\nI've noticed this with `pip-tools` (https://github.com/nvie/pip-tools/pull/354), which uses:\r\n\r\n```python\r\nreqset = RequirementSet(self.build_dir,\r\n                        self.source_dir,\r\n                        download_dir=self._download_dir,\r\n                        wheel_download_dir=self._wheel_download_dir,\r\n                        session=self.session)\r\ndependencies = reqset._prepare_file(self.finder, ireq)\r\n```\r\n\r\n([source](https://github.com/nvie/pip-tools/blob/5d4d162b1a57284ff42c638e035bf76f40473d27/piptools/repositories/pypi.py#L127-L132)\r\n\r\nThis behaves differently in case a package is installed already, and using\r\n`ignore_installed=True` with `RequirementSet` works around this.\r\n\r\nIn that case `DistInfoDistribution._compute_dependencies` is not being used.\r\n\r\n\r\nI've also noticed that the code around this area has changed in setuptools\r\nslightly, but this issue seems to remain there."},"comment":{"url":"https://api.github.com/repos/pypa/pip/issues/comments/217937025","html_url":"https://github.com/pypa/pip/issues/3661#issuecomment-217937025","issue_url":"https://api.github.com/repos/pypa/pip/issues/3661","id":217937025,"user":{"login":"blueyed","id":9766,"avatar_url":"https://avatars.githubusercontent.com/u/9766?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T17:49:20Z","updated_at":"2016-05-09T17:49:20Z","body":"Reported for setuptools at https://github.com/pypa/setuptools/pull/578, where it probably belongs / should get discussed further?!"}}