{"action":"created","comment":{"url":"https://api.github.com/repos/pytest-dev/pytest/pulls/comments/217921700","pull_request_review_id":155752261,"id":217921700,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzkyMTcwMA==","diff_hunk":"@@ -33,46 +128,13 @@ def mktemp(self, basename, numbered=True):\n         If ``numbered``, ensure the directory is unique by adding a number\n         prefix greater than any existing one.\n         \"\"\"\n-        basetemp = self.getbasetemp()\n-        if not numbered:\n-            p = basetemp.mkdir(basename)\n-        else:\n-            p = py.path.local.make_numbered_dir(\n-                prefix=basename, keep=0, rootdir=basetemp, lock_timeout=None\n-            )\n-        self.trace(\"mktemp\", p)\n-        return p\n+        return py.path.local(self.tmppath_factory.mktemp(basename, numbered).resolve())\n \n     def getbasetemp(self):\n-        \"\"\" return base temporary directory. \"\"\"\n-        try:\n-            return self._basetemp\n-        except AttributeError:\n-            basetemp = self.config.option.basetemp\n-            if basetemp:\n-                basetemp = py.path.local(basetemp)\n-                if basetemp.check():\n-                    basetemp.remove()\n-                basetemp.mkdir()\n-            else:\n-                temproot = py.path.local.get_temproot()\n-                user = get_user()\n-                if user:\n-                    # use a sub-directory in the temproot to speed-up\n-                    # make_numbered_dir() call\n-                    rootdir = temproot.join(\"pytest-of-%s\" % user)\n-                else:\n-                    rootdir = temproot\n-                rootdir.ensure(dir=1)\n-                basetemp = py.path.local.make_numbered_dir(\n-                    prefix=\"pytest-\", rootdir=rootdir\n-                )\n-            self._basetemp = t = basetemp.realpath()\n-            self.trace(\"new basetemp\", t)\n-            return t\n+        return py.path.local(self.tmppath_factory.getbasetemp().resolve())","path":"src/_pytest/tmpdir.py","position":162,"original_position":162,"commit_id":"0e10d9e423a190b33cbaaf6ee54afc5a0df08fb2","original_commit_id":"0e10d9e423a190b33cbaaf6ee54afc5a0df08fb2","user":{"login":"asottile","id":1810591,"node_id":"MDQ6VXNlcjE4MTA1OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1810591?v=4","gravatar_id":"","url":"https://api.github.com/users/asottile","html_url":"https://github.com/asottile","followers_url":"https://api.github.com/users/asottile/followers","following_url":"https://api.github.com/users/asottile/following{/other_user}","gists_url":"https://api.github.com/users/asottile/gists{/gist_id}","starred_url":"https://api.github.com/users/asottile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asottile/subscriptions","organizations_url":"https://api.github.com/users/asottile/orgs","repos_url":"https://api.github.com/users/asottile/repos","events_url":"https://api.github.com/users/asottile/events{/privacy}","received_events_url":"https://api.github.com/users/asottile/received_events","type":"User","site_admin":false},"body":"makes sense, another approach might be to write an adapter class which has the interface of `py.path._Path` but keeps a `pathlib` object internally -- I suspect we'll want something like this anyway to make a path forward for methods like `as_cwd()` which have no equivalent in `pathlib`","created_at":"2018-09-16T17:27:37Z","updated_at":"2018-09-16T17:27:37Z","html_url":"https://github.com/pytest-dev/pytest/pull/3988#discussion_r217921700","pull_request_url":"https://api.github.com/repos/pytest-dev/pytest/pulls/3988","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/pytest-dev/pytest/pulls/comments/217921700"},"html":{"href":"https://github.com/pytest-dev/pytest/pull/3988#discussion_r217921700"},"pull_request":{"href":"https://api.github.com/repos/pytest-dev/pytest/pulls/3988"}},"in_reply_to_id":217920806},"pull_request":{"url":"https://api.github.com/repos/pytest-dev/pytest/pulls/3988","id":215788828,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1Nzg4ODI4","html_url":"https://github.com/pytest-dev/pytest/pull/3988","diff_url":"https://github.com/pytest-dev/pytest/pull/3988.diff","patch_url":"https://github.com/pytest-dev/pytest/pull/3988.patch","issue_url":"https://api.github.com/repos/pytest-dev/pytest/issues/3988","number":3988,"state":"open","locked":false,"title":"[WIP] Tmpdir port pathlib","user":{"login":"RonnyPfannschmidt","id":156838,"node_id":"MDQ6VXNlcjE1NjgzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/156838?v=4","gravatar_id":"","url":"https://api.github.com/users/RonnyPfannschmidt","html_url":"https://github.com/RonnyPfannschmidt","followers_url":"https://api.github.com/users/RonnyPfannschmidt/followers","following_url":"https://api.github.com/users/RonnyPfannschmidt/following{/other_user}","gists_url":"https://api.github.com/users/RonnyPfannschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/RonnyPfannschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RonnyPfannschmidt/subscriptions","organizations_url":"https://api.github.com/users/RonnyPfannschmidt/orgs","repos_url":"https://api.github.com/users/RonnyPfannschmidt/repos","events_url":"https://api.github.com/users/RonnyPfannschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/RonnyPfannschmidt/received_events","type":"User","site_admin":false},"body":"this pr is to port tmpdir over to pathlib\r\n\r\nthe following steps have to be implemented\r\n\r\n- [x] port the internals to pathlib and leave only a py.path shim\r\n- [x] implement a basic make numbered dir\r\n- [ ] add a tmp_path fixture\r\n- [ ] reimplement the clean-up/folder retention","created_at":"2018-09-15T20:49:35Z","updated_at":"2018-09-16T17:27:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a83af4a7779ca4e8ad1289e804ef0a7c0db1ed55","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pytest-dev/pytest/pulls/3988/commits","review_comments_url":"https://api.github.com/repos/pytest-dev/pytest/pulls/3988/comments","review_comment_url":"https://api.github.com/repos/pytest-dev/pytest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/3988/comments","statuses_url":"https://api.github.com/repos/pytest-dev/pytest/statuses/0e10d9e423a190b33cbaaf6ee54afc5a0df08fb2","head":{"label":"RonnyPfannschmidt:tmpdir-port-pathlib","ref":"tmpdir-port-pathlib","sha":"0e10d9e423a190b33cbaaf6ee54afc5a0df08fb2","user":{"login":"RonnyPfannschmidt","id":156838,"node_id":"MDQ6VXNlcjE1NjgzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/156838?v=4","gravatar_id":"","url":"https://api.github.com/users/RonnyPfannschmidt","html_url":"https://github.com/RonnyPfannschmidt","followers_url":"https://api.github.com/users/RonnyPfannschmidt/followers","following_url":"https://api.github.com/users/RonnyPfannschmidt/following{/other_user}","gists_url":"https://api.github.com/users/RonnyPfannschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/RonnyPfannschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RonnyPfannschmidt/subscriptions","organizations_url":"https://api.github.com/users/RonnyPfannschmidt/orgs","repos_url":"https://api.github.com/users/RonnyPfannschmidt/repos","events_url":"https://api.github.com/users/RonnyPfannschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/RonnyPfannschmidt/received_events","type":"User","site_admin":false},"repo":{"id":38833653,"node_id":"MDEwOlJlcG9zaXRvcnkzODgzMzY1Mw==","name":"pytest","full_name":"RonnyPfannschmidt/pytest","private":false,"owner":{"login":"RonnyPfannschmidt","id":156838,"node_id":"MDQ6VXNlcjE1NjgzOA==","avatar_url":"https://avatars1.githubusercontent.com/u/156838?v=4","gravatar_id":"","url":"https://api.github.com/users/RonnyPfannschmidt","html_url":"https://github.com/RonnyPfannschmidt","followers_url":"https://api.github.com/users/RonnyPfannschmidt/followers","following_url":"https://api.github.com/users/RonnyPfannschmidt/following{/other_user}","gists_url":"https://api.github.com/users/RonnyPfannschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/RonnyPfannschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RonnyPfannschmidt/subscriptions","organizations_url":"https://api.github.com/users/RonnyPfannschmidt/orgs","repos_url":"https://api.github.com/users/RonnyPfannschmidt/repos","events_url":"https://api.github.com/users/RonnyPfannschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/RonnyPfannschmidt/received_events","type":"User","site_admin":false},"html_url":"https://github.com/RonnyPfannschmidt/pytest","description":"The pytest testing tool makes it easy to write small tests, yet scales to support complex functional testing","fork":true,"url":"https://api.github.com/repos/RonnyPfannschmidt/pytest","forks_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/forks","keys_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/teams","hooks_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/hooks","issue_events_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/issues/events{/number}","events_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/events","assignees_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/assignees{/user}","branches_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/branches{/branch}","tags_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/tags","blobs_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/git/refs{/sha}","trees_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/statuses/{sha}","languages_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/languages","stargazers_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/stargazers","contributors_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/contributors","subscribers_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/subscribers","subscription_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/subscription","commits_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/commits{/sha}","git_commits_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/git/commits{/sha}","comments_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/comments{/number}","issue_comment_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/issues/comments{/number}","contents_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/contents/{+path}","compare_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/merges","archive_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/downloads","issues_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/issues{/number}","pulls_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/pulls{/number}","milestones_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/milestones{/number}","notifications_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/labels{/name}","releases_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/releases{/id}","deployments_url":"https://api.github.com/repos/RonnyPfannschmidt/pytest/deployments","created_at":"2015-07-09T16:58:09Z","updated_at":"2018-09-13T12:51:06Z","pushed_at":"2018-09-16T12:35:05Z","git_url":"git://github.com/RonnyPfannschmidt/pytest.git","ssh_url":"git@github.com:RonnyPfannschmidt/pytest.git","clone_url":"https://github.com/RonnyPfannschmidt/pytest.git","svn_url":"https://github.com/RonnyPfannschmidt/pytest","homepage":"http://pytest.org/","size":13757,"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":"pytest-dev:features","ref":"features","sha":"bceaede1984c224066a9900439f78217df110ccf","user":{"login":"pytest-dev","id":8897583,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4OTc1ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/8897583?v=4","gravatar_id":"","url":"https://api.github.com/users/pytest-dev","html_url":"https://github.com/pytest-dev","followers_url":"https://api.github.com/users/pytest-dev/followers","following_url":"https://api.github.com/users/pytest-dev/following{/other_user}","gists_url":"https://api.github.com/users/pytest-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/pytest-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytest-dev/subscriptions","organizations_url":"https://api.github.com/users/pytest-dev/orgs","repos_url":"https://api.github.com/users/pytest-dev/repos","events_url":"https://api.github.com/users/pytest-dev/events{/privacy}","received_events_url":"https://api.github.com/users/pytest-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":37489525,"node_id":"MDEwOlJlcG9zaXRvcnkzNzQ4OTUyNQ==","name":"pytest","full_name":"pytest-dev/pytest","private":false,"owner":{"login":"pytest-dev","id":8897583,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4OTc1ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/8897583?v=4","gravatar_id":"","url":"https://api.github.com/users/pytest-dev","html_url":"https://github.com/pytest-dev","followers_url":"https://api.github.com/users/pytest-dev/followers","following_url":"https://api.github.com/users/pytest-dev/following{/other_user}","gists_url":"https://api.github.com/users/pytest-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/pytest-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytest-dev/subscriptions","organizations_url":"https://api.github.com/users/pytest-dev/orgs","repos_url":"https://api.github.com/users/pytest-dev/repos","events_url":"https://api.github.com/users/pytest-dev/events{/privacy}","received_events_url":"https://api.github.com/users/pytest-dev/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pytest-dev/pytest","description":"The pytest framework makes it easy to write small tests, yet scales to support complex functional testing","fork":false,"url":"https://api.github.com/repos/pytest-dev/pytest","forks_url":"https://api.github.com/repos/pytest-dev/pytest/forks","keys_url":"https://api.github.com/repos/pytest-dev/pytest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pytest-dev/pytest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pytest-dev/pytest/teams","hooks_url":"https://api.github.com/repos/pytest-dev/pytest/hooks","issue_events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/events{/number}","events_url":"https://api.github.com/repos/pytest-dev/pytest/events","assignees_url":"https://api.github.com/repos/pytest-dev/pytest/assignees{/user}","branches_url":"https://api.github.com/repos/pytest-dev/pytest/branches{/branch}","tags_url":"https://api.github.com/repos/pytest-dev/pytest/tags","blobs_url":"https://api.github.com/repos/pytest-dev/pytest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pytest-dev/pytest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pytest-dev/pytest/git/refs{/sha}","trees_url":"https://api.github.com/repos/pytest-dev/pytest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pytest-dev/pytest/statuses/{sha}","languages_url":"https://api.github.com/repos/pytest-dev/pytest/languages","stargazers_url":"https://api.github.com/repos/pytest-dev/pytest/stargazers","contributors_url":"https://api.github.com/repos/pytest-dev/pytest/contributors","subscribers_url":"https://api.github.com/repos/pytest-dev/pytest/subscribers","subscription_url":"https://api.github.com/repos/pytest-dev/pytest/subscription","commits_url":"https://api.github.com/repos/pytest-dev/pytest/commits{/sha}","git_commits_url":"https://api.github.com/repos/pytest-dev/pytest/git/commits{/sha}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/comments{/number}","issue_comment_url":"https://api.github.com/repos/pytest-dev/pytest/issues/comments{/number}","contents_url":"https://api.github.com/repos/pytest-dev/pytest/contents/{+path}","compare_url":"https://api.github.com/repos/pytest-dev/pytest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pytest-dev/pytest/merges","archive_url":"https://api.github.com/repos/pytest-dev/pytest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pytest-dev/pytest/downloads","issues_url":"https://api.github.com/repos/pytest-dev/pytest/issues{/number}","pulls_url":"https://api.github.com/repos/pytest-dev/pytest/pulls{/number}","milestones_url":"https://api.github.com/repos/pytest-dev/pytest/milestones{/number}","notifications_url":"https://api.github.com/repos/pytest-dev/pytest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pytest-dev/pytest/labels{/name}","releases_url":"https://api.github.com/repos/pytest-dev/pytest/releases{/id}","deployments_url":"https://api.github.com/repos/pytest-dev/pytest/deployments","created_at":"2015-06-15T20:28:27Z","updated_at":"2018-09-16T15:09:08Z","pushed_at":"2018-09-16T15:09:34Z","git_url":"git://github.com/pytest-dev/pytest.git","ssh_url":"git@github.com:pytest-dev/pytest.git","clone_url":"https://github.com/pytest-dev/pytest.git","svn_url":"https://github.com/pytest-dev/pytest","homepage":"https://pytest.org","size":13818,"stargazers_count":3039,"watchers_count":3039,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":777,"mirror_url":null,"archived":false,"open_issues_count":536,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":777,"open_issues":536,"watchers":3039,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytest-dev/pytest/pulls/3988"},"html":{"href":"https://github.com/pytest-dev/pytest/pull/3988"},"issue":{"href":"https://api.github.com/repos/pytest-dev/pytest/issues/3988"},"comments":{"href":"https://api.github.com/repos/pytest-dev/pytest/issues/3988/comments"},"review_comments":{"href":"https://api.github.com/repos/pytest-dev/pytest/pulls/3988/comments"},"review_comment":{"href":"https://api.github.com/repos/pytest-dev/pytest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytest-dev/pytest/pulls/3988/commits"},"statuses":{"href":"https://api.github.com/repos/pytest-dev/pytest/statuses/0e10d9e423a190b33cbaaf6ee54afc5a0df08fb2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"asottile"}}