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

    hundreds-carpet-28072

    10/28/2025, 10:56 AM
    Could somebody provide a link as to the exact spec that Pex uses for its lockfiles? I can’t seem to find it searching docs/github.
    b
    c
    • 3
    • 55
  • b

    billowy-tiger-59247

    10/28/2025, 4:57 PM
    Hey folks! We are dealing with an interesting behavior that got me trying to understand how Pants deals with test dependencies at test runtime. What happens in this case: • service resolve: dependency A==1.0.0 • pytest resolve (using the
    pytest.install_from_resolve
    ): dependency A=2.0.0 Which dependency will be picked up during test execution? The one from the original resolve or the one from the pytest resolve?
    h
    • 2
    • 15
  • n

    numerous-pharmacist-91083

    10/28/2025, 11:03 PM
    I'm facing some very slow Python build times. Any time any dependency is changed the build takes forever, primarily on steps like
    Building 21 requirements for requirements.pex
    which I think is building a pex isolated environment for unit tests and/or mypy runs. i think the main culprit is a few big libraries like PyTorch and torchvison but, for obvious reasons, I can't eliminate those. It's gotten so bad that I just added a single dependency and my CI is now timing out after 2 hours even though I'm caching the pants cache in my CI. Is there anything I can do to speed this up? I'm looking at options like maybe running with
    execution_mode = 'venv'
    or
    run_against_entire_lockfile
    but I don't have a good enough understand of how Pants, pex, testing, pip, etc. all interact and since each experiment takes about 2 hours some advice would be greatly appreciated.
    h
    • 2
    • 6
  • r

    ripe-architect-1001

    10/31/2025, 1:59 PM
    Maybe a stupid question but for using
    ruff
    for example if I just want to use it but I don't need any additional configuration I just need to add the backend, I don't need a config section?
    f
    w
    k
    • 4
    • 4
  • c

    curved-manchester-66006

    10/31/2025, 2:12 PM
    🧪 There are recent RCs on all current branches. If these resolve an issue you were experiencing please take them for a spin. • https://github.com/pantsbuild/pants/releases/tag/release_2.27.1rc0 • https://github.com/pantsbuild/pants/releases/tag/release_2.28.1rc0 • https://github.com/pantsbuild/pants/releases/tag/release_2.29.1rc1
  • l

    limited-potato-15054

    11/01/2025, 6:44 PM
    Hello! I'm adopting pantsbuild to our repository and need some assistance. Is this the appropriate channel? I need some help with specifying some internal dependencies
    w
    • 2
    • 1
  • b

    brief-engine-92399

    11/01/2025, 9:32 PM
    Is there a way to set a index url for a specific python_requirement?
    b
    • 2
    • 3
  • b

    brief-engine-92399

    11/01/2025, 11:38 PM
    How can I deal with the case where I have a dependency that forgot to add a build requirement to its build-requires, e.g., forgetting to add torch and expects --no-build-isolation alternatively? (other than forking it and adding the dep to build-requires myself)
    b
    • 2
    • 12
  • l

    limited-potato-15054

    11/02/2025, 12:15 AM
    Copy code
    |directory_a
    -|directory_b
     -|a_python_file.py
     -|BUILD
    -|directory_c
     -|b_python_file.py
     -|BUILD
    b_python_file.py imports a function from a_python_file.py using a relative import. Pantsbuild says it can't infer the dependency. What do I need to do or add to the BUILD file in directory_c so pants knows about this dependency?
    ✅ 1
    e
    • 2
    • 6
  • w

    wide-midnight-78598

    11/03/2025, 2:00 PM
    ❓ Open question to the community... Do people read the release notes/blog section of the website? ❓ https://www.pantsbuild.org/blog If so, are there any particular topics you'd like to see short posts (< 5 minute) about? These could also be candidates for documentation - but preferably more high level topics
    👍 3
    b
    h
    +2
    • 5
    • 15
  • f

    fast-school-44220

    11/03/2025, 2:42 PM
    Any chance anyone's going to BazelCon and is going to have a Pants counter-Con?
    😂 1
    w
    • 2
    • 2
  • h

    hundreds-carpet-28072

    11/04/2025, 12:50 PM
    Is there a way of triggering debug-level logging when “Long running tasks” is hit?
  • h

    hundreds-carpet-28072

    11/04/2025, 4:01 PM
    How can I debug a long-running .pex build process that I suspect is due to some auth/network issues? Setting
    PANTS_LEVEL=debug PANTS_PEX_VERBOSITY=9 PIP_VERBOSE=3
    doesn’t provide any additional logging output from these sections:
    Copy code
    15:11:18.39 [INFO] Long running tasks:
      265.86s	Building .ci.package.pex with 1 requirement: PyYAML==6.0
    15:11:48.42 [INFO] Long running tasks:
      295.90s	Building .ci.package.pex with 1 requirement: PyYAML==6.0
    e
    • 2
    • 3
  • a

    abundant-tent-27407

    11/06/2025, 9:01 AM
    Hi 👋 . Just updated to version 2.29 and have an issue with
    python_distribution
    that I wasn't having prior. I'm getting the following error:
    Copy code
    stderr:
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
    
    error: option --python-tag not recognized
    Simplified taget:
    Copy code
    python_distribution(
        ...
        wheel_config_settings = {
            "--global-option": [
                "--python-tag",
                "py311",
            ],
        },
    )
    Any suggestions on what is going on here?
    w
    b
    • 3
    • 7
  • p

    powerful-scooter-95162

    11/07/2025, 8:53 PM
    Hey folks, has anyone seen an error like this before:
    Copy code
    Engine traceback:
      in `package` goal
    
    IntrinsicError: Permission denied (os error 13)
    Looking at strace, I see these two commands return 13:
    Copy code
    openat(AT_FDCWD, "/tmp/immutable_inputsVEAeNe", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_DIRECTORY) = 13
    ...
    openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 13
    The permissions for both /tmp/ and /etc/localtime seem fine
    • 1
    • 2
  • f

    fast-nail-55400

    11/08/2025, 3:09 AM
    An interesting interaction with pip version and installing certain dependencies. (Posting in case anybody encounters it and wants a solution. ) Got this error when running
    pants fmt ::
    in a Pants-managed repository:
    Copy code
    ProcessExecutionFailure: Process 'Building black.pex from <resource://pants.backend.python.lint.black/black.lock>' failed with exit code 1.
    stdout:
    
    stderr:
    There was 1 error downloading required artifacts:
    1. platformdirs 4.4 from <https://files.pythonhosted.org/packages/40/4b/2028861e724d3bd36227adfa20d3fd24c3fc6d52032f4a93c133be5d17ce/platformdirs-4.4.0-py3-none-any.whl>
        Invalid specifier: 'CPython<3.14'
    I had
    [python].pip_version
    in
    pants.toml
    set to
    25.0
    and not
    latest
    . Switching to a newer pip fixes the issue. Gotta "appreciate" that pip needs to be updated to recognize the existence of newer Python versions.
    b
    • 2
    • 11
  • 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