Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a87d586

Browse files
committed
branch merge?
2 parents d25aef5 + cdc7517 commit a87d586

27 files changed

Lines changed: 303 additions & 80 deletions

.hgtags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ a69a031ac1402dede8b1ef80096436bca6d371f3 v3.1
7676
d18e9d71f369d8211f6ac87252c6d3211f9bd09f v3.1.3rc1
7777
a4f75773c0060cee38b0bb651a7aba6f56b0e996 v3.1.3
7878
32fcb9e94985cb19ce37ba9543f091c0dbe9d7dd v3.1.4rc1
79+
c918ec9f3a76d6afedfbb5d455004de880443a3d v3.1.4
7980
b37b7834757492d009b99cf0ca4d42d2153d7fac v3.2a1
8081
56d4373cecb73c8b45126ba7b045b3c7b3f94b0b v3.2a2
8182
da012d9a2c23d144e399d2e01a55b8a83ad94573 v3.2a3

Doc/c-api/intro.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ frequently-used builds will be described in the remainder of this section.
588588

589589
Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined produces
590590
what is generally meant by "a debug build" of Python. :c:macro:`Py_DEBUG` is
591-
enabled in the Unix build by adding :option:`--with-pydebug` to the
592-
:file:`configure` command. It is also implied by the presence of the
591+
enabled in the Unix build by adding ``--with-pydebug`` to the
592+
:file:`./configure` command. It is also implied by the presence of the
593593
not-Python-specific :c:macro:`_DEBUG` macro. When :c:macro:`Py_DEBUG` is enabled
594594
in the Unix build, compiler optimization is disabled.
595595

Doc/distutils/introduction.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,17 @@ Some observations:
7979
for an example)
8080

8181
To create a source distribution for this module, you would create a setup
82-
script, :file:`setup.py`, containing the above code, and run::
82+
script, :file:`setup.py`, containing the above code, and run this command from a
83+
terminal::
8384

8485
python setup.py sdist
8586

86-
which will create an archive file (e.g., tarball on Unix, ZIP file on Windows)
87+
For Windows, open a command prompt windows ("DOS box") and change the command
88+
to::
89+
90+
setup.py sdist
91+
92+
:command:`sdist` will create an archive file (e.g., tarball on Unix, ZIP file on Windows)
8793
containing your setup script :file:`setup.py`, and your module :file:`foo.py`.
8894
The archive file will be named :file:`foo-1.0.tar.gz` (or :file:`.zip`), and
8995
will unpack into a directory :file:`foo-1.0`.

Doc/documenting/markup.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ following example shows all of the features of this directive type::
9898

9999
Spam or ham the foo.
100100

101-
The signatures of object methods or data attributes should always include the
102-
type name (``.. method:: FileInput.input(...)``), even if it is obvious from the
103-
context which type they belong to; this is to enable consistent
104-
cross-references. If you describe methods belonging to an abstract protocol,
105-
such as "context managers", include a (pseudo-)type name too to make the
101+
The signatures of object methods or data attributes should not include the
102+
class name, but be nested in a class directive. The generated files will
103+
reflect this nesting, and the target identifiers (for HTML output) will use
104+
both the class and method name, to enable consistent cross-references. If you
105+
describe methods belonging to an abstract protocol such as context managers,
106+
use a class directive with a (pseudo-)type name too to make the
106107
index entries more informative.
107108

108109
The directives are:

Doc/install/index.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,16 @@ in the name of the downloaded archive, e.g. :file:`foo-1.0.tar.gz` or
9696
directory: :file:`foo-1.0` or :file:`widget-0.9.7`. Additionally, the
9797
distribution will contain a setup script :file:`setup.py`, and a file named
9898
:file:`README.txt` or possibly just :file:`README`, which should explain that
99-
building and installing the module distribution is a simple matter of running ::
99+
building and installing the module distribution is a simple matter of running
100+
one command from a terminal::
100101

101102
python setup.py install
102103

104+
For Windows, this command should be run from a command prompt windows ("DOS
105+
box")::
106+
107+
setup.py install
108+
103109
If all these things are true, then you already know how to build and install the
104110
modules you've just downloaded: Run the command above. Unless you need to
105111
install things in a non-standard way or customize the build process, you don't
@@ -113,14 +119,11 @@ Standard Build and Install
113119
==========================
114120

115121
As described in section :ref:`inst-new-standard`, building and installing a module
116-
distribution using the Distutils is usually one simple command::
122+
distribution using the Distutils is usually one simple command to run from a
123+
terminal::
117124

118125
python setup.py install
119126

120-
On Unix, you'd run this command from a shell prompt; on Windows, you have to
121-
open a command prompt window ("DOS box") and do it there; on Mac OS X, you open
122-
a :command:`Terminal` window to get a shell prompt.
123-
124127

125128
.. _inst-platform-variations:
126129

Doc/library/builtins.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
This module provides direct access to all 'built-in' identifiers of Python; for
99
example, ``builtins.open`` is the full name for the built-in function
10-
:func:`open`.
10+
:func:`open`. See :ref:`built-in-funcs` and :ref:`built-in-consts` for
11+
documentation.
12+
1113

1214
This module is not normally accessed explicitly by most applications, but can be
1315
useful in modules that provide objects with the same name as a built-in value,

Doc/library/constants.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _built-in-consts:
2+
13
Built-in Constants
24
==================
35

Doc/library/logging.handlers.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,21 @@ supports sending logging messages to a remote or local Unix syslog.
436436
The record is formatted, and then sent to the syslog server. If exception
437437
information is present, it is *not* sent to the server.
438438

439+
.. versionchanged:: 3.2.1
440+
(See: :issue:`12168`.) In earlier versions, the message sent to the
441+
syslog daemons was always terminated with a NUL byte, because early
442+
versions of these daemons expected a NUL terminated message - even
443+
though it's not in the relevant specification (RF 5424). More recent
444+
versions of these daemons don't expect the NUL byte but strip it off
445+
if it's there, and even more recent daemons (which adhere more closely
446+
to RFC 5424) pass the NUL byte on as part of the message.
447+
448+
To enable easier handling of syslog messages in the face of all these
449+
differing daemon behaviours, the appending of the NUL byte has been
450+
made configurable, through the use of a class-level attribute,
451+
``append_nul``. This defaults to ``True`` (preserving the existing
452+
behaviour) but can be set to ``False`` on a ``SysLogHandler`` instance
453+
in order for that instance to *not* append the NUL terminator.
439454

440455
.. method:: encodePriority(facility, priority)
441456

Doc/library/logging.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,13 @@ The useful mapping keys in a :class:`LogRecord` are given in the section on
453453
record. Otherwise, the ISO8601 format is used. The resulting string is
454454
returned.
455455

456+
This function uses a user-configurable function to convert the creation
457+
time to a tuple. By default, :func:`time.localtime` is used; to change
458+
this for a particular formatter instance, set the ``converter`` attribute
459+
to a function with the same signature as :func:`time.localtime` or
460+
:func:`time.gmtime`. To change it for all formatters, for example if you
461+
want all logging times to be shown in GMT, set the ``converter``
462+
attribute in the ``Formatter`` class.
456463

457464
.. method:: formatException(exc_info)
458465

@@ -544,6 +551,9 @@ wire).
544551
:param name: The name of the logger used to log the event represented by
545552
this LogRecord.
546553
:param level: The numeric level of the logging event (one of DEBUG, INFO etc.)
554+
Note that this is converted to *two* attributes of the LogRecord:
555+
``levelno`` for the numeric value and ``levelname`` for the
556+
corresponding level name.
547557
:param pathname: The full pathname of the source file where the logging call
548558
was made.
549559
:param lineno: The line number in the source file where the logging call was

Doc/license.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ expat
845845
-----
846846

847847
The :mod:`pyexpat` extension is built using an included copy of the expat
848-
sources unless the build is configured :option:`--with-system-expat`::
848+
sources unless the build is configured ``--with-system-expat``::
849849

850850
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
851851
and Clark Cooper
@@ -874,7 +874,7 @@ libffi
874874
------
875875

876876
The :mod:`_ctypes` extension is built using an included copy of the libffi
877-
sources unless the build is configured :option:`--with-system-libffi`::
877+
sources unless the build is configured ``--with-system-libffi``::
878878

879879
Copyright (c) 1996-2008 Red Hat, Inc and others.
880880

0 commit comments

Comments
 (0)