You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new source: configuration supports explicit hook-backed profiles:
source:
provider: hook-sdist
and:
source:
provider: hook-prebuilt
These profiles allow packages with custom resolution logic to opt into the new source configuration while continuing to use the existing get_resolver_provider package
hook.
The resolver models and PackageBuildInfo.source_resolver property are now available, but AbstractHookResolver.resolver_provider() still raises NotImplementedError. Once resolution dispatch from #1292 is enabled, packages using either hook-backed profile will select the new path but fail before their existing resolver hook can run.
This makes the documented hook profiles unusable and leaves the new source configuration incomplete.
This work belongs to the source configuration epic #1254.
Implementation pointers
Delegate to the existing get_resolver_provider package override hook.
Preserve compatibility with existing hook arguments, including:
ctx
req
include_sdists
include_wheels
sdist_server_url
req_type
ignore_platform
Let each profile express its intended artifact type:
hook-sdist for source artifacts.
hook-prebuilt for pre-built wheels.
If a package selects a hook-backed profile but does not provide the required hook, raise a clear, actionable error.
Do not silently fall back to the default PyPI provider.
Preserve the existing behavior for packages that do not configure source:.
Why this is needed
The new source: configuration supports explicit hook-backed profiles:
and:
These profiles allow packages with custom resolution logic to opt into the new source configuration while continuing to use the existing get_resolver_provider package
hook.
The resolver models and PackageBuildInfo.source_resolver property are now available, but AbstractHookResolver.resolver_provider() still raises NotImplementedError. Once resolution dispatch from #1292 is enabled, packages using either hook-backed profile will select the new path but fail before their existing resolver hook can run.
This makes the documented hook profiles unusable and leaves the new source configuration incomplete.
This work belongs to the source configuration epic #1254.
Implementation pointers
Delegate to the existing get_resolver_provider package override hook.
Preserve compatibility with existing hook arguments, including:
Let each profile express its intended artifact type:
If a package selects a hook-backed profile but does not provide the required hook, raise a clear, actionable error.
Do not silently fall back to the default PyPI provider.
Preserve the existing behavior for packages that do not configure source:.
Coordinate cooldown behavior with New source config cooldown path has gaps compared to legacy resolve_package_cooldown() #1252 so providers are not configured twice.
This issue should focus on creating resolver providers. Artifact downloading is handled separately by #1293.
Tests
Add tests covering:
Related issues
source_resolverdispatch to resolution pipeline #1292source_resolverdispatch to download pipeline #1293