Skip to content

Commit e8333d0

Browse files
authored
Merge branch 'main' into dependabot/cargo/src/rust/engine/async-trait-0.1.86
2 parents 746ab4f + cc0c044 commit e8333d0

File tree

46 files changed

+1153
-657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1153
-657
lines changed

.github/workflows/release.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,12 @@ jobs:
254254
go-version: 1.19.5
255255
- env:
256256
ARCHFLAGS: -arch x86_64
257+
_PYTHON_HOST_PLATFORM: macosx-13.0-x86_64
257258
name: Build wheels
258259
run: ./pants run src/python/pants_release/release.py -- build-wheels
259260
- env:
260261
ARCHFLAGS: -arch x86_64
262+
_PYTHON_HOST_PLATFORM: macosx-13.0-x86_64
261263
name: Build Pants PEX
262264
run: ./pants package src/python/pants:pants-pex
263265
- continue-on-error: true
@@ -351,10 +353,12 @@ jobs:
351353
go-version: 1.19.5
352354
- env:
353355
ARCHFLAGS: -arch arm64
356+
_PYTHON_HOST_PLATFORM: macosx-14.0-arm64
354357
name: Build wheels
355358
run: ./pants run src/python/pants_release/release.py -- build-wheels
356359
- env:
357360
ARCHFLAGS: -arch arm64
361+
_PYTHON_HOST_PLATFORM: macosx-14.0-arm64
358362
name: Build Pants PEX
359363
run: ./pants package src/python/pants:pants-pex
360364
- continue-on-error: true

.github/workflows/test.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -532,10 +532,12 @@ jobs:
532532
go-version: 1.19.5
533533
- env:
534534
ARCHFLAGS: -arch x86_64
535+
_PYTHON_HOST_PLATFORM: macosx-13.0-x86_64
535536
name: Build wheels
536537
run: ./pants run src/python/pants_release/release.py -- build-wheels
537538
- env:
538539
ARCHFLAGS: -arch x86_64
540+
_PYTHON_HOST_PLATFORM: macosx-13.0-x86_64
539541
name: Build Pants PEX
540542
run: ./pants package src/python/pants:pants-pex
541543
- continue-on-error: true
@@ -612,10 +614,12 @@ jobs:
612614
go-version: 1.19.5
613615
- env:
614616
ARCHFLAGS: -arch arm64
617+
_PYTHON_HOST_PLATFORM: macosx-14.0-arm64
615618
name: Build wheels
616619
run: ./pants run src/python/pants_release/release.py -- build-wheels
617620
- env:
618621
ARCHFLAGS: -arch arm64
622+
_PYTHON_HOST_PLATFORM: macosx-14.0-arm64
619623
name: Build Pants PEX
620624
run: ./pants package src/python/pants:pants-pex
621625
- continue-on-error: true
@@ -1870,6 +1874,7 @@ jobs:
18701874
test_python_macos13_x86_64:
18711875
env:
18721876
ARCHFLAGS: -arch x86_64
1877+
_PYTHON_HOST_PLATFORM: macosx-13.0-x86_64
18731878
if: (github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.docs_only != 'true')
18741879
name: Test Python (macOS13-x86_64)
18751880
needs:

3rdparty/python/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ freezegun==1.2.1
1111
ijson==3.2.3
1212
libcst==1.4.0
1313
packaging==21.3
14-
pex==2.32.0
14+
pex==2.33.0
1515
psutil==5.9.8
1616
# This should be compatible with pytest.py, although it can be looser so that we don't
1717
# over-constrain pantsbuild.pants.testutil

3rdparty/python/user_reqs.lock

+9-9
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
// "mypy-typing-asserts==0.1.1",
2424
// "node-semver==0.9.0",
2525
// "packaging==21.3",
26-
// "pex==2.32.0",
26+
// "pex==2.33.0",
2727
// "psutil==5.9.8",
2828
// "pydevd-pycharm==203.5419.8",
2929
// "pytest<7.1.0,>=6.2.4",
@@ -1005,13 +1005,13 @@
10051005
"artifacts": [
10061006
{
10071007
"algorithm": "sha256",
1008-
"hash": "83a10fd288a8f1482e831422a6f5e912a4561151a37e1694e187125e757227ee",
1009-
"url": "https://files.pythonhosted.org/packages/df/cc/85b7bf41b71dd324bd53b5d921dd81146499ce3ddb93d3fc2551ddd3b253/pex-2.32.0-py2.py3-none-any.whl"
1008+
"hash": "a1132a4a1eaeedcc56b2125a6e75e6820b9728560200043527a2151a8cb389f5",
1009+
"url": "https://files.pythonhosted.org/packages/95/04/294db01e6db8303a2147a85e3ea4044dda8711fa8eba540f12c8d40aa910/pex-2.33.0-py2.py3-none-any.whl"
10101010
},
10111011
{
10121012
"algorithm": "sha256",
1013-
"hash": "4f8cd1e0c314c26f213a02b4d0f0dcb4d76cf23e8ac6f2a0e9fabccf58e3ad55",
1014-
"url": "https://files.pythonhosted.org/packages/98/d3/e9dfe131d50c10eb21b9fdb0aa1039c933fe79291cb193141ecda4631d1f/pex-2.32.0.tar.gz"
1013+
"hash": "f41f1c79bc4935d444f96f7d53afa5273052b3950dc72e212d28b5c46f4dbb42",
1014+
"url": "https://files.pythonhosted.org/packages/9a/66/e3d64b05863cb03789d4e74ac165100d4c334b8abe8f0936a74e90155da3/pex-2.33.0.tar.gz"
10151015
}
10161016
],
10171017
"project_name": "pex",
@@ -1020,7 +1020,7 @@
10201020
"subprocess32>=3.2.7; python_version < \"3\" and extra == \"subprocess\""
10211021
],
10221022
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<3.14,>=2.7",
1023-
"version": "2.32.0"
1023+
"version": "2.33.0"
10241024
},
10251025
{
10261026
"artifacts": [
@@ -2317,8 +2317,8 @@
23172317
"only_wheels": [],
23182318
"overridden": [],
23192319
"path_mappings": {},
2320-
"pex_version": "2.32.1",
2321-
"pip_version": "25.0",
2320+
"pex_version": "2.33.0",
2321+
"pip_version": "25.0.1",
23222322
"prefer_older_binary": false,
23232323
"requirements": [
23242324
"PyGithub==2.4.0",
@@ -2335,7 +2335,7 @@
23352335
"mypy-typing-asserts==0.1.1",
23362336
"node-semver==0.9.0",
23372337
"packaging==21.3",
2338-
"pex==2.32.0",
2338+
"pex==2.33.0",
23392339
"psutil==5.9.8",
23402340
"pydevd-pycharm==203.5419.8",
23412341
"pytest<7.1.0,>=6.2.4",

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ Created as part of the release process.
352352
+ Travis Crawford
353353
+ Troy Howard
354354
+ Tushar Singh
355+
+ Tyler Rhodes
355356
+ Ugo Di Girolamo
356357
+ Ulugbek Adilbekov
357358
+ Viktor Kleen

build-support/cherry_pick/make_pr.sh

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ gh pr create \
3737
--base "$MILESTONE" \
3838
--title "$TITLE (Cherry-pick of #$PR_NUM)" \
3939
--label "$CATEGORY_LABEL" \
40+
--label "release-notes:not-required" \
4041
--milestone "$MILESTONE" \
4142
--body-file "$BODY_FILE" \
4243
--reviewer "$REVIEWERS" \

docs/notes/2.25.x.md

+58-58
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ Thank you to [Klayvio](https://www.klaviyo.com/) and [Normal Computing](https://
1818

1919
### General
2020

21-
- Fixed a longstanding bug in the processing of [synthetic targets](https://www.pantsbuild.org/2.24/docs/writing-plugins/the-target-api/concepts#synthetic-targets-api). This fix has the side-effect of requiring immutability and hashability of scalar values in BUILD files, which was always assumed but not enforced. This may cause BUILD file parsing errors, if you have custom field types involving custom mutable data structures. See ([#21725](https://github.com/pantsbuild/pants/pull/21725)) for more.
22-
- [Fixed](https://github.com/pantsbuild/pants/pull/21665) bug where `pants --export-resolve=<resolve> --export-py-generated-sources-in-resolve=<resolve>` fails (see [#21659](https://github.com/pantsbuild/pants/issues/21659) for more info).
21+
- Fixed a longstanding bug in the processing of [synthetic targets](https://www.pantsbuild.org/2.25/docs/writing-plugins/the-target-api/concepts#synthetic-targets-api). This fix has the side-effect of requiring immutability and hashability of scalar values in BUILD files, which was always assumed but not enforced. This may cause BUILD file parsing errors, if you have custom field types involving custom mutable data structures. See ([#21725](https://github.com/pantsbuild/pants/pull/21725)) for more.
22+
- [Fixed](https://github.com/pantsbuild/pants/pull/21665) a bug where `pants --export-resolve=<resolve> --export-py-generated-sources-in-resolve=<resolve>` fails (see [#21659](https://github.com/pantsbuild/pants/issues/21659) for more info).
2323
- [Fixed](https://github.com/pantsbuild/pants/pull/21694) bug where an `archive` target is unable to produce a ZIP file with no extension (see [#21693](https://github.com/pantsbuild/pants/issues/21693) for more info).
2424
- `[subprocess-environment].env_vars` and `extra_env_vars` (on many subsystems and targets) now supports a generalised glob syntax using Python [fnmatch](https://docs.python.org/3/library/fnmatch.html) to construct patterns like `AWS_*`, `TF_*`, and `S2TESTS_*`.
25-
26-
#### Remote Caching/Execution
25+
- Suspicious values now generate a warning instead of hard error when using the `<PATH>` special value to inject shell `PATH` values to the `system-binaries` subsystem.
26+
- [Fixed](https://github.com/pantsbuild/pants/pull/21943) a bug where negative target specs (e.g., `-folder::`) were not recognized on the command line.
27+
### Remote Caching/Execution
2728

2829
Pants now sends a `user-agent` header with every request to a remote store or a remote execution service,
2930
even when other headers are configured. If necessary, the user may override the user agent by specifying
@@ -43,7 +44,7 @@ The version of Python used by Pants itself has been updated to [3.11](https://do
4344
- Use the package manager you used to install Pants. For example, with Homebrew: `brew update && brew upgrade pantsbuild/tap/pants`.
4445
- Use its built-in self-update functionality: `SCIE_BOOT=update pants`.
4546

46-
That Pants itself happens to be partially writtin in Python has no bearing on the versions of Python that Pants can use to test and build your code.
47+
Note: The fact that Pants happens to be partially written in Python has no bearing on the versions of Python that Pants can use to test and build your code.
4748

4849
### Goals
4950

@@ -66,7 +67,13 @@ use_rust_parser = false
6667
Strict adherence to the [schema of Docker registry configuration](https://www.pantsbuild.org/2.25/reference/subsystems/docker#registries) is now required.
6768
Previously we did ad-hoc coercion of some field values, so that, e.g., you could provide a "true"/"false" string as a boolean value. Now we require actual booleans.
6869

69-
Fixed an error which was caused when the same tool appeaed in both the `--docker-tools` and `--docker-optional-tools` options.
70+
Fixed an error which was caused when the same tool appeared in both the `--docker-tools` and `--docker-optional-tools` options.
71+
72+
Stages in multi-stage builds which only used a hash to identify the image version (that is, no tag) are now surfaced. They can now be used in the `docker_image.target_state` field.
73+
74+
#### Go
75+
76+
Fix a bug with the setup of the gRPC protobuf plugins where a `go install` invocation was prevented from accessing the Go module proxy during its build of those plugins, which caused those builds to fail.
7077

7178
#### Helm
7279

@@ -83,6 +90,49 @@ The default "globs" for matching yaml in charts now matches more common structur
8390

8491
Fixed an issue where `pants run ...` commands only worked if the `package.json` file was in the root directory.
8592

93+
The dependency inference now considers `.ts` and `.tsx` file extensions.
94+
95+
The dependency inference now considers scoped npm packages.
96+
97+
The NodeJS subsystem now supports configuring additional tools that should be available in the NodeJS process execution. These tools can be configured via two options:
98+
99+
- [`[nodejs].tools`](https://www.pantsbuild.org/2.25/reference/subsystems/nodejs#tools): Specify additional executables required by nodejs processes.
100+
- [`[nodejs].optional_tools`](https://www.pantsbuild.org/2.25/reference/subsystems/nodejs#optional_tools): Additional tools that may be needed but aren't required. Unlike `tools`, the build won't fail if these aren't found. Useful for tools that only exist in some environments.
101+
102+
The paths to these tools will be included in the PATH used in the execution sandbox, so that they may be used by NodeJS processes during execution.
103+
104+
##### TypeScript
105+
106+
The dependency inference now considers `.tsx` files.
107+
108+
#### nFPM
109+
110+
The nFPM backend has a new plugin hook that allows plugins to inject field values that are used to generate nfpm config. To use this, a plugin needs to implement `InjectNfpmPackageFieldsRequest`:
111+
112+
```python
113+
from pants.backend.nfpm.fields.version import NfpmVersionField, NfpmVersionReleaseField
114+
from pants.backend.nfpm.util_rules.inject_config import InjectedNfpmPackageFields, InjectNfpmPackageFieldsRequest
115+
from pants.engine.internals.native_engine import Address, Field
116+
from pants.engine.rules import rule
117+
118+
class MyCustomInjectFieldsRequest(InjectNfpmPackageFieldsRequest):
119+
@classmethod
120+
def is_applicable(cls, target) -> bool:
121+
# this could check the target's address, packager, package_name field, etc.
122+
return True
123+
124+
@rule
125+
def inject_my_custom_fields(request: MyCustomInjectFieldsRequest) -> InjectedNfpmPackageFields:
126+
# this could get the version from a file
127+
version = "9.8.7-dev+git"
128+
release = 6
129+
fields: list[Field] = [
130+
NfpmVersionField(version, request.target.address),
131+
NfpmVersionReleaseField(release, request.target.address),
132+
]
133+
return InjectedNfpmPackageFields(fields, address=request.target.address)
134+
```
135+
86136
#### Python
87137

88138
The AWS Lambda backend now provides built-in complete platforms for the Python 3.13 runtime.
@@ -91,25 +141,20 @@ Constrained the transitive dependencies within the builtin lockfile for twine to
91141

92142
Several improvements to the Python Build Standalone backend (`pants.backend.python.providers.experimental.python_build_standalone`):
93143

94-
- The backend now supports filtering PBS releases via their "release tag" via [the new `--python-build-standalone-release-constraints` option](https://www.pantsbuild.org/2.25/reference/subsystems/python-build-standalone-python-provider#release_constraints). THe PBS "known versions" database now contains metadata on all known PBS versions, and not just the latest PBS release tag per Python patchlevel.
144+
- The backend now supports filtering PBS releases via their "release tag" via [the new `--python-build-standalone-release-constraints` option](https://www.pantsbuild.org/2.25/reference/subsystems/python-build-standalone-python-provider#release_constraints). The PBS "known versions" database now contains metadata on all known PBS versions, and not just the latest PBS release tag per Python patchlevel.
95145

96146
- The backend will now infer metadata for a PBS release from a given URL if the URL conforms to the naming convention used by the PBS project. The inferred metadata is Python version, PBS release tag, and platform.
97147

98148
- The `--python-build-standalone-known-python-versions` option now accepts a three field format where each value is `SHA256|FILE_SIZE|URL`. All of the PBS release metadata will be parsed from the URL (which must use the naming convention used by the PBS project). (The existing five-field format is still accepted and will now allow the version and platform fields to be blank if that data can be inferred from the URL.)
99149

100150
- Metadata on PBS releases is current to PBS release 20250115.
101151

102-
Changed references to Python Build Standalone to not refer to the [GitHub organization](https://github.com/astral-sh/python-build-standalone) as described in [Transferring Python Build Standalone Stewardship to Astral](https://gregoryszorc.com/blog/2024/12/03/transferring-python-build-standalone-stewardship-to-astral/).
152+
Changed references to Python Build Standalone to refer to the new [GitHub organization](https://github.com/astral-sh/python-build-standalone) as described in [Transferring Python Build Standalone Stewardship to Astral](https://gregoryszorc.com/blog/2024/12/03/transferring-python-build-standalone-stewardship-to-astral/).
103153

104154
The default version of the [Pex](https://docs.pex-tool.org/) tool has been updated from 2.20.3 to [2.32.1](https://github.com/pex-tool/pex/releases/tag/v2.32.1). Among many improvements and bug fixes, this unlocks support for pip [24.3.1](https://pip.pypa.io/en/stable/news/#v24-3-1) and Pip [25.0](https://pip.pypa.io/en/stable/news/#v25).
105155

106156
The `pants.backend.experimental.python.lint.ruff.check` backend [now supports](https://github.com/pantsbuild/pants/pull/21783) including [Ruff's output file as a report](https://www.pantsbuild.org/2.25/docs/python/overview/linters-and-formatters#bandit-flake8-pylint-and-ruff-report-files).
107157

108-
#### Go
109-
110-
Fix a bug with the setup of the gRPC protobuf plugins where a `go install` invocation was prevented from accessing the Go module proxy during its build of those plugins, which caused those builds to fail.
111-
112-
113158
##### NEW: Python for OpenAPI
114159

115160
A new experimental `pants.backend.experimental.openapi.codegen.python` backend
@@ -158,51 +203,6 @@ Bugfix: fixed an issue with cache concurrency. This affected initialisation of m
158203

159204
The previously deprecated `[shell-setup].tailor` option has now been removed. See [`[shell-setup].tailor_sources`](https://www.pantsbuild.org/2.25/reference/subsystems/shell-setup#tailor_sources) and [`[shell-setup].tailor_shunit2_tests`](https://www.pantsbuild.org/2.25/reference/subsystems/shell#tailor_shunit2_tests) to update.
160205

161-
#### nFPM
162-
163-
The nFPM backend has a new plugin hook that allows plugins to inject field values that are used to generate nfpm config. To use this, a plugin needs to implement `InjectNfpmPackageFieldsRequest`:
164-
165-
```python
166-
from pants.backend.nfpm.fields.version import NfpmVersionField, NfpmVersionReleaseField
167-
from pants.backend.nfpm.util_rules.inject_config import InjectedNfpmPackageFields, InjectNfpmPackageFieldsRequest
168-
from pants.engine.internals.native_engine import Address, Field
169-
from pants.engine.rules import rule
170-
171-
class MyCustomInjectFieldsRequest(InjectNfpmPackageFieldsRequest):
172-
@classmethod
173-
def is_applicable(cls, target) -> bool:
174-
# this could check the target's address, packager, package_name field, etc.
175-
return True
176-
177-
@rule
178-
def inject_my_custom_fields(request: MyCustomInjectFieldsRequest) -> InjectedNfpmPackageFields:
179-
# this could get the version from a file
180-
version = "9.8.7-dev+git"
181-
release = 6
182-
fields: list[Field] = [
183-
NfpmVersionField(version, request.target.address),
184-
NfpmVersionReleaseField(release, request.target.address),
185-
]
186-
return InjectedNfpmPackageFields(fields, address=request.target.address)
187-
```
188-
189-
#### JavaScript
190-
191-
The dependency inference now considers `.ts` and `.tsx` file extensions.
192-
193-
The dependency inference now considers scoped npm packages.
194-
195-
The NodeJS subsystem now supports configuring additional tools that should be available in the NodeJS process execution. These tools can be configured via two options:
196-
197-
- [`[nodejs].tools`](https://www.pantsbuild.org/2.25/reference/subsystems/nodejs#tools): Specify additional executables required by nodejs processes.
198-
- [`[nodejs].optional_tools`](https://www.pantsbuild.org/2.25/reference/subsystems/nodejs#optional_tools): Additional tools that may be needed but aren't required. Unlike `tools`, the build won't fail if these aren't found. Useful for tools that only exist in some environments.
199-
200-
The paths to these tools will be included in the PATH used in the execution sandbox, so that they may be used by NodeJS processes during execution.
201-
202-
#### TypeScript
203-
204-
The dependency inference now considers `.tsx` files.
205-
206206
### Plugin API changes
207207

208208
The version of Python used by Pants itself is now [3.11](https://docs.python.org/3/whatsnew/3.11.html) (up from 3.9).

0 commit comments

Comments
 (0)