ข่าวประจำสัปดาห์
Dropbox complete migrate to Python 3
เวลานี้คงไม่มีใครไม่รู้จัก Dropbox นะครับ แต่อาจจะมีคนไม่รู้ว่า Dropbox เป็นหนึ่งในบริษัทที่ใช้ Python ใหญ่ที่สุดในโลก เฉพาะโค้ดของตัว Application Dropbox นี่ก็เกิน 1 ล้านบรรทัดแล้วครับ
แต่ว่าถึงจะใช้ Python ใหญ่ที่สุดในโลกโค้ดของที่นั่นก็ยังเป็น Python 2 อยู่ครับ ซึ่งทาง Dropbox เองก็วางแผน Migrate มาตั้งแต่ปี 2015 แล้ว จนถึงวันนี้ ถ้าใครใช้ Application dropbox เวอร์ชั่นล่าสุด ตัวโค้ดที่รันอยู่ข้างล่างก็มีพื้นฐานจาก Python 3.5 เวอร์ชั่นพิเศษแล้วครับ ซึ่งทางบล็อกนี้อธิบายขั้นตอนการ Roll out ตัวโค้ดจาก Python 2.7 -> Python 3 และปัญหาที่เจอคร่าวๆ ครับ
นอกจากนั้นแล้ว บล็อกนี้เป็นหนึ่งในซีรีย์บล็อกที่จะตามมาอีกหลายบล็อกจาก Dropbox เกี่ยวกับการ Migrate ไปใช้ Python 3 ก็คอยติดตามกันต่อไปได้ครับ
How we rolled out one of the largest Python 3 migrations ever — Dropbox, Max Bélanger
The State of Developer Ecosystem Survey in 2018
Poll ประจำปีของทาง Jetbrains นะครับ ในส่วนของ Python ปีนี้การใช้งาน Python3 เกิน 75% ของทั้งหมดแล้วครับ และงานที่ใช้ภาษา Python อันดับหนึ่งเลยคือ Data analysis ตามมาด้วย Web Development และ Machine Learning ตามลำดับ
ในส่วนของ Library ที่ใช้งานมากที่สุดจะเป็นเซ็ต Data Science อยู่อันดับหนึ่งเลยครับ ซึ่งประกอบด้วย NumPy, matplotlib, SciPy และ Panda อันดับต่อมาคือ Django, Flask และ Requests ตามลำดับครับ
Python in 2018 - The State of Developer Ecosystem by JetBrains Over 1400+ developers share their insights on modern Python programming. Keep up with the most relevant technologies and frameworks in this infographic! — JetBrains
More coverage on CPython Core Developer Sprint 2018
ถ้าใครติดตามเขียนงูให้วัวกลัวรายสัปดาห์ ของสัปดาห์ที่แล้วจะเห็นว่าเราพูดถึงเรื่อง Core Developer Sprint เยอะหน่อย ซึ่งสัปดาห์นี้ก็มีบล็อกที่เกี่ยวข้องออกมาถึง 3 บล็อกเลยครับ ถ้าใครสนใจเกี่ยวกับการตัดสินใจเกี่ยวกับอนาคตภาษาหรือเรื่อง Implementation Detail ของภาษาก็น่าติดตามมากเลยครับ
บล็อกแรกเป็น Part 2 ของคุณ Mariatta นะครับ ตอนนี้เน้นพูดถึง PEP581, Contributor License Agreement และ f-string issues ครับ
Python Core Sprint 2018: Part Two Read up on Part one first. Here are additional discussions and projects that I got involved with during the sprint. PEP 581 PEP 581 is a PEP I wrote about using GitHub issues instead of Roundup as CPython’s issue tracker. During the sprint, I discussed this topic mainly with Ezio … — mariatta.ca, Mariatta
บล็อกที่สองเป็นของทาง Python Software Foundation เองครับ จะพูดถึงภาพรวมของ Core Developer Sprint ครับ
CPython Core Developer Sprint 2018 This September, twenty-nine core committers arrived at Microsoft’s main campus in Redmond, Washington, USA for the now-annual core developer… — Ewa Jodlowska
บล็อกสุดท้ายเป็นของคุณ Neil Schemenauer ตัวนี้ค่อนข้างจะลงลึกไปในเรื่อง Implementation Detail ของ CPython ครับว่าจะทำยังไงให้ Python 3.8 จะเร็วขึ้นได้มากกว่าเดิม
Why Emulating CPython C API is so hard
บล็อกนี้จะพาเราไปรู้จัก cpyext API ของ PyPy ซึ่งเป็น API ที่เอาไว้ต่อกับ C API ของตัว CPython จริงๆ ครับ จะช่วยให้เราเข้าใจขึ้นว่าทำไม library บางตัวถึงรันช้าขึ้นเมื่ออยู่บน PyPy
Inside cpyext: Why emulating CPython C API is so Hard cpyext is PyPy’s subsystem which provides a compatibility layer to compile and run CPython C extensions inside PyPy. Often people ask … — official C API
APIStar as a cross-framework API Tool
ต้องบอกว่า APIStar นี่เปลี่ยนทิศทางโปรเจ็คไปมาหลายครั้งจนผมเองก็เริ่มจำไม่ได้แล้วว่าตกลงมันทำอะไรได้บ้าง พอมาเห็น Tweet นี้จากคุณ Tom Christie ซึ่งเป็นคนสร้าง APIStar ก็ทำให้เราพอจะมองเห็นทิศทางของโปรเจ็คได้บ้างครับว่าจะเป็นไปในทาง API tools ที่ทำหน้าที่สร้าง Documents, validate API Schema, Mock server หรือเป็น API Client เอง
นอกจากนั้นแล้วยังแยกส่วนของ Server ออกมาเพราะอีกโปรเจ็คนึงของบริษัท Encode นี้คือ Starlette โฟกัสในส่วนของ ASGI Server ได้ดีกว่า APIStar ครับ
ส่วนใครที่กำลังสงสัยว่า อ่าวแล้ว Django REST Framework จะไปในทิศทางไหน ในทวีตยังบอกด้วยครับว่าตัว DRF จะเริ่มย้ายจาก coreapi schema ไปใช้ OpenAPI Schema แทนครับ
I'm going to be trimming all the server stuff out of API Star, and releasing it instead as a framework-agnositic set of API tools for generating API docs, validating schemas, using as a client library, etc...https://t.co/ZQFf3hDuxg
— Tom Christie (@starletdreaming) September 21, 2018
PyCon 2019 Call for Proposals
สำหรับงานใหญ่ประจำปีอย่าง PyCon ปีหน้าก็เริ่มรับ Talk Proposal แล้วนะครับ ปีหน้าจัดวันที่ 1–9 พฤษภาคม ใครสนใจรายละเอียดหรือ Guideline ในการส่งสามารถกดดูได้ที่ลิ้งค์ข้างล่างเลยครับ
Speak at PyCon | PyCon 2019 in Cleveland, Ohio — PyCon 2019 in Cleveland, Ohio
หรือถ้าใครอยากดูตัวอย่างของ Talk Proposal คุณ Mariatta ก็ได้ทำ documents ตัว Talk Proposal ที่เค้าเคยส่งไว้ที่นี่ครับ
Talk Proposals by Mariatta — talk-talk-talk documentation — talk-talk-talk
Auth0 join #Hacktoberfest 2018
คงไม่ต้องแนะนำกันมากนะครับสำหรับ auth0 ซึ่งเป็น identity provider ที่น่าจะมีคนใช้เยอะระดับนึงเลย ผมลองดูๆ ใน https://github.com/auth0 ก็มี Python repository อยู่บ้างโดยเฉพาะ auth0-python ใครสนใจก็ไปช่วย contribute เอาเสื้อกันได้ครับ
Celebrate Open-Source Software and Hacktoberfest 2018 with Auth0 Auth0 is to excited join Hacktoberfest 2018, a month-long celebration and supporting of open-source software by Digital Ocean, Github, an… — Auth0 - Blog, Kim Noel
Python book 40% of at Manning publishing
ทาง Manning ได้ออก special page ให้กับคุณ Naomi Ceder ซึ่งเป็น Chair of PSF นะครับมีหลายเล่มน่าสนใจ ก็ไปจับจองกันได้ตามลิ้งค์ข้างล่างเลยครับ
Naomi’s Picks | Special deals — Special deals
Humble book bundle: Learn you some code
แพ๊คใหม่ของ Humble book bundle นะครับ มีหนังสือ Python อยู่สองสามเล่มเช่น Automate the boring stuff with Python, Python crash course และ Python Playground ใครสนใจก็ไปกดกันได้ครับ ถือว่าเป็นการช่วยองค์กรการกุศลและยังได้หนังสือดีๆ มาอ่านด้วย
Humble Book Bundle: Learn You Some Code by No Starch Press Pay what you want for awesome ebooks and support charity! — Humble Bundle
ซอร์ฟแวร์อัพเดท
Pytest 3.8.1
สำหรับ Library test ยอดนิยมอย่าง pytest ใน release นี้ออกมาแก้ bug อย่างเดียวเลยครับ แต่บั๊กใหญ่ใน release นี้คือมัน discover test ใน __init__.py แล้วมันระเบิดเพราะว่าไม่มี method len() ครับ นอกจากนั้นยังเพิ่มหน้า Deprecate and Removal ใน Document ด้วยเพื่อช่วยให้คนที่ใช้ Pytest เวอร์ชั่นเก่าๆ อัพเดทง่ายขึ้นครับ
pytest/CHANGELOG.rst at main · pytest-dev/pytest The pytest framework makes it easy to write small tests, yet scales to support complex functional testing - pytest/CHANGELOG.rst at main · pytest-dev/pytest — GitHub, pytest-dev
Black 18.9b0
สำหรับ code formatter มาแรงอย่าง Black หลังจากห่างหายการอัพเดทไปนานเวอร์ชั่นนี้ได้เพิ่มความสามารถในการ format ตัวเลขให้มี _ (numerical literal) ที่มีตั้งแต่ Python 3.6 ขึ้นไปได้ และอื่นๆ อีกครับ
GitHub - psf/black: The uncompromising Python code formatter The uncompromising Python code formatter. Contribute to psf/black development by creating an account on GitHub. — GitHub, psf
Scikit-learn 0.20.0
Release ล่าสุดของ Scikit-learn นี้จะเป็นเวอร์ชั่นสุดท้ายที่รองรับ Python 2.7 และ Python 3.4 ลงไปนะครับ เวอร์ชั่นหน้าจะต้องการ Python 3.5 หรือมากกว่า รายละเอียดเพิ่มเติมเกี่ยวกับฟีเจอร์ใหม่ สามารถติดตามได้ใน Document ข้างล่างครับ
Release History Release notes for all scikit-learn releases are linked in this page. Tip: Subscribe to scikit-learn releases on libraries.io to be notified when new versions are released. Version 1.0.2, Version 1…. — scikit-learn
Datasette 0.25
สำหรับใครที่ไม่รู้จักนะครับ Datasette ช่วยให้เราสร้าง JSON read only API จาก database sqlite ได้ด้วยคำสั่งเดียว ซึ่งในเวอร์ชั่นนี้ได้แก้คำสั่ง published ให้เลือกได้ว่าเราจะใช้ heroku หรือ now ครับ นอกจากนั้นแล้วยังเปลี่ยนไปใช้ pysqlite3 ในการเชื่อมต่อกับ sqlite ทำให้สามารถใช้กับ sqlite เวอร์ชั่นล่าสุดอย่าง 3.25.0 ได้ด้วยครับ ยังมีฟีเจอร์อื่นๆ ที่เพิ่มขึ้นอีกนอกจากนี้ สามารถอ่านเพิ่มเติมได้ที่ release note ข้างล่างเลยครับ
Twine 1.12.1
ในเวอร์ชั่นใหม่ของ twine ได้เพิ่ม command $ twine check ขึ้นมาครับ ช่วยให้เราสามารถเช็ค README file ว่าตรงกับ format ที่ PyPI อ่านได้รึเปล่าครับ
Making a PyPI-friendly README — Python Packaging User Guide — Logo
LogMe 1.2.1
ผมเพิ่งรู้จัก LogMe เมื่อเร็วๆ นี้เองครับ เป็น Library ที่ช่วยให้เขียน Log ใน Python ได้ง่ายขึ้นเพียงแค่แปะ decorator ใครสนใจก็ไปลองใช้กันได้ครับ
GitHub - BNMetrics/logme: Python Logging For Humans (Also supports configurable color logging for the terminal!) Python Logging For Humans (Also supports configurable color logging for the terminal!) - GitHub - BNMetrics/logme: Python Logging For Humans (Also supports configurable color logging for the termin… — GitHub, BNMetrics
Click 7.0
สำหรับ Library ทำ command line ยอดฮิตอีกตัวนะครับ ในเวอร์ชั่นนี้สามารถทำ native autocomplete ใน zsh ได้แล้ว รวมถึง autocomplete ตัว choice ด้วย นอกจากนี้ยังเพิ่ม DateTime และ FloatRange สำหรับ input type ครับ
อีกส่วนหนึ่งที่สำคัญใน release นี้คือการย้าย document หลักของโปรเจ็คไปไว้ที่ readthedoc ครับ
Click 7.0 Released — Pallets
หมดแล้วครับสำหรับสัปดาห์นี้แล้วพบกันใหม่สัปดาห์หน้าครับ
Original post at: https://medium.com/pythonbycow/เขียนงูให้วัวกลัวรายสัปดาห์-ฉบับที่-2-ebabd95bb532
