Skip to content

Commit

Permalink
Updated Pants and expanded Python constraint in Scie
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshjoshi committed Dec 18, 2024
1 parent 0ac34e9 commit ff26965
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pants-plugins/experimental/scie/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ python_distribution(
"Tracker": "https://github.com/sureshjoshi/pants-plugins/issues",
"Changelog": "https://github.com/sureshjoshi/pants-plugins/blob/main/pants-plugins/experimental/scie/CHANGELOG.md",
},
version="0.0.4",
version="0.0.5",
),
)
6 changes: 5 additions & 1 deletion pants-plugins/experimental/scie/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

## [Unreleased]

## [0.0.4] - 2024-05-09
## [0.0.5] - 2024-12-18

- Expanded `requires` to being greater than 3.9

## [0.0.4] - 2024-12-18

- Bumped `science` to 0.9.0
- No assertion on Python 3.12 or 3.13
Expand Down
8 changes: 6 additions & 2 deletions pants-plugins/experimental/scie/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ async def _get_interpreter_config(targets: Targets) -> Interpreter:
InterpreterConstraintsRequest([tgt.address for tgt in targets]),
)
# TODO: Pull the interpreter_universe from somewhere else (Python Build standalone?)
minimum_version = constraints.minimum_python_version(["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"])
assert minimum_version is not None, f"scie-plugin: No minimum python version found given py-{minimum_version}"
minimum_version = constraints.minimum_python_version(
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
)
assert (
minimum_version is not None
), f"scie-plugin: No minimum python version found given py-{minimum_version}"
# Create a toml configuration from the input targets and the minimum_version
return Interpreter(version=minimum_version)

Expand Down
8 changes: 4 additions & 4 deletions pants.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[GLOBAL]
pants_version = "2.21.0"
pants_version = "2.23.0"
pantsd = true
build_patterns = ["BUILD.pants", "BUILD"]
pythonpath = ["pants-plugins"]
print_stacktrace = true
plugins=["libcst==1.3.1"]
plugins=["libcst==1.4.0"]

backend_packages = [
"pants.backend.plugin_development",
Expand Down Expand Up @@ -44,15 +44,15 @@ root_patterns = [

[python]
enable_resolves = true
interpreter_constraints = ["==3.9.*"]
interpreter_constraints = [">=3.9"]
tailor_pex_binary_targets = false

[python.resolves]
pants-plugins = "build-support/lockfiles/pants-plugins.lock"
python-default = "build-support/lockfiles/python-default.lock"

[python.resolves_to_interpreter_constraints]
pants-plugins = [">=3.9,<3.10"]
pants-plugins = [">=3.9,<3.14"]

[bandit]
# Skipping assertion warnings - because this is an example project
Expand Down

0 comments on commit ff26965

Please sign in to comment.