Skip to main content

Venerable Pythons, Pants, Pip, and Ecosystems

· 2 min read
Chris Burroughs
Pants Maintainer

The Python development community concurrently supports multiple version of the Python programming language. These are in various states such as "prerelease", "bugfix", "security", or "end-of-life". For example version 3.12 is currently in "bugfix" while 3.8 is the oldest still receiving security updates. The cadence of future release is currently governed by PEP 602 – Annual Release Cycle for Python

Building Linux/x64 containers on OS X on Apple Silicon with Pants

· 3 min read
Alex Kouzemtchenko
CTO & Founder at Espresso AI

Espresso AI started as a primarily Linux shop, but as we've added more developers on OS X we've needed a way to build docker containers on OS X that are compatible with our Linux production environment.

Pants has supported running portions of the build in docker containers for a while, but the exact configuration is a little tricky, particularly if you want to build x86_64 containers on Apple ARM processors.

Announcing Klaviyo's Sponsorship

· 2 min read
Greg Niemann
Lead Site Reliability Engineer at Klaviyo

Today we are excited to announce that Klaviyo has become the first Platinum sponsor of the Pants project via the corporate sponsorship program! This is one of the first such sponsorships through our new Open Source Sponsorship program, through which we are trying to support the open source projects we depend on. While the core development and maintenance of Pants is volunteer driven, there are costs involved with maintaining and distributing such a large piece of software, costs which far too often are covered by individual volunteers. We benefit enormously from this project and want to help contribute to its ongoing success.

Pants 2.21.0 is released!

· 2 min read
Chris Burroughs
Pants Maintainer

We are pleased to announce Pants 2.21.0, the latest release of Pantsbuild, the scalable and ergonomic build system. To update, set pants_version = "2.21.0" in your pants.toml. If you're not using Pants yet, get started now.

Highlights in 2.21 include:

  • 🧪 All backends now support [test].attempts_default
  • ⚡ Pants internal manipulation of Python dependencies by way of Pex is now substantially faster in many cases.
  • 📜 The __defaults__ symbol will now set default values for generated targets too. For instance, __defaults__({python_source: dict(skip_black=True)}) will now apply to the python_source targets generated by a python_sources target, without having to write __defaults__({(python_source, python_sources): ...})
  • ♻ When running in CI, Pants will output a command to rerun only the failed tests.
  • 🐍 All built in lockfiles are now Python 3.12 ready.
  • 🚡 As part of regenerating lockfiles for Python 3.12, the default version of most builtin Python tools has been updated.
  • 🐳 The cache_from field on docker_image now supports multiple values.
  • 🏜 The experimental-deploy goal now has built-in support for the --dry-run option.
  • 🪜 Scalafix can now be run by Pants using the new pants.backend.experimental.scala.lint.scalafix backend.
  • 📈 And lots of smaller features, update, bugfixes, and general improvements

Pants 2.20.0 is released!

· 2 min read
Chris Burroughs
Pants Maintainer

We are pleased to announce Pants 2.20.0, the latest release of Pantsbuild, the scalable and ergonomic build system. To update, set pants_version = "2.20.0" in your pants.toml. If you're not using Pants yet, get started now.

Highlights in 2.20 include:

Pants 2.19.0 is released!

· 4 min read
Tom Solberg
Pants Maintainer (and plugin developer)

Photo by Erol Ahmed / Unsplash

We're pleased to announce Pants 2.19.0, the latest release of Pantsbuild, the scalable and ergonomic build system. To update, set pants_version = "2.19.0" in your pants.toml. If you're not using Pants yet, get started now.

Highlights in 2.19 include:

  • New backends: semgrep and openapi-format
  • Test retries for flaky Python tests
  • buildx support in the Docker backend
  • Using parametrize to set multiple fields in tandem
  • And lots of smaller features, bugfixes, and general improvements

Two hermetic Pythons

· 3 min read
Joshua Cannon
Pants Maintainer

Make builds more reliable and save time doing so. The upcoming Pants 2.16 introduces a couple of exciting changes to make Pants safer, faster, and more user-friendly. Here we preview a pair of changes which increase hermeticity.

Pants 2.15: Easier multi-platform workflows, Docker build support, automatic code cleanup, and more!

· 7 min read
Christopher Neugebauer
Pants Maintainer

"Blue Bill Duck" by Richard Ashurst licensed under CC BY 2.0

The 2.15 series represents the biggest change to Pants since version 2.0, and we're excited to share how it can let you complete more workflows, more easily, in more places. Including cross-platform builds, containerized builds with Docker, and easier configuration for local builds…

How we get quick feedback on new features via "experimental" backends

· 4 min read
Benjy Weinberger
Pants Co-creator and Maintainer

Image by NTNU, Faculty of Natural Sciences (license)

Pants balances release velocity and end-user stability via judicious use of deprecation cycles. Experimental backends are a way to get quick feedback on new functionality, before "graduating" it to the formal deprecation policy. Experimental features are still well-supported, and not to be feared!

Dependency inference: Pants's special sauce

· 10 min read
Benjy Weinberger
Pants Co-creator and Maintainer

Unlike earlier build systems, Pants v2 automatically infers your code's internal and external dependencies. And it does this at the file level, so that you get optimal invalidation, caching, and concurrency performance without having to manually create and maintain mountains of BUILD file metadata.

Pants 2.14: Less boilerplate, more Rust, better support for Go monorepos, interactive debugging support, and more!

· 6 min read
Stu Hood
Pants Maintainer

Highlights include: less boilerplate via hierarchical defaults for target field values, better Golang monorepo support, with multiple go.mods, do more of your workflows in Pants with the experimental deploy goal (with initial support for Helm), and much more…

Pants 2.13: Easier at the command line, easier parallel execution in CI, Kotlin support, and better Python and JVM support!

· 6 min read
Christopher Neugebauer
Pants Maintainer

We're pleased to announce Pants 2.13.0. Highlights include better command line arguments for file sets, improved JVM support, easier access to parallel execution in CI, and lower barriers to adoption for Python projects that currently use existing distribution and build tools.

Optimizing Python + Docker deploys using Pants

· 8 min read
Joshua Cannon
Pants Maintainer

The Python and Docker logos, with a plus sign between them

Pants can build a PEX file, an executable zip file containing your Python code and all transitive dependencies. Deploying your application is as simple as copying the file. This post elaborates on how to get best performance out of the powerful combination of Pants+PEX+Docker.

Effective monorepos with Pants

· 8 min read
Benjy Weinberger
Pants Co-creator and Maintainer

Image by Markus Spiske / CC0 1.0

Working effectively in a monorepo requires appropriate tooling. While Pants can be a really useful system in repos of all sizes and architectures, it has some features that make it particularly appealing in a monorepo setting…

Poetry support for Pants 2.6

· 5 min read

Pants 2.6 can now understand Poetry's pyproject.toml configuration for third-party dependency management, addressing one of our most requested features in the last year!

Pants Contributor Liam Wilson delves into this new feature as well as his experiences developing the macro as a Toolchain intern.

Introducing Pants v2

· 9 min read
Benjy Weinberger
Pants Co-creator and Maintainer

There are so many tools in the Python development ecosystem. Installing, configuring and orchestrating them—all while not re-executing work unnecessarily—is a hard problem, especially as your codebase grows.

Fortunately, there is now a tailor-made (pun intended) solution: Pants v2!