{"id":329458,"date":"2023-05-29T15:34:00","date_gmt":"2023-05-29T15:34:00","guid":{"rendered":"http:\/\/itteacheritfreelance.hk\/wordpress\/?guid=115d8b2c4e8ea3d6f04ef9e7fb86a9b1"},"modified":"2023-05-29T15:34:00","modified_gmt":"2023-05-29T15:34:00","slug":"the-python-language-summit-2023-python-on-mobile","status":"publish","type":"post","link":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/2023\/05\/29\/the-python-language-summit-2023-python-on-mobile\/","title":{"rendered":"The Python Language Summit 2023: Python on Mobile"},"content":{"rendered":"<p class=\"syndicated-attribution\"><meta name= \\\"keywords \\\" content= \\\"\u96fb\u5b50\u8a08\u7b97\u6a5f, \u6559\u80b2, IT \u96fb\u8166\u73ed,\u96fb\u8166\u88dc\u7fd2\uff0c \u96fb\u8166\u73ed\uff0c \u5bb6\u6559\uff0c \u79c1\u4eba\u8001\u5e2b\uff0c \u8cc7\u8a0a\u6280\u8853\uff0c \u7a0b\u5e8f\u8a2d\u8a08\uff0c \u96fb\u5b50\u8a08\u7b97\u6a5f\uff0c \u904a\u6232\uff0c \u860b\u679c\uff0c \u96fb\u5f71\uff0c \u8a08\u7b97\u6a5f\uff0c\u7de8\u78bc\uff0c Java\uff0c C\/C++\uff0c JavaScript\uff0c PHP\uff0c HTML\uff0c CSS\uff0c MySQL\uff0c mobile\uff0c Android\uff0c \u52d5\u6f2b\uff0c Python\uff0c teacher\uff0c \u88dc\u7fd2\uff0c \u96fb\u8166\u88dc\u7fd2 \u8cc7\u8a0a, \u7535\u5b50\u8ba1\u7b97\u673a, IT ,Game, apple, movie, Computer,student,Java,\u6559\u80b2, ,\u5b66\u751f, \u5b66\u4e60, learn, \u6559\u5b66,  Android, apple,anime, animation, \u4fe1\u606f\u6280\u672f, \u7a0b\u5e8f\u8bbe\u8ba1, \u79fb\u52a8\u7535\u8bdd, \u8cc7\u8a0a\u79d1\u6280,Game, Jeu, Juego,Call Of Duty ,\u4f7f\u547d\u53ec\u559a , \u6e38\u620f, \u7535\u5b50\u6e38\u620f,, \u591a\u4eba\u7535\u5b50\u6e38\u620f, \u7f51\u7edc\u6e38\u620f\uff0conline\uff0conline game, \u624b\u673a\u6e38\u620f, mobile \\\"><\/p>\n<div class=\"markdown-body container-fluid comment-inner comment-enabled\" data-hard-breaks=\"true\" id=\"doc\">\n<p><span>At the <a href=\"https:\/\/pyfound.blogspot.com\/2023\/05\/the-python-language-summit-2023_29.html\" rel=\"nofollow\" >Python Language Summit 2023<\/a>, Russell Keith-Magee presented on the ongoing efforts of <\/span><a href=\"https:\/\/beeware.org\/\" rel=\"noopener\" ><span>BeeWare<\/span><\/a><span>, a project that aims to make it easier to run Python on mobile platforms such as Android and iOS.<\/span><\/p>\n<p><span><br \/><\/span><\/p>\n<p><span><\/span><\/p>\n<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/a\/AVvXsEhKd0EQEStk2AWmSAjsGgsESDcswdm1vnDv77ZrTgwbJdOD6Om0nyFfH6gxIT1fvBo6Tt9bykJuS1pIkPD1qNFnLiINcLdtiebwaDA4CvfOCyNkoq5nRNKZ9K0_7FPWhsYhLJXGxbv7BCL2XEMHZNQxfl61szs8q0yAX56kyk_PKSXXG4A\" style=\"margin-left: auto; margin-right: auto;\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" data-original-height=\"270\" data-original-width=\"270\" height=\"240\" src=\"https:\/\/blogger.googleusercontent.com\/img\/a\/AVvXsEhKd0EQEStk2AWmSAjsGgsESDcswdm1vnDv77ZrTgwbJdOD6Om0nyFfH6gxIT1fvBo6Tt9bykJuS1pIkPD1qNFnLiINcLdtiebwaDA4CvfOCyNkoq5nRNKZ9K0_7FPWhsYhLJXGxbv7BCL2XEMHZNQxfl61szs8q0yAX56kyk_PKSXXG4A\" width=\"240\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td class=\"tr-caption\" style=\"text-align: center;\">The BeeWare logo<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span><br \/><\/span><\/p>\n<h2 class=\"raw\"><span>Russell Keith-Magee is one busy bee<\/span><\/h2>\n<p><span>Improving Python\u2019s story for running on mobile has been a labour of love for Keith-Magee for eight years at this point. Keith-Magee <\/span><a href=\"https:\/\/pyfound.blogspot.com\/2020\/05\/cpython-on-mobile-platforms.html\" rel=\"noopener\" ><span>last presented at the Python Language Summit in 2020<\/span><\/a><span> (a year when the summit was conducted entirely virtually due to the Covid-19 pandemic). Since then, however, great progress has been made.<\/span><\/p>\n<p><span>The biggest change since his last update, Keith-Magee reported, wasn\u2019t technical \u2013 it was financial. For the last year, BeeWare has no longer been a hobby project for Keith-Magee. He is now paid by <\/span><a href=\"https:\/\/www.anaconda.com\/\" rel=\"noopener\" ><span>Anaconda<\/span><\/a><span> to <\/span><a href=\"https:\/\/beeware.org\/news\/buzz\/exciting-news-for-the-future-of-beeware\/\" rel=\"noopener\" ><span>work on the project full time<\/span><\/a><span>, along with a colleague, Malcolm Smith. \u201cI now have the resources to do the work\u201d required to make this happen, he announced.<\/span><\/p>\n<p><span>Keith-Magee came to the Language Summit this year with a proposal: to add Android and iOS as platforms with \u201ctier-3\u201d support from CPython in Python 3.13.<\/span><\/p>\n<p><span>What does \u201ctier-3 support\u201d mean? Tier-3 support, as defined by <\/span><a href=\"https:\/\/peps.python.org\/pep-0011\/#tier-3\" rel=\"noopener\" ><span>PEP 11<\/span><\/a><span>, describes a level of support that the CPython core developers commit to giving a specific platform. The CPython test suite is run constantly on popular platforms such as Ubuntu, Windows and MacOS, and test failures on these platforms can block releases until they are fixed. More esoteric platforms, meanwhile, are tested in CI less frequently. Test failures on those platforms will not necessarily block a release of CPython.<\/span><\/p>\n<p><span>Tier-3 support is the current level of support Python provides to the <a href=\"https:\/\/emscripten.org\/\" rel=\"nofollow\" >emscripten<\/a>, <a href=\"https:\/\/wasi.dev\/\" rel=\"nofollow\" >WASI<\/a> and <a href=\"https:\/\/www.freebsd.org\/\" rel=\"nofollow\" >FreeBSD<\/a> platforms, among others. If a platform has tier-3 support, the test suite will be run on the platform on a regular basis, but not on every pull request. Tier-3 support indicates that at least one core developer has committed to supporting CPython on that platform as best they can. However, test failures on that platform will not block a release of CPython.<\/span><\/p>\n<h2 class=\"raw\"><span>The path to tier-3 support<\/span><\/h2>\n<p><span>Historically, a significant barrier standing in the way of mobile-platform support from CPython has been the difficulties associated with running tests on mobile platforms in <\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/Continuous_integration\" rel=\"noopener\" ><span>CI<\/span><\/a><span>. Keith-Magee announced, however, that it was now possible to run the CPython test suite on mobile platforms via <\/span><a href=\"https:\/\/beeware.org\/project\/projects\/tools\/briefcase\/\" rel=\"noopener\" ><span>Briefcase<\/span><\/a><span>, BeeWare\u2019s packaging and development tool. (Getting the test suite to <\/span><em><span>pass<\/span><\/em><span> is another issue \u2013 But Keith-Magee felt confident that it would be easy to make progress on that front.) As such, Keith-Magee reported, it should be feasible for CPython to integrate running tests on these platforms into the project\u2019s testing infrastructure on GitHub.<\/span><\/p>\n<p><span>One remaining issue is a fairly specific question, but an important one nonetheless: on a mobile platform, what should <\/span><a href=\"https:\/\/docs.python.org\/3\/library\/sys.html#sys.platform\" rel=\"noopener\" ><code>sys.platform<\/code><\/a><span> be? The two major mobile platforms are currently inconsistent about this: on iOS, <\/span><code>sys.platform == \"ios\"<\/code><span>, whereas on Android, <\/span><code>sys.platform == \"linux\"<\/code><span>.<\/span><\/p>\n<p><span>The advantage of the first approach is that it is easy for user code to detect whether the code is being run on iOS or not. The advantage of the second approach, meanwhile, is that most existing Python code won\u2019t necessarily account for the possibility that it might be run on Android or iOS, so will run into difficulties with idioms such as the following:<\/span><\/p>\n<pre><code class=\"python hljs\"><div class=\"wrapper\"><div class=\"gutter linenumber\"><span><\/span>\n<span><\/span><\/div><div class=\"code\"><span class=\"hljs-keyword\">if<\/span> sys.platform == <span class=\"hljs-string\">\"linux\"<\/span>:\n    do_fancy_linux_only_feature()\n<\/div><\/div><\/code><\/pre>\n<p><span>The Android platform, Keith-Magee noted, is very similar to Linux, so by setting <\/span><code>sys.platform<\/code><span> to \u201clinux\u201d, a lot of code \u201cjust works\u201d on Android even though the code hasn\u2019t explicitly accounted for the possibility that it might be run on that platform.<\/span><\/p>\n<h2 class=\"raw\"><span>Abuzz with excitement<\/span><\/h2>\n<div><span><br \/><\/span><\/div>\n<div><span><br \/><\/span><\/div>\n<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"tr-caption-container\" style=\"margin-left: auto; margin-right: auto;\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjMf7wl_3NSqzHPBtLs31nHWssIZ1rIY3Wd5AmZKsrmQJnxvn0AQT0yF-cbuP6oldqPjC3L75USN9wYhENRXMmLoPgfEvVx6bUiu7RMNHpkWeexNYmKKRIetyQkdAFlloeZt1KAS9tP9OCu4F9QXY7mF2L11TasEGT2MTrKODgJRDqqkj8\/s959\/image_2023-05-27_221125338.png\" style=\"margin-left: auto; margin-right: auto;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" data-original-height=\"719\" data-original-width=\"959\" height=\"240\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjMf7wl_3NSqzHPBtLs31nHWssIZ1rIY3Wd5AmZKsrmQJnxvn0AQT0yF-cbuP6oldqPjC3L75USN9wYhENRXMmLoPgfEvVx6bUiu7RMNHpkWeexNYmKKRIetyQkdAFlloeZt1KAS9tP9OCu4F9QXY7mF2L11TasEGT2MTrKODgJRDqqkj8\/s320\/image_2023-05-27_221125338.png\" width=\"320\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td class=\"tr-caption\" style=\"text-align: center;\">Keith-Magee in flight (photo by Hugo van Kemenade)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>\n<p><span>Keith-Magee\u2019s talk was greeted enthusiastically by the core developers in the room; there was strong consensus that Python needed a better story on mobile platforms. Carol Willing expressed excitement about the ways in which support for mobile platforms could help Python spread globally, to countries where large numbers of people had no access to desktop computers (but had easy access to phones). \u0141ukasz Langa agreed, noting that he had received many enquiries about Python on mobile after giving a talk on the subject about a year ago. \u201cIt\u2019s interesting to a <\/span><em><span>lot<\/span><\/em><span> of people,\u201d Langa commented. \u201cWe need it.\u201d<\/span><\/p>\n<blockquote>\n<p><span>\u201cWooooo!\u201d<\/span>&nbsp;<\/p>\n<\/blockquote>\n<blockquote>\n<p>&#8212; <i>Carol Willing, CPython Core Developer<\/i><\/p>\n<\/blockquote>\n<p><span>On the <\/span><code>sys.platform<\/code><span> question, Core Developer Filipe La\u00edns said that he was working on a new API for the <\/span><a href=\"https:\/\/docs.python.org\/3\/library\/sysconfig.html\" rel=\"noopener\" ><code>sysconfig<\/code><\/a><span> standard-library module, which will provide a more granular way of distinguishing between platforms from user code. In the meantime, Brett Cannon wondered if BeeWare could use the same approach as CPython builds for WebAssembly: on WebAssembly builds, unusually, <\/span><code>sys.platform<\/code><span> has a different value to <\/span><code>os.name<\/code><span> (<\/span><code>sys.platform <\/code><span>is either &#8220;wasi&#8221; or &#8220;emscripten&#8221;, but <\/span><code>os.name <\/code><span>is &#8220;linux&#8221;).<\/span><\/p>\n<p><span>Another outstanding question, however, is what the release process would look like for these new platforms. There was appreciation of the work Keith-Magee had already put into BeeWare, and nobody doubted that he would continue to be committed to the project. However, Keith-Magee is not currently a core developer, leading to a concern that CPython might be supporting a platform that nobody on the core team had expertise in.<\/span><\/p>\n<p><span>Ned Deily, release manager for Python 3.6 and 3.7, worried that distributing CPython binaries for these platforms might not be feasible, as it would make the release process \u201ceven more arduous\u201d. Keith-Magee responded that it could be possible to automate the build process for these platforms. If it wasn\u2019t, he said, it also wouldn\u2019t necessarily be essential for CPython to distribute official binaries for these platforms, at least at first.<\/span><\/p>\n<h2 class=\"raw\"><span>Where next for BeeWare?<\/span><\/h2>\n<p><span>Keith-Magee\u2019s next steps are to work towards upstreaming the patches to CPython that the BeeWare project has made, so that CPython on mobile platforms can \u201cjust work\u201d without any changes being made. The alterations that have already been made to support <a href=\"https:\/\/pyfound.blogspot.com\/2022\/05\/the-2022-python-language-summit-python.html\" rel=\"nofollow\" >CPython on WebAssembly<\/a> have made this task much easier, Keith-Magee noted.<\/span><\/p>\n<\/div>\n\n<p class=\"syndicated-attribution\"><figure class= \\\"wp-block-image alignnone \\\"><img src= \\\"http:\/\/itteacheritfreelance.hk\/test\/wordpress\/wp-content\/uploads\/2016\/05\/logo2-2.png\\\" alt=\\\"IT\u96fb\u8166\u88dc\u7fd2 java\u88dc\u7fd2 \u70ba\u5927\u5bb6\u914d\u5c0d\u96fb\u8166\u88dc\u7fd2,IT freelance, \u79c1\u4eba\u8001\u5e2b, PHP\u88dc\u7fd2,CSS\u88dc\u7fd2,XML,Java\u88dc\u7fd2,MySQL\u88dc\u7fd2,graphic design\u88dc\u7fd2,\u4e2d\u5c0f\u5b78ICT\u88dc\u7fd2,\u4e00\u5c0d\u4e00\u79c1\u4eba\u88dc\u7fd2\u548cFreelance\u81ea\u7531\u5de5\u4f5c\u914d\u5c0d\u3002\\\"\/><figcaption>\u7acb\u523b\u8a3b\u518a\u53ca\u5831\u540d\u96fb\u8166\u88dc\u7fd2\u8ab2\u7a0b\u5427!<\/figcaption><\/figure>\r\n<\/br>Find A Teacher Form:\r\n<\/br>https:\/\/docs.google.com\/forms\/d\/1vREBnX5n262umf4wU5U2pyTwvk9O-JrAgblA-wH9GFQ\/viewform?edit_requested=true#responses\r\n<\/br><\/br>Email:\r\n<\/br>public1989two@gmail.com<br><br><br><br><br><br><br>\r\n<a href=www.itsec.hk style=color:#FFFFFF;>www.itsec.hk<\/a><br>\r\n<a href=\\\"www.itsec.vip\\\" style=color:#FFFFFF;>www.itsec.vip<\/a><br>\r\n<a href=\\\"www.itseceu.uk\\\" style=color:#FFFFFF;>www.itseceu.uk<\/a><br><\/p>","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>At the Python Language Summit 2023, Russell Keith-Magee presented on the ongoing efforts of BeeWare, a project that aims to make it easier to run Python on mobile platforms such as Android and iOS.The BeeWare logoRussell Keith-Magee is one busy beeImp&#8230;<\/p>\n<\/div>","protected":false},"author":2053,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"The Python Language Summit 2023: Python on Mobile - ITTeacherITFreelance.hk","description":"At the Python Language Summit 2023, Russell Keith-Magee presented on the ongoing efforts of BeeWare, a project that aims to make it easier to run Python on mobi"},"footnotes":""},"categories":[10700],"tags":[],"_links":{"self":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329458"}],"collection":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/2053"}],"replies":[{"embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=329458"}],"version-history":[{"count":1,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329458\/revisions"}],"predecessor-version":[{"id":329459,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/329458\/revisions\/329459"}],"wp:attachment":[{"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=329458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=329458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itteacheritfreelance.hk\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=329458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}