Driving Toward A Faster Python Interpreter With Pyston
Play • 44 min

Summary

One of the common complaints about Python is that it is slow. There are languages and runtimes that can execute code faster, but they are not as easy to be productive with, so many people are willing to make that tradeoff. There are some use cases, however, that truly need the benefit of faster execution. To address this problem Kevin Modzelewski helped to create the Pyston intepreter that is focused on speeding up unmodified Python code. In this episode he shares the history of the project, discusses his current efforts to optimize a fork of the CPython interpreter, and his goals for building a business to support the ongoing work to make Python faster for everyone. This is an interesting look at the opportunities that exist in the Python ecosystem and the work being done to address some of them.

Announcements

  • Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.
  • When you’re ready to launch your next app or want to try a project you hear about on the show, you’ll need somewhere to deploy it, so take a look at our friends over at Linode. With the launch of their managed Kubernetes platform it’s easy to get started with the next generation of deployment and scaling, powered by the battle tested Linode platform, including simple pricing, node balancers, 40Gbit networking, dedicated CPU and GPU instances, and worldwide data centers. Go to pythonpodcast.com/linode and get a $100 credit to try out a Kubernetes cluster of your own. And don’t forget to thank them for their continued support of this show!
  • Your host as usual is Tobias Macey and today I’m interviewing Kevin Modzelewski about his work on Pyston, an interpreter for Python focused on compatibility and speed.

Interview

  • Introductions
  • How did you get introduced to Python?
  • Can you start by describing what Pyston is and how it got started?
  • Can you share some of the history of the project and the recent changes?
    • What is your motivation for focusing on Pyston and Python optimization?
  • What are the use cases that you are primarily focused on with Pyston?
  • Why do you think Python needs another performance project?
  • Can you describe the technical implementation of Pyston?
    • How has the project evolved since you first began working on it?
  • What are the biggest challenges that you face in maintaining compatibility with CPython?
  • How does the approach to Pyston compare to projects like PyPy and Pyjion?
  • How are you approaching sustainability and governance of the project?
  • What are some of the most interesting, innovative, or unexpected uses for Pyston that you have seen?
  • What have you found to be the most interesting, unexpected, or challenging lessons that you have learned while working on Pyston?
  • When is Pyston the wrong choice?
  • What do you have planned for the future of the project?

Keep In Touch

Picks

Links

The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA

Python Bytes
Python Bytes
Michael Kennedy and Brian Okken
#222 Autocomplete with type annotations for AWS and boto3
Sponsored by Linode! pythonbytes.fm/linode Special guest: Greg Herrera YouTube live stream for viewers: Watch on YouTube Michael #1: boto type annotations * via Michael Lerner * boto3's services are created at runtime * IDEs aren't able to index its code in order to provide code completion or infer the type of these services or of the objects created by them. * Type systems cannot verify them * Even if it was able to do so, clients and service resources are created using a service agnostic factory method and are only identified by a string argument of that method. * boto3_type_annotations defines stand in classes for the clients, service resources, paginators, and waiters provided by boto3's services. Example with “bare” boto3: Example with annotated boto3: Brian #2: How to have your code reviewer appreciate you * By Michael Lynch * Suggested by Miłosz Bednarzak * Actual title “How to Make Your Code Reviewer Fall in Love with You” * but 🤮 * even has the words “your reviewer will literally fall in love with you.” * literally → figuratively, please * Topic is important though, here are some good tips: * Review your own code first * “Don’t just check for mistakes — imagine reading the code for the first time. What might confuse you?” * Write a clear change list description * “A good change list description explains what the change achieves, at a high level, and why you’re making this change.” * Narrowly scope changes * Separate functional and non-functional changes * This is tough, even for me, but important. * Need to fix something, and the formatting is a nightmare and you feel you must blacken it. Do those things in two separate merge requests. * Break up large change lists * A ton to write about. Maybe it deserves 2-3 merges instead of 1. * Respond graciously to critiques * It can feel like a personal attack, but hopefully it’s not. * Responding defensively will only make things works. Greg #3: REPODASH - Quality Metrics for Github repositories * by Laurence Molloy * Do you maintain a project codebase on Github? * Would you like to be able to show the maturity of your project at a glance? * Walk through the metrics available * Use-case Michael #4: Extra, extra, extra, extra, hear all about it * Python 3 Float Security Bug * Building Python 3 from source now :-/ It’s still Python 3.8.5 on Ubuntu with the kernel patch just today! (Linux 5.4.0-66 / Ubuntu 20.04.2) * Finally, I’m Dockering on my M1 mac via: * docker context create remotedocker --docker "host=ssh://user@server" * docker context use remotedocker * docker run -it ubuntu:latest bash now works as usual but remotely! * Why I keep complaining about merge thing on dependabot. Why!?! ;) * Anthony Shaw wrote a bot to help alleviate this a bit. More on that later. Brian #5: testcontainers-python * Suggested by Josh Peak * Why mock a database? Spin up a live one in a docker container. * “Python port for testcontainers-java that allows using docker containers for functional and integration testing. Testcontainers-python provides capabilities to spin up docker containers (such as a database, Selenium web browser, or any other container) for testing.” import sqlalchemy from testcontainers.mysql import MySqlContainer with MySqlContainer('mysql:5.7.32') as mysql: engine = sqlalchemy.create_engine(mysql.get_connection_url()) version, = engine.execute("select version()").fetchone() print(version) # 5.7.32 * The snippet above will spin up a MySql database in a container. The get_connection_url() convenience method returns a sqlalchemy compatible url we use to connect to the database and retrieve the database version. Greg #6: The Python Ecosystem is relentlessly improving price-performance every day * Python is reaching top-of-mind for more and more business decision-makers because their technology teams are delivering solutions to the business with unprecedented price-performance. * The business impact keeps getting better and better. * What seems like heavy adoption throughout the economy is still a relatively small-inroad compared to what we’ll see in the future. It’s like water rapidly collecting behind a weak dam. * It’s an exciting time to be in the Python world! Extras: Brian: * Firefox 86 enhances cookie protection * sites can save cookies. but can’t share between sites. * Firefox maintains separate cookie storage for each site. * Momentary exceptions allowed for some non-tracking cross-site cookie uses, such as popular third party login providers. Joke: 56 Funny Code Comments That People Actually Wrote: These are actually in a code base somewhere (a sampling): /* * Dear Maintainer * * Once you are done trying to ‘optimize’ this routine, * and you have realized what a terrible mistake that was, * please increment the following counter as a warning * to the next guy. * * total_hours_wasted_here = 73 */ // sometimes I believe compiler ignores all my comments // drunk, fix later // Magic. Do not touch. /*** Always returns true ***/ public boolean isAvailable() { return false; }
38 min
Azure DevOps Podcast
Azure DevOps Podcast
Jeffrey Palermo
Mark Fussell on Dapr 1.0 - Episode 130
Joining Jeffrey today is return guest, Mark Fussell! Mark works on the Azure Incubations Team and is the Product Manager for Dapr, the Distributed Application Runtime. He has been working at Microsoft for over 19 years and has been a passionate advocate for building microservice-based applications for the last 10 years. He has a proven track record of building innovative computing platforms, running large-scale cloud services, and starting new million-dollar businesses within corporations. Last time Mark was on the show, he and Jeffrey discussed Dapr and what it can do for developers. In this episode, Mark and Jeffrey discuss the new 1.0 release of Dapr. Mark shares how to build, test, deploy, and monitor an application that’s built and deployed using Dapr. He speaks about the team’s journey for the last six months with working on the 1.0 release, the new and exciting changes with the 1.0 release, and all that Dapr is currently capable of. Topics of Discussion: [:38] Be sure to visit AzureDevOps.Show for past episodes and show notes. [:50] About The Azure DevOps Podcast, Clear Measure, and Jeffrey’s offer to speak at virtual user groups. [1:16] About Jeffrey’s newest podcast, Architect Tips! [1:20] About today’s episode with return guest, Mark Fussell. [1:42] Jeffrey welcomes Mark Fussell back to The Azure DevOps Podcast. [2:03] Mark gives a rundown of what’s new at Microsoft, how he ended up on the Azure Incubations Team at Microsoft, and what the team works on. [3:15] An overview of Dapr. [5:08] The huge news for Dapr: the new 1.0 release. [5:41] Mark elaborates on the journey for the last six months with Dapr and what’s new and exciting with the 1.0 release. [7:07] Is Dapr aimed squarely at processes such as backend services with no UI (that either need to be triggered by something or to pop up and do something)? [9:19] Is Dapr only for Javascript apps? Is it for .NET developers? How is it positioned? [11:55] The strategy of Azure and the positioning of Dapr. [13:25] What are some of Dapr’s main goals? Can Dapr be as simple as a single backend process to a whole bunch of backend processes? [21:53] A word from Azure DevOps Podcast’s sponsor: Clear Measure. [22:24] Is there overlap with Dapr and open-source distributed application frameworks for .NET such as MassTransit and NServiceBus? Did the Azure Incubations Team discuss these when developing Dapr? [24:19] Jeffrey and Mark dive into the operational side of Dapr. Mark speaks about how to build, test, deploy, and monitor an application that’s built and deployed using Dapr. [28:24] Does Dapr integrate with Application Insights on its own set of custom events and custom metrics? [29:28] What does deploying with ASP.NET look like? Is it possible, with Dapr, that you would not need to deploy a second process (whether it be Windows Service, Azure Function, or Containers) and you can simply bundle it in with a regular app service web application deployment? [33:51] Mark provides an update on the status of Kubernetes in Azure. [37:04] Discussing the future of running and deploying to Azure. Mentioned in this Episode: Architect Tips — New video podcast! Azure DevOps Clear Measure (Sponsor) .NET DevOps for Azure: A Developer's Guide to DevOps Architecture the Right Way, by Jeffrey Palermo — Available on Amazon! bit.ly/dotnetdevopsebook — Click here to download the .NET DevOps for Azure ebook! Jeffrey Palermo’s Youtube Jeffrey Palermo’s Twitter — Follow to stay informed about future events! The Azure DevOps Podcast’s Twitter: @AzureDevOpsShow Mark Fussell’s LinkedIn Mark Fussell’s Twitter @MFussell Dapr Dapr on GitHubr Dapr for .NET Developers, by Robert Vettor, Sander Molenkamp, and Edwin van Wijk Azure DevOps Podcast Ep. 66: “Mark Fussell on the Distributed Application Runtime or Dapr” KEDA Azure Queue Storage Azure Service Bus MassTransit NService Bus Azure DevOps Podcast Ep. 128: “Simon Timms on Microservices Architecture” Azure Application Insights OpenTelemetry Collector ASP.NET Kubernetes Azure DevOps Podcast Ep. 110: “Stefan Schackow on What’s New in Azure App Service” “Microsoft’s Dapr Introduces Cloud Native Development to the Enterprise” | The New Stack “Microsoft's most useful open-source project for Kubernetes, Dapr hits the 1.0 primetime” | The Register “Distributed Application Runtime (Dapr) v1.0 Announced” | InfoQ “Microsoft’s Dapr open-source project to help developers build cloud-native apps hits 1.0” | TechCrunch “Microsoft’s open source Dapr hits prime time to help developers embrace microservices” | VentureBeat Want to Learn More? Visit AzureDevOps.Show for show notes and additional episodes.
41 min
More episodes
Search
Clear search
Close search
Google apps
Main menu