python / python/cpython

build-details.json should be installed to different locations for nondebug/debug builds and have distinct base_interpreter values

Aperta
#131,372 7 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

build topic-installation type-bug
Lingua principale
Python
Stelle
77.2k
Fork
35.9k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

Bug report

Bug description:

In Fedora, we build Python in 4 variants: debug, optimized, freethreading-debug and freethreading. For all of them builds the base_interpreter value stored in the file build-details.json is the same:

  "base_interpreter": "/usr/bin/python3.14",

I suspect it should reflect the build type and contain the applicable suffix(es): d, t, td.
Because of this line, when we run Python's test suite on an installed python3-debug, the test fails, as you can see e.g. here: https://artifacts.dev.testing-farm.io/0ac8ab69-ed5f-4602-9c01-8c13293aa9b6/

test_base_interpreter (test.test_build_details.CPythonBuildDetailsTests.test_base_interpreter) ... FAIL

======================================================================
FAIL: test_base_interpreter (test.test_build_details.CPythonBuildDetailsTests.test_base_interpreter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.14/test/test_build_details.py", line 124, in test_base_interpreter
    self.assertEqual(os.path.realpath(value), os.path.realpath(sys.executable))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/usr/bin/python3.14' != '/usr/bin/python3.14d'
- /usr/bin/python3.14
+ /usr/bin/python3.14d
?                    +

Another issue is that in both cases, the debug and non-debug files are installed to the same location, resulting in a single rewritten file. In case of our sequential build of 4 Pythons, we end up with just two files. Should they be stored in distinct locations for each build instead?

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Linked PRs
  • gh-142256
  • gh-142269
  • gh-150098
  • gh-150414

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da test/test_build_details.py, in particolare test_base_interpreter, e riproduci il failure installato debug-versus-nondebug descritto nell’issue. Traccia come viene generato e installato build-details.json per le quattro varianti; il lavoro è completato quando ogni file installato ha il valore base_interpreter applicabile e posizioni distinte, e il test passa.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
build-system
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.