quaint-telephone-89068
10/24/2025, 5:54 PMquaint-telephone-89068
10/25/2025, 2:57 AMquaint-telephone-89068
10/25/2025, 4:35 AM7.0.1.
• There are lots of feature additions and bug improvements between pytest 7.0.1 and 8.4.1. At least in my case, many of the desired features translate to much broader pytest configuration control centralized in my codebase's pyproject.toml.
• Moving to pytest 8.x would also mitigate a number of deprecation warnings that stem from older versions of pytest (see related issue thread here for one such example impacting us at the moment).
## Solution Description
• Bump the default version of pytest to 8.x.
## Alternatives Considered
• Modify the pytest version in our project. Not totally opposed to this, but I wanted to see if there's any reason not to bump the version at the source.
pantsbuild/pantsquaint-telephone-89068
10/25/2025, 6:41 PMquaint-telephone-89068
10/25/2025, 6:52 PMmacos-13 is closing down
The macOS 13 hosted runner image is closing down, following our N-1 OS support policy. This process will begin September 1, 2025, and the image will be fully retired on November 14, 2025. We recommend updating workflows to use macos-14 or macos-15.pantsbuild/pants
quaint-telephone-89068
10/26/2025, 2:05 PMquaint-telephone-89068
10/27/2025, 11:13 AMversion parameter of all targets that support it. This would enable triggering of release builds of packages when a version bump occurs by querying with something akin to:
pants list --filter-target-type=python_distribution --changed-property=version
This is a common pattern when dealing with file-level changes in other systems, such as triggering on changes to a __version__ file. The added granularity of being able to handle target properties directly would be useful in lots of cases, but triggering on version updates would be a good first example.
Describe alternatives you've considered
The basic alternative would be to grep the git diff of BUILD files, but this isn't very robust.
pantsbuild/pantsquaint-telephone-89068
10/27/2025, 12:28 PMquaint-telephone-89068
10/28/2025, 3:01 AMquaint-telephone-89068
10/28/2025, 3:01 AMquaint-telephone-89068
10/30/2025, 1:58 AMrun_module field (as though run with python -m myproject.myapp), but it should be trivial to extend that to running a specific function on binary launch (similar to .pex files).
It should be a relatively easy fix, and keeps a nice visual consistency with the entry_point of the pex_binary
I only noted that I forgot to support this case while writing the documentation
pantsbuild/pantsquaint-telephone-89068
10/30/2025, 1:58 AMquaint-telephone-89068
10/30/2025, 2:01 AMpeek, a list filter, a new goal shudder).
Example as a filter: pants --filter-goal-type=test list ::
Alternatively, maybe this functionality should be part of a BSP? Unsure.
### Example of logging to the console:
oss/pants-plugins % pants list package
141346.36 [INFO] Initialization options changed: reinitializing scheduler...
141347.06 [INFO] Scheduler initialized.
141347.09 [WARN] No targets were matched in goal list.
141347.09 [WARN] No files or targets specified. The package goal works with these target types:
* archive
* pex_binary
* pyoxidizer_binary
* python_distribution
Please specify relevant file and/or target arguments. Run pants --filter-target-type=archive,pex_binary,pyoxidizer_binary,python_distribution list :: to find all applicable targets in your project, or run pants --filter-target-type=archive,pex_binary,pyoxidizer_binary,python_distribution filedeps :: to find all applicable files.
⏺️ oss/pants-plugins % pants list ::
pants-plugins/experimental/swift/util_rules:util_rules
...
...
...
pants-plugins/experimental/swift/util_rules/compile.py
⏺️ oss/pants-plugins % pants list package
141402.99 [WARN] No targets were matched in goal list.
Note that the second call to list package doesn't show the same warning as the first call.
pantsbuild/pantsquaint-telephone-89068
10/30/2025, 2:07 AMI'm sure this has been discussed a bunch, but is there any way to "speed up" the PR CI testing, or at least, short-circuit some of it? I'm adding a pretty isolated formatting plugin, but the testing is still around 50 minutes for a test failure which didn't show up on my local machine (for some reason, not sure why it passed locally).
Is the pants dependency inference good enough that a simple ./pants --changed-since=... test would be safe for the PR?
If not, maybe run that test before running the whole suite? That way, if any of the modified code is breaking, CI will fail fast? And if not, we just fallback to a regular full test suite (with the modified code test results memoized)?The summary of the chat is that it might be worth having a sanity test before running the test suite, which would probably fail within a few minutes, if it is going to fail on newly PR'd code. ./pants --changed-since=origin/main test # followed by ./pants test --shard=... :: pantsbuild/pants
quaint-telephone-89068
10/30/2025, 1:46 PM-trimpath option to go tool cgo to remove sandbox prefix from source paths. This will involve using __PANTS_SANDBOX_ROOT__ replacement support of GoSdkProcess.
pantsbuild/pantsquaint-telephone-89068
10/30/2025, 2:12 PM[python]
pip_version = "22.3"
[pyoxidizer]
interpreter_constraints = ["CPython==3.9.*"]
But when I poke in the sandbox I see
$ /tmp/pants-sandbox-xKFXVz/.cache/pyoxidizer/python_distributions/python.1c490d71269e/python/install/bin/python3.9 -m pip --version
pip 21.2.4 from /tmp/pants-sandbox-xKFXVz/.cache/pyoxidizer/python_distributions/python.1c490d71269e/python/install/lib/python3.9/site-packages/pip (python 3.9)
Pants version
2.16.0.dev5
OS
Linux
Additional info
I tripped on this because after it was running for ~20 minutes (which is probably longer than it takes to compile CPython) so I decided to figure our what ./pants package was doing, and it turned out to be pip pegging a core:
ecsb 17442 94.3 0.3 138260 121068 ? R 09:30 30:52 /tmp/pants-sandbox-xKFXVz/.cache/pyoxidizer/python_distributions/python.1c490d71269e/python/install/bin/python3.9 -m pip --disable-pip-version-check install --target /tmp/pyoxidizer-pip-installXrTk0h/install feast_demo-0.0.1-py3-none-any.whl
My naive expectation was that the python.pip_version setting would be used. I suppose there might be a case where a pyoxidizer.pip_version settings might be needed. Presumably tangled up with #14619 and #14734
pantsbuild/pantsquaint-telephone-89068
10/31/2025, 1:23 PMpants peek :: on the repo should take on the order of ~60 sec with no memoization and a warm cache.
• Running pants dependencies :: should consume approaching 4 GiB of memory
pantsbuild/pantsquaint-telephone-89068
10/31/2025, 1:27 PMquaint-telephone-89068
10/31/2025, 1:36 PMquaint-telephone-89068
10/31/2025, 2:08 PM/tmp is tmpfs (aka just in memory) Pants sandboxes will quickly fill it up.
It is totally reasonable (ex from slack: https://pantsbuild.slack.com/archives/C046T6T9U/p1694679410518159) for people to not be familiar with the details of their CI filesystem layout, so even if this "works" on their workstation, they get bitten with spooky CI problems.
We can steer away from this unlikely-to-be-what-you-want configuration by issuing a WARNing on startup.
pantsbuild/pantsquaint-telephone-89068
10/31/2025, 11:28 PMinterpreter_constraints and resolve fields. Resolves themselves also have interpreter constraints set in pants.toml. By default, the interpreter_constraints on Python targets defaults to the [python].interpreter_constraints field in pants.toml. However, if you have multiple resolves with different interpreter constraints, you now have to set the interpreter constraints on each Python source file to be a subset of the constraints of its resolve.
Describe the solution you'd like
There should be an option in the Python subsystem to allow Python targets with a resolves field to fall back to the interpreter constraints of their resolve instead of the global constraints.
Describe alternatives you've considered
I use a macro to make the resolve constraints and source file constraints match today, but this means constraints must be updated and match in multiple spots instead of just having pants.toml as the single source of truth.
pantsbuild/pantsquaint-telephone-89068
11/02/2025, 1:55 PMquaint-telephone-89068
11/02/2025, 9:40 PMquaint-telephone-89068
11/03/2025, 2:14 PMquaint-telephone-89068
11/04/2025, 5:29 PMindexes to grab pip, setuptools and wheel, but not for other dependencies
Pants version
Which version of Pants are you using?
2.29
OS
Only tested on Linux
Additional info
I am pretty sure I have set up the toml file correctly because pants is actually using it for these deps, which leads me to think the bug is in pants.
pantsbuild/pantsquaint-telephone-89068
11/07/2025, 9:43 AMgo backend uses separate options for search paths. These are _go_search_paths and _cgo_tool_search_paths. I needed an additional search path for the extra-tools option but ended up implicitly using the _go_search_paths.
A number of other backends seem to use executable_search_path option. These are Docker, NodeJS, Pex and Shell.
The Proposal
Enhance the go backend to use executable_search_path for the go binaries, cgo tools and extra tools. This would be done by using the ExecutableSearchPathsOptionMixin.
This would improve consistency in the options for the various backends. It does however impact existing configs that would need to be migrated.
pantsbuild/pantsquaint-telephone-89068
11/07/2025, 4:32 PMquaint-telephone-89068
11/08/2025, 10:18 AMpyproject.toml file
Describe the solution you'd like
It would be ideal if the package command can automatically increase the version number depending on the commits by using commitizen or others.
Describe alternatives you've considered
Adding a plugin (probably better than a macro) might be able to archive this, but haven't had the time to explore that option.
The idea is that it will run just before the package command and increase the version number of any libraries that has changed.
Appreciate if you can provide more info in other ways and/or examples to archive this.
Additional context
We use poetry for our libraries, and have a mono repo that generates multiple libraries (for external systems to consume).
An example. If I got 3 pyproject.toml that then I publish as libraries, called A,B and C.
Assuming dependencies goes like this C -> B -> A. Meaning, B depends on A and C depends on B.
• If A changes, I would like the version number for A, B and C to increase.
• If B changes, I would like the version of B and C to change.
• If C changes, Then I would like only the version in C to change.
Does this make sense?
A bonus extra would be to detect what number to increase depending on the commit (using git commitizen or similar) but I can live without that
Our libraries have a poetry file like this:
[tool.poetry]
name = "library_1"
version = "2.0.0"
description = "my internal library"
authors = ["<mailto:blabla@blablabla.com|blabla@blablabla.com>"]
readme = "README.md"
repository = "<https://ohhh-this-url-is-amazing/but-is-not-real>"
[tool.poetry.dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Got a wee publish macro that looks like this:
# flake8: noqa: F821
def poetry_distribution(name, **kwargs):
resources(name="package_data", sources=["pyproject.toml", "README.md"])
python_distribution(
name="dist",
dependencies=[":package_data", f"src/python/{name}/src", "//:root"],
provides=python_artifact(name=name),
generate_setup=False,
)
Then in the folder for each library I have this in the BUILD file
poetry_distribution(
name="name-of-my-library",
)
The project structure is like this:
├── BUILD
├── dependencies.lock
├── dist
│ ├── library-1-2.0.0-py2.py3-none-any.whl
│ ├── library-1-2.0.0.tar.gz
│ ├── library-2-5.0.0-py2.py3-none-any.whl
│ ├── library-2-5.0.0.tar.gz
│ ├── library-3-3.0.0-py2.py3-none-any.whl
│ ├── library-3-3.0.0.tar.gz
│ ├── library-4-2.0.0-py2.py3-none-any.whl
│ └── library-4-2.0.0.tar.gz
├── pants
├── pants.toml
├── pants_plugins
│ ├── BUILD
│ └── macros.py <- This is where I have put the macro
├── pyproject.toml
├── setup.cfg
└── src
└── python
├── library-1
│ ├── BUILD
│ ├── README.md
│ ├── pyproject.toml
│ ├── src
│ │ ├── BUILD
│ │ └── library-1.py
│ └── test
│ ├── BUILD
│ └── test_library-1.py
├── library-2
│ ├── BUILD
│ ├── README.md
│ ├── pyproject.toml
│ └── src
│ ├── BUILD
│ ├── library-2.py
│ ├── test_something_else_library-2.py
│ └── test_library-2.py
├── library-3
│ ├── BUILD
│ ├── README.md
│ ├── pyproject.toml
│ └── src
│ ├── BUILD
│ ├── __init__.py
│ ├── library-3.py
│ └── test_library-3.py
└── ppl_library-4
├── BUILD
├── README.md
├── pyproject.toml
└── src
├── BUILD
├── ppl_library-4.py
└── test_library-4.py
The only root source config I got in the pants.toml is
[source]
root_patterns = ['/src/python/*/src', '/']
And added also this like to activate the macros
build_file_prelude_globs = ["pants_plugins/macros.py"]
Thanks in advance!!
From this slack message
pantsbuild/pantsquaint-telephone-89068
11/09/2025, 2:01 PMpython_requirements and requirements.txt, or using python_requirement blocks.
pantsbuild/pantsquaint-telephone-89068
11/09/2025, 3:41 PMpython.linting and python.formatting settings have been deprecated as in the latest Python extension pre-release version, as we're migrating our tooling support to extensions (see here for more details).
I figured I'd open this issue to suggest to remove them from the docs 😊
Thanks!
pantsbuild/pants