{"action":"created","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/2564","repository_url":"https://api.github.com/repos/micropython/micropython","labels_url":"https://api.github.com/repos/micropython/micropython/issues/2564/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/2564/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/2564/events","html_url":"https://github.com/micropython/micropython/pull/2564","id":185450769,"number":2564,"title":"Store interface configuration to flash only where documented and implement esp.save_config() to save configuration to flash on demand","user":{"login":"kfricke","id":7383069,"avatar_url":"https://avatars.githubusercontent.com/u/7383069?v=3","gravatar_id":"","url":"https://api.github.com/users/kfricke","html_url":"https://github.com/kfricke","followers_url":"https://api.github.com/users/kfricke/followers","following_url":"https://api.github.com/users/kfricke/following{/other_user}","gists_url":"https://api.github.com/users/kfricke/gists{/gist_id}","starred_url":"https://api.github.com/users/kfricke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kfricke/subscriptions","organizations_url":"https://api.github.com/users/kfricke/orgs","repos_url":"https://api.github.com/users/kfricke/repos","events_url":"https://api.github.com/users/kfricke/events{/privacy}","received_events_url":"https://api.github.com/users/kfricke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-26T16:54:10Z","updated_at":"2016-10-27T20:28:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/micropython/micropython/pulls/2564","html_url":"https://github.com/micropython/micropython/pull/2564","diff_url":"https://github.com/micropython/micropython/pull/2564.diff","patch_url":"https://github.com/micropython/micropython/pull/2564.patch"},"body":"Connecting to a network and altering interface modes do also not write the configuration to flash anymore.\r\nThis previous behavior was not documented in the MicroPython documentation and aligns the implementation to this.\r\n\r\nSetting network configuration parameters using the method `WLAN.config(kwarg=...)` does still write the settings to flash. This behavior is described in the documentation now, containing a warning about flash wearing.\r\n\r\nThese changes do not contain changes to the network API! The behavior of the implementation prior to this pull request is only known by experienced users of the C-API which had this behavior from the beginning and later got enhanced by API calls that did avoid this (several API methods got a `_current` variant, which does not write config to flash anymore)."},"comment":{"url":"https://api.github.com/repos/micropython/micropython/issues/comments/256759474","html_url":"https://github.com/micropython/micropython/pull/2564#issuecomment-256759474","issue_url":"https://api.github.com/repos/micropython/micropython/issues/2564","id":256759474,"user":{"login":"kfricke","id":7383069,"avatar_url":"https://avatars.githubusercontent.com/u/7383069?v=3","gravatar_id":"","url":"https://api.github.com/users/kfricke","html_url":"https://github.com/kfricke","followers_url":"https://api.github.com/users/kfricke/followers","following_url":"https://api.github.com/users/kfricke/following{/other_user}","gists_url":"https://api.github.com/users/kfricke/gists{/gist_id}","starred_url":"https://api.github.com/users/kfricke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kfricke/subscriptions","organizations_url":"https://api.github.com/users/kfricke/orgs","repos_url":"https://api.github.com/users/kfricke/repos","events_url":"https://api.github.com/users/kfricke/events{/privacy}","received_events_url":"https://api.github.com/users/kfricke/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T20:28:09Z","updated_at":"2016-10-27T20:28:09Z","body":">>This is the only way to do this after this patch.\r\n\r\n>And that's one, but not the only problem with it. ...\r\n\r\nThis got changed with the last three commits (). It is now possible to save the config consistently with `esp.save_config()`.\r\n\r\n> The biggest problem is that it change well known behavior of ESP8266 module. Not just behavior of MicroPython's ESP8266 port how it was from the beginning (familiar to a thousand of users), but the well-known ESP8266 behavior, familiar to hundreds of thousands of ESP8266 users. Everyone who uses ESP8266 knows that once they called connect() function, the module remembers connection and will automatically connect after reset, power down/power up, etc.\r\n\r\nPeople come to MicroPython not because they are familiar with the ESP8266. They are here because of Python. \r\nLet us look at the situation from another point of view: We have not documented the current behavior because it breaks the API if we tell the truth. If we'd align the documentation we would notice immediately that the vocabulary of the API methods is not sufficiently reflecting what the methods actually do.\r\n\r\n> ...that mode of operation is familiar to all users of desktop and mobile computer... phone.\r\n\r\nThere is not a human in the ESP8266 and this is a micro-controller. In our case we have users who want to write Python scripts which tell the micro step by step what to do.\r\n\r\nDo not compare an apple with a rice corn!\r\n_(rice was chosen because of it's size not it's origin from asia ;) )_\r\n\r\n>Ain't it a bit too ambitious to try to change that?\r\n\r\nNot if it the behavior does destroy flash in concrete and realistic use-cases. Also \"well-known\" and undocumented does not really stand the truth.\r\n\r\nAin't yours a bad attitude to support progress?"}}
{"actor":{"display_login":"kfricke"}}