Skip to content

Commit

Permalink
Pin python-hcl2 to <4.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
purajit committed Aug 28, 2024
1 parent 00a0bd7 commit 70cef78
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions docs/notes/2.23.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ The `tfsec` linter now works on all supported platforms without extra config.

Sandboxes for the `experimental-deploy` deployment (the execution of `terraform apply`) can now be preserved with `--keep-sandboxes`.

[The `terraform-hcl2-parser` subsystem](https://www.pantsbuild.org/2.21/reference/subsystems/terraform-hcl2-parser) downgrades `python-hcl2` version back to 4.3.0 by default to avoid parsing issues introduced afterwards.

#### Javascript

The Node.js runtime now uses version 18.20.3 by default. This is a major version upgrade from the 16.x series, which was used before.
Expand Down
3 changes: 2 additions & 1 deletion src/python/pants/backend/terraform/dependency_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class TerraformHcl2Parser(PythonToolRequirementsBase):
options_scope = "terraform-hcl2-parser"
help_short = "Used to parse Terraform modules to infer their dependencies."

default_requirements = ["python-hcl2>=3.0.5,<5"]
# versions 4.3.2+ have parsing issues; bump once resolved
default_requirements = ["python-hcl2>=3.0.5,<=4.3.0"]

register_interpreter_constraints = True

Expand Down
16 changes: 8 additions & 8 deletions src/python/pants/backend/terraform/hcl2.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// "CPython<4,>=3.7"
// ],
// "generated_with_requirements": [
// "python-hcl2<5,>=3.0.5"
// "python-hcl2<=4.3.0,>=3.0.5"
// ],
// "manylinux": "manylinux2014",
// "requirement_constraints": [],
Expand Down Expand Up @@ -54,21 +54,21 @@
"artifacts": [
{
"algorithm": "sha256",
"hash": "e958fe52ca0519e3500eb621caa16be6be9c27870cbcd1879d8c538fb85067ea",
"url": "https://files.pythonhosted.org/packages/34/0a/39813c22334a22b43ffd16acb06aa4541ea1d34bfeab2aa2bcece83a471f/python_hcl2-4.3.2-py3-none-any.whl"
"hash": "6c76d1d523b6fb8ca6d1f70308459f310853e124c4bbfe9fcc018bcacdc78a40",
"url": "https://files.pythonhosted.org/packages/0d/58/32f70aa0d776a467472ee0077929e03d4febb681f6b564cec1d58c09d95b/python_hcl2-4.3.0-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "7122661438be27ccd8b8f3db71969d8ef2cce3b3cf183e88f8172575e7405a65",
"url": "https://files.pythonhosted.org/packages/ef/94/cc6f7100a857a5a4a676c2c71322ca476051278fad4ec956f0116c1d3834/python-hcl2-4.3.2.tar.gz"
"hash": "41e37e2a9b3d223da5e8ebc99e72b40d2315087e966f458f7eac13c7831d9b9e",
"url": "https://files.pythonhosted.org/packages/0b/8c/9c7858604212b25e040652fba3eb06514b363b857544f7321ca97185f001/python-hcl2-4.3.0.tar.gz"
}
],
"project_name": "python-hcl2",
"requires_dists": [
"lark<2,>=1"
],
"requires_python": ">=3.7.0",
"version": "4.3.2"
"version": "4.3.0"
}
],
"platform_tag": null
Expand All @@ -77,11 +77,11 @@
"only_builds": [],
"only_wheels": [],
"path_mappings": {},
"pex_version": "2.2.1",
"pex_version": "2.3.3",
"pip_version": "24.0",
"prefer_older_binary": false,
"requirements": [
"python-hcl2<5,>=3.0.5"
"python-hcl2<=4.3.0,>=3.0.5"
],
"requires_python": [
"<4,>=3.7"
Expand Down

0 comments on commit 70cef78

Please sign in to comment.