Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 92f8786

Browse filesBrowse files
Doc: Update references and examples of old, unsupported OSes and uarches (GH-92791) (GH-93638)
(cherry picked from commit a5ba0f4) Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
1 parent 98bbbbe commit 92f8786
Copy full SHA for 92f8786

File tree

Expand file treeCollapse file tree

7 files changed

+29
-18
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+29
-18
lines changed

‎Doc/c-api/init_config.rst

Copy file name to clipboardExpand all lines: Doc/c-api/init_config.rst
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,8 @@ PyConfig
735735
736736
* ``"utf-8"`` if :c:member:`PyPreConfig.utf8_mode` is non-zero.
737737
* ``"ascii"`` if Python detects that ``nl_langinfo(CODESET)`` announces
738-
the ASCII encoding (or Roman8 encoding on HP-UX), whereas the
739-
``mbstowcs()`` function decodes from a different encoding (usually
740-
Latin1).
738+
the ASCII encoding, whereas the ``mbstowcs()`` function
739+
decodes from a different encoding (usually Latin1).
741740
* ``"utf-8"`` if ``nl_langinfo(CODESET)`` returns an empty string.
742741
* Otherwise, use the :term:`locale encoding`:
743742
``nl_langinfo(CODESET)`` result.

‎Doc/faq/library.rst

Copy file name to clipboardExpand all lines: Doc/faq/library.rst
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,14 @@ including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, and
483483
How do I copy a file?
484484
---------------------
485485
486-
The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note
487-
that on MacOS 9 it doesn't copy the resource fork and Finder info.
486+
The :mod:`shutil` module contains a :func:`~shutil.copyfile` function.
487+
Note that on Windows NTFS volumes, it does not copy
488+
`alternate data streams
489+
<https://en.wikipedia.org/wiki/NTFS#Alternate_data_stream_(ADS)>`_
490+
nor `resource forks <https://en.wikipedia.org/wiki/Resource_fork>`__
491+
on macOS HFS+ volumes, though both are now rarely used.
492+
It also doesn't copy file permissions and metadata, though using
493+
:func:`shutil.copy2` instead will preserve most (though not all) of it.
488494
489495
490496
How do I read (or write) binary data?

‎Doc/howto/sockets.rst

Copy file name to clipboardExpand all lines: Doc/howto/sockets.rst
+12-7Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,20 +252,25 @@ Binary Data
252252
-----------
253253

254254
It is perfectly possible to send binary data over a socket. The major problem is
255-
that not all machines use the same formats for binary data. For example, a
256-
Motorola chip will represent a 16 bit integer with the value 1 as the two hex
257-
bytes 00 01. Intel and DEC, however, are byte-reversed - that same 1 is 01 00.
255+
that not all machines use the same formats for binary data. For example,
256+
`network byte order <https://en.wikipedia.org/wiki/Endianness#Networking>`_
257+
is big-endian, with the most significant byte first,
258+
so a 16 bit integer with the value ``1`` would be the two hex bytes ``00 01``.
259+
However, most common processors (x86/AMD64, ARM, RISC-V), are little-endian,
260+
with the least significant byte first - that same ``1`` would be ``01 00``.
261+
258262
Socket libraries have calls for converting 16 and 32 bit integers - ``ntohl,
259263
htonl, ntohs, htons`` where "n" means *network* and "h" means *host*, "s" means
260264
*short* and "l" means *long*. Where network order is host order, these do
261265
nothing, but where the machine is byte-reversed, these swap the bytes around
262266
appropriately.
263267

264-
In these days of 32 bit machines, the ascii representation of binary data is
268+
In these days of 64-bit machines, the ASCII representation of binary data is
265269
frequently smaller than the binary representation. That's because a surprising
266-
amount of the time, all those longs have the value 0, or maybe 1. The string "0"
267-
would be two bytes, while binary is four. Of course, this doesn't fit well with
268-
fixed-length messages. Decisions, decisions.
270+
amount of the time, most integers have the value 0, or maybe 1.
271+
The string ``"0"`` would be two bytes, while a full 64-bit integer would be 8.
272+
Of course, this doesn't fit well with fixed-length messages.
273+
Decisions, decisions.
269274

270275

271276
Disconnecting

‎Doc/library/mmap.rst

Copy file name to clipboardExpand all lines: Doc/library/mmap.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
102102

103103
To ensure validity of the created memory mapping the file specified
104104
by the descriptor *fileno* is internally automatically synchronized
105-
with physical backing store on macOS and OpenVMS.
105+
with the physical backing store on macOS.
106106

107107
This example shows a simple way of using :class:`~mmap.mmap`::
108108

‎Doc/library/platform.rst

Copy file name to clipboardExpand all lines: Doc/library/platform.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Cross Platform
5353

5454
.. function:: machine()
5555

56-
Returns the machine type, e.g. ``'i386'``. An empty string is returned if the
56+
Returns the machine type, e.g. ``'AMD64'``. An empty string is returned if the
5757
value cannot be determined.
5858

5959

‎Doc/library/posix.rst

Copy file name to clipboardExpand all lines: Doc/library/posix.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Large File Support
3737

3838
.. sectionauthor:: Steve Clift <clift@mail.anacapa.net>
3939

40-
Several operating systems (including AIX, HP-UX and Solaris) provide
40+
Several operating systems (including AIX and Solaris) provide
4141
support for files that are larger than 2 GiB from a C programming model where
4242
:c:type:`int` and :c:type:`long` are 32-bit values. This is typically accomplished
4343
by defining the relevant size and offset types as 64-bit values. Such files are

‎Doc/library/struct.rst

Copy file name to clipboardExpand all lines: Doc/library/struct.rst
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ If the first character is not one of these, ``'@'`` is assumed.
146146

147147
Native byte order is big-endian or little-endian, depending on the host
148148
system. For example, Intel x86 and AMD64 (x86-64) are little-endian;
149-
Motorola 68000 and PowerPC G5 are big-endian; ARM and Intel Itanium feature
150-
switchable endianness (bi-endian). Use ``sys.byteorder`` to check the
151-
endianness of your system.
149+
IBM z and most legacy architectures are big-endian;
150+
and ARM, RISC-V and IBM Power feature switchable endianness
151+
(bi-endian, though the former two are nearly always little-endian in practice).
152+
Use ``sys.byteorder`` to check the endianness of your system.
152153

153154
Native size and alignment are determined using the C compiler's
154155
``sizeof`` expression. This is always combined with native byte order.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.