{"action":"opened","number":5229,"pull_request":{"url":"https://api.github.com/repos/micropython/micropython/pulls/5229","id":329713793,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI5NzEzNzkz","html_url":"https://github.com/micropython/micropython/pull/5229","diff_url":"https://github.com/micropython/micropython/pull/5229.diff","patch_url":"https://github.com/micropython/micropython/pull/5229.patch","issue_url":"https://api.github.com/repos/micropython/micropython/issues/5229","number":5229,"state":"open","locked":false,"title":"py/objmodule.c: Implement default weak links for all ports.","user":{"login":"jimmo","id":5102768,"node_id":"MDQ6VXNlcjUxMDI3Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/5102768?v=4","gravatar_id":"","url":"https://api.github.com/users/jimmo","html_url":"https://github.com/jimmo","followers_url":"https://api.github.com/users/jimmo/followers","following_url":"https://api.github.com/users/jimmo/following{/other_user}","gists_url":"https://api.github.com/users/jimmo/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmo/subscriptions","organizations_url":"https://api.github.com/users/jimmo/orgs","repos_url":"https://api.github.com/users/jimmo/repos","events_url":"https://api.github.com/users/jimmo/events{/privacy}","received_events_url":"https://api.github.com/users/jimmo/received_events","type":"User","site_admin":false},"body":"I use the Unix port a lot for testing and keep tripping over this. I very strongly agree that the modules should be called `ufoo` but also really like the weak linking behaviour so that code \"just works\" while still providing a nice mechanism for customisation and extension. After seeing a couple of recent forum posts about this, I looked through the history on #1740 and I'd like to propose that we just do this.\r\n\r\nThis also avoids duplication in the ports and avoids a port \"accidentally\" missing a weak link (although I didn't notice any existing cases of this).\r\n\r\n---\r\n\r\nPreviously ports chose whether or not to alias `ufoo` -> `foo`, and each\r\nport implemented this explicitly. This changes objmodule to always provide a\r\n`foo` weak link for any core `ufoo` module.\r\n\r\nOther than now enabling weak links for the Unix port, this should be a\r\nno-op on any ports currently enabling weak links.\r\n\r\n`utime` and `uos` are provided by the ports, so they must still provide\r\ntheir own weak links for these modules.\r\n\r\nFixes #1740","created_at":"2019-10-18T12:28:59Z","updated_at":"2019-10-18T12:28:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/micropython/micropython/pulls/5229/commits","review_comments_url":"https://api.github.com/repos/micropython/micropython/pulls/5229/comments","review_comment_url":"https://api.github.com/repos/micropython/micropython/pulls/comments{/number}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/5229/comments","statuses_url":"https://api.github.com/repos/micropython/micropython/statuses/da9b8ed7c47e0646c365728a588bd34836f30990","head":{"label":"jimmo:unix-weak-links","ref":"unix-weak-links","sha":"da9b8ed7c47e0646c365728a588bd34836f30990","user":{"login":"jimmo","id":5102768,"node_id":"MDQ6VXNlcjUxMDI3Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/5102768?v=4","gravatar_id":"","url":"https://api.github.com/users/jimmo","html_url":"https://github.com/jimmo","followers_url":"https://api.github.com/users/jimmo/followers","following_url":"https://api.github.com/users/jimmo/following{/other_user}","gists_url":"https://api.github.com/users/jimmo/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmo/subscriptions","organizations_url":"https://api.github.com/users/jimmo/orgs","repos_url":"https://api.github.com/users/jimmo/repos","events_url":"https://api.github.com/users/jimmo/events{/privacy}","received_events_url":"https://api.github.com/users/jimmo/received_events","type":"User","site_admin":false},"repo":{"id":113645320,"node_id":"MDEwOlJlcG9zaXRvcnkxMTM2NDUzMjA=","name":"micropython","full_name":"jimmo/micropython","private":false,"owner":{"login":"jimmo","id":5102768,"node_id":"MDQ6VXNlcjUxMDI3Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/5102768?v=4","gravatar_id":"","url":"https://api.github.com/users/jimmo","html_url":"https://github.com/jimmo","followers_url":"https://api.github.com/users/jimmo/followers","following_url":"https://api.github.com/users/jimmo/following{/other_user}","gists_url":"https://api.github.com/users/jimmo/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmo/subscriptions","organizations_url":"https://api.github.com/users/jimmo/orgs","repos_url":"https://api.github.com/users/jimmo/repos","events_url":"https://api.github.com/users/jimmo/events{/privacy}","received_events_url":"https://api.github.com/users/jimmo/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jimmo/micropython","description":"MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems","fork":true,"url":"https://api.github.com/repos/jimmo/micropython","forks_url":"https://api.github.com/repos/jimmo/micropython/forks","keys_url":"https://api.github.com/repos/jimmo/micropython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimmo/micropython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimmo/micropython/teams","hooks_url":"https://api.github.com/repos/jimmo/micropython/hooks","issue_events_url":"https://api.github.com/repos/jimmo/micropython/issues/events{/number}","events_url":"https://api.github.com/repos/jimmo/micropython/events","assignees_url":"https://api.github.com/repos/jimmo/micropython/assignees{/user}","branches_url":"https://api.github.com/repos/jimmo/micropython/branches{/branch}","tags_url":"https://api.github.com/repos/jimmo/micropython/tags","blobs_url":"https://api.github.com/repos/jimmo/micropython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimmo/micropython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimmo/micropython/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimmo/micropython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimmo/micropython/statuses/{sha}","languages_url":"https://api.github.com/repos/jimmo/micropython/languages","stargazers_url":"https://api.github.com/repos/jimmo/micropython/stargazers","contributors_url":"https://api.github.com/repos/jimmo/micropython/contributors","subscribers_url":"https://api.github.com/repos/jimmo/micropython/subscribers","subscription_url":"https://api.github.com/repos/jimmo/micropython/subscription","commits_url":"https://api.github.com/repos/jimmo/micropython/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimmo/micropython/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimmo/micropython/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimmo/micropython/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimmo/micropython/contents/{+path}","compare_url":"https://api.github.com/repos/jimmo/micropython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimmo/micropython/merges","archive_url":"https://api.github.com/repos/jimmo/micropython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimmo/micropython/downloads","issues_url":"https://api.github.com/repos/jimmo/micropython/issues{/number}","pulls_url":"https://api.github.com/repos/jimmo/micropython/pulls{/number}","milestones_url":"https://api.github.com/repos/jimmo/micropython/milestones{/number}","notifications_url":"https://api.github.com/repos/jimmo/micropython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimmo/micropython/labels{/name}","releases_url":"https://api.github.com/repos/jimmo/micropython/releases{/id}","deployments_url":"https://api.github.com/repos/jimmo/micropython/deployments","created_at":"2017-12-09T05:42:54Z","updated_at":"2019-09-10T11:37:12Z","pushed_at":"2019-10-18T12:23:21Z","git_url":"git://github.com/jimmo/micropython.git","ssh_url":"git@github.com:jimmo/micropython.git","clone_url":"https://github.com/jimmo/micropython.git","svn_url":"https://github.com/jimmo/micropython","homepage":"https://micropython.org","size":42244,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":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":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"micropython:master","ref":"master","sha":"8f9e2e325ab0d0dfa9457779010a4cb2cfe60fef","user":{"login":"micropython","id":6298560,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyOTg1NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/6298560?v=4","gravatar_id":"","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"repo":{"id":15337142,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMzNzE0Mg==","name":"micropython","full_name":"micropython/micropython","private":false,"owner":{"login":"micropython","id":6298560,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyOTg1NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/6298560?v=4","gravatar_id":"","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/micropython/micropython","description":"MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems","fork":false,"url":"https://api.github.com/repos/micropython/micropython","forks_url":"https://api.github.com/repos/micropython/micropython/forks","keys_url":"https://api.github.com/repos/micropython/micropython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micropython/micropython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micropython/micropython/teams","hooks_url":"https://api.github.com/repos/micropython/micropython/hooks","issue_events_url":"https://api.github.com/repos/micropython/micropython/issues/events{/number}","events_url":"https://api.github.com/repos/micropython/micropython/events","assignees_url":"https://api.github.com/repos/micropython/micropython/assignees{/user}","branches_url":"https://api.github.com/repos/micropython/micropython/branches{/branch}","tags_url":"https://api.github.com/repos/micropython/micropython/tags","blobs_url":"https://api.github.com/repos/micropython/micropython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micropython/micropython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micropython/micropython/git/refs{/sha}","trees_url":"https://api.github.com/repos/micropython/micropython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micropython/micropython/statuses/{sha}","languages_url":"https://api.github.com/repos/micropython/micropython/languages","stargazers_url":"https://api.github.com/repos/micropython/micropython/stargazers","contributors_url":"https://api.github.com/repos/micropython/micropython/contributors","subscribers_url":"https://api.github.com/repos/micropython/micropython/subscribers","subscription_url":"https://api.github.com/repos/micropython/micropython/subscription","commits_url":"https://api.github.com/repos/micropython/micropython/commits{/sha}","git_commits_url":"https://api.github.com/repos/micropython/micropython/git/commits{/sha}","comments_url":"https://api.github.com/repos/micropython/micropython/comments{/number}","issue_comment_url":"https://api.github.com/repos/micropython/micropython/issues/comments{/number}","contents_url":"https://api.github.com/repos/micropython/micropython/contents/{+path}","compare_url":"https://api.github.com/repos/micropython/micropython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micropython/micropython/merges","archive_url":"https://api.github.com/repos/micropython/micropython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micropython/micropython/downloads","issues_url":"https://api.github.com/repos/micropython/micropython/issues{/number}","pulls_url":"https://api.github.com/repos/micropython/micropython/pulls{/number}","milestones_url":"https://api.github.com/repos/micropython/micropython/milestones{/number}","notifications_url":"https://api.github.com/repos/micropython/micropython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micropython/micropython/labels{/name}","releases_url":"https://api.github.com/repos/micropython/micropython/releases{/id}","deployments_url":"https://api.github.com/repos/micropython/micropython/deployments","created_at":"2013-12-20T11:47:07Z","updated_at":"2019-10-18T11:16:28Z","pushed_at":"2019-10-18T10:22:23Z","git_url":"git://github.com/micropython/micropython.git","ssh_url":"git@github.com:micropython/micropython.git","clone_url":"https://github.com/micropython/micropython.git","svn_url":"https://github.com/micropython/micropython","homepage":"https://micropython.org","size":42043,"stargazers_count":9352,"watchers_count":9352,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2851,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":772,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2851,"open_issues":772,"watchers":9352,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/micropython/micropython/pulls/5229"},"html":{"href":"https://github.com/micropython/micropython/pull/5229"},"issue":{"href":"https://api.github.com/repos/micropython/micropython/issues/5229"},"comments":{"href":"https://api.github.com/repos/micropython/micropython/issues/5229/comments"},"review_comments":{"href":"https://api.github.com/repos/micropython/micropython/pulls/5229/comments"},"review_comment":{"href":"https://api.github.com/repos/micropython/micropython/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/micropython/micropython/pulls/5229/commits"},"statuses":{"href":"https://api.github.com/repos/micropython/micropython/statuses/da9b8ed7c47e0646c365728a588bd34836f30990"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":67,"deletions":63,"changed_files":7}}
{"actor":{"display_login":"jimmo"}}