Skip to content

Commit 9cdeee1

Browse files
committed
Fix documentation typos and grammar errors across 16 files
- Fix "a HTTP/HTTPS/SSL/HTML/SMTP" → "an HTTP/HTTPS/SSL/HTML/SMTP" (article before vowel-sound acronyms) in 22 instances - Fix "a arbitrary" → "an arbitrary" in configure.rst - Fix "-X env" → "-X dev" (wrong flag name) in whatsnew/3.8.rst - Fix "are is initialized" → "are initialized" in sys.rst - Fix "a the Python" → "the Python" in first-extension-module.rst - Fix "via the passing" → "by passing" in whatsnew/3.14.rst - Fix "take into consideration" → "taken into consideration" in pending-removal-in-3.15.rst (2 instances)
1 parent ab47892 commit 9cdeee1

File tree

16 files changed

+29
-29
lines changed

16 files changed

+29
-29
lines changed

Doc/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Available make targets are:
6666
starts a local server, and automatically reloads the page in your browser
6767
when you make changes to reST files (Unix only).
6868

69-
* "htmlhelp", which builds HTML files and a HTML Help project file usable to
69+
* "htmlhelp", which builds HTML files and an HTML Help project file usable to
7070
convert them into a single Compiled HTML (.chm) file -- these are popular
7171
under Microsoft Windows, but very handy on every platform.
7272

Doc/deprecations/pending-removal-in-3.15.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Pending removal in Python 3.15
66
* Setting ``__cached__`` on a module while
77
failing to set :attr:`__spec__.cached <importlib.machinery.ModuleSpec.cached>`
88
is deprecated. In Python 3.15, ``__cached__`` will cease to be set or
9-
take into consideration by the import system or standard library. (:gh:`97879`)
9+
taken into consideration by the import system or standard library. (:gh:`97879`)
1010

1111
* Setting :attr:`~module.__package__` on a module while
1212
failing to set :attr:`__spec__.parent <importlib.machinery.ModuleSpec.parent>`
1313
is deprecated. In Python 3.15, :attr:`!__package__` will cease to be set or
14-
take into consideration by the import system or standard library. (:gh:`97879`)
14+
taken into consideration by the import system or standard library. (:gh:`97879`)
1515

1616
* :mod:`ctypes`:
1717

Doc/extending/first-extension-module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ on :py:attr:`sys.path`.
670670
":c:type:`!PyFunctionDef`".
671671
.. [#why-pylongfromlong] The name :c:func:`PyLong_FromLong`
672672
might not seem obvious.
673-
``PyLong`` refers to a the Python :py:class:`int`, which was originally
673+
``PyLong`` refers to the Python :py:class:`int`, which was originally
674674
called ``long``; the ``FromLong`` refers to the C ``long`` (or ``long int``)
675675
type.
676676
.. [#why-pyunicodeasutf8] Here, ``PyUnicode`` refers to the original name of

Doc/howto/urllib2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Data
100100
Sometimes you want to send data to a URL (often the URL will refer to a CGI
101101
(Common Gateway Interface) script or other web application). With HTTP,
102102
this is often done using what's known as a **POST** request. This is often what
103-
your browser does when you submit a HTML form that you filled in on the web. Not
103+
your browser does when you submit an HTML form that you filled in on the web. Not
104104
all POSTs have to come from forms: you can use a POST to transmit arbitrary data
105105
to your own application. In the common case of HTML forms, the data needs to be
106106
encoded in a standard way, and then passed to the Request object as the ``data``

Doc/library/asyncio-eventloop.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ Opening network connections
487487

488488
Other arguments:
489489

490-
* *ssl*: if given and not false, a SSL/TLS transport is created
490+
* *ssl*: if given and not false, an SSL/TLS transport is created
491491
(by default a plain TCP transport is created). If *ssl* is
492492
a :class:`ssl.SSLContext` object, this context is used to create
493493
the transport; if *ssl* is :const:`True`, a default context returned

Doc/library/http.client.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ This module provides the following function:
131131

132132
.. function:: parse_headers(fp)
133133

134-
Parse the headers from a file pointer *fp* representing a HTTP
134+
Parse the headers from a file pointer *fp* representing an HTTP
135135
request/response. The file has to be a :class:`~io.BufferedIOBase` reader
136136
(i.e. not text) and must provide a valid :rfc:`5322` style header.
137137

@@ -142,7 +142,7 @@ This module provides the following function:
142142
After returning, the file pointer *fp* is ready to read the HTTP body.
143143

144144
.. note::
145-
:meth:`parse_headers` does not parse the start-line of a HTTP message;
145+
:meth:`parse_headers` does not parse the start-line of an HTTP message;
146146
it only parses the ``Name: value`` lines. The file has to be ready to
147147
read these field lines, so the first line should already be consumed
148148
before calling the function.
@@ -209,7 +209,7 @@ The following exceptions are raised as appropriate:
209209

210210
.. exception:: BadStatusLine
211211

212-
A subclass of :exc:`HTTPException`. Raised if a server responds with a HTTP
212+
A subclass of :exc:`HTTPException`. Raised if a server responds with an HTTP
213213
status code that we don't understand.
214214

215215

@@ -373,13 +373,13 @@ HTTPConnection Objects
373373
the CONNECT request.
374374

375375
As HTTP/1.1 is used for HTTP CONNECT tunnelling request, `as per the RFC
376-
<https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.6>`_, a HTTP ``Host:``
376+
<https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.6>`_, an HTTP ``Host:``
377377
header must be provided, matching the authority-form of the request target
378-
provided as the destination for the CONNECT request. If a HTTP ``Host:``
378+
provided as the destination for the CONNECT request. If an HTTP ``Host:``
379379
header is not provided via the headers argument, one is generated and
380380
transmitted automatically.
381381

382-
For example, to tunnel through a HTTPS proxy server running locally on port
382+
For example, to tunnel through an HTTPS proxy server running locally on port
383383
8080, we would pass the address of the proxy to the :class:`HTTPSConnection`
384384
constructor, and the address of the host that we eventually want to reach to
385385
the :meth:`~HTTPConnection.set_tunnel` method::

Doc/library/logging.handlers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -991,11 +991,11 @@ supports sending logging messages to a web server, using either ``GET`` or
991991

992992
Returns a new instance of the :class:`HTTPHandler` class. The *host* can be
993993
of the form ``host:port``, should you need to use a specific port number. If
994-
no *method* is specified, ``GET`` is used. If *secure* is true, a HTTPS
994+
no *method* is specified, ``GET`` is used. If *secure* is true, an HTTPS
995995
connection will be used. The *context* parameter may be set to a
996996
:class:`ssl.SSLContext` instance to configure the SSL settings used for the
997997
HTTPS connection. If *credentials* is specified, it should be a 2-tuple
998-
consisting of userid and password, which will be placed in a HTTP
998+
consisting of userid and password, which will be placed in an HTTP
999999
'Authorization' header using Basic authentication. If you specify
10001000
credentials, you should also specify secure=True so that your userid and
10011001
password are not passed in cleartext across the wire.

Doc/library/pydoc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ module is the first line of its documentation string.
6464

6565
You can also use :program:`pydoc` to start an HTTP server on the local machine
6666
that will serve documentation to visiting web browsers. :program:`python -m pydoc -p 1234`
67-
will start a HTTP server on port 1234, allowing you to browse the
67+
will start an HTTP server on port 1234, allowing you to browse the
6868
documentation at ``http://localhost:1234/`` in your preferred web browser.
6969
Specifying ``0`` as the port number will select an arbitrary unused port.
7070

Doc/library/shutil.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Directory and files operations
4747
:func:`copyfileobj` will *not* guarantee that the destination stream has
4848
been flushed on completion of the copy. If you want to read from the
4949
destination at the completion of the copy operation (for example, reading
50-
the contents of a temporary file that has been copied from a HTTP stream),
50+
the contents of a temporary file that has been copied from an HTTP stream),
5151
you must ensure that you have called :func:`~io.IOBase.flush` or
5252
:func:`~io.IOBase.close` on the file-like object before attempting to read
5353
the destination file.

Doc/library/ssl.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Exceptions
293293
.. exception:: SSLSyscallError
294294

295295
A subclass of :exc:`SSLError` raised when a system error was encountered
296-
while trying to fulfill an operation on a SSL socket. Unfortunately,
296+
while trying to fulfill an operation on an SSL socket. Unfortunately,
297297
there is no easy way to inspect the original errno number.
298298

299299
.. versionadded:: 3.3
@@ -1645,7 +1645,7 @@ to speed up repeated connections from the same clients.
16451645
entry is a dict like the output of :meth:`SSLSocket.getpeercert`. Otherwise
16461646
the method returns a list of DER-encoded certificates. The returned list
16471647
does not contain certificates from *capath* unless a certificate was
1648-
requested and loaded by a SSL connection.
1648+
requested and loaded by an SSL connection.
16491649

16501650
.. note::
16511651
Certificates in a capath directory aren't loaded unless they have
@@ -2434,7 +2434,7 @@ should use the following idiom::
24342434
Client-side operation
24352435
^^^^^^^^^^^^^^^^^^^^^
24362436

2437-
This example creates a SSL context with the recommended security settings
2437+
This example creates an SSL context with the recommended security settings
24382438
for client sockets, including automatic certificate verification::
24392439

24402440
>>> context = ssl.create_default_context()
@@ -2620,7 +2620,7 @@ thus several things you need to be aware of:
26202620
and :meth:`SSLSocket.send` failures, and retry after another call to
26212621
:func:`~select.select`.
26222622

2623-
- Conversely, since the SSL layer has its own framing, a SSL socket may
2623+
- Conversely, since the SSL layer has its own framing, an SSL socket may
26242624
still have data available for reading without :func:`~select.select`
26252625
being aware of it. Therefore, you should first call
26262626
:meth:`SSLSocket.recv` to drain any potentially available data, and then
@@ -2824,7 +2824,7 @@ validation and hostname checking, and try to choose reasonably secure
28242824
protocol and cipher settings.
28252825

28262826
For example, here is how you would use the :class:`smtplib.SMTP` class to
2827-
create a trusted, secure connection to a SMTP server::
2827+
create a trusted, secure connection to an SMTP server::
28282828

28292829
>>> import ssl, smtplib
28302830
>>> smtp = smtplib.SMTP("mail.python.org", port=587)
@@ -2893,7 +2893,7 @@ Cipher selection
28932893
''''''''''''''''
28942894

28952895
If you have advanced security requirements, fine-tuning of the ciphers
2896-
enabled when negotiating a SSL session is possible through the
2896+
enabled when negotiating an SSL session is possible through the
28972897
:meth:`SSLContext.set_ciphers` method. Starting from Python 3.2.3, the
28982898
ssl module disables certain weak ciphers by default, but you may want
28992899
to further restrict the cipher choice. Be sure to read OpenSSL's documentation

0 commit comments

Comments
 (0)