Skip to content

Remove unused build environment interpolation and expandvars - #294

Open
f321x wants to merge 1 commit into
aio-libs:masterfrom
f321x:remove-unused-expandvars
Open

Remove unused build environment interpolation and expandvars#294
f321x wants to merge 1 commit into
aio-libs:masterfrom
f321x:remove-unused-expandvars

Conversation

@f321x

@f321x f321x commented Sep 11, 2026

Copy link
Copy Markdown

What do these changes do?

Remove the unused environment interpolation configuration from the Cython build backend and drop the expandvars build dependency. Preserve compiler flags supplied through the environment, Cython tracing, and reproducible build flags.

Are there changes in behavior for the user?

Source builds no longer need expandvars. The library's runtime behavior is unchanged.

Related issue number

None.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist (N/A; validated with the existing suites)
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES/ folder

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label Sep 11, 2026
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown

Confidence Score: 4/5

Not safe to merge until the repository-required regression coverage for the changed build-environment behavior is added.

The final review contains one finding tied to an explicit repository requirement.

Files Needing Attention: Add or extend tests covering the behavior changed in packaging/pep517_backend/_cython_configuration.py.

Reviews (1): Last reviewed commit: "Remove unused build environment interpol..." | Re-trigger Greptile

Comment on lines 100 to 110
def patched_env(
env: dict[str, str],
cython_line_tracing_requested: bool,
*,
original_source_directory: Path | None = None,
temporary_build_directory: Path | None = None,
) -> Iterator[None]:
"""Temporary set given env vars.

:param env: tmp env vars to set
:type env: dict
"""Temporarily adjust compiler flags for Cython builds.

:yields: None
"""
orig_env = os.environ.copy()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing build regression test

This changes the Cython build environment by removing configured environment interpolation, but adds no coverage for the remaining compiler-flag handling and environment restoration. The repository directive requires changed behavior to be covered by an added or extended test. Add coverage for caller-provided CFLAGS, tracing flags, reproducible-build flags, and restoration of the original environment; this repository requirement must be satisfied before merging.

Context Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@codspeed-hq

codspeed-hq Bot commented Sep 11, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing f321x:remove-unused-expandvars (4c1ab67) with master (448e79c)

Open in CodSpeed

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Motivation? This would have to be in sync with the upstream copy @ ansible-pylibssh at all times so it's easy to share updates using diff.

@f321x

f321x commented Sep 11, 2026

Copy link
Copy Markdown
Author

See discussion in aio-libs/yarl#1879

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

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants