Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support of MS-DOS (DJGPP compiler) #66781

Closed
vstinner opened this issue Oct 9, 2014 · 8 comments
Closed

Drop support of MS-DOS (DJGPP compiler) #66781

vstinner opened this issue Oct 9, 2014 · 8 comments

Comments

@vstinner
Copy link
Member

vstinner commented Oct 9, 2014

BPO 22591
Nosy @pitrou, @vstinner, @serhiy-storchaka
Files
  • drop_msdos_support.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2014-10-10.09:57:04.399>
    created_at = <Date 2014-10-09.21:15:43.717>
    labels = []
    title = 'Drop support of MS-DOS (DJGPP compiler)'
    updated_at = <Date 2014-10-10.09:57:04.398>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2014-10-10.09:57:04.398>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-10-10.09:57:04.399>
    closer = 'vstinner'
    components = []
    creation = <Date 2014-10-09.21:15:43.717>
    creator = 'vstinner'
    dependencies = []
    files = ['36856']
    hgrepos = []
    issue_num = 22591
    keywords = ['patch']
    message_count = 8.0
    messages = ['228913', '228916', '228920', '228922', '228924', '228974', '228975', '228976']
    nosy_count = 5.0
    nosy_names = ['pitrou', 'vstinner', 'Arfrever', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue22591'
    versions = ['Python 3.5']

    @vstinner
    Copy link
    Member Author

    vstinner commented Oct 9, 2014

    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

    @serhiy-storchaka
    Copy link
    Member

    AFAIK Borland and Watcom compilers supported Windows.

    @vstinner
    Copy link
    Member Author

    vstinner commented Oct 9, 2014

    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.

    @pitrou
    Copy link
    Member

    pitrou commented Oct 9, 2014

    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 ;-)

    @vstinner
    Copy link
    Member Author

    vstinner commented Oct 9, 2014

    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 bpo-22592 to propose to drop the support of the Borland C compiler.

    @vstinner
    Copy link
    Member Author

    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?

    @pitrou
    Copy link
    Member

    pitrou commented Oct 10, 2014

    Yes!

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 10, 2014

    New changeset a1605d2508af by Victor Stinner in branch 'default':
    Issue bpo-22591: Drop support of MS-DOS
    https://hg.python.org/cpython/rev/a1605d2508af

    @vstinner vstinner changed the title Drop support of MS-DOS Drop support of MS-DOS (DJGPP compiler) Oct 10, 2014
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants