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

packages: unify python project check #377

Merged
merged 2 commits into from
May 31, 2022

Conversation

abn
Copy link
Member

@abn abn commented May 26, 2022

Following up from #368 in relation to python-poetry/poetry#5692

Seems we were only checking for setup.py when determining if a relative path dependency was installable.

@abn abn requested a review from a team May 26, 2022 13:55
@abn abn marked this pull request as draft May 26, 2022 13:59
@abn abn force-pushed the unifiy-python-project-check branch from c5350b2 to 70ad2cc Compare May 26, 2022 14:07
@abn abn marked this pull request as ready for review May 26, 2022 14:07
tests/packages/utils/test_utils.py Outdated Show resolved Hide resolved
def is_installable_dir(path: str) -> bool:
"""Return True if `path` is a directory containing a setup.py file."""
if not os.path.isdir(path):
@functools.lru_cache(maxsize=None)
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious how much of a hot path this is/if caching is a significant benefit here?

Copy link
Member Author

Choose a reason for hiding this comment

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

My thinking is this is called every time a dir dependency gets cloned, this happens a few times during resolution. And since this requires IO figured it can't hurt.

Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
@sonarcloud
Copy link

sonarcloud bot commented May 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@neersighted neersighted merged commit b026aab into python-poetry:main May 31, 2022
@abn abn deleted the unifiy-python-project-check branch May 31, 2022 22:39
@radoering radoering mentioned this pull request Jul 9, 2022
bostonrwalker pushed a commit to bostonrwalker/poetry-core that referenced this pull request Aug 29, 2022
Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
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