classification
Title: Drop support of MS-DOS (DJGPP compiler)
Type: Stage:
Components: Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, haypo, pitrou, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2014-10-09 21:15 by haypo, last changed 2014-10-10 09:57 by haypo. This issue is now closed.

Files
File name Uploaded Description Edit
drop_msdos_support.patch haypo, 2014-10-09 22:01 review
Messages (8)
msg228913 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2014-10-09 21:15
In the C code of Python 3.5, there are still preprocessor commands checking for defines:

- __BORLANDC__: Borland C compiler
- __WATCOMC__: Watcom C compiler
- __DJGPP__: MS-DOS port of GCC

In 2014, it's time to drop this old code. OS/2 support was already removed in Python 3.4 (see the PEP 11).

I'm quite sure that Python 3.5 cannot be compiled on MS-DOS and/or will not work on MS-DOS. I don't think that anyone tried Python 3 on MS-DOS. The MS-DOS support was simply inherited from Python 2, Python 3 source code is based on Python 2.

I don't want to drop support of custom compilers, only removing code specific to MS-DOS, see:
http://bugs.python.org/issue22579#msg228908
msg228916 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-10-09 21:24
AFAIK Borland and Watcom compilers supported Windows.
msg228920 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2014-10-09 21:44
> AFAIK Borland and Watcom compilers supported Windows.

It looks like Borland C++ Builder 5.5 was released in 2000, 14 years ago. Yes, it supports Windows and MS-DOS, but do we really want to support this very old proprietary compiler?

For Watcom, it's a different story. The compiler was released under an open source license. It's now hosted at github and the project is actively developed (last commit a few hours ago):
https://github.com/open-watcom/open-watcom-v2/

It would be interesting to support OpenWatcom compiler on Windows to not depend on the proprietary Microsoft compiler.
msg228922 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-10-09 21:47
> AFAIK Borland and Watcom compilers supported Windows.

AFAIU Victor only proposes to remove the MSDOS-specific conditionals. But it's hard to tell, since he didn't post a patch ;-)
msg228924 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2014-10-09 22:01
Here is my huge patch :-) It only changes osdefs.h.

In fact, I expected more code checking for __DJGPP__.

For __WATCOMC__, it's unclear for me yet if the code is specific to MS-DOS or to the Watcom compiler. For example, timemodule.c includes <i86.h> to get the delay() function. On Linux, I would prefer to use select(), on Windows, I would prefer to use the Windows code. We should check if OpenWatcom provides select() on Linux. I'm trying to build OpenWatcom for this ;)

I created the issue #22592 to propose to drop the support of the Borland C compiler.
msg228974 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2014-10-10 09:53
I hope that "MS_WINDOWS" is also defined when Python is compiled by the Borland C compiler or OpenWatcom. IMO if it's not the case, it's a bug and it should be fixed.

It means that my patch drop_msdos_support.patch only drops support for the DJGPP compiler in fact. DJGPP is (was) the MS-DOS port of GCC.

So, what do you think of drop_msdos_support.patch? Is it ok for Python 3.5?
msg228975 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-10-10 09:54
Yes!
msg228976 - (view) Author: Roundup Robot (python-dev) Date: 2014-10-10 09:56
New changeset a1605d2508af by Victor Stinner in branch 'default':
Issue #22591: Drop support of MS-DOS
https://hg.python.org/cpython/rev/a1605d2508af
History
Date User Action Args
2014-10-10 09:57:04hayposetstatus: open -> closed
resolution: fixed
title: Drop support of MS-DOS -> Drop support of MS-DOS (DJGPP compiler)
2014-10-10 09:56:21python-devsetnosy: + python-dev
messages: + msg228976
2014-10-10 09:54:01pitrousetmessages: + msg228975
2014-10-10 09:53:29hayposetmessages: + msg228974
2014-10-09 22:06:18Arfreversetnosy: + Arfrever
2014-10-09 22:01:24hayposetfiles: + drop_msdos_support.patch
keywords: + patch
messages: + msg228924
2014-10-09 21:47:51pitrousetnosy: + pitrou
messages: + msg228922
2014-10-09 21:44:59hayposetmessages: + msg228920
2014-10-09 21:24:50serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg228916
2014-10-09 21:15:43haypocreate