• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 36668
0%
main: 80%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/gha-deps-3c8f6f13e3
DEFAULT BRANCH: main
Ran 25 Nov 2020 12:18AM UTC
Jobs 1
Files 418
Run time 41s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
36668

push

travis-ci-com

web-flow
Fix dependency inference parsing of Python 3.8 and 3.9 files (#11213)

## Problem

We currently cheat with dependency inference by exploiting the fact that Pants runs via Python, so we use Python's `ast` module.

This means that we can only parse the AST for whatever version of Python we run Pants with (and earlier versions, thanks to backwards compat). Tangibly, you must run Pants with Py38 to parse Py38 syntax. We can never parse Py39 files as we don't release a Py39 wheel.

## Solution

Run import analysis as a subprocess. Use the `interpreter_constraints` field to discover the interpreter like we'd normally do.

## Benchmarks

All of these runs are 25 times.

Before, `--no-pantsd` (i.e., completely cold cache):

```
1: ./pants --no-pantsd dependencies ::
            Mean        Std.Dev.    Min         Median      Max
real        5.682       0.186       5.494       5.638       6.362
user        6.245       0.197       6.067       6.202       7.012
sys         3.969       0.088       3.878       3.949       4.245
```

After, `--no-pantsd` and using `UncachableProcess` (i.e, a completely cold cache):

```
            Mean        Std.Dev.    Min         Median      Max
real        8.597       0.241       8.204       8.595       9.186
user        15.434      0.497       14.396      15.394      16.439
sys         10.834      0.382       9.964       10.842      11.550
```


After, `--no-pantsd` but 100% cache for the process (i.e., pantsd restart on completely warm cache):

```
1: ./pants --no-pantsd dependencies ::
            Mean        Std.Dev.    Min         Median      Max
real        6.914       0.402       6.268       6.886       8.082
user        7.680       0.334       7.248       7.616       8.854
sys         5.445       0.201       5.089       5.427       6.138
```

Note that the After runs include finding a compatible interpreter, which appears to take ~1s. This was not needed before. While this ad... (continued)

0 of 29089 relevant lines covered (0.0%)

0.0 hits per line

Jobs
ID Job ID Ran Files Coverage
4 36668.4 (PANTS_CONFIG_FILES="${TRAVIS_BUILD_DIR}/pants.travis-ci.toml" PANTS_DYNAMIC_UI=false LC_ALL="en_US.UTF-8" AWS_BUCKET=ci-public.pantsbuild.org BOOTSTRAPPED_PEX_KEY_PREFIX=daily/${TRAVIS_BUILD_NUMBER}/${TRAVIS_BUILD_ID}/pants.pex NATIVE_ENGINE_SO_KEY_PREFIX=monthly/native_engine_so MACOS_PYENV_PY27_VERSION=2.7.18 MACOS_PYENV_PY37_VERSION=3.7.7 MACOS_PYENV_PY38_VERSION=3.8.3 PYENV_ROOT_OSX=${HOME}/.pants_pyenv PYENV_ROOT="${PYENV_ROOT:-${PYENV_ROOT_OSX}}" PATH="${PYENV_ROOT}/shims:${PATH}" AWS_CLI_ROOT="${HOME}/.aws_cli" AWS_ACCESS_KEY_ID__TO_BE_REEXPORTED_ON_DEPLOYS=AKIAV6A6G7RQ2HFZ5KP7 AWS_SECRET_ACCESS_KEY=[secure] RUST_BACKTRACE="all" BOOTSTRAPPED_PEX_KEY_SUFFIX=py37.linux CACHE_NAME=python_tests.py37) 25 Nov 2020 12:18AM UTC 0
0.0
Travis Job 36668.4
Source Files on build 36668
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #36668
  • a41de986 on github
  • Prev Build on master (#36666)
  • Next Build on master (#36669)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc