May was a month of big events. The Pallets Projects, home to popular frameworks like Flask and Click, released new major versions of all six of its core projects. The Python Software Foundation (PSF) hosted PyCon US 2021, a virtual conference that delivered an authentic in-person experience.

Pallets Releases New Major Versions of All Core Projects

Two years of hard work from the Pallets team and its many open source contributors has culminated in the release of new major versions for all six of its core projects:

  • Flask 2.0
  • Werkzeug 2.0
  • Jinja 3.0
  • Click 8.0
  • ItsDangerous 2.0
  • MarkupSafe 2.0

All six projects have dropped support for Python 2 and Python 3.5, making Python 3.6 the minimum supported version. Previously deprecated code has been removed, and some new deprecations have been added.

Some of the major changes affecting all six projects include:

  • Renaming the default branch to main
  • Adding comprehensive type annotations that make type checking user code more useful and provide better integrations with IDEs
  • Using tools like pre-commit, Black, and Flake8 to enforce a consistent style across all of the codebases and new pull requests

Besides the sweeping changes listed above, individual projects have several attractive new features.

Jinja Gets Improved Async Environments

asyncio support in Jinja 2.x required a patching system as well as some caveats developers needed to keep in mind.

One of the reasons for this is that Jinja 2.x supports Python 2.7 and Python 3.5.

Now that all of the Pallets projects only support Python 3.6+, the patching system was removed to provide a more natural asyncio experience for projects using Jinja 3.0.

Click Gets an Overhauled Shell Tab Completion System

Building great command-line interfaces (CLI) for an application can be a chore. The Click project helps ease this burden with its friendly API.

One of the features shell users expect from a CLI is tab completion, which suggests command names, option names, and choice values when a user types a few characters and presses Tab.

PyCon US 2021 Connects Pythonistas Around the World

Late spring is always an exciting time for Pythonistas in the United States. PyCon US, the largest annual convention devoted to Python, traditionally takes place in April or May.

This year, PyCon US was a little bit different from previous conferences. Originally slated to take place in Pittsburgh, Pennsylvania, PyCon US 2021 transitioned to an online-only event due to the COVID-19 pandemic.

What’s Next for Python?

May was an eventful month for Python. At Real Python, we’re excited about Python’s future and can’t wait to see what new things are in store for us in June.

Tags: , , , , , , , , , , , , , , , ,