Devcontainer support

What is the state of devcontainer support in the cpython code?

Is it reasonable to expect that I could clone the repo, open with the devcontainer extension in vscode (on macOS, arm64) , and be able to build/run tests?

I tried this, but I noted a few issues

  • when keeping the git repo in the local environment & having the default option to mount in a container:
    • when opened for the first time in a clean environment (but reproducible in a clean environment) towards the end of the container setup a failure occurs. Reopening in the devcontainer allows the final stages of setup to continue
    • whilst builds work fine, tests fail with permission issues
  • when creating a volume
    • setup works first time
    • builds work, but tests again fail – this time differently, missing symbols

Not a blocker (I have an issue/change I wanted to look at) - but I can reproduce and raise an issue with details if helpful. Before doing so I wanted to check what I was doing was reasonable (I couldn’t find specific devcontainer docs, though it looks as if one of the main targets was github codespaces?). Also I note some of the tests invoke tk & require local UI (not checked if this is setup in devcontainer)

I am able to build fine on fedora40 and the tests pass - other than a few skips:

Total duration: 3 min 45 sec
Total tests: run=45,310 skipped=1,627
Total test files: run=475/477 skipped=14 resource_denied=2

which I suspect is fine.

I did look at other groups, but this is about actually building cpython - to look at behaviour/bugs/changes, rather than using python.

ie python itself is built and tested within the devcontainer to make the dev processor easier (and more approachable for new contributors)

Agreed, this is fine here (but sorry, I don’t know the answer to your question).

@savannahostrowski, maybe you have some insight here?

Yeah, this should just work! What editor are you using to work in the Dev Container? I’ve never seen the behaviour you’re describing in VS Code. If you want to open an issue and tag me (my handle is the same on GitHub), I’d happily debug it with you!

Thanks. I’ll raise an issue with detailed info, may take a few days (workload). Editor is vscode.

1 Like