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

    happy-kitchen-89482

    11/09/2025, 11:49 PM
    https://pantsbuild.slack.com/archives/C0D7TNJHL/p1762732178639309
  • s

    silly-queen-7197

    11/11/2025, 4:58 AM
    Have folks tried out anywidget? Its a way to create widgets similar to what you'd find in ipywidgets. Many MLEs (myself included) like these for creating interactive jupyter notebooks. I'm wondering if there's a way I can bundle some typescript code that's converted to regular js into my python code that consumes it. For something like a webserver, local development is easy with pants. Declare the dep and pants run the some file. For this it seems like my options are 1. package the typescript code and consume in python from dist. 2. Setup my code as a distribution and then have folks import it after calling export* I'm wondering if i can set my code up as a package and somehow consume it from a notebook with an editable install? If I'm using the venv produced by a pants export this seems plausible in theory?
    • 1
    • 2
  • w

    worried-glass-66985

    11/11/2025, 11:50 AM
    Hello! I'd like to figure out what are the best practices about using a single resolve for several projects. As I understand from the docs single resolve is preferable if dependencies of different projects do not conflict with each other. What I don't like is getting warnings like
    Pants cannot infer owners for the following imports
    when some dependency is specified in several
    python_requirement
    targets. I have a small example to illustrate my problem. I would expect dependency to be: 1. If not specified explicitly for the target, then some merge of all other dependencies, or just take the exact version from lockfile 2. If specified, then use this dependency without any warnings
    f
    e
    • 3
    • 6
  • g

    gentle-flower-25372

    11/12/2025, 4:15 PM
    Is there a way to embed or cache this in our CI Agent AMIs? We find that GitHub is rather unreliable. We see issues conservatively once a quarter and it disrupts CI. > Failed to fetch https://github.com/pantsbuild/pants/releases/download/release_2.28.0/pants.2.28.0-cp311-linux_x86_64.pex: [28] Timeout was reached (Failed to connect to github.com port 443 after 129444 ms: Couldn't connect to server) > Wasn't able to fetch the Pants PEX at https://github.com/pantsbuild/pants/releases/download/release_2.28.0/pants.2.28.0-cp311-linux_x86_64.pex. > Check to see if the URL is reachable. > > Exception: > Command '['/var/lib/buildkite-agent/.cache/nce/22652cf60b12e7a187ea0cf21d7bc9d8234bbb630fa94ca6f9c28655bd6a81fb/ptex-linux-x86_64', 'https://github.com/pantsbuild/pants/releases/download/release_2.28.0/pants.2.28.0-cp311-linux_x86_64.pex']' returned non-zero exit status 1. > Error: Failed to establish atomic directory /var/lib/buildkite-agent/.cache/nce/5c54a0c25255df2afb0525da856d49eb81b48cff0e32a9c868f77a296af24319/locks/install-c0ce0c6f977d6f5d0786222a4e158390b5b503257ea667345b3e995f3e2d738f. Population of work directory failed: Boot binding command failed: exit status: 1
    f
    • 2
    • 8
  • b

    brainy-sundown-66139

    11/13/2025, 6:51 PM
    Are there any reasons that the pex generated during pants run, and the pex generated during pants package would be different? I am running into a weird issue where I can run package and run the pex directly and that works, but when I run pants run, I get a no module named ... error.
    Copy code
    ModuleNotFoundError: No module named 'azure.eventhub.extensions.checkpointstoreblobaio'
    b
    • 2
    • 24
  • f

    famous-kilobyte-26155

    11/14/2025, 4:03 PM
    I’m not able to run pants. It seems to be looking for a release file that doesn’t exist It is looking for https://github.com/pantsbuild/pants/releases/download/release_2.29.1/pants.2.29.1-cp39-darwin_x86_64.pex when the file is https://github.com/pantsbuild/pants/releases/download/release_2.29.1/pants.2.29.1-cp311-darwin_x86_64.pex Is there something I need to change. I’ve tried rerunning get-pants.sh.
    w
    • 2
    • 22
  • b

    busy-ram-14533

    11/14/2025, 4:48 PM
    Has anyone else noticed
    .shellcheckrc
    files not being discovered or used when running shellcheck via
    pants lint
    ?
    w
    • 2
    • 1
  • l

    limited-potato-15054

    11/14/2025, 7:39 PM
    When I run pants run command, how do I get it to use local sources instead of installing dependencies from artifactory?
  • p

    powerful-scooter-95162

    11/14/2025, 8:57 PM
    Is it possible to have a pex depend on another pex and then run that pex file as a separate shell command? I want to bundle a python tool that has a weird set of dependencies (skypilot) from our main python system. Inside a docker container this is pretty straight forward....
    • 1
    • 1
  • g

    gray-apple-58935

    11/18/2025, 4:45 PM
    looking into pyinstaller / nuitka integration
  • w

    wide-midnight-78598

    11/19/2025, 3:46 PM
    Just a heads up to Homebrew users - for some reason, the last scie-pants release didn't run on the homebrew-tap repo (out-of-date ubuntu, looks like), so I just manually updated the repo to support scie-pants 0.12.5, which updated our PBS versions to 20250612
  • w

    worried-piano-22913

    11/20/2025, 10:48 AM
    Hello, is there a way to ignore dependency mismatches when resolving python package dependencies? E.g. Package A and B depend on package C, but they chose the dependency ranges too strictly and now they cant be installed together. Can i force a version for dependency C and still generate the lockfiles? Edit: Specified 'python packages'
    b
    • 2
    • 1
  • 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?
  • 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
    • 16
  • 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
    • 3
    • 6
  • 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