Skip to content

Commit dd0e8a6

Browse files
[3.10] gh-76773: Update docs mentioning no-longer-supported Windows versions & features (GH-92529) (GH-92609)
(cherry picked from commit f1bbcba) Co-authored-by: CAM Gerlach <[email protected]> Automerge-Triggered-By: GH:serhiy-storchaka
1 parent 7954b66 commit dd0e8a6

File tree

9 files changed

+70
-115
lines changed

9 files changed

+70
-115
lines changed

Doc/extending/windows.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ Using DLLs in Practice
106106

107107

108108
Windows Python is built in Microsoft Visual C++; using other compilers may or
109-
may not work (though Borland seems to). The rest of this section is MSVC++
110-
specific.
109+
may not work. The rest of this section is MSVC++ specific.
111110

112111
When creating DLLs in Windows, you must pass :file:`pythonXY.lib` to the linker.
113112
To build two DLLs, spam and ni (which uses C functions found in spam), you could
@@ -134,4 +133,3 @@ Developer Studio will throw in a lot of import libraries that you do not really
134133
need, adding about 100K to your executable. To get rid of them, use the Project
135134
Settings dialog, Link tab, to specify *ignore default libraries*. Add the
136135
correct :file:`msvcrtxx.lib` to the list of libraries.
137-

Doc/faq/windows.rst

+2-6
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ with running programs from the Windows command line then everything will seem
2626
obvious; otherwise, you might need a little more guidance.
2727

2828
Unless you use some sort of integrated development environment, you will end up
29-
*typing* Windows commands into what is variously referred to as a "DOS window"
30-
or "Command prompt window". Usually you can create such a window from your
29+
*typing* Windows commands into what is referred to as a
30+
"Command prompt window". Usually you can create such a window from your
3131
search bar by searching for ``cmd``. You should be able to recognize
3232
when you have started such a window because you will see a Windows "command
3333
prompt", which usually looks like this:
@@ -186,9 +186,6 @@ Embedding the Python interpreter in a Windows app can be summarized as follows:
186186
by the Windows ``GetProcAddress()`` routine. Macros can make using these
187187
pointers transparent to any C code that calls routines in Python's C API.
188188

189-
Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf.exe
190-
first.
191-
192189
.. XXX what about static linking?
193190
194191
2. If you use SWIG, it is easy to create a Python "extension module" that will
@@ -279,4 +276,3 @@ How do I check for a keypress without blocking?
279276
Use the :mod:`msvcrt` module. This is a standard Windows-specific extension module.
280277
It defines a function ``kbhit()`` which checks whether a keyboard hit is
281278
present, and ``getch()`` which gets one character without echoing it.
282-

Doc/library/ctypes.rst

+1-6
Original file line numberDiff line numberDiff line change
@@ -1361,10 +1361,6 @@ way is to instantiate one of the following classes:
13611361
functions in these libraries use the ``stdcall`` calling convention, and are
13621362
assumed to return :c:type:`int` by default.
13631363

1364-
On Windows CE only the standard calling convention is used, for convenience the
1365-
:class:`WinDLL` and :class:`OleDLL` use the standard calling convention on this
1366-
platform.
1367-
13681364
The Python :term:`global interpreter lock` is released before calling any
13691365
function exported by these libraries, and reacquired afterwards.
13701366

@@ -1665,8 +1661,7 @@ See :ref:`ctypes-callback-functions` for examples.
16651661
.. function:: WINFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False)
16661662

16671663
Windows only: The returned function prototype creates functions that use the
1668-
``stdcall`` calling convention, except on Windows CE where
1669-
:func:`WINFUNCTYPE` is the same as :func:`CFUNCTYPE`. The function will
1664+
``stdcall`` calling convention. The function will
16701665
release the GIL during the call. *use_errno* and *use_last_error* have the
16711666
same meaning as above.
16721667

Doc/library/optparse.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ option
131131
These option syntaxes are not supported by :mod:`optparse`, and they never
132132
will be. This is deliberate: the first three are non-standard on any
133133
environment, and the last only makes sense if you're exclusively targeting
134-
VMS, MS-DOS, and/or Windows.
134+
Windows or certain legacy platforms (e.g. VMS, MS-DOS).
135135

136136
option argument
137137
an argument that follows an option, is closely associated with that option,

Doc/library/os.path.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:synopsis: Operations on pathnames.
66

77
**Source code:** :source:`Lib/posixpath.py` (for POSIX) and
8-
:source:`Lib/ntpath.py` (for Windows NT).
8+
:source:`Lib/ntpath.py` (for Windows).
99

1010
.. index:: single: path; operations
1111

Doc/library/tempfile.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ The module defines the following user-callable items:
8484
file-like object. Whether the name can be
8585
used to open the file a second time, while the named temporary file is
8686
still open, varies across platforms (it can be so used on Unix; it cannot
87-
on Windows NT or later). If *delete* is true (the default), the file is
87+
on Windows). If *delete* is true (the default), the file is
8888
deleted as soon as it is closed.
8989
The returned object is always a file-like object whose :attr:`!file`
9090
attribute is the underlying true file object. This file-like object can

Doc/using/windows.rst

+51-83
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ may be changed from ``.``, and the package will be installed into a
374374
subdirectory. By default, the subdirectory is named the same as the package,
375375
and without the ``-ExcludeVersion`` option this name will include the specific
376376
version installed. Inside the subdirectory is a ``tools`` directory that
377-
contains the Python installation::
377+
contains the Python installation:
378+
379+
.. code-block:: doscon
378380
379381
# Without -ExcludeVersion
380382
> .\python.3.5.2\tools\python.exe -V
@@ -421,7 +423,7 @@ dependants, such as Idle), pip and the Python documentation are not included.
421423
.. note::
422424

423425
The embedded distribution does not include the `Microsoft C Runtime
424-
<https://www.microsoft.com/en-us/download/details.aspx?id=48145>`_ and it is
426+
<https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist#visual-studio-2015-2017-2019-and-2022>`_ and it is
425427
the responsibility of the application installer to provide this. The
426428
runtime may have already been installed on a user's system previously or
427429
automatically via Windows Update, and can be detected by finding
@@ -555,27 +557,22 @@ System variables, you need non-restricted access to your machine
555557
Windows will concatenate User variables *after* System variables, which may
556558
cause unexpected results when modifying :envvar:`PATH`.
557559

558-
The :envvar:`PYTHONPATH` variable is used by all versions of Python 2 and
559-
Python 3, so you should not permanently configure this variable unless it
560-
only includes code that is compatible with all of your installed Python
560+
The :envvar:`PYTHONPATH` variable is used by all versions of Python,
561+
so you should not permanently configure it unless the listed paths
562+
only include code that is compatible with all of your installed Python
561563
versions.
562564

563565
.. seealso::
564566

565-
https://www.microsoft.com/en-us/wdsi/help/folder-variables
566-
Environment variables in Windows NT
567-
568-
https://technet.microsoft.com/en-us/library/cc754250.aspx
569-
The SET command, for temporarily modifying environment variables
567+
https://docs.microsoft.com/en-us/windows/win32/procthread/environment-variables
568+
Overview of environment variables on Windows
570569

571-
https://technet.microsoft.com/en-us/library/cc755104.aspx
572-
The SETX command, for permanently modifying environment variables
570+
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1
571+
The ``set`` command, for temporarily modifying environment variables
573572

574-
https://support.microsoft.com/en-us/help/310519/how-to-manage-environment-variables-in-windows-xp
575-
How To Manage Environment Variables in Windows XP
573+
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/setx
574+
The ``setx`` command, for permanently modifying environment variables
576575

577-
https://www.chem.gla.ac.uk/~louis/software/faq/q1.html
578-
Setting Environment variables, Louis J. Farrugia
579576

580577
.. _windows-path-mod:
581578

@@ -673,48 +670,40 @@ From the command-line
673670
System-wide installations of Python 3.3 and later will put the launcher on your
674671
:envvar:`PATH`. The launcher is compatible with all available versions of
675672
Python, so it does not matter which version is installed. To check that the
676-
launcher is available, execute the following command in Command Prompt:
677-
678-
::
673+
launcher is available, execute the following command in Command Prompt::
679674

680675
py
681676

682677
You should find that the latest version of Python you have installed is
683678
started - it can be exited as normal, and any additional command-line
684679
arguments specified will be sent directly to Python.
685680

686-
If you have multiple versions of Python installed (e.g., 2.7 and |version|) you
687-
will have noticed that Python |version| was started - to launch Python 2.7, try
688-
the command:
689-
690-
::
691-
692-
py -2.7
681+
If you have multiple versions of Python installed (e.g., 3.7 and |version|) you
682+
will have noticed that Python |version| was started - to launch Python 3.7, try
683+
the command::
693684

694-
If you want the latest version of Python 2.x you have installed, try the
695-
command:
685+
py -3.7
696686

697-
::
687+
If you want the latest version of Python 2 you have installed, try the
688+
command::
698689

699690
py -2
700691

701-
You should find the latest version of Python 2.x starts.
692+
You should find the latest version of Python 3.x starts.
702693

703-
If you see the following error, you do not have the launcher installed:
704-
705-
::
694+
If you see the following error, you do not have the launcher installed::
706695

707696
'py' is not recognized as an internal or external command,
708697
operable program or batch file.
709698

710699
Per-user installations of Python do not add the launcher to :envvar:`PATH`
711700
unless the option was selected on installation.
712701

713-
::
702+
The command::
714703

715704
py --list
716705

717-
You should see the currently installed versions of Python.
706+
displays the currently installed version(s) of Python.
718707

719708
Virtual environments
720709
^^^^^^^^^^^^^^^^^^^^
@@ -740,9 +729,7 @@ following contents
740729
import sys
741730
sys.stdout.write("hello from Python %s\n" % (sys.version,))
742731
743-
From the directory in which hello.py lives, execute the command:
744-
745-
::
732+
From the directory in which hello.py lives, execute the command::
746733

747734
py hello.py
748735

@@ -755,9 +742,9 @@ is printed. Now try changing the first line to be:
755742
756743
Re-executing the command should now print the latest Python 3.x information.
757744
As with the above command-line examples, you can specify a more explicit
758-
version qualifier. Assuming you have Python 2.6 installed, try changing the
759-
first line to ``#! python2.6`` and you should find the 2.6 version
760-
information printed.
745+
version qualifier. Assuming you have Python 3.7 installed, try changing
746+
the first line to ``#! python3.7`` and you should find the |version|
747+
version information printed.
761748

762749
Note that unlike interactive use, a bare "python" will use the latest
763750
version of Python 2.x that you have installed. This is for backward
@@ -810,8 +797,8 @@ shebang lines starting with ``/usr``.
810797
Any of the above virtual commands can be suffixed with an explicit version
811798
(either just the major version, or the major and minor version).
812799
Furthermore the 32-bit version can be requested by adding "-32" after the
813-
minor version. I.e. ``/usr/bin/python2.7-32`` will request usage of the
814-
32-bit python 2.7.
800+
minor version. I.e. ``/usr/bin/python3.7-32`` will request usage of the
801+
32-bit python 3.7.
815802

816803
.. versionadded:: 3.7
817804

@@ -897,19 +884,19 @@ Examples:
897884
``python2`` will use the latest Python 2.x version installed and
898885
the command ``python3`` will use the latest Python 3.x installed.
899886

900-
* The commands ``python3.1`` and ``python2.7`` will not consult any
887+
* The command ``python3.7`` will not consult any
901888
options at all as the versions are fully specified.
902889

903890
* If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use
904891
the latest installed Python 3 version.
905892

906-
* If ``PY_PYTHON=3.1-32``, the command ``python`` will use the 32-bit
907-
implementation of 3.1 whereas the command ``python3`` will use the latest
893+
* If ``PY_PYTHON=3.7-32``, the command ``python`` will use the 32-bit
894+
implementation of 3.7 whereas the command ``python3`` will use the latest
908895
installed Python (PY_PYTHON was not considered at all as a major
909896
version was specified.)
910897

911-
* If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.1``, the commands
912-
``python`` and ``python3`` will both use specifically 3.1
898+
* If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7``, the commands
899+
``python`` and ``python3`` will both use specifically 3.7
913900

914901
In addition to environment variables, the same settings can be configured
915902
in the .INI file used by the launcher. The section in the INI file is
@@ -920,21 +907,21 @@ an environment variable will override things specified in the INI file.
920907

921908
For example:
922909

923-
* Setting ``PY_PYTHON=3.1`` is equivalent to the INI file containing:
910+
* Setting ``PY_PYTHON=3.7`` is equivalent to the INI file containing:
924911

925912
.. code-block:: ini
926913
927914
[defaults]
928-
python=3.1
915+
python=3.7
929916
930-
* Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.1`` is equivalent to the INI file
917+
* Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7`` is equivalent to the INI file
931918
containing:
932919

933920
.. code-block:: ini
934921
935922
[defaults]
936923
python=3
937-
python3=3.1
924+
python3=3.7
938925
939926
Diagnostics
940927
-----------
@@ -1088,13 +1075,14 @@ is a collection of modules for advanced Windows-specific support. This includes
10881075
utilities for:
10891076

10901077
* `Component Object Model
1091-
<https://docs.microsoft.com/en-us/windows/desktop/com/component-object-model--com--portal>`_
1078+
<https://docs.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal>`_
10921079
(COM)
10931080
* Win32 API calls
10941081
* Registry
10951082
* Event log
1096-
* `Microsoft Foundation Classes <https://msdn.microsoft.com/en-us/library/fe1cf721%28VS.80%29.aspx>`_ (MFC)
1097-
user interfaces
1083+
* `Microsoft Foundation Classes
1084+
<https://docs.microsoft.com/en-us/cpp/mfc/mfc-desktop-applications>`_
1085+
(MFC) user interfaces
10981086

10991087
`PythonWin <https://web.archive.org/web/20060524042422/
11001088
https://www.python.org/windows/pythonwin/>`_ is a sample MFC application
@@ -1105,7 +1093,7 @@ shipped with PyWin32. It is an embeddable IDE with a built-in debugger.
11051093
`Win32 How Do I...? <http://timgolden.me.uk/python/win32_how_do_i.html>`_
11061094
by Tim Golden
11071095

1108-
`Python and COM <http://www.boddie.org.uk/python/COM.html>`_
1096+
`Python and COM <https://www.boddie.org.uk/python/COM.html>`_
11091097
by David and Paul Boddie
11101098

11111099

@@ -1119,18 +1107,6 @@ you can distribute your application without requiring your users to install
11191107
Python.
11201108

11211109

1122-
WConio
1123-
------
1124-
1125-
Since Python's advanced terminal handling layer, :mod:`curses`, is restricted to
1126-
Unix-like systems, there is a library exclusive to Windows as well: Windows
1127-
Console I/O for Python.
1128-
1129-
`WConio <http://newcenturycomputers.net/projects/wconio.html>`_ is a wrapper for
1130-
Turbo-C's :file:`CONIO.H`, used to create text user interfaces.
1131-
1132-
1133-
11341110
Compiling Python on Windows
11351111
===========================
11361112

@@ -1140,21 +1116,13 @@ latest release's source or just grab a fresh `checkout
11401116
<https://devguide.python.org/setup/#getting-the-source-code>`_.
11411117

11421118
The source tree contains a build solution and project files for Microsoft
1143-
Visual Studio 2015, which is the compiler used to build the official Python
1119+
Visual Studio, which is the compiler used to build the official Python
11441120
releases. These files are in the :file:`PCbuild` directory.
11451121

11461122
Check :file:`PCbuild/readme.txt` for general information on the build process.
11471123

1148-
11491124
For extension modules, consult :ref:`building-on-windows`.
11501125

1151-
.. seealso::
1152-
1153-
`Python + Windows + distutils + SWIG + gcc MinGW <http://sebsauvage.net/python/mingw.html>`_
1154-
or "Creating Python extensions in C/C++ with SWIG and compiling them with
1155-
MinGW gcc under Windows" or "Installing Python extension with distutils
1156-
and without Microsoft Visual C++" by Sébastien Sauvage, 2003
1157-
11581126

11591127
Other Platforms
11601128
===============
@@ -1163,12 +1131,12 @@ With ongoing development of Python, some platforms that used to be supported
11631131
earlier are no longer supported (due to the lack of users or developers).
11641132
Check :pep:`11` for details on all unsupported platforms.
11651133

1166-
* `Windows CE <http://pythonce.sourceforge.net/>`_ is still supported.
1167-
* The `Cygwin <https://cygwin.com/>`_ installer offers to install the Python
1168-
interpreter as well (cf. `Cygwin package source
1169-
<ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/mirrors/cygnus/
1170-
release/python>`_, `Maintainer releases
1171-
<http://www.tishler.net/jason/software/python/>`_)
1134+
* `Windows CE <http://pythonce.sourceforge.net/>`_ is
1135+
`no longer supported <https://github.com/python/cpython/issues/71542>`__
1136+
since Python 3 (if it ever was).
1137+
* The `Cygwin <https://cygwin.com/>`_ installer offers to install the
1138+
`Python interpreter <https://cygwin.com/packages/summary/python3.html>`__
1139+
as well
11721140

11731141
See `Python for Windows <https://www.python.org/downloads/windows/>`_
11741142
for detailed information about platforms with pre-compiled installers.

PC/readme.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ All PC ports use this scheme to try to set up a module search path:
1818

1919
1) The script location; the current directory without script.
2020
2) The PYTHONPATH variable, if set.
21-
3) For Win32 platforms (NT/95), paths specified in the Registry.
21+
3) Paths specified in the Registry.
2222
4) Default directories lib, lib/win, lib/test, lib/tkinter;
2323
these are searched relative to the environment variable
2424
PYTHONHOME, if set, or relative to the executable and its
2525
ancestors, if a landmark file (Lib/string.py) is found ,
2626
or the current directory (not useful).
2727
5) The directory containing the executable.
2828

29-
The best installation strategy is to put the Python executable (and
30-
DLL, for Win32 platforms) in some convenient directory such as
29+
The best installation strategy is to put the Python executable and
30+
DLL in some convenient directory such as
3131
C:/python, and copy all library files and subdirectories (using XCOPY)
3232
to C:/python/lib. Then you don't need to set PYTHONPATH. Otherwise,
3333
set the environment variable PYTHONPATH to your Python search path.

0 commit comments

Comments
 (0)