This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix --without-threads build error
Type: Stage:
Components: Build Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: splitscreen, theller, tim.peters
Priority: normal Keywords: patch

Created on 2006-07-18 17:51 by splitscreen, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
without-thread2.patch splitscreen, 2006-07-18 19:23 Patch v2
Messages (5)
msg50714 - (view) Author: Matt Fleming (splitscreen) Date: 2006-07-18 17:51
This patch fixes the compile error reported in #1524317.

Please review this patch as I have no idea if it's the
right thing to do.

Thanks, Matt
msg50715 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2006-07-18 18:02
Logged In: YES 
user_id=31435

The correct way to repair this is to move the body of
_PyThread_CurrentFrames above:

/* Python "auto thread state" API. */
#ifdef WITH_THREAD

_PyThread_CurrentFrames() should be able to return a dict
regardless of whether WITH_THREAD is defined.  If
WITH_THREAD is not defined, sys._current_frames() should
return a single-element dict, mapping the integer 0 to the
main thread's frame.  That should happen "by magic", but the
test case will have to be changed to pass then.

I have no idea how to build Python without threads on
Windows, so I'm probably not the best person to try this.
msg50716 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-07-18 19:18
Logged In: YES 
user_id=11105

> I have no idea how to build Python without threads on
> Windows, so I'm probably not the best person to try this.

Tim, you can uncomment '#define WITH_THREAD' in
PC/pyconfig.h, and exclude 'threadmodule.c' from the build,
for a start (this will give you the compile error that the
patch is supposed to fix, plus others in _ctypes and sqlite3
code, for example ;-). 

Or you downgrade to linux...
msg50717 - (view) Author: Matt Fleming (splitscreen) Date: 2006-07-18 19:20
Logged In: YES 
user_id=1126061

Another patch coming up.. all tests pass for my on Linux
with and without threads.
msg50718 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2006-07-19 00:09
Logged In: YES 
user_id=31435

Sorry, I didn't notice the change here, and checked in the
suggested kind of fix in rev 50708.  Unsurprisingly, it's
very much like your fix :-)

test_sys still fails in a build without threads, but for an
unrelated reason.
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43688
2006-07-18 17:51:55splitscreencreate