https://pantsbuild.org/ logo
Join Slack
Powered by
# general
  • f

    famous-kilobyte-26155

    11/20/2025, 5:17 PM
    I’m hoping this is me being oblivious (yet again). I’m using ruff. When I says
    pants lint scripts::
    for subdirectory
    scripts
    I get no errors, but when I run
    pants lint ::
    I get errors for files in that directory. (mostly include order, but that might be a red herring) Any hints?
    w
    h
    • 3
    • 27
  • h

    happy-sundown-654

    11/20/2025, 6:10 PM
    Is something up with the registry here? Keep hitting this issue in CI with github actions:
    Copy code
    Run pantsbuild/actions/init-pants@v9
      with:
        gha-cache-key: v0
        setup-commit: 6f136713a46e555946a22ffb3ed49c372eea58df
        base-branch: main
        named-caches-location: ~/.cache/pants/named_caches
        pants-ci-config: DEFAULT
        cache-lmdb-store: false
        lmdb-store-location: ~/.cache/pants/lmdb_store
        experimental-remote-cache-via-gha: false
        setup-python-for-plugins: false
        gh-host: github.com
      env:
        AWS_REGION: us-west-2
        SLACK_WEBHOOK: ***
        pythonLocation: /opt/hostedtoolcache/Python/3.12.7/x64
        PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.7/x64/lib/pkgconfig
        Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.7/x64
        Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.7/x64
        Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.7/x64
        LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.7/x64/lib
    Run if ! command -v pants; then
    Downloading and installing the pants launcher ...
    Installed the pants launcher from <https://github.com/pantsbuild/scie-pants/releases/latest/download/scie-pants-linux-x86_64> to /home/runner/.local/bin/pants
    
    Running `pants` in a Pants-enabled repo will use the version of Pants configured for that repo.
    In a repo not yet Pants-enabled, it will prompt you to set up Pants for that repo.
    Run PANTS_BOOTSTRAP_CACHE_KEY=$(PANTS_BOOTSTRAP_TOOLS=2 pants bootstrap-cache-key)
    Failed to source file cpython-3.11.13+20250612-x86_64-unknown-linux-gnu-install_only.tar.gz: Failed to fetch <https://github.com/astral-sh/python-build-standalone/releases/download/20250612/cpython-3.11.13%2B20250612-x86_64-unknown-linux-gnu-install_only.tar.gz>: [22] HTTP response code said error (The requested URL returned error: 503)
    Error: Failed to prepare a scie jump action: Failed to establish atomic directory /home/runner/.cache/nce/4dd2c710a828c8cfff384e0549141016a563a5e153d2819a7225ccc05a1a17c7/cpython-3.11.13+20250612-x86_64-unknown-linux-gnu-install_only.tar.gz. Population of work directory failed: The tar.gz destination /home/runner/.cache/nce/4dd2c710a828c8cfff384e0549141016a563a5e153d2819a7225ccc05a1a17c7/cpython-3.11.13+20250612-x86_64-unknown-linux-gnu-install_only.tar.gz of size 0 had unexpected hash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
    w
    • 2
    • 4
  • m

    mammoth-area-83300

    11/22/2025, 6:49 PM
    Hey all, I'm getting tripped up getting Pants to work with SQLAlchemy dialect dependencies, and hoping someone can help:
    Copy code
    # requirements.txt
    sqlalchemy==1.3.22
    pybigquery==0.5.0
    
    # BUILD
    python_requirements(
        name="root",
    )
    
    python_tests(
        name="tests0",
        dependencies=[":root#pybigquery"],
    )
    
    # test_bq.py
    
    def test_engine_init():
        sqlalchemy.create_engine("<bigquery://test-project>")
    I see that the pybigquery dependency was installed in the pex from the logs of running
    test
    and I verified via
    pdb -> interact
    that
    import pybigquery
    is successful. But there seems to be something screwed up with the environment setup because creating the sql engine fails with
    Copy code
    ...
            else:
                for impl in pkg_resources.iter_entry_points(self.group, name):
                    self.impls[name] = impl.load
                    return impl.load()
        
    >       raise exc.NoSuchModuleError(
                "Can't load plugin: %s:%s" % (self.group, name)
            )
    E       sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:bigquery
    Is there something extra needed for Pants (or is pex the culprit?) to correctly register the pybigquery plugin for sqlalchemy?
    w
    b
    • 3
    • 21
  • a

    acoustic-librarian-29560

    11/24/2025, 5:50 PM
    Anyone have any idea why I'm getting these errors when trying to use the sandboxer?
    Copy code
    12:49:05.91 [INFO] Initializing scheduler...
    12:49:05.93 [INFO] Trying sandboxer socket path /run/pants/b85ec67a0d83283d/sandboxer.sock
    12:49:05.93 [WARN] Failed to create dir for sandboxer socket at /run/pants/b85ec67a0d83283d/sandboxer.sock
    12:49:05.93 [INFO] Trying sandboxer socket path /var/run/pants/b85ec67a0d83283d/sandboxer.sock
    12:49:05.93 [WARN] Failed to create dir for sandboxer socket at /var/run/pants/b85ec67a0d83283d/sandboxer.sock
    12:49:05.93 [INFO] Trying sandboxer socket path /var/folders/v7/qb819xs91_55px65swlk4nqr0000gp/T/run/pants/b85ec67a0d83283d/sandboxer.sock
    12:49:05.93 [INFO] Using sandboxer socket path /var/folders/v7/qb819xs91_55px65swlk4nqr0000gp/T/run/pants/b85ec67a0d83283d/sandboxer.sock
    It seems to work eventually so is it just trying different paths?
    c
    • 2
    • 1
  • b

    busy-ram-14533

    11/25/2025, 4:10 PM
    Is there a way to configure python resolves to use only binaries by default, but allow certain packages to be exceptions? In this case, I need to make an exception for pyspark because they don’t publish prebuilt wheels I tried (1) seeing if exclusion syntax works it (doesn’t)
    Copy code
    [python.resolves_to_only_binary]
    __default__ = [":all:", "!pyspark"]
    error
    ```stderr:
    pid 54908 -> /Users/gregory.fast/.cache/pants/named_caches/pex_root/venvs/1/4ff2f56ac3254236a25efbdabc197b860c992fbd/dfd2c09fe12009f8446c34db0afc997702969a55/bin/python /Users/gregory.fast/.cache/pants/named_caches/pex_root/venvs/1/4ff2f56ac3254236a25efbdabc197b860c992fbd/dfd2c09fe12009f8446c34db0afc997702969a55/pex --disable-pip-version-check --exists-action a --no-input --isolated --log pex-pip-download.log -q --cache-dir /Users/gregory.fast/.cache/pants/named_caches/pex_root/pip/1/25.2/pip_cache download --dest /private/var/folders/19/qfvft6053wvdm7yfbgcg08d40000gp/T/pants-sandbox-iv6uS1/.tmp/tmprbumncl8/Users.gregory.fast..pyenv.versions.3.12.10.bin.python3.12 --only-binary all psutil>=7.0.0 pyspark==3.5.4 --index-url https://depot-read-api-python.us1.ddbuild.io/magicmirror/magicmirror/@current/simple/ --retries 5 --resume-retries 3 --timeout 15 exited with 1 and STDERR:
    pip: ERROR: Could not find a version that satisfies the requirement pyspark==3.5.4 (from versions: none)
    pip: ERROR: No matching distribution found for pyspark==3.5.4```
    (2) seeing if I could put exclusions in no_binary
    Copy code
    [python.resolves_to_only_binary]
    __default__ = [":all:"] 
    
    [python.resolves_to_no_binary]
    __default__ = ["pyspark"]
    error
    ```stderr:
    Builds were disallowed, but the following project names are configured to only allow building: pyspark```
    b
    • 2
    • 6
  • a

    ambitious-actor-36781

    11/25/2025, 10:19 PM
    got a question about how the content-addressable cache stuff works. How much depends on the cache? if I have a chain of rules
    a -> b -> c
    and
    a
    's output is a random number. (i.e.
    a() -> uuid4()
    ) and B's output is a constant. (i.e.
    b(a_out) -> 0
    ) what happens to C (
    c(b_out) -> ...
    ) Would
    c
    always get a cache miss because
    a
    isn't deterministic? or would
    c
    always get a cache hit, because
    b
    returns a constant value?
    h
    • 2
    • 4
  • f

    fresh-continent-76371

    11/25/2025, 10:46 PM
    pantsd dies Hi, I am doing some performance tuning of pants. First off the list is that pantsd does not hang around. It dies straight away.
    Copy code
    ~/pro/git/project 
    ❯ rm ../../.pants.d/workdir/pants.log   
    
    ~/pro/git/project 
    ❯ pants list ::                         
    09:41:52.68 [INFO] (pe_nailgun::nailgun_pool) Initializing Nailgun pool for 28 processes...
    09:41:55.12 [INFO] (pe_nailgun::nailgun_pool) Initializing Nailgun pool for 28 processes...
    .......>8....... snipped output
    
    ~/pro/git/project 
    ❯ cat   ../../.pants.d/workdir/pants.log
    09:41:59.04 [WARN] (watch) File watcher exiting with: The watcher was shut down.
    
    ~/pro/git/project 
    ❯
    This happens to all developers - so is not a local workstation problem ? How do we go about debugging this
    h
    • 2
    • 18
  • v

    victorious-dress-47449

    11/26/2025, 10:41 PM
    I'm encountering a weird python module resolution issue. I have a package called
    A
    under the directory
    company_name/lib/A
    that depends on a third party package called
    B
    and B depends on a package also called
    A
    (but not the same as my package under company_name/lib/A). In testing company_name/lib/A, when B tries to import from A, it resolves to my own package. Why would this happen if my package is nested under company_name/lib? I'm using a docker environment. My source root is just '/'. I'd expect `import company_name.lib.A`to resolve to my package and
    import A
    to resolve to the third party package.
    k
    h
    b
    • 4
    • 28
  • h

    hundreds-carpet-28072

    12/01/2025, 12:37 PM
    Is there ongoing work or plan for integrating
    uv
    as an optional dependency resolver in Pants? I know there are feature requests for it, but was curious as to whether anybody has looked to pick it up. Faster resolution of environments would be a great improvement to have.
    h
    b
    d
    • 4
    • 12
  • b

    better-wolf-86659

    12/01/2025, 6:11 PM
    Is it a known bug that Pants fails to detect mismatch b/t a
    version-control style python_requirement
    (reference) and the lockfile? Here's what I'm running into: • we have pants version 2.28.0 • we have a
    python_requirement
    defined in 3rdparty/BUILD:
    Copy code
    MY_DEP_VERSION = "v1.xx.xx"
    MY_DEP_GIT_URL = f"my-dep@ git+<https://github.com/my-repo/my-dep.git@{MY_DEP_VERSION}>"
    python_requirement(
        name="my_dep",
        requirements=[MY_DEP_GIT_URL],
        modules=["mydep"],
    )
    • after generating the lockfile, I bumped `MY_DEP_VERSION`to a newer version. Surprisingly, running "pants check" or "pants package" on targets than depend on "my_dep" didn't error out. • When I manually run "pants generate-lockfiles", the summary does show the upgraded dependencies for "my_dep" from v1.xx.xx to the newer version "v1.yy.yy" I wonder if this is a bug? Is it known or I should file a new one? Or I'm doing something wrong with version control requirement? Thank you!
    h
    b
    • 3
    • 23
  • a

    abundant-tent-27407

    12/02/2025, 2:52 PM
    Hey, I was trying to migrate from poetry to uv, but having trouble with the overrides section.
    poetry_requirements
    would produce a bunch of targets such as
    //:root#aiohttp
    but that doesn't seem to be the case with
    uv_requirements
    . Therefore I am getting this error:
    Copy code
    InvalidFieldException: Unused key in the `overrides` field for //:root: ['fastapi', 'redis']
    Target in thread
    b
    b
    • 3
    • 4
  • v

    victorious-dress-47449

    12/03/2025, 8:47 PM
    Has anyone got a clue why
    pants publish docker/python:base
    would work fine publishing to google cloud but then if I delete the local version of the image (or go to a different machine with the same user credentials) then
    pants run server:docker
    (which triggers pulling
    docker/python:base
    from the repository) would fail with a permission denied error
    Permission \"artifactregistry.repositories.downloadArtifacts\" denied on resource
    yet docker pull works. So somehow the authentication is working for pushing but then it fails for pulling in the pants sandbox.
    w
    • 2
    • 17
  • s

    stale-twilight-79248

    12/03/2025, 9:33 PM
    Hey all, does anyone know what I'm doing wrong?
    Copy code
    $ pants generate-lockfiles 
    16:20:51.53 [INFO] Initializing scheduler...
    16:20:53.64 [INFO] Scheduler initialized.
    ...
    16:29:37.97 [ERROR] 1 Exception encountered:
    
    Engine traceback:
      in `generate-lockfiles` goal
    
    IntrinsicError: Error downloading file: error sending request for url (<https://github.com/astral-sh/python-build-standalone/releases/download/20250610/cpython-3.10.18%2B20250610-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz>)
    I'm on a network with no direct access to the internet, i have my
    http_proxy
    and
    https_proxy
    set correctly, everything else on my system is correctly able to reach the internet through the proxy I have the following in my
    pants.toml
    as per the documentation:
    Copy code
    [subprocess-environment]
    # pull in proxy settings from environment and pass them through to all subprocesses
    env_vars = [
        "http_proxy",
        "https_proxy",
        "no_proxy",
        "HTTP_PROXY",
        "HTTPS_PROXY",
        "NO_PROXY",
    ]
    but still every pants operation requiring the internet fails...
    w
    b
    • 3
    • 28
  • s

    square-elephant-85438

    12/03/2025, 9:46 PM
    Is there a way to see the setup.py generated by pants by setting generate_setup=True in a python_distribution target?
    w
    • 2
    • 1
  • a

    acoustic-librarian-29560

    12/04/2025, 4:34 PM
    Is anyone using GCS as a remote cache with Pants? I'm getting this error
    Copy code
    [WARN] Failed to read from remote cache (2 occurrences so far): Internal: "protocol error: received message with invalid compression flag: 60 (valid flags are 0 and 1) while receiving response with status: 400 Bad Request"
    I'm not the first one to hit the
    invalid compression flag: 60
    but it seems the others were always due to size rather than bad request.
    f
    • 2
    • 6
  • c

    careful-postman-55465

    12/04/2025, 8:13 PM
    Hey, everyone! Is there a way of making a test-only Python package always be bundled together with another one? I have Python tests that use fixtures provided by
    pytest-spark
    (github.com/malexer/pytest-spark). For it to work properly, PySpark must be installed. PySpark isn't a dep on
    pytest-spark
    , tho, so our tests that happen to use PySpark directly pass, while others don't. Any way to make this work?
    s
    b
    e
    • 4
    • 7
  • r

    rough-motherboard-57371

    12/04/2025, 10:48 PM
    Hello, I encountered an issue where only after prefixing a pants command with
    PANTS_LEVEL=debug
    did my command run successfully. I do not yet have a minimal command to repro but in general wondering if this is a known possibility and a sign of misconfiguration, etc.
    h
    • 2
    • 4
  • m

    many-vase-25409

    12/05/2025, 8:30 PM
    Hello, I'm having trouble running pants remotely, probably related to an NFS mount there (happens during the bootstrap of pants):
    Copy code
    File "/data/project/digero/.cache/nce/8b397e34f7388bd488c1673f7080b8a63aef66cfe7d264e94f8e8438171ae5fa/tools.pex/.bootstrap/pex/cache/access.py", line 79, in _lock
    OSError: [Errno 9] Bad file descriptor
    Error: Failed to establish atomic directory /data/project/digero/.cache/nce/5c54a0c25255df2afb0525da856d49eb81b48cff0e32a9c868f77a296af24319/locks/configure-7d68ce086d9fb08674404fe09a2aa1798f91c7d51081d1dc782d0d758d0fef39. Population of work directory failed: Boot binding command failed: exit status: 1
    h
    • 2
    • 2
  • e

    elegant-florist-94385

    12/08/2025, 5:26 PM
    Is there a roadmap somewhere for the state of JS/TS affairs? I'm setting up a brand new work repo with a python backend and a frontend using TS/Angular. Since its greenfield, I'd love to be able to use pants for "everything" from the beginning. Would like to read up on how much is available for my FE needs.
    w
    n
    • 3
    • 7
  • b

    bumpy-kitchen-92571

    12/08/2025, 5:30 PM
    Hello! Is there a job posting board for pants contractors? We have a large project on pants 2.17 and are feeling out of our depth managing multiple python resolves.
    w
    • 2
    • 3
  • f

    fancy-fish-76944

    12/08/2025, 9:22 PM
    Has anyone looked at fixing remote execution issues in pants? I am observing most of the issues described in https://github.com/gruzewski/pants-remote-exec-issues in pants 2.28. In particular, to get it to work with BB we had to do the following: 1. downgrade the version of the remote executor from ghcr.io/buildbarn/bb-worker:20250820T081613Z-efef252 to ghcr.io/buildbarn/bb-worker:20250526T162405Z-20574f0 2. Needed to remove the "platform" settings from the remote worker configuration. Otherwise, no workers are being picked up by pants client. 3. Needed to explicitly set the following environment variables in the remote worker: environment_variables: { PATH: "/usr/local/sbin/usr/local/bin/usr/sbin/usr/bin/sbin:/bin" }
    • 1
    • 1
  • h

    hundreds-carpet-28072

    12/09/2025, 3:05 PM
    I would like to prevent Pants from using existing Pip config when building its internal envs, essentially using
    --isolated
    mode. Is there a way I can do this?
    c
    b
    • 3
    • 9
  • t

    thankful-stone-5860

    12/09/2025, 6:55 PM
    Just wanted to share some neatness I found: I have a few different repos that utilize
    python_aws_lambda_function
    but I could never find a decent way to integrate the build target with
    terraform_module
    until I recently tried it with
    shell_command
    as a intermediary. Here is my
    src/terraform/BUILD
    file:
    Copy code
    terraform_module(dependencies=[":lambda_zip"])
    
    terraform_deployment(name="infra", root_module=":terraform")
    
    shell_command(
        name="lambda_zip",
        command="[ -f 'src.python/lambda.zip' ] || { exit 1; }",
        execution_dependencies=["src/python:lambda"],
        output_files=["src.python/lambda.zip"],
        workdir="/",
    )
    and I read the
    lambda.zip
    using:
    Copy code
    data "local_file" "lambda_package" {
      filename = "../../src.python/lambda.zip"
    }
    😎 1
    ❤️ 1
  • p

    powerful-scooter-95162

    12/09/2025, 10:48 PM
    I'm getting a weird error on my machine when I run pants check specifically (with mypy):
    Copy code
    There was 1 error downloading required artifacts:
    1. psycopg2 2.9.11 from <https://files.pythonhosted.org/packages/89/8d/9d12bc8677c24dad342ec777529bce705b3e785fa05d85122b5502b9ab55/psycopg2-2.9.11.tar.gz>
        pip:    ERROR: python setup.py egg_info exited with 1
    Nobody else seems to be getting this error so I'm a bit confused
    c
    • 2
    • 4
  • r

    refined-cat-61929

    12/10/2025, 8:03 PM
    Hi, I'm having an error I don't understand about wheels. Yesterday, sqlalchemy released a new point-fix version,
    2.0.45
    . Pants (probably actually
    pex
    ) reported
    No pre-built wheel was available for SQLAlchemy 2.0.45. Successfully built the wheel sqlalchemy-2.0.45-cp311-cp311-macosx_11_0_arm64.whl from the sdist sqlalchemy-2.0.45.tar.gz but it is not compatible with the requested foreign target complete platform cp312-cp312-manylinux_2_36_x86_64.
    But sqlalchemy has what this is apparently looking for, or at least a previous clib version: sqlalchemy-2.0.45-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl. The previous version, which worked, had an even earlier clib version: sqlalchemy-2.0.44-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl. My
    gcloud-platfrom.json
    has the `"cp312-cp312-manylinux_2_36_x86_64",
    Copy code
    as the first compatible tag, but has tags for 2_28 and 2_17 as well.  So I think it *should* work.
    
    When I switch on
    -ldebug`, I see the args to pex (I think) have the following odd-looking args:
    "--no-pypi", "--index=<https://pypi.org/simple/>"
    . We also are using
    --find-link
    with our own storage, but none of this has been a problem in the past. I've worked around the issue by just using the old version of sqlalchemy, but I'd like to understand what is going wrong.
    b
    • 2
    • 6
  • v

    victorious-dress-47449

    12/11/2025, 12:54 AM
    Hello, I may have encountered a bug with environments correctly resolving the right target when using
    parameterize
    . The following seems to pull the same environment for both.
    Copy code
    [environments-preview.names]
    python = "//:python@parametrize=default"
    python_service = "//:python@parametrize=service"
    If I separate them then everything works:
    Copy code
    [environments-preview.names]
    python = "//:python"
    python_service = "//:python_service"
    In fact, throwing a random string e.g.
    python = "//:python@parametrize=dekjdfgk"
    still "works" so it seems like the environment setting is ignoring the parameterization
    • 1
    • 1
  • b

    brainy-parrot-55558

    12/11/2025, 2:29 PM
    is someone experiencing flakiness in their CI / pants installation? we are getting:
    Copy code
    Run bin/get-pants.sh
    Downloading and installing the pants launcher ...
    URL: <https://github.com/pantsbuild/scie-pants/releases/latest/download/scie-pants-macos-aarch64>
    curl: (22) The requested URL returned error: 503
    Error: Process completed with exit code 22.
    I know it's not a pants issue, GH. just curious
    🙋 1
    w
    r
    +2
    • 5
    • 14
  • e

    elegant-florist-94385

    12/12/2025, 1:55 PM
    I'm curious about this section: https://www.pantsbuild.org/stable/docs/javascript/overview/enabling-typescript-support#configuring-project-references I have my tsconfig set up with
    Copy code
    {
      "references": [
        {
          "path": "./shared/header"
        },
        {
          "path": "./apps/app1"
        }
      ]
    }
    This seems to work for typescript itself (ie.
    pants check ::
    ) passes successfully), but my dependency inference is not working correctly. When I run
    pants test ::
    my tests of
    app1
    fail because they cannot import from the shared package. Sure enough,
    pants dependencies
    and/or inspecting sandboxes reveals that there are no transitive dependencies from any of the
    app1
    sources on the shared package. I assume I am missing a config somewhere, but I'm not sure what. Any thoughts?
    • 1
    • 1
  • f

    fast-school-44220

    12/12/2025, 6:58 PM
    I just upgraded from 2.28.0 to 2.30.0 and now I'm seeing this warning at the top of every pants run's output:
    Copy code
    10:55:38.07 [WARN] /home/svenier/.cache/nce/5c54a0c25255df2afb0525da856d49eb81b48cff0e32a9c868f77a296af24319/bindings/venvs/2.30.0/lib/python3.11/site-packages/pants/init/options_initializer.py:14: UserWarning: pkg_resources is deprecated as an API. See <https://setuptools.pypa.io/en/latest/pkg_resources.html>. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
      import pkg_resources
    Is this something on my end from using an old host? Or will it be fixed with SJ's coming updates?
    w
    f
    • 3
    • 8
  • m

    many-vase-25409

    12/13/2025, 5:24 PM
    Hello, is there an easy way to delete or limit the pants cache? It regularly fills up to 20GB or more, and surely not all of this is needed. Or do I need to manually delete it from time to time?
    w
    • 2
    • 5