Monday, May 3, 2021

Python News: What's New From April 2021?

If you hang around Python developers long enough, you’ll eventually hear someone talk about how awesome the Python community is. If you want to get up to speed on what happened in the Python community in April 2021, then you’ve come to the right place to get your news!

From better error messages that improve user experience to community-driven efforts to delay a change to CPython, April 2021 was a month full of stories that reminded us that Python is better because of its community.

Let’s dive into the biggest Python news from the past month!

The PSF Is Hiring Thanks to Visionary Sponsors

In February 2021, Google became the first Visionary Sponsor of the Python Software Foundation (PSF). Shortly thereafter, Bloomberg Engineering also stepped up as a Visionary Sponsor.

Visionary Sponsors are the highest tier of sponsorship and provide significant funds to support PSF initiatives. The sponsorship from Google and Bloomberg is helping the PSF hire two new full-time employees.

CPython Developer-in-Residence

Thanks to Google’s sponsorship funds, the PSF has announced its plan to hire a CPython developer-in-residence. According to the PSF’s announcement, the developer-in-residence will “address backlog, perform analytical research to understand the project’s volunteer hours and funding, investigate project priorities and their tasks going forward, and begin working on those priorities.”

The full-time position is funded for one year, and résumé submissions are being accepted until May 16, 2021. However, the position appears to be open only to existing core developers.

Hiring a full-time employee to support CPython development is an enormous step forward for the PSF and for the Python community. The decision was inspired by the Django Fellowship Program, which hires paid contractors to handle administrative and community management tasks.

Python Packaging Project Manager

Bloomberg’s donations are helping to fund a Python Packaging project manager position. According to the PSF’s announcement, the project manager will “oversee improvements and added functionality that will benefit all Python users while leading the development of PyPI into a sustainable service.”

Applications are open until May 18, 2021. For more information about the position, check out the Python Jobs Board.

You can read more about Bloomberg’s decision to support Python and why they’re specifically interested in the Python Packaging ecosystem in their blog post Supporting the Python community by “Shifting Left.”

Python 3.10 Will Have Improved Error Messages

On April 9, 2021, Python core developer Pablo Galindo, who is also the release manager for Python 3.10 and 3.11, tweeted a question directed toward Python educators:

Python educators and users: I have been working on improving SyntaxError messages in CPython lately. What error (only SyntaxErrors for now 😅) messages you or your students have struggle with? Which ones you think we should improve? 🤔 (Pls RT to help reaching more people 🙏). (Source)

The tweet got a lot of engagement, including requests for improved error messages about the assignment (=) and comparison (==) operators, indentation errors, and missing colons. In some cases, Galindo pointed out that he had already improved the errors people mentioned!

For instance, in a pull request titled bpo-42997: Improve error message for missing : before suites, Galindo improved the error messages for missing colons. In Python 3.10, if you forget to type a colon (:) after defining a function, you’ll see this new and improved message:

>>>
>>> # Python 3.10a7
>>> def f()
  File "<stdin>", line 1
    def f()
          ^
SyntaxError: expected ':'

Contrast that to the error message in Python 3.9:

>>>
>>> # Python 3.9.4
>>> def f()
  File "<stdin>", line 1
    def f()
           ^
SyntaxError: invalid syntax

Read the full article at https://realpython.com/python-news-april-2021/ »


[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]



from Real Python
read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...