Skip to content

Commit 3700920

Browse files
committed
Issue python#11863: Remove support for legacy systems deprecated in Python 3.2
(following PEP 11). These systems are systems using Mach C Threads, SunOS lightweight processes, GNU pth threads and IRIX threads.
1 parent 022ae22 commit 3700920

11 files changed

Lines changed: 315 additions & 1009 deletions

File tree

Include/Python.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,6 @@ PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
151151
#define Py_file_input 257
152152
#define Py_eval_input 258
153153

154-
#ifdef HAVE_PTH
155-
/* GNU pth user-space thread support */
156-
#include <pth.h>
157-
#endif
158-
159154
/* Define macros for inline documentation. */
160155
#define PyDoc_VAR(name) static char name[]
161156
#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,10 @@ Library
948948
Build
949949
-----
950950

951+
- Issue #11863: Remove support for legacy systems deprecated in Python 3.2
952+
(following PEP 11). These systems are systems using Mach C Threads,
953+
SunOS lightweight processes, GNU pth threads and IRIX threads.
954+
951955
- Issue #8746: Correct faulty configure checks so that os.chflags() and
952956
os.lchflags() are once again built on systems that support these
953957
functions (*BSD and OS X). Also add new stat file flags for OS X

PC/pyconfig.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,9 +711,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
711711
/* Define if you have the <sys/utsname.h> header file. */
712712
/* #define HAVE_SYS_UTSNAME_H 1 */
713713

714-
/* Define if you have the <thread.h> header file. */
715-
/* #undef HAVE_THREAD_H */
716-
717714
/* Define if you have the <unistd.h> header file. */
718715
/* #define HAVE_UNISTD_H 1 */
719716

Python/thread.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@
2626

2727
#ifndef _POSIX_THREADS
2828

29-
#ifdef __sgi
30-
#define SGI_THREADS
31-
#endif
32-
33-
#ifdef HAVE_THREAD_H
34-
#define SOLARIS_THREADS
35-
#endif
36-
37-
#if defined(sun) && !defined(SOLARIS_THREADS)
38-
#define SUN_LWP
39-
#endif
40-
4129
/* Check if we're running on HP-UX and _SC_THREADS is defined. If so, then
4230
enough of the Posix threads package is implemented to support python
4331
threads.
@@ -93,37 +81,11 @@ PyThread_init_thread(void)
9381
or the size specified by the THREAD_STACK_SIZE macro. */
9482
static size_t _pythread_stacksize = 0;
9583

96-
#ifdef SGI_THREADS
97-
#error SGI Irix threads are now unsupported, and code will be removed in 3.3.
98-
#include "thread_sgi.h"
99-
#endif
100-
101-
#ifdef SOLARIS_THREADS
102-
#define PYTHREAD_NAME "solaris"
103-
#include "thread_solaris.h"
104-
#endif
105-
106-
#ifdef SUN_LWP
107-
#error SunOS lightweight processes are now unsupported, and code will be removed in 3.3.
108-
#include "thread_lwp.h"
109-
#endif
110-
111-
#ifdef HAVE_PTH
112-
#error GNU pth threads are now unsupported, and code will be removed in 3.3.
113-
#include "thread_pth.h"
114-
#undef _POSIX_THREADS
115-
#endif
116-
11784
#ifdef _POSIX_THREADS
11885
#define PYTHREAD_NAME "pthread"
11986
#include "thread_pthread.h"
12087
#endif
12188

122-
#ifdef C_THREADS
123-
#error Mach C Threads are now unsupported, and code will be removed in 3.3.
124-
#include "thread_cthread.h"
125-
#endif
126-
12789
#ifdef NT_THREADS
12890
#define PYTHREAD_NAME "nt"
12991
#include "thread_nt.h"
@@ -134,11 +96,6 @@ static size_t _pythread_stacksize = 0;
13496
#include "thread_os2.h"
13597
#endif
13698

137-
#ifdef PLAN9_THREADS
138-
#define PYTHREAD_NAME "plan9"
139-
#include "thread_plan9.h"
140-
#endif
141-
14299
/*
143100
#ifdef FOOBAR_THREADS
144101
#include "thread_foobar.h"

Python/thread_cthread.h

Lines changed: 0 additions & 112 deletions
This file was deleted.

Python/thread_lwp.h

Lines changed: 0 additions & 113 deletions
This file was deleted.

0 commit comments

Comments
 (0)