{"action":"closed","issue":{"url":"https://api.github.com/repos/PyMySQL/PyMySQL/issues/705","repository_url":"https://api.github.com/repos/PyMySQL/PyMySQL","labels_url":"https://api.github.com/repos/PyMySQL/PyMySQL/issues/705/labels{/name}","comments_url":"https://api.github.com/repos/PyMySQL/PyMySQL/issues/705/comments","events_url":"https://api.github.com/repos/PyMySQL/PyMySQL/issues/705/events","html_url":"https://github.com/PyMySQL/PyMySQL/issues/705","id":337938519,"node_id":"MDU6SXNzdWUzMzc5Mzg1MTk=","number":705,"title":"Latest release (v0.9.1) installs `tests` as a top-level library","user":{"login":"campadrenalin","id":289492,"node_id":"MDQ6VXNlcjI4OTQ5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/289492?v=4","gravatar_id":"","url":"https://api.github.com/users/campadrenalin","html_url":"https://github.com/campadrenalin","followers_url":"https://api.github.com/users/campadrenalin/followers","following_url":"https://api.github.com/users/campadrenalin/following{/other_user}","gists_url":"https://api.github.com/users/campadrenalin/gists{/gist_id}","starred_url":"https://api.github.com/users/campadrenalin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/campadrenalin/subscriptions","organizations_url":"https://api.github.com/users/campadrenalin/orgs","repos_url":"https://api.github.com/users/campadrenalin/repos","events_url":"https://api.github.com/users/campadrenalin/events{/privacy}","received_events_url":"https://api.github.com/users/campadrenalin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-03T15:01:36Z","updated_at":"2018-07-04T06:33:41Z","closed_at":"2018-07-04T06:33:41Z","author_association":"NONE","body":"This is kind of a subtle issue. The pymysql `tests` dir is installed as a top level package. So you could presumably reproduce this by:\r\n\r\n1. Install pymysql globally or in a virtualenv.\r\n2. Make sure the current directory doesn't have a `tests` dir.\r\n3. Open a python prompt.\r\n4. `import tests/test_auth` and see if it works.\r\n\r\nThis seems to come from a quirk of `PyMySQL-0.9.1.dist-info/top_level.txt`:\r\n```\r\npymysql\r\ntests\r\n```\r\n\r\nMost people won't notice. If you want to know the details of my workflow and why it affects me, I will include them below, but it doesn't really relate to fixing the packaging bug, and I know your time is valuable.\r\n\r\nI use a tool called Serverless to deploy Python-based applications on AWS Lambda. Part of the build process is installing all Python dependencies to `.serverless/requirements/...`, and then symlinking those into the root of my project repository temporarily. It's failing because my repo has a `tests` dir, so when Serverless tries to symlink the `tests` dependency, the two collide. I have several different workaround options, including pinning to a previous version of PyMySQL. But I think this issue is worth fixing upstream for everybody, and any workarounds on my end would ideally be temporary."}}
{"actor":{"display_login":"methane"}}