Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inspection: use pep517 metadata build #2632

Merged
merged 2 commits into from
Jul 24, 2020

Conversation

abn
Copy link
Member

@abn abn commented Jul 4, 2020

This change replaces setup.py execution in favour of pep517 metadata builds. The proposed approach executes pep517.meta.build instead of python setup.py egg_info.

This does not change the order of preference in the inspection flow for execution vs AST parsing. A build is only perfromed in cases where existing metadata inspection, SetupReader parsing etc returns an incomplete/unusable PackageInfo instance or raises PackageInfoError.

The original proposal was made in #2296 by @finswimmer.

Closes: #2296
Resolves: #1900

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

@abn abn requested a review from a team July 4, 2020 01:47
@abn abn force-pushed the improve-inspection-info branch from f23b52d to 3c5d98f Compare July 4, 2020 13:50
@abn abn marked this pull request as ready for review July 4, 2020 14:02
poetry/inspection/info.py Outdated Show resolved Hide resolved
@abn abn force-pushed the improve-inspection-info branch from 3c5d98f to d82962b Compare July 10, 2020 13:22
@abn abn requested a review from sdispater July 10, 2020 13:24
@abn abn force-pushed the improve-inspection-info branch 4 times, most recently from 37961b7 to 4a2712d Compare July 10, 2020 21:44
@abn
Copy link
Member Author

abn commented Jul 21, 2020

@sdispater bumping this once again with the proposed changes addressing your concerns

@abn abn changed the base branch from develop to master July 24, 2020 10:34
This change replaces setup.py explicit execution in favour of pep517
metadata builds.

In addition to improving handling of PEP 517 metadata builds, error
handling when reading setup files have also been improved.
@abn abn force-pushed the improve-inspection-info branch from 4a2712d to 4250a5f Compare July 24, 2020 11:13
Copy link
Member

@sdispater sdispater left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@abn abn merged commit f57d22e into python-poetry:master Jul 24, 2020
@abn abn deleted the improve-inspection-info branch July 24, 2020 14:47
@sdispater sdispater mentioned this pull request Jul 24, 2020
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'BinOp' object has no attribute 's' when trying to add a git dependency with poetry
2 participants