Skip to content

Comments

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

Merged
sdispater merged 2 commits intomasterfrom
bug/wildcards
Jan 7, 2020
Merged

Handle nested wildcards in package includes correctly. Fixes: #1379.#1592
sdispater merged 2 commits intomasterfrom
bug/wildcards

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

# The __init__.py file should be first
# Packages no longer need an __init__.py in python3
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
@github-actions
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