python / python/cpython

test_python_executable failure on macOS 12.7.5

Open
#120,961 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OS-mac tests
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Test added in #120006 fails when running in my private buildbots.

Since it passed in CI, I suspect this means it was relying on the machine configuration or the presence of the source tree to get through the tests. The CI machine was running macOS-13.6.7-x86_64-i386-64bit-Mach-O and mine is macOS-12.7.5-x86_64-i386-64bit-Mach-O.

Mine also applies some install_name_tool modifications to the binaries and deploys them to a new machine before running tests, but given every other test passes and the failure here is to locate a Python module rather than a native one, I have to assume that's not impactful.

stderr:
---
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Fatal Python error: Failed to import encodings module
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0000000115121600 (most recent call first):
  <no Python frame>
---

I'm not in a position to test or debug, unfortunately. I see that Ned proposed to deprecate this variable entirely in #91057, so I wonder how badly we need this test?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the test_python_executable test added in #120006 and reproduce it on the macOS 12.7.5 build described in the report. Compare its behavior with the macOS 13.6.7 CI environment, including the reported deployment and install_name_tool differences. Done means identifying the cause of the missing encodings module and establishing whether the test or its assumptions need to change.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, python
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.