Skip to content

fix(backend): resolve dotted backend object paths - #318

Closed
repzakske wants to merge 1 commit into
tox-dev:mainfrom
repzakske:fix/dotted-backend-objects
Closed

repzakske wants to merge 1 commit into
tox-dev:mainfrom
repzakske:fix/dotted-backend-objects

Conversation

@repzakske

Copy link
Copy Markdown
Contributor

build-backend = "build.api:holder.backend" is valid under PEP 517, whose object_path grammar permits multiple attribute components. Currently the backend performs one getattr with the whole object path, so startup fails with AttributeError: module 'build.api' has no attribute 'holder.backend'.

Resolve the object path one component at a time. Extend the existing subprocess integration test with nested and deeply nested backend objects, retain the existing single-object cases, and assert the exact returned requirements. The two nested cases fail on unmodified main and pass with this fix.

Validation on Windows:

  • Full suite: 83 tests pass, with 100% line and branch coverage, on Python 3.11.16, 3.14.8, and 3.15.0 (using coverage's C tracer).
  • pre-commit run --all-files --show-diff-on-failure passes.
  • ty check --output-format concise --error-on-warning . passes.

@gaborbernat

Copy link
Copy Markdown
Member

Superseded by #319, which keeps your commit and adds test ids. This branch doesn't allow maintainer edits, so I couldn't push there. Thanks!

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.

2 participants