Skip to content

Commit af01f66

Browse files
committed
Issue python#16136: Remove VMS support and VMS-related code
1 parent 5255b86 commit af01f66

File tree

20 files changed

+27
-325
lines changed

20 files changed

+27
-325
lines changed

Doc/whatsnew/3.4.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,7 @@ Unsupported Operating Systems
977977

978978
* OS/2
979979
* Windows 2000
980+
* VMS
980981

981982

982983
Deprecated Python modules, functions and methods

Include/pyerrors.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,6 @@ PyAPI_DATA(PyObject *) PyExc_IOError;
199199
#ifdef MS_WINDOWS
200200
PyAPI_DATA(PyObject *) PyExc_WindowsError;
201201
#endif
202-
#ifdef __VMS
203-
PyAPI_DATA(PyObject *) PyExc_VMSError;
204-
#endif
205202

206203
PyAPI_DATA(PyObject *) PyExc_RecursionErrorInst;
207204

Lib/test/test_pep3151.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ def test_blockingioerror(self):
157157
e.characters_written = 5
158158
self.assertEqual(e.characters_written, 5)
159159

160-
# XXX VMSError not tested
161-
162160

163161
class ExplicitSubclassingTest(unittest.TestCase):
164162

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ Tests
256256
Build
257257
-----
258258

259+
- Issue #16136: Remove VMS support
260+
259261
- Issue #18215: Add script Tools/ssl/test_multiple_versions.py to compile and
260262
run Python's unit tests with multiple versions of OpenSSL.
261263

Modules/_cryptmodule.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,12 @@
55

66
#include <sys/types.h>
77

8-
#ifdef __VMS
9-
#include <openssl/des.h>
10-
#endif
11-
128
/* Module crypt */
139

1410

1511
static PyObject *crypt_crypt(PyObject *self, PyObject *args)
1612
{
1713
char *word, *salt;
18-
#ifndef __VMS
19-
extern char * crypt(const char *, const char *);
20-
#endif
2114

2215
if (!PyArg_ParseTuple(args, "ss:crypt", &word, &salt)) {
2316
return NULL;

Modules/fcntlmodule.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,7 @@ fcntl_ioctl(PyObject *self, PyObject *args)
208208
return NULL;
209209
}
210210
Py_BEGIN_ALLOW_THREADS
211-
#ifdef __VMS
212-
ret = ioctl(fd, code, (void *)arg);
213-
#else
214211
ret = ioctl(fd, code, arg);
215-
#endif
216212
Py_END_ALLOW_THREADS
217213
if (ret < 0) {
218214
PyErr_SetFromErrno(PyExc_IOError);

Modules/fpectlmodule.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ extern "C" {
7070

7171
#if defined(__FreeBSD__)
7272
# include <ieeefp.h>
73-
#elif defined(__VMS)
74-
#define __NEW_STARLET
75-
#include <starlet.h>
76-
#include <ieeedef.h>
7773
#endif
7874

7975
#ifndef WANT_SIGFPE_HANDLER
@@ -182,23 +178,6 @@ static void fpe_reset(Sigfunc *handler)
182178
ieee_set_fp_control(fp_control);
183179
PyOS_setsig(SIGFPE, handler);
184180

185-
/*-- DEC ALPHA VMS --------------------------------------------------------*/
186-
#elif defined(__ALPHA) && defined(__VMS)
187-
IEEE clrmsk;
188-
IEEE setmsk;
189-
clrmsk.ieee$q_flags =
190-
IEEE$M_TRAP_ENABLE_UNF | IEEE$M_TRAP_ENABLE_INE |
191-
IEEE$M_MAP_UMZ;
192-
setmsk.ieee$q_flags =
193-
IEEE$M_TRAP_ENABLE_INV | IEEE$M_TRAP_ENABLE_DZE |
194-
IEEE$M_TRAP_ENABLE_OVF;
195-
sys$ieee_set_fp_control(&clrmsk, &setmsk, 0);
196-
PyOS_setsig(SIGFPE, handler);
197-
198-
/*-- HP IA64 VMS --------------------------------------------------------*/
199-
#elif defined(__ia64) && defined(__VMS)
200-
PyOS_setsig(SIGFPE, handler);
201-
202181
/*-- Cray Unicos ----------------------------------------------------------*/
203182
#elif defined(cray)
204183
/* UNICOS delivers SIGFPE by default, but no matherr */
@@ -251,14 +230,6 @@ static PyObject *turnoff_sigfpe(PyObject *self,PyObject *args)
251230
#ifdef __FreeBSD__
252231
fpresetsticky(fpgetsticky());
253232
fpsetmask(0);
254-
#elif defined(__VMS)
255-
IEEE clrmsk;
256-
clrmsk.ieee$q_flags =
257-
IEEE$M_TRAP_ENABLE_UNF | IEEE$M_TRAP_ENABLE_INE |
258-
IEEE$M_MAP_UMZ | IEEE$M_TRAP_ENABLE_INV |
259-
IEEE$M_TRAP_ENABLE_DZE | IEEE$M_TRAP_ENABLE_OVF |
260-
IEEE$M_INHERIT;
261-
sys$ieee_set_fp_control(&clrmsk, 0, 0);
262233
#else
263234
fputs("Operation not implemented\n", stderr);
264235
#endif

Modules/getpath.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,7 @@
110110
#endif
111111

112112
#ifndef PREFIX
113-
# ifdef __VMS
114-
# define PREFIX ""
115-
# else
116-
# define PREFIX "/usr/local"
117-
# endif
113+
# define PREFIX "/usr/local"
118114
#endif
119115

120116
#ifndef EXEC_PREFIX

Modules/grpmodule.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,12 @@ mkgrent(struct group *p)
5858

5959
#define SET(i,val) PyStructSequence_SET_ITEM(v, i, val)
6060
SET(setIndex++, PyUnicode_DecodeFSDefault(p->gr_name));
61-
#ifdef __VMS
62-
SET(setIndex++, Py_None);
63-
Py_INCREF(Py_None);
64-
#else
6561
if (p->gr_passwd)
6662
SET(setIndex++, PyUnicode_DecodeFSDefault(p->gr_passwd));
6763
else {
6864
SET(setIndex++, Py_None);
6965
Py_INCREF(Py_None);
7066
}
71-
#endif
7267
SET(setIndex++, _PyLong_FromGid(p->gr_gid));
7368
SET(setIndex++, w);
7469
#undef SET

Modules/main.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55

66
#include <locale.h>
77

8-
#ifdef __VMS
9-
#error "PEP 11: VMS is now unsupported, code will be removed in Python 3.4"
10-
#include <unixlib.h>
11-
#endif
12-
138
#if defined(MS_WINDOWS) || defined(__CYGWIN__)
149
#include <windows.h>
1510
#ifdef HAVE_FCNTL_H
@@ -124,19 +119,7 @@ usage(int exitcode, wchar_t* program)
124119
fprintf(f, usage_5, DELIM, PYTHONHOMEHELP);
125120
fputs(usage_6, f);
126121
}
127-
#if defined(__VMS)
128-
if (exitcode == 0) {
129-
/* suppress 'error' message */
130-
return 1;
131-
}
132-
else {
133-
/* STS$M_INHIB_MSG + SS$_ABORT */
134-
return 0x1000002c;
135-
}
136-
#else
137122
return exitcode;
138-
#endif
139-
/*NOTREACHED*/
140123
}
141124

142125
static void RunStartupFile(PyCompilerFlags *cf)
@@ -580,14 +563,7 @@ Py_Main(int argc, wchar_t **argv)
580563
if (command == NULL && module == NULL && _PyOS_optind < argc &&
581564
wcscmp(argv[_PyOS_optind], L"-") != 0)
582565
{
583-
#ifdef __VMS
584-
filename = decc$translate_vms(argv[_PyOS_optind]);
585-
if (filename == (char *)0 || filename == (char *)-1)
586-
filename = argv[_PyOS_optind];
587-
588-
#else
589566
filename = argv[_PyOS_optind];
590-
#endif
591567
}
592568

593569
stdin_is_interactive = Py_FdIsInteractive(stdin, (char *)0);
@@ -623,11 +599,6 @@ Py_Main(int argc, wchar_t **argv)
623599
#endif /* !MS_WINDOWS */
624600
/* Leave stderr alone - it should be unbuffered anyway. */
625601
}
626-
#ifdef __VMS
627-
else {
628-
setvbuf (stdout, (char *)NULL, _IOLBF, BUFSIZ);
629-
}
630-
#endif /* __VMS */
631602

632603
#ifdef __APPLE__
633604
/* On MacOS X, when the Python interpreter is embedded in an

0 commit comments

Comments
 (0)