Skip to content

Comments

Add linehaul telemetry data to User-Agent header for PyPI statistics#2184

Open
guillermodotn wants to merge 1 commit intopypa:masterfrom
guillermodotn:dev
Open

Add linehaul telemetry data to User-Agent header for PyPI statistics#2184
guillermodotn wants to merge 1 commit intopypa:masterfrom
guillermodotn:dev

Conversation

@guillermodotn
Copy link

Summary

Adds linehaul-compatible platform metadata to the User-Agent header sent during hatch publish.

Closes #2111

Design decisions

  • Separate CI detection for linehaul vs CLI: linehaul._looks_like_ci() uses existence-based env var checks (matching pip), while the existing ci.running_in_ci() keeps its stricter value-based check for CLI interactive mode.
  • distro is lazy-imported inside the Linux-only code path and declared as a platform-conditional dependency.
  • Result is cached with @lru_cache since platform data is constant for the process lifetime.
  • setuptools_version/rustc_version fields are omitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support linehaul data in user agent

1 participant