INFRA Signal 543
Trey Hunner urges Python developers to replace string paths with pathlib
Illustration only Photo by Matt Artz on Unsplash
At PyCon US 2026, Trey Hunner argued that Python developers should stop representing filesystem paths as strings and use pathlib instead, though string-based paths remain pervasive among longtime users.
String-based path handling has been the default in Python for years and continues to work for most use cases, creating significant inertia against adopting a different abstraction. The talk highlights an ongoing tension in the Python community between established practices that function adequately and newer approaches that may offer cleaner patterns.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
Trey Hunner presented at PyCon US 2026 advocating for pathlib over string-based path representation.
String-based paths remain pervasive in Python and continue to work for most use cases.
Shifting longtime Python users away from string-based paths is described as a significant challenge.
THE CLUSTER