Skip to content

Commit

Permalink
Merge branch 'main' into keep-trailing-slash-wip3
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Dec 3, 2023
2 parents 12cfb1a + 09505c5 commit 2593ddb
Show file tree
Hide file tree
Showing 38 changed files with 517 additions and 276 deletions.
3 changes: 3 additions & 0 deletions Doc/c-api/hash.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ See also the :c:member:`PyTypeObject.tp_hash` member.
Get the hash function definition.
.. seealso::
:pep:`456` "Secure and interchangeable hash algorithm".
.. versionadded:: 3.4
3 changes: 3 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@
('envvar', 'USER'),
('envvar', 'USERNAME'),
('envvar', 'USERPROFILE'),
# Deprecated function that was never documented:
('py:func', 'getargspec'),
('py:func', 'inspect.getargspec'),
]

# Temporary undocumented names.
Expand Down
14 changes: 7 additions & 7 deletions Doc/library/gettext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ are the methods of :class:`!NullTranslations`:

.. method:: info()

Return the "protected" :attr:`_info` variable, a dictionary containing
Return a dictionary containing
the metadata found in the message catalog file.


Expand Down Expand Up @@ -296,17 +296,17 @@ are the methods of :class:`!NullTranslations`:
The :class:`GNUTranslations` class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The :mod:`gettext` module provides one additional class derived from
The :mod:`!gettext` module provides one additional class derived from
:class:`NullTranslations`: :class:`GNUTranslations`. This class overrides
:meth:`_parse` to enable reading GNU :program:`gettext` format :file:`.mo` files
:meth:`!_parse` to enable reading GNU :program:`gettext` format :file:`.mo` files
in both big-endian and little-endian format.

:class:`GNUTranslations` parses optional metadata out of the translation
catalog. It is convention with GNU :program:`gettext` to include metadata as
the translation for the empty string. This metadata is in :rfc:`822`\ -style
``key: value`` pairs, and should contain the ``Project-Id-Version`` key. If the
key ``Content-Type`` is found, then the ``charset`` property is used to
initialize the "protected" :attr:`_charset` instance variable, defaulting to
initialize the "protected" :attr:`!_charset` instance variable, defaulting to
``None`` if not found. If the charset encoding is specified, then all message
ids and message strings read from the catalog are converted to Unicode using
this encoding, else ASCII is assumed.
Expand All @@ -315,7 +315,7 @@ Since message ids are read as Unicode strings too, all ``*gettext()`` methods
will assume message ids as Unicode strings, not byte strings.

The entire set of key/value pairs are placed into a dictionary and set as the
"protected" :attr:`_info` instance variable.
"protected" :attr:`!_info` instance variable.

If the :file:`.mo` file's magic number is invalid, the major version number is
unexpected, or if other problems occur while reading the file, instantiating a
Expand Down Expand Up @@ -636,9 +636,9 @@ implementations, and valuable experience to the creation of this module:

.. rubric:: Footnotes

.. [#] The default locale directory is system dependent; for example, on RedHat Linux
.. [#] The default locale directory is system dependent; for example, on Red Hat Linux
it is :file:`/usr/share/locale`, but on Solaris it is :file:`/usr/lib/locale`.
The :mod:`gettext` module does not try to support these system dependent
The :mod:`!gettext` module does not try to support these system dependent
defaults; instead its default is :file:`{sys.base_prefix}/share/locale` (see
:data:`sys.base_prefix`). For this reason, it is always best to call
:func:`bindtextdomain` with an explicit absolute path at the start of your
Expand Down
Loading

0 comments on commit 2593ddb

Please sign in to comment.