-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Feature] An explicitly specified prerelease package should install without requiring install-prerelease #4243
Comments
Yes, we should absolutely do this! I was afraid the logic here would be pretty gnarly, but after a quick dive in, it's much simpler than I thought: dbt-core/core/dbt/deps/registry.py Lines 130 to 133 in 2241698
Becomes: # if any prelease version is explicitly specified in any way,
# assume we're good to use prereleases for this package
prerelease_version_specified = any(
bool(version.prerelease) for version in self.versions
)
installable = semver.filter_installable(
available,
self.install_prerelease or prerelease_version_specified
) This would have the effect of supporting both of the following: packages:
- package: dbt-labs/dbt_utils
version: 0.7.4-b1 packages:
- package: dbt-labs/dbt_utils
version: [">=0.7.4-b1", "<0.7.5"]
I'd welcome a PR for this! A larger question: to what extent should we try to follow PEP 404 to the letter? (I stumbled across some interesting related conversation here: pypa/pip#5503). Namely:
|
I don't have strong feelings on this. Two options:
|
Is there an existing feature request for this?
Describe the Feature
I opened #4224 because I tried to install a prerelease version of dbt utils without the
install-prerelease: True
setting:Requesting a prerelease package by name should be enough to trigger its installation.
Describe alternatives you've considered
No response
Who will this benefit?
Test drivers of beta packages
Are you interested in contributing this feature?
Only if no one else beats me to it
Anything else?
A potential extra for experts detailed here is to also add a
--pre
subcommand todbt deps
which behaves likepip install x --pre
and installs prerelease versions of all first-order packages (i.e. not if you're getting dbt-utils by dependency instead of a direct reference).The text was updated successfully, but these errors were encountered: