{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/21271","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/21271/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/21271/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/21271/events","html_url":"https://github.com/odoo/odoo/pull/21271","id":277071801,"number":21271,"title":"Replace deprecated `getargspec` with `getfullargspec`","user":{"login":"sopelj","id":5285941,"avatar_url":"https://avatars1.githubusercontent.com/u/5285941?v=4","gravatar_id":"","url":"https://api.github.com/users/sopelj","html_url":"https://github.com/sopelj","followers_url":"https://api.github.com/users/sopelj/followers","following_url":"https://api.github.com/users/sopelj/following{/other_user}","gists_url":"https://api.github.com/users/sopelj/gists{/gist_id}","starred_url":"https://api.github.com/users/sopelj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sopelj/subscriptions","organizations_url":"https://api.github.com/users/sopelj/orgs","repos_url":"https://api.github.com/users/sopelj/repos","events_url":"https://api.github.com/users/sopelj/events{/privacy}","received_events_url":"https://api.github.com/users/sopelj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-27T16:03:52Z","updated_at":"2017-11-28T13:29:50Z","closed_at":"2017-11-28T13:29:50Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/21271","html_url":"https://github.com/odoo/odoo/pull/21271","diff_url":"https://github.com/odoo/odoo/pull/21271.diff","patch_url":"https://github.com/odoo/odoo/pull/21271.patch"},"body":"Description of the issue/feature this PR addresses:\r\nThe method `getargspec` was still used despite [being deprecated in Python 3](https://docs.python.org/3/library/inspect.html#inspect.getargspec). This causes Odoo to fails to install modules if type hints are used, despite them being supported by Python 3.5+ (which is the supported version for Odoo 11). The method `getfullargspec` does the same thing (and more) and is the recommended replacement. \r\n\r\nCurrent behavior before PR:\r\nUsage of type hints in methods parsed by Odoo in a module cause the module to not be able to be imported.\r\n![screenshot_20171127_102713](https://user-images.githubusercontent.com/5285941/33275974-29887b4a-d362-11e7-9604-ca88114412b4.png)\r\n\r\nDesired behavior after PR is merged:\r\nAllow usage of functions with type hints and not use the deprecated method  `getargspec`.\r\n\r\n\r\n\r\n\r\n--\r\nI confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr\r\n"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/347523533","html_url":"https://github.com/odoo/odoo/pull/21271#issuecomment-347523533","issue_url":"https://api.github.com/repos/odoo/odoo/issues/21271","id":347523533,"user":{"login":"xmo-odoo","id":7571158,"avatar_url":"https://avatars1.githubusercontent.com/u/7571158?v=4","gravatar_id":"","url":"https://api.github.com/users/xmo-odoo","html_url":"https://github.com/xmo-odoo","followers_url":"https://api.github.com/users/xmo-odoo/followers","following_url":"https://api.github.com/users/xmo-odoo/following{/other_user}","gists_url":"https://api.github.com/users/xmo-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/xmo-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmo-odoo/subscriptions","organizations_url":"https://api.github.com/users/xmo-odoo/orgs","repos_url":"https://api.github.com/users/xmo-odoo/repos","events_url":"https://api.github.com/users/xmo-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/xmo-odoo/received_events","type":"User","site_admin":false},"created_at":"2017-11-28T13:29:50Z","updated_at":"2017-11-28T13:29:50Z","author_association":"CONTRIBUTOR","body":"> The method getfullargspec does the same thing (and more) and is the recommended replacement.\r\n\r\nIt also does not exist in Python 2."}}
{"actor":{"display_login":"xmo-odoo"}}