{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-signal/pytftb/pulls/comments/49704450","id":49704450,"diff_hunk":"@@ -13,9 +13,29 @@\n from scipy import angle\n from tftb.utils import is_linear\n \n+# yoder:\n+# let's add at least some backwards python2.x compatibility for now.\n+import sys\n+#py_ver = sys.version_info.major\n+# and assume only backwards revisions (for now):\n+ispy2 = (sys.version_info.major<3)\t\t# maybe we should work this into TestBase?\n \n class TestBase(unittest.TestCase):\n \n+    # yoder: add __init__()\n+    def __init__(self, *args, **kwargs):\n+    \t# handle various bits, including some python2-3 compatibility, then execute base __init__ as super()\n+    \tif not ispy2:\n+    \t\t# re-map some function calls:\n+    \t\tself.assertItemsEqual = self.assertCountEqual\t\t#(inherited from unittest.TestCase)\n+    \t\t# ... and others...\n+    \t\t#\n+    \t# and let's go backwards as well, just to be sure (now, we can correct all the downstream code and remove this hack at a later time...).\n+    \tif ispy2:\n+    \t\tself.assertCountEqual = self.assertItemsEqual","path":"tftb/tests/base.py","position":23,"original_position":23,"commit_id":"ffd47f739b07f0624f8ccc1ef55ca3ef3998129e","original_commit_id":"ffd47f739b07f0624f8ccc1ef55ca3ef3998129e","user":{"login":"jaidevd","id":1250388,"avatar_url":"https://avatars.githubusercontent.com/u/1250388?v=3","gravatar_id":"","url":"https://api.github.com/users/jaidevd","html_url":"https://github.com/jaidevd","followers_url":"https://api.github.com/users/jaidevd/followers","following_url":"https://api.github.com/users/jaidevd/following{/other_user}","gists_url":"https://api.github.com/users/jaidevd/gists{/gist_id}","starred_url":"https://api.github.com/users/jaidevd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaidevd/subscriptions","organizations_url":"https://api.github.com/users/jaidevd/orgs","repos_url":"https://api.github.com/users/jaidevd/repos","events_url":"https://api.github.com/users/jaidevd/events{/privacy}","received_events_url":"https://api.github.com/users/jaidevd/received_events","type":"User","site_admin":false},"body":"It's not necessary to rewrite the `__init__` method to add aliases to other methods. This should be in the `setUpClass` method of `TestBase`.","created_at":"2016-01-14T09:40:39Z","updated_at":"2016-01-14T09:40:39Z","html_url":"https://github.com/scikit-signal/pytftb/pull/82#discussion_r49704450","pull_request_url":"https://api.github.com/repos/scikit-signal/pytftb/pulls/82","_links":{"self":{"href":"https://api.github.com/repos/scikit-signal/pytftb/pulls/comments/49704450"},"html":{"href":"https://github.com/scikit-signal/pytftb/pull/82#discussion_r49704450"},"pull_request":{"href":"https://api.github.com/repos/scikit-signal/pytftb/pulls/82"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-signal/pytftb/pulls/82","id":55177508,"html_url":"https://github.com/scikit-signal/pytftb/pull/82","diff_url":"https://github.com/scikit-signal/pytftb/pull/82.diff","patch_url":"https://github.com/scikit-signal/pytftb/pull/82.patch","issue_url":"https://api.github.com/repos/scikit-signal/pytftb/issues/82","number":82,"state":"open","locked":false,"title":"Python3 compatibility","user":{"login":"markyoder","id":7614835,"avatar_url":"https://avatars.githubusercontent.com/u/7614835?v=3","gravatar_id":"","url":"https://api.github.com/users/markyoder","html_url":"https://github.com/markyoder","followers_url":"https://api.github.com/users/markyoder/followers","following_url":"https://api.github.com/users/markyoder/following{/other_user}","gists_url":"https://api.github.com/users/markyoder/gists{/gist_id}","starred_url":"https://api.github.com/users/markyoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markyoder/subscriptions","organizations_url":"https://api.github.com/users/markyoder/orgs","repos_url":"https://api.github.com/users/markyoder/repos","events_url":"https://api.github.com/users/markyoder/events{/privacy}","received_events_url":"https://api.github.com/users/markyoder/received_events","type":"User","site_admin":false},"body":"- used Python \"2to3\" to do most of the heavy lifting for Python2.x to 3.x. \r\n- several additional changes were necessary, including some changes to calls to the unit testing library\r\n- modified the testing base class to support Python 2.x and 3.x\r\n- all tests except test_gdpower() pass. the gdpower() test output is not totally ridiculous, so it is not clear if perhaps the sample to which the generated output is flawed.","created_at":"2016-01-06T05:06:56Z","updated_at":"2016-01-14T09:40:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa72235a3f1c8f03e821ee14a70bed83e3a3ce46","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-signal/pytftb/pulls/82/commits","review_comments_url":"https://api.github.com/repos/scikit-signal/pytftb/pulls/82/comments","review_comment_url":"https://api.github.com/repos/scikit-signal/pytftb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scikit-signal/pytftb/issues/82/comments","statuses_url":"https://api.github.com/repos/scikit-signal/pytftb/statuses/ffd47f739b07f0624f8ccc1ef55ca3ef3998129e","head":{"label":"markyoder:master","ref":"master","sha":"ffd47f739b07f0624f8ccc1ef55ca3ef3998129e","user":{"login":"markyoder","id":7614835,"avatar_url":"https://avatars.githubusercontent.com/u/7614835?v=3","gravatar_id":"","url":"https://api.github.com/users/markyoder","html_url":"https://github.com/markyoder","followers_url":"https://api.github.com/users/markyoder/followers","following_url":"https://api.github.com/users/markyoder/following{/other_user}","gists_url":"https://api.github.com/users/markyoder/gists{/gist_id}","starred_url":"https://api.github.com/users/markyoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markyoder/subscriptions","organizations_url":"https://api.github.com/users/markyoder/orgs","repos_url":"https://api.github.com/users/markyoder/repos","events_url":"https://api.github.com/users/markyoder/events{/privacy}","received_events_url":"https://api.github.com/users/markyoder/received_events","type":"User","site_admin":false},"repo":{"id":49027346,"name":"pytftb","full_name":"markyoder/pytftb","owner":{"login":"markyoder","id":7614835,"avatar_url":"https://avatars.githubusercontent.com/u/7614835?v=3","gravatar_id":"","url":"https://api.github.com/users/markyoder","html_url":"https://github.com/markyoder","followers_url":"https://api.github.com/users/markyoder/followers","following_url":"https://api.github.com/users/markyoder/following{/other_user}","gists_url":"https://api.github.com/users/markyoder/gists{/gist_id}","starred_url":"https://api.github.com/users/markyoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markyoder/subscriptions","organizations_url":"https://api.github.com/users/markyoder/orgs","repos_url":"https://api.github.com/users/markyoder/repos","events_url":"https://api.github.com/users/markyoder/events{/privacy}","received_events_url":"https://api.github.com/users/markyoder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/markyoder/pytftb","description":"A Python implementation of the MATLAB Time-Frequency Toolbox by Auger, Flandrin, Goncalves and Lemoine (http://tftb.nongnu.org)","fork":true,"url":"https://api.github.com/repos/markyoder/pytftb","forks_url":"https://api.github.com/repos/markyoder/pytftb/forks","keys_url":"https://api.github.com/repos/markyoder/pytftb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/markyoder/pytftb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/markyoder/pytftb/teams","hooks_url":"https://api.github.com/repos/markyoder/pytftb/hooks","issue_events_url":"https://api.github.com/repos/markyoder/pytftb/issues/events{/number}","events_url":"https://api.github.com/repos/markyoder/pytftb/events","assignees_url":"https://api.github.com/repos/markyoder/pytftb/assignees{/user}","branches_url":"https://api.github.com/repos/markyoder/pytftb/branches{/branch}","tags_url":"https://api.github.com/repos/markyoder/pytftb/tags","blobs_url":"https://api.github.com/repos/markyoder/pytftb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/markyoder/pytftb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/markyoder/pytftb/git/refs{/sha}","trees_url":"https://api.github.com/repos/markyoder/pytftb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/markyoder/pytftb/statuses/{sha}","languages_url":"https://api.github.com/repos/markyoder/pytftb/languages","stargazers_url":"https://api.github.com/repos/markyoder/pytftb/stargazers","contributors_url":"https://api.github.com/repos/markyoder/pytftb/contributors","subscribers_url":"https://api.github.com/repos/markyoder/pytftb/subscribers","subscription_url":"https://api.github.com/repos/markyoder/pytftb/subscription","commits_url":"https://api.github.com/repos/markyoder/pytftb/commits{/sha}","git_commits_url":"https://api.github.com/repos/markyoder/pytftb/git/commits{/sha}","comments_url":"https://api.github.com/repos/markyoder/pytftb/comments{/number}","issue_comment_url":"https://api.github.com/repos/markyoder/pytftb/issues/comments{/number}","contents_url":"https://api.github.com/repos/markyoder/pytftb/contents/{+path}","compare_url":"https://api.github.com/repos/markyoder/pytftb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/markyoder/pytftb/merges","archive_url":"https://api.github.com/repos/markyoder/pytftb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/markyoder/pytftb/downloads","issues_url":"https://api.github.com/repos/markyoder/pytftb/issues{/number}","pulls_url":"https://api.github.com/repos/markyoder/pytftb/pulls{/number}","milestones_url":"https://api.github.com/repos/markyoder/pytftb/milestones{/number}","notifications_url":"https://api.github.com/repos/markyoder/pytftb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/markyoder/pytftb/labels{/name}","releases_url":"https://api.github.com/repos/markyoder/pytftb/releases{/id}","created_at":"2016-01-04T22:33:53Z","updated_at":"2016-01-13T17:10:19Z","pushed_at":"2016-01-13T17:11:56Z","git_url":"git://github.com/markyoder/pytftb.git","ssh_url":"git@github.com:markyoder/pytftb.git","clone_url":"https://github.com/markyoder/pytftb.git","svn_url":"https://github.com/markyoder/pytftb","homepage":null,"size":806,"stargazers_count":0,"watchers_count":0,"language":"Matlab","has_issues":false,"has_downloads":true,"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":"scikit-signal:master","ref":"master","sha":"0876adb1aa3d38bf1411b9b3920c02ecacb08ca1","user":{"login":"scikit-signal","id":1300576,"avatar_url":"https://avatars.githubusercontent.com/u/1300576?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-signal","html_url":"https://github.com/scikit-signal","followers_url":"https://api.github.com/users/scikit-signal/followers","following_url":"https://api.github.com/users/scikit-signal/following{/other_user}","gists_url":"https://api.github.com/users/scikit-signal/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-signal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-signal/subscriptions","organizations_url":"https://api.github.com/users/scikit-signal/orgs","repos_url":"https://api.github.com/users/scikit-signal/repos","events_url":"https://api.github.com/users/scikit-signal/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-signal/received_events","type":"Organization","site_admin":false},"repo":{"id":25037129,"name":"pytftb","full_name":"scikit-signal/pytftb","owner":{"login":"scikit-signal","id":1300576,"avatar_url":"https://avatars.githubusercontent.com/u/1300576?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-signal","html_url":"https://github.com/scikit-signal","followers_url":"https://api.github.com/users/scikit-signal/followers","following_url":"https://api.github.com/users/scikit-signal/following{/other_user}","gists_url":"https://api.github.com/users/scikit-signal/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-signal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-signal/subscriptions","organizations_url":"https://api.github.com/users/scikit-signal/orgs","repos_url":"https://api.github.com/users/scikit-signal/repos","events_url":"https://api.github.com/users/scikit-signal/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-signal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scikit-signal/pytftb","description":"A Python implementation of the MATLAB Time-Frequency Toolbox by Auger, Flandrin, Goncalves and Lemoine (http://tftb.nongnu.org)","fork":false,"url":"https://api.github.com/repos/scikit-signal/pytftb","forks_url":"https://api.github.com/repos/scikit-signal/pytftb/forks","keys_url":"https://api.github.com/repos/scikit-signal/pytftb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-signal/pytftb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-signal/pytftb/teams","hooks_url":"https://api.github.com/repos/scikit-signal/pytftb/hooks","issue_events_url":"https://api.github.com/repos/scikit-signal/pytftb/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-signal/pytftb/events","assignees_url":"https://api.github.com/repos/scikit-signal/pytftb/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-signal/pytftb/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-signal/pytftb/tags","blobs_url":"https://api.github.com/repos/scikit-signal/pytftb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-signal/pytftb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-signal/pytftb/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-signal/pytftb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-signal/pytftb/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-signal/pytftb/languages","stargazers_url":"https://api.github.com/repos/scikit-signal/pytftb/stargazers","contributors_url":"https://api.github.com/repos/scikit-signal/pytftb/contributors","subscribers_url":"https://api.github.com/repos/scikit-signal/pytftb/subscribers","subscription_url":"https://api.github.com/repos/scikit-signal/pytftb/subscription","commits_url":"https://api.github.com/repos/scikit-signal/pytftb/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-signal/pytftb/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-signal/pytftb/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-signal/pytftb/issues/comments{/number}","contents_url":"https://api.github.com/repos/scikit-signal/pytftb/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-signal/pytftb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-signal/pytftb/merges","archive_url":"https://api.github.com/repos/scikit-signal/pytftb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-signal/pytftb/downloads","issues_url":"https://api.github.com/repos/scikit-signal/pytftb/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-signal/pytftb/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-signal/pytftb/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-signal/pytftb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-signal/pytftb/labels{/name}","releases_url":"https://api.github.com/repos/scikit-signal/pytftb/releases{/id}","created_at":"2014-10-10T13:40:21Z","updated_at":"2016-01-13T15:50:23Z","pushed_at":"2016-01-13T17:10:18Z","git_url":"git://github.com/scikit-signal/pytftb.git","ssh_url":"git@github.com:scikit-signal/pytftb.git","clone_url":"https://github.com/scikit-signal/pytftb.git","svn_url":"https://github.com/scikit-signal/pytftb","homepage":null,"size":818,"stargazers_count":6,"watchers_count":6,"language":"Matlab","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":6,"forks":10,"open_issues":6,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-signal/pytftb/pulls/82"},"html":{"href":"https://github.com/scikit-signal/pytftb/pull/82"},"issue":{"href":"https://api.github.com/repos/scikit-signal/pytftb/issues/82"},"comments":{"href":"https://api.github.com/repos/scikit-signal/pytftb/issues/82/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-signal/pytftb/pulls/82/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-signal/pytftb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scikit-signal/pytftb/pulls/82/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-signal/pytftb/statuses/ffd47f739b07f0624f8ccc1ef55ca3ef3998129e"}}}}