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

Skip to content

Commit 4e15c9a

Browse files
author
animalize
authored
Merge pull request #5 from python/master
5
2 parents 93ff15f + 3e028b2 commit 4e15c9a

87 files changed

Lines changed: 1255 additions & 154 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ PCbuild/*.VC.db
6969
PCbuild/*.VC.opendb
7070
PCbuild/.vs/
7171
PCbuild/amd64/
72+
PCbuild/arm32/
7273
PCbuild/obj/
7374
PCbuild/win32/
7475
.purify

Doc/library/asyncio-protocol.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Transports are classes provided by :mod:`asyncio` in order to abstract
7373
various kinds of communication channels.
7474

7575
Transport objects are always instantiated by an
76-
ref:`asyncio event loop <asyncio-event-loop>`.
76+
:ref:`asyncio event loop <asyncio-event-loop>`.
7777

7878
asyncio implements transports for TCP, UDP, SSL, and subprocess pipes.
7979
The methods available on a transport depend on the transport's kind.

Doc/library/asyncio-sync.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ Condition
180180
cond = asyncio.Condition()
181181

182182
# ... later
183-
await lock.acquire()
183+
await cond.acquire()
184184
try:
185185
await cond.wait()
186186
finally:
187-
lock.release()
187+
cond.release()
188188

189189
.. coroutinemethod:: acquire()
190190

Doc/library/pathlib.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ call fails (for example because the path doesn't exist).
728728

729729
.. method:: Path.glob(pattern)
730730

731-
Glob the given *pattern* in the directory represented by this path,
731+
Glob the given relative *pattern* in the directory represented by this path,
732732
yielding all matching files (of any kind)::
733733

734734
>>> sorted(Path('.').glob('*.py'))
@@ -980,8 +980,8 @@ call fails (for example because the path doesn't exist).
980980

981981
.. method:: Path.rglob(pattern)
982982

983-
This is like calling :meth:`Path.glob` with "``**``" added in front of the
984-
given *pattern*::
983+
This is like calling :func:`Path.glob` with "``**/``" added in front of the
984+
given relative *pattern*::
985985

986986
>>> sorted(Path().rglob("*.py"))
987987
[PosixPath('build/lib/pathlib.py'),

Doc/library/shutil.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ Directory and files operations
396396

397397
.. versionadded:: 3.3
398398

399+
.. versionchanged:: 3.8
400+
The :class:`bytes` type is now accepted. If *cmd* type is
401+
:class:`bytes`, the result type is also :class:`bytes`.
399402

400403
.. exception:: Error
401404

Doc/library/sys.rst

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,13 +1368,30 @@ always available.
13681368
returned by the :func:`open` function. Their parameters are chosen as
13691369
follows:
13701370

1371-
* The character encoding is platform-dependent. Under Windows, if the stream
1372-
is interactive (that is, if its :meth:`isatty` method returns ``True``), the
1373-
console codepage is used, otherwise the ANSI code page. Under other
1374-
platforms, the locale encoding is used (see :meth:`locale.getpreferredencoding`).
1375-
1376-
Under all platforms though, you can override this value by setting the
1377-
:envvar:`PYTHONIOENCODING` environment variable before starting Python.
1371+
* The character encoding is platform-dependent. Non-Windows
1372+
platforms use the locale encoding (see
1373+
:meth:`locale.getpreferredencoding()`).
1374+
1375+
On Windows, UTF-8 is used for the console device. Non-character
1376+
devices such as disk files and pipes use the system locale
1377+
encoding (i.e. the ANSI codepage). Non-console character
1378+
devices such as NUL (i.e. where isatty() returns True) use the
1379+
value of the console input and output codepages at startup,
1380+
respectively for stdin and stdout/stderr. This defaults to the
1381+
system locale encoding if the process is not initially attached
1382+
to a console.
1383+
1384+
The special behaviour of the console can be overridden
1385+
by setting the environment variable PYTHONLEGACYWINDOWSSTDIO
1386+
before starting Python. In that case, the console codepages are
1387+
used as for any other character device.
1388+
1389+
Under all platforms, you can override the character encoding by
1390+
setting the :envvar:`PYTHONIOENCODING` environment variable before
1391+
starting Python or by using the new :option:`-X` ``utf8`` command
1392+
line option and :envvar:`PYTHONUTF8` environment variable. However,
1393+
for the Windows console, this only applies when
1394+
:envvar:`PYTHONLEGACYWINDOWSSTDIO` is also set.
13781395

13791396
* When interactive, ``stdout`` and ``stderr`` streams are line-buffered.
13801397
Otherwise, they are block-buffered like regular text files. You can

Doc/tools/templates/indexsidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h3>{% trans %}Docs by version{% endtrans %}</h3>
44
<ul>
55
<li><a href="https://docs.python.org/3.8/">{% trans %}Python 3.8 (in development){% endtrans %}</a></li>
66
<li><a href="https://docs.python.org/3.7/">{% trans %}Python 3.7 (stable){% endtrans %}</a></li>
7-
<li><a href="https://docs.python.org/3.6/">{% trans %}Python 3.6 (stable){% endtrans %}</a></li>
7+
<li><a href="https://docs.python.org/3.6/">{% trans %}Python 3.6 (security-fixes){% endtrans %}</a></li>
88
<li><a href="https://docs.python.org/3.5/">{% trans %}Python 3.5 (security-fixes){% endtrans %}</a></li>
99
<li><a href="https://docs.python.org/2.7/">{% trans %}Python 2.7 (stable){% endtrans %}</a></li>
1010
<li><a href="https://www.python.org/doc/versions/">{% trans %}All versions{% endtrans %}</a></li>

Lib/dataclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def __init__(self, default, default_factory, init, repr, hash, compare,
241241
self.hash = hash
242242
self.compare = compare
243243
self.metadata = (_EMPTY_METADATA
244-
if metadata is None or len(metadata) == 0 else
244+
if metadata is None else
245245
types.MappingProxyType(metadata))
246246
self._field_type = None
247247

Lib/importlib/_bootstrap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
88
"""
99
#
10-
# IMPORTANT: Whenever making changes to this module, be sure to run
11-
# a top-level make in order to get the frozen version of the module
12-
# updated. Not doing so will result in the Makefile to fail for
10+
# IMPORTANT: Whenever making changes to this module, be sure to run a top-level
11+
# `make regen-importlib` followed by `make` in order to get the frozen version
12+
# of the module updated. Not doing so will result in the Makefile to fail for
1313
# all others who don't have a ./python around to freeze the module
1414
# in the early stages of compilation.
1515
#

Lib/multiprocessing/managers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ def __imul__(self, value):
11351135

11361136
DictProxy = MakeProxyType('DictProxy', (
11371137
'__contains__', '__delitem__', '__getitem__', '__iter__', '__len__',
1138-
'__setitem__', 'clear', 'copy', 'get', 'has_key', 'items',
1138+
'__setitem__', 'clear', 'copy', 'get', 'items',
11391139
'keys', 'pop', 'popitem', 'setdefault', 'update', 'values'
11401140
))
11411141
DictProxy._method_to_typeid_ = {

0 commit comments

Comments
 (0)