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

Handle nested wildcards in package includes correctly. Fixes: #1379. #1592

Merged
merged 2 commits into from
Jan 7, 2020

Conversation

kasteph
Copy link
Member

@kasteph kasteph commented Nov 17, 2019

Pull Request Check List

  • Added tests for changed code.

This PR fixes #1379. I've also added some unit tests for PackageInclude.

@kasteph kasteph added the kind/bug Something isn't working as expected label Nov 17, 2019
@kasteph kasteph added this to the 1.0 milestone Nov 17, 2019
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.

Thanks for your first contribution! :-)

Overall great job 👍 However, we need tests for this use case in the sdist builders because I think they will fail since we check for the presence of an __init__.py file in one other place: https://github.com/sdispater/poetry/blob/master/poetry/masonry/builders/sdist.py#L237

root = self._elements[0]
if root.name != "__init__.py":
Copy link
Member

Choose a reason for hiding this comment

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

I think we can change this line to check if there is at least one Python file, regardless of whether it's a __init__.py file or not. If there is no Python file, it's not a package and we should raise the exception.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I've also added it now in commit 1d0e99d.

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 👍 Thanks!

@sdispater sdispater merged commit c401850 into master Jan 7, 2020
@sdispater sdispater deleted the bug/wildcards branch January 7, 2020 19:52
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
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tool.poetry.packages handles wildcards * and ** incorrectly in pyproject.toml
2 participants