Skip to content

packages: unify python project check#377

Merged
neersighted merged 2 commits intopython-poetry:mainfrom
abn:unifiy-python-project-check
May 31, 2022
Merged

packages: unify python project check#377
neersighted merged 2 commits intopython-poetry:mainfrom
abn:unifiy-python-project-check

Conversation

@abn
Copy link
Copy Markdown
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
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
Copy Markdown
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
Copy Markdown
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.

@sonarqubecloud
Copy link
Copy Markdown

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
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