question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ability to specify package sources that are not scanned/used by default

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

When specifying additional sources in pyproject.toml as “secondary”, the current behavior of Poetry is to include this source in all of it’s scans for dependency resolution for adding or installing packages. This is almost entirely unnecessary in many cases, as a secondary source is normally only needed to install very specific packages and would not normally host any other packages from pypi (and if they do, it’s likely not “secondary” then but “default”.)

Since this behavior is already defined, I’d like to propose a third option, targeted which specifies that a source should be used only if a dependency definition explicitly specifies it in it’s source parameter. That package’s dependencies would be scanned from that repository, but it would be otherwise ignored.

One specific reason that this is desperately needed is that in several of my corporate projects, we use Azure DevOps artifacts system private PyPI. This system is notoriously slow and a small project’s dependency resolution scan take upwards of 10 minutes with Poetry scanning it for every single project dependency. To mitigate this, we currently force source="pypi" in all dependency specifications to target it specifically.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:18
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
zevisertcommented, Oct 7, 2021

I’d really love to move this feature forward! Every time I need to update packages at work I have to sit there watching poetry 1.1.11 take 300+ seconds in most of our projects to resolve dependencies is annoying when I think I have a PR I have can do it in less than 15…

I just heard about @python-poetry/triage Hi! 👋

2reactions
IWillPullcommented, Jun 16, 2022

I’m also experiencing it and having builds take 30+ minutes longer when using one secondary dependency sounds more like a bug, not a feature request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Package Source Mapping | Microsoft Learn
Following your source declarations, add a <packageSourceMapping> element that specifies the desired mappings for each source. Declare exactly ...
Read more >
Default package source for NuGet defaulting to newly added ...
Can anyone tell me how to default to All instead of having it always default to Internal nuget? To my knowledge, the default...
Read more >
Missing default nuget package source - Visual Studio Feedback
Developer Community. Your open channel to Microsoft engineering teams. Select a page .
Read more >
NuGet Repositories - JFrog - JFrog Documentation
Metadata calculation for NuGet packages hosted in Artifactory's local repositories; The ability to define proxies and caches to access Remote ...
Read more >
Managing Activities Packages - UiPath Documentation Portal
User defined and default package sources can be enabled or disabled from the Manage ... the Package Manager is not able to load...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found