petl v1.7.22 was published on July 29, 2026. It fixes an instance attribute named header that shadowed the Table.header() method across table views, restoring a consistent method interface for pipelines that inspect table headers.
The full release notes and downloads are on the GitHub release page.
The header method collision ¶
The release contains one listed code change: a fix for header instance attribute shadowing across views. In Python attribute lookup, an instance attribute can hide a method with the same name. Code expecting Table.header() to be callable can therefore receive the stored header value instead of the method defined by the table interface.
That is a small naming conflict with a direct effect at an API boundary. Header inspection often sits close to validation, field selection, mapping, and output setup. A view that presents the wrong member under header can break code before row processing begins, even when the source data and transformation logic are valid.
The fix is tracked in pull request 704. The notes describe the scope as views in general. They do not identify individual view classes, input formats, or output adapters, so it would be unsafe to claim that only one pipeline shape was affected.
What matters for ETL code ¶
The practical concern is interface consistency. A pipeline may construct several lazy table views and treat each one through the common Table API. If one view exposes header as data while another exposes header() as a method, generic validation code has to handle an implementation detail that should remain behind the view boundary.
Version v1.7.22 removes that collision according to the release notes. This matters most for code that calls header() on derived views, shared helpers that accept different view types, and tests that verify schema information before consuming rows. Pipelines that never call the method may not have observed the defect, but the corrected attribute layout still makes behavior more predictable for future maintenance.
No new transform, connector, serialization format, or command line option is listed for this release. There are also no performance claims in the notes. Treat v1.7.22 as a focused correctness release, not as a broader change to petl execution or data semantics.
Upgrade scope and verification ¶
The release notes list no breaking changes and no migration procedure. For an upgrade, the useful regression check is direct: exercise Table.header() on the view types used by the pipeline, then run the existing schema validation and row processing tests. This targets the repaired boundary without assuming behavior that the notes do not document.
Teams carrying a local workaround should review it after upgrading. For example, code that reads a header attribute specifically to avoid calling the shadowed method may preserve the old ambiguity. Confirm the expected access pattern against v1.7.22 before removing compatibility code.
Because the published notes contain only this fix, the operational change surface is narrow. That also limits what can be concluded from the announcement. There is no stated schema migration, persisted state change, or configuration update. The v1.7.22 release page remains the source for the packaged release and its concise change record.
Where to get it ¶
- Release: petl v1.7.22
- Repository: petl on GitHub
- Tag:
v1.7.22