Clean up Python/thread_*.h ?
Hello, I am wondering which of the files in Python/thread_*.h are really necessary today. Looking at these files, I think most of them could perhaps be removed in py3k. I've identified three categories of potentially removable files: * The unused file: thread_wince.h Windows CE has actually been using thread_nt.h since January 2009 (see http://bugs.python.org/issue4893 ). thread_wince.h is still there, but it's unused and grep brings no instance of it being mentioned anywhere in the source tree. * The (unsupported, untested?) files: thread_atheos.h, thread_cthread.h, thread_lwp.h, thread_os2.h, thread_pth.h, thread_sgi.h. These files refer to architectures which we probably have stopped caring about. It is not even sure whether these files compile and work ok. Most of them have not seen maintenance for years, except for the OS/2 file. In any case, it is obvious they haven't received the level of attention and support that the pthreads and NT versions have. (also, according to http://www.lesstif.org/~amai/os2/html/porting.html, there is a pthreads interface available for OS/2) * The questionable files: thread_pth.h, thread_solaris.h. GNU pth is probably obsolete on all platforms and superseced by the pthreads API. According to http://www.gnu.org/software/pth/, the last pth version was released in 2006 (and the changelog is rather unimpressive). As for Solaris, according to the Sun website it should provide the pthreads API. It was already documented in a 1999 manpage for SunOS 5.9: http://docs.sun.com/app/docs/doc/816-0216/6m6ngupon?a=view . Making a decision and removing the files considered unnecessary would clarify what platforms still are/should be supported. Having less supported platforms would also make improvements easier. Right now making an addition to the core threading primitives is almost impossible since it would require to provide all those platform-specific versions which almost nobody is competent for. Regards Antoine.
Antoine Pitrou wrote:
* The unused file: thread_wince.h
Windows CE has actually been using thread_nt.h since January 2009 (see http://bugs.python.org/issue4893 ). thread_wince.h is still there, but it's unused and grep brings no instance of it being mentioned anywhere in the source tree.
What about older versions of Windows CE? Maybe they still require the wince thread header?
* The (unsupported, untested?) files: thread_atheos.h, thread_cthread.h, thread_lwp.h, thread_os2.h, thread_pth.h, thread_sgi.h.
thread_atheos.h --------------- According to svn annotate the file was added on one revision and never touched afterwards. It was added by MvL. r27146 | loewis | 2002-06-11 08:22:31 +0200 (Tue, 11 Jun 2002) | 2 lines Patch #488073: AtheOS port. thread_cthread.h ---------------- Most lines were last modified or added in in revision 4018 (!), 12178, 16421 and 24967 by Guido, Thomas Wouters and MvL. The last change was: r24967 | loewis | 2002-01-01 19:41:33 +0100 (Di, 01. Jan 2002) | 2 Zeilen Patch #497098: build support for GNU/Hurd. thread_lwp.h ------------ The history of this file is almost identical to thread_cthread.h. No changes since r23732 (2001-10-16) thread_os2.h ------------ The file seems to be maintained by Andrew Macintyre. The last change was on r46919 (2006-06-13). We should ask him before we remove the file. thread_pth.h ------------ No changes since r15372 (2000-05-08), most of the files was last changed by Guido and Thomas Wouters. thread_sgi.h ------------ Same as thread_cthread.h I'mm +1 on removing the files. Let's ask Martin and Andrew before we remove the wince and os2 thread files. Christian
Making a decision and removing the files considered unnecessary would clarify what platforms still are/should be supported.
I think any such removal should go through the PEP 11 process. Put a #error into the files for 3.2, and a removal notice into the PEP, then remove them in 3.3. As for OS/2: this should probably stay. Regards, Martin
Martin v. Löwis
Making a decision and removing the files considered unnecessary would clarify what platforms still are/should be supported.
I think any such removal should go through the PEP 11 process. Put a #error into the files for 3.2, and a removal notice into the PEP, then remove them in 3.3.
Ok, thanks! I see that AtheOS and BeOS are already marked unsupported in PEP 11. What is your opinion about the Solaris-specific thread support? Is it still necessary? Regards Antoine.
Martin v. Löwis wrote:
Making a decision and removing the files considered unnecessary would clarify what platforms still are/should be supported.
I think any such removal should go through the PEP 11 process. Put a #error into the files for 3.2, and a removal notice into the PEP, then remove them in 3.3.
As for OS/2: this should probably stay.
Yes please (to keeping the OS/2 thread support as-is). Andrew. -- ------------------------------------------------------------------------- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: andymac@bullseye.apana.org.au (pref) | Snail: PO Box 370 andymac@pcug.org.au (alt) | Belconnen ACT 2616 Web: http://www.andymac.org/ | Australia
On Saturday 24 October 2009, Christian Heimes wrote:
Antoine Pitrou wrote:
* The unused file: thread_wince.h
Windows CE has actually been using thread_nt.h since January 2009 (see http://bugs.python.org/issue4893 ). thread_wince.h is still there, but it's unused and grep brings no instance of it being mentioned anywhere in the source tree.
What about older versions of Windows CE? Maybe they still require the wince thread header?
Windows CE support in recent 2.x (and probably 3.x) is broken due to heavy bitrot. I can't imagine any CE platform this code would compile against. Further, I don't see many people using CE < 4, with CE 6 being current, in fact they are _very_ rare judging from Usenet activities. For current CE versions, porting the NT-threads code is the easier way out. +1 for removal of thread_wince.{h,c} Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 ************************************************************************************** Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 ************************************************************************************** Visit our website at http://www.satorlaser.de/ ************************************************************************************** Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden. E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich. **************************************************************************************
participants (5)
-
"Martin v. Löwis"
-
Andrew MacIntyre
-
Antoine Pitrou
-
Christian Heimes
-
Ulrich Eckhardt