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 Bug label Nov 17, 2019
@kasteph kasteph added this to the 1.0 milestone Nov 17, 2019
@kasteph kasteph requested review from sdispater and finswimmer Nov 17, 2019
Copy link
Member

@sdispater sdispater left a comment

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

@sdispater sdispater Nov 18, 2019

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

@kasteph kasteph Jan 6, 2020

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

Looks good to me 👍 Thanks!

@sdispater sdispater merged commit c401850 into master Jan 7, 2020
32 checks passed
@sdispater sdispater added this to Closed in Bugs via automation Jan 7, 2020
@sdispater sdispater deleted the bug/wildcards branch Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug
Projects
Bugs
  
Closed
Development

Successfully merging this pull request may close these issues.

2 participants