Feature February 20, 2021, the 30th anniversary of Python, finds the programming language at the top of its game but not without challenges.
“I do believe that Python just doesn’t have the right priorities these days,” said Armin Ronacher, director of engineering at software monitoring biz Sentry and creator of Flask, the popular Python web app framework, in an email interview with The Register.
Ronacher, a prolific Python contributor, remains a fan of the language. He credits Python’s success to being both easy to learn and having an implementation that was easy to hack. And in its early years, Python didn’t have a lot of competitors with those same characteristics, he said.
The hackability of the language enabled many of the projects that made it successful
“The hackability of the language enabled many of the projects that made it successful, such as NumPy and others, which extended the language through extension modules written in C that would have been hard to do with Python alone at the time,” he said. “Some of the functionality to enable libraries like NumPy were added right to the language itself to enable these more advanced use cases.”
Ronacher expressed appreciation for Python’s readability, at least initially.
“It’s easy to read, it wasn’t an overly complex language for a long time, and it gives you a lot of access to the internals,” he said. “The latter allows you to introspect the runtime without many penalties, which in turn means that it’s an interesting language to build web services on top. When something goes wrong in production you can easily figure out what was happening.”
He also pointed to the relatively simple runtime, which makes runtime performance more predictable. “While it’s not a very fast language, it compensates for this somewhat because the reference counting semantics often mean that the memory usage is somewhat predictable in production environments,” he said.
At the same time, Ronacher takes issue with the path Python has taken recently.
“Over the last few years, Python hasn’t made the most amazing decisions,” he said. “For instance, I’m not a fan of how Unicode was approached. With Python 3, I wish a Unicode model more like Rust would have been approached that just declares strings to be UTF-8 in memory. Python 3 is very wasteful with memory when it comes to Unicode to permit direct indexing into characters, which is not that useful anyways with modern Unicode.”
He also took issue with the focus of Python’s core developers.
“Many features are landing that are making the language much more complex to learn, such as the async IO system, the way the typing support works, and the new match statement,” he said. “Meanwhile, essential features such as a better packaging story are still absent.”
Essential features such as a better packaging story are still absent
The shortcomings of Python’s software packaging tools – the software used to set up Python environments and to download, install, and manage libraries – have been an issue for years. It was bad enough that cartoonist Randall Munroe, on April 30, 2018, penned an xkcd comic on the subject.
Things have improved somewhat since then. In 2019, the Python Software Foundation awarded the Packaging Working Group $407,000, courtesy of Mozilla and the Chan Zuckerberg Initiative, to renovate the pip package management tool in 2020.
Nevertheless, Ronacher said he hopes Python’s core developers focus on improving packaging and on adding the ability to load different versions of the same library side by side.
“It’s much more complex to install packages in the Python ecosystem than others and the packaging infrastructure is too disconnected from the core language development,” he said.
“Whereas Node now comes with npm out of the box and Rust develops the cargo package manager alongside the language, Python still does not consider packaging to be part of language development. As a result, there are countless competing efforts that are all pieced together.”
“Whereas a Rust programmer can just download the language and use the integrated rustup+cargo tools for everything, Python programmers need to juggle many different tools to accomplish something similar but those tools are not developed in unison,” Ronacher explained. “Unlike all other modern languages, Python also can only load one version of a dependency. This means that your entire software project needs to agree on a compatible version, which becomes harder the larger the ecosystem grows and the faster it moves.”
Even though Python’s packaging story still suffers by comparison to Rust’s well-regarded Cargo system, the language has never been more popular. Its maintainers must be doing something right.
Who’s in control?
Named as a nod to British comedy troupe Monty Python, the language has become the second or third most popular choice, depending on who you ask, for those writing computer code.
The language’s creator, Guido van Rossum, relinquished his role overseeing the language and his honorary epithet, Benevolent Dictator for Life, in July 2018. This was after a fractious debate over the addition of a new language feature, the “Walrus operator” (PEP 572), that left van Rossum frustrated by online animosity.
The Register asked van Rossum to comment for the occasion but he declined, stating that he’s not all that interested in promoting himself.
Python is currently managed by the Python Steering Council, which consists of five people who serve for the duration of a feature release, the most recent of which was Python 3.9.0 last October. Currently, the group includes: Barry Warsaw, Brett Cannon, Carol Willing, Pablo Galindo Salgado, and Thomas Wouters.
These five oversee technical changes to Python and manage the community governance process – a process based on Python Enhancement Proposals (PEPs). They coordinate the contributions of more than 90 active core developers and other members of the Python community.
Python swallows Java to become second-most popular programming language… according to this index
For the past 20 years, as of March 6, 2021, the Python Software Foundation (PSF) has supported the language’s development. Its aim is to “promote, protect, and advance the Python programming language, and to support and facilitate the growth of a diverse and international community of Python programmers.”
“The PSF has a little bit been distanced from the actual maintenance of the language itself,” said Ewa Jodlowska, executive director of the PSF, in an interview with The Register. “But through the creation of the Steering Council, that has created a vessel for us to be able to communicate with and work on future funding requests that might aid them in some things that they lack.”
The Python Foundation has found it difficult to meet its funding goals during the COVID-19 pandemic. According to Jodlowska, much of the foundation’s revenue has traditionally come from PyCon US. The event was virtual last year and will be again this year, limiting the potential income.
Jodlowska said one of the PSF’s goals this year is to hire a full-time core developer, an ambition fulfilled on February 11, when Google announced plans to donate more than $350,000 to the PSF to support three projects: a malware detection system for the Python Package Index (PyPI); improvements in Python tools and services; and paying for a CPython Developer-in-Residence for 2021, to work on language maintenance.
CPython is the reference implementation of the language, written in C, the one you download from Python.org. But there are others like IronPython (C#), Jython (Java), and PyPy (RPython, a Python subset).
Asked what has made Python so successful, Jodlowska cited the importance of the Python community and the role its Code of Conduct plays as a support structure.
“Diversity for the maintainers and core developers of Python is being addressed in several ways,” Jodlowska explained.
The Code of Conduct, she said, is now being enforced by the Steering Council. That’s a big deal, she said, “because prior to the Steering Council existing there really was no enforcement for keeping community discussions civil and welcoming.”
In theory, the Steering Council’s Code of Conduct enforcement will prevent situations like the Walrus operator debate that drove van Rossum to give up his governance role. But to judge by remarks from Python Steering Council member Brett Cannon, moderating community debate simply moves the point of friction from the community to its leadership.
We are still very much a volunteer-run project, but our size demands a lot of time to keep running
Asked via email about the greatest challenge facing the Python community, Cannon said it’s just trying to keep up with the size and volume of the project.
“We are still very much a volunteer-run project, but our size demands a lot of time to keep running,” he said. “Tack on the usual naysayers for any decision made and it’s a lot to manage both from a time and emotion standpoint.”
At companies like Facebook and Microsoft that moderate the worst sorts of content, the workers who screen toxic posts and violent videos need psychological support. Managing opinionated developers in the Python community may not generate comparable levels of stress, but keeping things civil still appears to take a mental toll, particularly among volunteers.
For the Python community, bringing new people in so others can step back or delegate may help mitigate that sense of siege. Jodlowska credits efforts by Python core developers to keep the community vital. “A lot of the current core developers, for example, on their own time mentor others who are interested in becoming core developers,” she said. “And there’s definitely a steady stream of new incomers that way.”