This week we welcome Kyle Stanley (@Aeros1415) as our PyDev of the Week! Kyle is a core developer of the Python programming language. If you’d like to see what Kyle is working on, you can check out his Github profile. You can also connect with Kyle on LinkedIn.
Let’s spend some time getting to know Kyle better!
Can you tell us a little about yourself (hobbies, education, etc):
Hi, my name is Kyle Stanley. I’m a 23 year old college student finishing up the last year of my B.S. degree (Information Systems Technology, Programming spec.). Most notably, I was recently promoted to the role of core developer for CPython, the default/reference implementation of the Python programming language (in April 2020). I mostly contribute to the standard library through reviews and my own authored changes, as both a hobby that I enjoy and a means of building my professional experience in the software development industry. Most of my significant contributions have been to the modules asyncio and concurrent.futures.
I’m also decently active in various CPython development communities, such as discuss.python.org, firstname.lastname@example.org, and email@example.com. Although, I probably end up spending far more time reading posts from the wide variety of experts in the community than I do writing my own posts. Over time, I’ve discovered that there’s an infinite well of knowledge to be gained from the discussions, as long as one has the time and patience to sort through the significant volume of content to find the “hidden” gems. I’m very grateful to the many active experts on there.
Outside of CPython, I’m involved in the Python Discord community (https://ift.tt/2zpcE47) as a Moderator. As far as other hobbies go, I also enjoy programming challenge sites such as Codewars, reading fantasy novels, playing RPG video games (recently Mount and Blade 2: Bannerlord), watching various sci-fi TV series such as Star Trek, and riding my bike.
Why did you start using Python?
~6-7 years ago, Python was my first serious programming language. From back in high school when I joined my school’s STEM academy, I had a strong interest in technology and wanted to pick up programming as a skill once I realized how fundamentally important it is for many IT career paths. After a significant amount of “testing the waters” with other languages, I found Python to have the most intuitive and human-friendly syntax out of the languages that had significant real-world utility. Although there is a significant amount of depth underneath the surface, I find that the core syntax seamlessly flows from thought to code.
What projects are you working on now?
I have a few ongoing CPython projects, but my most substantial current project is probably asyncio.ThreadPool, which is a high-level asynchronous thread pool designed to be used as a context manager (e.g. “async with asyncio.ThreadPool() as pool:“). The primary use case for it in CPython is concurrent execution of long-running, IO-bound subroutines (non-async functions/methods) that would normally block the event loop (such as for network programming, DB connectors, inter-process communication, file IO, etc.), particularly for existing code or libraries that can’t be easily converted to use async/await. Threads have a bit more overhead than using coroutines (`async def` functions/methods), but when it’s not a realistic or available option to convert the existing code to use them, it’s often far more efficient to execute the subroutine in a thread pool rather than blocking the event loop for a significant period of time.
This can technically already be done using the existing `asyncio.loop.run_in_executor()` method, but it’s significantly less intuitive, and gives far less flexibility to the user for controlling when the thread pool’s resources are created and finalized. Also, it’s a more long-term goal for asyncio.ThreadPool to have a completely asyncio-native implementation, instead of relying upon concurrent.futures under the hood (which wasn’t really a viable option for `loop.run_in_executor()`). There’s a non-trivial cost incurred in the conversion process, so converting to a completely asyncio-native version could very likely result in significant performance improvements. We’re starting with one that relies on concurrent.futures for initial stability and giving users the chance to provide feedback on the API…
Thanks for doing the interview, Kyle!
The rest of the post PyDev of the Week: Kyle Stanley appeared first on The Mouse Vs. The Python.
from The Mouse Vs. The Python https://ift.tt/3d4gMHG