{"action":"created","comment":{"url":"https://api.github.com/repos/scrapy/scrapy/pulls/comments/27442275","id":27442275,"diff_hunk":"@@ -1,8 +1,12 @@\n import json\n import socket\n+import logging\n+\n+from testfixtures import LogCapture","path":"tests/test_crawl.py","position":5,"original_position":5,"commit_id":"66f735d06e14e8da2cd9795e5f3e27d0740d6c5f","original_commit_id":"66f735d06e14e8da2cd9795e5f3e27d0740d6c5f","user":{"login":"Curita","id":213781,"avatar_url":"https://avatars.githubusercontent.com/u/213781?v=3","gravatar_id":"","url":"https://api.github.com/users/Curita","html_url":"https://github.com/Curita","followers_url":"https://api.github.com/users/Curita/followers","following_url":"https://api.github.com/users/Curita/following{/other_user}","gists_url":"https://api.github.com/users/Curita/gists{/gist_id}","starred_url":"https://api.github.com/users/Curita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Curita/subscriptions","organizations_url":"https://api.github.com/users/Curita/orgs","repos_url":"https://api.github.com/users/Curita/repos","events_url":"https://api.github.com/users/Curita/events{/privacy}","received_events_url":"https://api.github.com/users/Curita/received_events","type":"User","site_admin":false},"body":"I like unittest2 too. Problem right now is that some TestCases can't be changed to inherit directly from unittest2.TestCase (or even unittest.TestCase) instead of twisted.trial.unittest.TestCase because the twisted one implements the logic to wait for deferreds, so some tests that use defer.inlineCallbacks are going to return immediately after switching those parent classes (and possibly be marked as successful tests without checking anything).\r\n\r\nI just realized that after verifying that the plugin pytest-twisted won't work on test methods from unittest.TestCase objects (that plugin implements the logic to wait for deferreds), since pytest handles separately its integration with unittest. I'd probably need to submit another PR checking that unittest.TestCase is used only when not dealing with deferreds, so I prefer that this PR uses testfixtures package for now.","created_at":"2015-03-30T23:36:18Z","updated_at":"2015-03-30T23:36:18Z","html_url":"https://github.com/scrapy/scrapy/pull/1060#discussion_r27442275","pull_request_url":"https://api.github.com/repos/scrapy/scrapy/pulls/1060","_links":{"self":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/comments/27442275"},"html":{"href":"https://github.com/scrapy/scrapy/pull/1060#discussion_r27442275"},"pull_request":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/1060"}}},"pull_request":{"url":"https://api.github.com/repos/scrapy/scrapy/pulls/1060","id":30256098,"html_url":"https://github.com/scrapy/scrapy/pull/1060","diff_url":"https://github.com/scrapy/scrapy/pull/1060.diff","patch_url":"https://github.com/scrapy/scrapy/pull/1060.patch","issue_url":"https://api.github.com/repos/scrapy/scrapy/issues/1060","number":1060,"state":"open","locked":false,"title":"Python logging","user":{"login":"Curita","id":213781,"avatar_url":"https://avatars.githubusercontent.com/u/213781?v=3","gravatar_id":"","url":"https://api.github.com/users/Curita","html_url":"https://github.com/Curita","followers_url":"https://api.github.com/users/Curita/followers","following_url":"https://api.github.com/users/Curita/following{/other_user}","gists_url":"https://api.github.com/users/Curita/gists{/gist_id}","starred_url":"https://api.github.com/users/Curita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Curita/subscriptions","organizations_url":"https://api.github.com/users/Curita/orgs","repos_url":"https://api.github.com/users/Curita/repos","events_url":"https://api.github.com/users/Curita/events{/privacy}","received_events_url":"https://api.github.com/users/Curita/received_events","type":"User","site_admin":false},"body":"This PR switches Twisted logging system to the Python standard one.\r\n\r\n~~It's pretty much done, though it's missing documentation~~ (UPDATE: All docs related to logging have been updated) since I want to hear feedback first. I implemented the bare minimum changes to support all previous use cases, but new functionality could definitely be added.\r\n\r\nThe pull request closes a few open issues and other PRs. This closes #921, closes #881, closes #877, closes #875, closes #483, closes #481, closes #433, and closes #265.","created_at":"2015-03-02T03:09:51Z","updated_at":"2015-03-30T23:36:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16267e1ecdf3f66ae03c6e4898a0e31164ee380f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scrapy/scrapy/pulls/1060/commits","review_comments_url":"https://api.github.com/repos/scrapy/scrapy/pulls/1060/comments","review_comment_url":"https://api.github.com/repos/scrapy/scrapy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scrapy/scrapy/issues/1060/comments","statuses_url":"https://api.github.com/repos/scrapy/scrapy/statuses/66f735d06e14e8da2cd9795e5f3e27d0740d6c5f","head":{"label":"Curita:python-logging","ref":"python-logging","sha":"66f735d06e14e8da2cd9795e5f3e27d0740d6c5f","user":{"login":"Curita","id":213781,"avatar_url":"https://avatars.githubusercontent.com/u/213781?v=3","gravatar_id":"","url":"https://api.github.com/users/Curita","html_url":"https://github.com/Curita","followers_url":"https://api.github.com/users/Curita/followers","following_url":"https://api.github.com/users/Curita/following{/other_user}","gists_url":"https://api.github.com/users/Curita/gists{/gist_id}","starred_url":"https://api.github.com/users/Curita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Curita/subscriptions","organizations_url":"https://api.github.com/users/Curita/orgs","repos_url":"https://api.github.com/users/Curita/repos","events_url":"https://api.github.com/users/Curita/events{/privacy}","received_events_url":"https://api.github.com/users/Curita/received_events","type":"User","site_admin":false},"repo":{"id":17608525,"name":"scrapy","full_name":"Curita/scrapy","owner":{"login":"Curita","id":213781,"avatar_url":"https://avatars.githubusercontent.com/u/213781?v=3","gravatar_id":"","url":"https://api.github.com/users/Curita","html_url":"https://github.com/Curita","followers_url":"https://api.github.com/users/Curita/followers","following_url":"https://api.github.com/users/Curita/following{/other_user}","gists_url":"https://api.github.com/users/Curita/gists{/gist_id}","starred_url":"https://api.github.com/users/Curita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Curita/subscriptions","organizations_url":"https://api.github.com/users/Curita/orgs","repos_url":"https://api.github.com/users/Curita/repos","events_url":"https://api.github.com/users/Curita/events{/privacy}","received_events_url":"https://api.github.com/users/Curita/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Curita/scrapy","description":"Scrapy, a fast high-level screen scraping and web crawling framework for Python.","fork":true,"url":"https://api.github.com/repos/Curita/scrapy","forks_url":"https://api.github.com/repos/Curita/scrapy/forks","keys_url":"https://api.github.com/repos/Curita/scrapy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Curita/scrapy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Curita/scrapy/teams","hooks_url":"https://api.github.com/repos/Curita/scrapy/hooks","issue_events_url":"https://api.github.com/repos/Curita/scrapy/issues/events{/number}","events_url":"https://api.github.com/repos/Curita/scrapy/events","assignees_url":"https://api.github.com/repos/Curita/scrapy/assignees{/user}","branches_url":"https://api.github.com/repos/Curita/scrapy/branches{/branch}","tags_url":"https://api.github.com/repos/Curita/scrapy/tags","blobs_url":"https://api.github.com/repos/Curita/scrapy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Curita/scrapy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Curita/scrapy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Curita/scrapy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Curita/scrapy/statuses/{sha}","languages_url":"https://api.github.com/repos/Curita/scrapy/languages","stargazers_url":"https://api.github.com/repos/Curita/scrapy/stargazers","contributors_url":"https://api.github.com/repos/Curita/scrapy/contributors","subscribers_url":"https://api.github.com/repos/Curita/scrapy/subscribers","subscription_url":"https://api.github.com/repos/Curita/scrapy/subscription","commits_url":"https://api.github.com/repos/Curita/scrapy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Curita/scrapy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Curita/scrapy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Curita/scrapy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Curita/scrapy/contents/{+path}","compare_url":"https://api.github.com/repos/Curita/scrapy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Curita/scrapy/merges","archive_url":"https://api.github.com/repos/Curita/scrapy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Curita/scrapy/downloads","issues_url":"https://api.github.com/repos/Curita/scrapy/issues{/number}","pulls_url":"https://api.github.com/repos/Curita/scrapy/pulls{/number}","milestones_url":"https://api.github.com/repos/Curita/scrapy/milestones{/number}","notifications_url":"https://api.github.com/repos/Curita/scrapy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Curita/scrapy/labels{/name}","releases_url":"https://api.github.com/repos/Curita/scrapy/releases{/id}","created_at":"2014-03-10T21:06:20Z","updated_at":"2015-03-10T19:07:47Z","pushed_at":"2015-03-27T17:50:39Z","git_url":"git://github.com/Curita/scrapy.git","ssh_url":"git@github.com:Curita/scrapy.git","clone_url":"https://github.com/Curita/scrapy.git","svn_url":"https://github.com/Curita/scrapy","homepage":"http://scrapy.org","size":13919,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scrapy:master","ref":"master","sha":"67a85c77f24b587b548b0968dd41426b718228cc","user":{"login":"scrapy","id":733635,"avatar_url":"https://avatars.githubusercontent.com/u/733635?v=3","gravatar_id":"","url":"https://api.github.com/users/scrapy","html_url":"https://github.com/scrapy","followers_url":"https://api.github.com/users/scrapy/followers","following_url":"https://api.github.com/users/scrapy/following{/other_user}","gists_url":"https://api.github.com/users/scrapy/gists{/gist_id}","starred_url":"https://api.github.com/users/scrapy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrapy/subscriptions","organizations_url":"https://api.github.com/users/scrapy/orgs","repos_url":"https://api.github.com/users/scrapy/repos","events_url":"https://api.github.com/users/scrapy/events{/privacy}","received_events_url":"https://api.github.com/users/scrapy/received_events","type":"Organization","site_admin":false},"repo":{"id":529502,"name":"scrapy","full_name":"scrapy/scrapy","owner":{"login":"scrapy","id":733635,"avatar_url":"https://avatars.githubusercontent.com/u/733635?v=3","gravatar_id":"","url":"https://api.github.com/users/scrapy","html_url":"https://github.com/scrapy","followers_url":"https://api.github.com/users/scrapy/followers","following_url":"https://api.github.com/users/scrapy/following{/other_user}","gists_url":"https://api.github.com/users/scrapy/gists{/gist_id}","starred_url":"https://api.github.com/users/scrapy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrapy/subscriptions","organizations_url":"https://api.github.com/users/scrapy/orgs","repos_url":"https://api.github.com/users/scrapy/repos","events_url":"https://api.github.com/users/scrapy/events{/privacy}","received_events_url":"https://api.github.com/users/scrapy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scrapy/scrapy","description":"Scrapy, a fast high-level web crawling and screen scraping framework for Python.","fork":false,"url":"https://api.github.com/repos/scrapy/scrapy","forks_url":"https://api.github.com/repos/scrapy/scrapy/forks","keys_url":"https://api.github.com/repos/scrapy/scrapy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scrapy/scrapy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scrapy/scrapy/teams","hooks_url":"https://api.github.com/repos/scrapy/scrapy/hooks","issue_events_url":"https://api.github.com/repos/scrapy/scrapy/issues/events{/number}","events_url":"https://api.github.com/repos/scrapy/scrapy/events","assignees_url":"https://api.github.com/repos/scrapy/scrapy/assignees{/user}","branches_url":"https://api.github.com/repos/scrapy/scrapy/branches{/branch}","tags_url":"https://api.github.com/repos/scrapy/scrapy/tags","blobs_url":"https://api.github.com/repos/scrapy/scrapy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scrapy/scrapy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scrapy/scrapy/git/refs{/sha}","trees_url":"https://api.github.com/repos/scrapy/scrapy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scrapy/scrapy/statuses/{sha}","languages_url":"https://api.github.com/repos/scrapy/scrapy/languages","stargazers_url":"https://api.github.com/repos/scrapy/scrapy/stargazers","contributors_url":"https://api.github.com/repos/scrapy/scrapy/contributors","subscribers_url":"https://api.github.com/repos/scrapy/scrapy/subscribers","subscription_url":"https://api.github.com/repos/scrapy/scrapy/subscription","commits_url":"https://api.github.com/repos/scrapy/scrapy/commits{/sha}","git_commits_url":"https://api.github.com/repos/scrapy/scrapy/git/commits{/sha}","comments_url":"https://api.github.com/repos/scrapy/scrapy/comments{/number}","issue_comment_url":"https://api.github.com/repos/scrapy/scrapy/issues/comments{/number}","contents_url":"https://api.github.com/repos/scrapy/scrapy/contents/{+path}","compare_url":"https://api.github.com/repos/scrapy/scrapy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scrapy/scrapy/merges","archive_url":"https://api.github.com/repos/scrapy/scrapy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scrapy/scrapy/downloads","issues_url":"https://api.github.com/repos/scrapy/scrapy/issues{/number}","pulls_url":"https://api.github.com/repos/scrapy/scrapy/pulls{/number}","milestones_url":"https://api.github.com/repos/scrapy/scrapy/milestones{/number}","notifications_url":"https://api.github.com/repos/scrapy/scrapy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scrapy/scrapy/labels{/name}","releases_url":"https://api.github.com/repos/scrapy/scrapy/releases{/id}","created_at":"2010-02-22T02:01:14Z","updated_at":"2015-03-30T21:39:07Z","pushed_at":"2015-03-30T16:18:00Z","git_url":"git://github.com/scrapy/scrapy.git","ssh_url":"git@github.com:scrapy/scrapy.git","clone_url":"https://github.com/scrapy/scrapy.git","svn_url":"https://github.com/scrapy/scrapy","homepage":"http://scrapy.org","size":23851,"stargazers_count":8052,"watchers_count":8052,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":2255,"mirror_url":null,"open_issues_count":235,"forks":2255,"open_issues":235,"watchers":8052,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/1060"},"html":{"href":"https://github.com/scrapy/scrapy/pull/1060"},"issue":{"href":"https://api.github.com/repos/scrapy/scrapy/issues/1060"},"comments":{"href":"https://api.github.com/repos/scrapy/scrapy/issues/1060/comments"},"review_comments":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/1060/comments"},"review_comment":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/1060/commits"},"statuses":{"href":"https://api.github.com/repos/scrapy/scrapy/statuses/66f735d06e14e8da2cd9795e5f3e27d0740d6c5f"}}}}