Associate dependency with source
See original GitHub issueI have two entries in my pyproject.toml of the following form.
dependencies = [
...
"internal-package~=1.0",
]
[[tool.pdm.source]]
url = "https://gitlab.company.com/api/v4/projects/309/packages/pypi/simple"
verify_ssl = true
name = "custom-packages-1"
This possibly causes a name collision issue if somebody uploads a package called internal-package
to pypi: (will pdm use the package from pypi or from my custom source?
It also appears to slow down pdm, as I presume pdm is searching for requests, pandas etc. in my custom source instead of only on pypi.
Both of these issues could be solved if there were a way to associate a particular dependency with a particular source.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:16 (6 by maintainers)
Top Results From Across the Web
How to better manage dependencies with artifact repositories
Learn how to automate key dependency management tasks by combining an artifact repository with the ActiveState Platform.
Read more >Source Dependency - an overview | ScienceDirect Topics
The network dependency model accurately defines fine-grained dependencies between the various network components. Given that service nodes comprise agents and ...
Read more >Aggregating Javadocs from Dependency Sources
Dependency-driven javadoc aggregation works by resolving the sources for included dependencies, then including these sources in the javadoc ...
Read more >Difference between association and dependency?
A dependency typically (but not always) implies that an object accepts another object as a method parameter, instantiates, or uses another object.
Read more >How to manage build dependencies - IBM
So there is an indirect build dependency between the program source and the ... the DependencyScanner checks to see whether the file is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ElijahSink Unfortunately the former, pip fetches candidates from all indexes and sorts them together to get the best match. We already have a plan to implement our own package finder to replace pip’s. So let’s leave it for this release and do improvements in the future.
Another mitigation for this dependency confusion issue is to follow some pattern for naming your internal packages, such as reducing the chances a public package uses the same name. Something like org-team-project-name. You’d have to keep this pattern and name private/hidden/secret of course (not public).