Issue #418

The End of the Python 2 Era, New Features in Python 3.9, Common Python App Layouts, and More

April 28, 2020

The End of the Python 2 Era, New Features in Python 3.9, Common Python App Layouts, and More
#418 – APRIL 28, 2020 VIEW IN BROWSER
The PyCoder’s Weekly Logo
The Final Python 2 Release Marks the End of an Era
The final version of Python 2 has been released. As the Python community looks forward to the new era, Ryan Donovan from the Stack Overflow Blog takes some time to reflect on the transition and points out that, while support for Python 2 from official channels may be gone, the language isn’t dead. In fact, there’s reason to believe it will live on for decades to come.
RYAN DONOVAN

New Features in Python 3.9 You Should Know About
Python 3.9 is scheduled for release on October 5, 2020, and it’s packed full of new goodies. Explore these new features in this overview by Martin Heinz, including new dict operators, updates to the math module, new string methods, a functools.ToplogicalSorter class, and more!
MARTIN HEINZ • Shared by Martin Heinz

Scout APM for Python
Check out Scout’s developer-friendly application performance monitoring solution for Python. Scout continually tracks down N+1 database queries, sources of memory bloat, performance abnormalities, and more. Get back to coding with Scout →
SCOUT APMsponsor

The Python pickle Module: How to Persist Objects in Python
In this tutorial, you’ll learn how you can use the Python pickle module to convert your objects into a stream of bytes that can be saved to a disk or sent over a network. You’ll also learn the security implications of using this process on objects from an untrusted source.
REAL PYTHON

Collecting Questions for a Steering Council Q&A
As part of PyCon US 2020, the Python Steering Council will record a Q&A. They are soliciting questions from the community, so here’s your chance to get your burning questions answered!
PYTHON.ORG

Structuring a Python Application (Common Layouts)
This course is a reference guide to common Python application layouts and project structures for command-line applications, web applications, and more.
REAL PYTHON course


Discussions


Dealing With Failure
It’s not that professional programmers never fail. They’ve just learned how to deal with failure and recover from it—most of the time, anyway. What coping mechanisms have you come up with?
REDDIT

I’m Committed to 1 Year of Coding in Python. What Goals Can I Set for Myself Along the Way?
Lots of great advice for new Python programmers in this thread!
REDDIT


Python Jobs


Senior Python Engineer (Remote - US East Coast)
ENTERRA SOLUTIONS

Senior Software Engineer Docker/Go/Python (Austin, TX)
CYBERCODERS

Software Engineer - Python, Docker, AWS (Remote)
TECHNOLOGY NAVIGATORS

More Python Jobs >>>


Articles & Tutorials


Numbers in Python
Quick quiz: how many numeric data types are there in Python? If you answered “two, duh” then you might be surprised to learn that there are actually four! In addition to int and float, the fractions and decimal standard library modules implement data types used to represent fraction and decimal numbers exactly. Learn about all of Python’s numeric data types, their strengths and weakness, and how to choose the right one in this short-but-informative article from Moshe Zadka.
MOSHE ZADKA

Building on Solid Ground: Ensuring Reproducible Docker Builds for Python
Docker is a popular tool for distributing applications bundled with their environments. It’s often sold as a cure to the “it worked on my machine” conundrum, but you’re not alone if you’ve found this to be a bit oversold. The issue isn’t with Docker, though. Chances are your images aren’t completely reproducible. In this tutorial, you’ll learn some best practices for creating reproducible Docker builds.
ITAMAR TURNER-TRAURING

How to Convert .py to .exe
You’ve just created a Python project, but how can you easily distribute it as a one-click file? Fortunately, there are Python utilities that help convert files to .exe. Check out ActiveState’s tutorial that steps you through how to create an executable for your Python script →
ACTIVESTATEsponsor

Working With Warnings in Python (Or: When Is an Exception Not an Exception?)
Imagine you’re maintaining an open-source Python package and you’re going to release a new version with breaking changes. You warn users about those changes in documentation and even blast the info on social media channels. But wouldn’t it be great if you could warn users right in their terminal as their using your tool? Well, with Python’s warnings module, you can! How are warnings different from Python exceptions? Learn how to send and filter warnings, and why you would want to do so.
RUEVEN LERNER

Best Practices for Working With Configuration in Python Applications
Users love being able to configure an application. But dealing with user configuration means parsing untrusted input, validating that input, and figuring out how to access it safely in all the layers of your applications. Python has a rich configuration ecosystem. Lots of articles focus on how to use various configuration formats in your Python programs but skip out on the finer details of how and when configuration should be validated. This tutorial fills in some of those gaps.
TOBIAS PFEIFFER

Introduction to Python Sets
Have you heard about Python’s set data type? A set is an unordered collection of distinct objects that support fast membership tests and can be used to remove duplicates from a sequence. Learn all about this handy data type in this beginner-friendly article from Mike Driscoll.
MIKE DRISCOLL

The Pandas DataFrame: Make Working With Data Delightful
In this tutorial, you’ll get started with Pandas DataFrames, which are powerful and widely used two-dimensional data structures. You’ll learn how to perform basic operations with data, handle missing values, work with time-series data, and visualize data from a Pandas DataFrame.
REAL PYTHON

Rate Limiting Using Python and Redis
This article explores rate limiting algorithms using Python and Redis, starting from a naive approach and culminate at an advanced one called Generic Cell Rate Algorithm (GCRA).
ANDREA STAGI • Shared by Andrea Stagi

Verifying a DKIM-Signature by Hand
“We take an email and verify the the DKIM-Signature step by step using Python. We also take care about the signing itself (RSA). Source code included.”
GITHUB.COM/KMILLE

Create a Correlation Matrix in Python With NumPy and Pandas
In this tutorial, you’ll learn how to create a correlation matrix in Python with NumPy and Pandas. Plus upper & lower triangular (tables).
ERIK MARSJA

Continuously Deploying Django to AWS EC2 with Docker and GitLab
MICHAEL HERMAN • Shared by Michael Herman

Roll Your Own Class-Based Views in Django
JAMES TIMMINS • Shared by James Timmins

Create Your Own File Comparison Tool Using Python’s difflib
FLORIAN DAHLITZ • Shared by Florian Dahlitz

The Curious Case of Python’s Context Manager
REDOWAN DELOWAR • Shared by Redowan Delowar


Projects & Code


flpc: Forth Lisp Python Continuum
GITHUB.COM/ASRP

astropy: A Common Core Package for Astronomy in Python
GITHUB.COM/ASTROPY

twitter-ticker-tape: Raspberry Pi Project to Read Tweets via Receipt Printer
GITHUB.COM/HEALEYCODES

BentoML: Model Serving Made Easy
GITHUB.COM/BENTOML

taichi: Language for Portable, High-Performance, Sparse & Differentiable Computing
GITHUB.COM/TAICHI-DEV

LibreLingo: Community Driven Language-Learning Platform
GITHUB.COM/KANTORD

3d-photo-inpainting: 3D Photography Using Context-Aware Layered Depth Inpainting
GITHUB.COM/VT-VL-LAB

📆🐍 Upcoming Python Events


⋅ Montréal-Python Online Hackathon May 1st to May 3rd, 2020
Happy Pythoning!
Copyright © 2020 PyCoder’s Weekly, All rights reserved.