Skip to content

Commit

Permalink
Go back to defaulting to exact
Browse files Browse the repository at this point in the history
We should probably default to the safest behavior, given that the purpose of a tool like Pants is correctness.

This also avoids making a breaking API change.

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
Eric-Arellano committed Oct 16, 2020
1 parent 407e1c8 commit 1fa0e48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/python/pants/backend/python/goals/setup_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def register_options(cls, register):
register(
"--first-party-dependency-version-scheme",
type=FirstPartyDependencyVersionScheme,
default=FirstPartyDependencyVersionScheme.COMPATIBLE,
default=FirstPartyDependencyVersionScheme.EXACT,
help=(
"What version to set in `install_requires` when a `python_distribution` depends on "
"other `python_distribution`s. If `exact`, will use `==`. If `compatible`, will "
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/backend/python/goals/setup_py_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def test_generate_chroot(chroot_rule_runner: RuleRunner) -> None:
"packages": ("foo", "foo.qux"),
"namespace_packages": ("foo",),
"package_data": {"foo": ("resources/js/code.js",)},
"install_requires": ("baz~=1.1.1",),
"install_requires": ("baz==1.1.1",),
"entry_points": {"console_scripts": ["foo_main=foo.qux.bin"]},
},
"src/python/foo:foo-dist",
Expand Down

0 comments on commit 1fa0e48

Please sign in to comment.