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

Skip to content

Commit d529224

Browse files
Merge branch 'master' into disable-wchar-cache
2 parents c5eb102 + 5d5c84e commit d529224

41 files changed

Lines changed: 1553 additions & 623 deletions

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ Include/pytime.h @pganssle @abalkin
7373
/Doc/library/gc.rst @pablogsal
7474

7575
# Parser
76-
/Parser/ @pablogsal
77-
/Tools/peg_generator/ @pablogsal
78-
/Lib/test/test_peg_generator/ @pablogsal
76+
/Parser/ @pablogsal @lysnikolaou
77+
/Tools/peg_generator/ @pablogsal @lysnikolaou
78+
/Lib/test/test_peg_generator/ @pablogsal @lysnikolaou
7979

8080
# SQLite 3
8181
**/*sqlite* @berkerpeksag

Doc/c-api/init_config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,12 @@ PyPreConfig
197197
198198
Function to initialize a preconfiguration:
199199
200-
.. c:function:: void PyPreConfig_InitIsolatedConfig(PyPreConfig *preconfig)
200+
.. c:function:: void PyPreConfig_InitPythonConfig(PyPreConfig *preconfig)
201201
202202
Initialize the preconfiguration with :ref:`Python Configuration
203203
<init-python-config>`.
204204
205-
.. c:function:: void PyPreConfig_InitPythonConfig(PyPreConfig *preconfig)
205+
.. c:function:: void PyPreConfig_InitIsolatedConfig(PyPreConfig *preconfig)
206206
207207
Initialize the preconfiguration with :ref:`Isolated Configuration
208208
<init-isolated-conf>`.

Doc/faq/general.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ How stable is Python?
296296
---------------------
297297

298298
Very stable. New, stable releases have been coming out roughly every 6 to 18
299-
months since 1991, and this seems likely to continue. Currently there are
300-
usually around 18 months between major releases.
299+
months since 1991, and this seems likely to continue. As of version 3.9,
300+
Python will have a major new release every 12 months (:pep:`602`).
301301

302302
The developers issue "bugfix" releases of older versions, so the stability of
303303
existing releases gradually improves. Bugfix releases, indicated by a third
@@ -315,8 +315,8 @@ be maintained after January 1, 2020 <https://www.python.org/dev/peps/pep-0373/>`
315315
How many people are using Python?
316316
---------------------------------
317317

318-
There are probably tens of thousands of users, though it's difficult to obtain
319-
an exact count.
318+
There are probably millions of users, though it's difficult to obtain an exact
319+
count.
320320

321321
Python is available for free download, so there are no sales figures, and it's
322322
available from many different sites and packaged with many Linux distributions,

Lib/rlcompleter.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import atexit
3333
import builtins
34+
import inspect
3435
import __main__
3536

3637
__all__ = ["Completer"]
@@ -96,7 +97,13 @@ def complete(self, text, state):
9697

9798
def _callable_postfix(self, val, word):
9899
if callable(val):
99-
word = word + "("
100+
word += "("
101+
try:
102+
if not inspect.signature(val).parameters:
103+
word += ")"
104+
except ValueError:
105+
pass
106+
100107
return word
101108

102109
def global_matches(self, text):

Lib/test/_test_multiprocessing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
2727
import test.support.script_helper
2828
from test import support
2929
from test.support import hashlib_helper
30+
from test.support import import_helper
3031
from test.support import socket_helper
3132
from test.support import threading_helper
3233

3334

3435
# Skip tests if _multiprocessing wasn't built.
35-
_multiprocessing = test.support.import_module('_multiprocessing')
36+
_multiprocessing = import_helper.import_module('_multiprocessing')
3637
# Skip tests if sem_open implementation is broken.
3738
support.skip_if_broken_multiprocessing_synchronize()
3839
import threading

Lib/test/audiotests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from test.support import findfile, TESTFN, unlink
1+
from test.support import findfile
2+
from test.support.os_helper import TESTFN, unlink
23
import array
34
import io
45
import pickle

Lib/test/libregrtest/cmdline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import sys
44
from test import support
5+
from test.support import os_helper
56

67

78
USAGE = """\
@@ -291,7 +292,7 @@ def _create_parser():
291292
def relative_filename(string):
292293
# CWD is replaced with a temporary dir before calling main(), so we
293294
# join it with the saved CWD so it ends up where the user expects.
294-
return os.path.join(support.SAVEDCWD, string)
295+
return os.path.join(os_helper.SAVEDCWD, string)
295296

296297

297298
def huntrleaks(string):

Lib/test/libregrtest/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def find_tests(self, tests):
216216
# regex to match 'test_builtin' in line:
217217
# '0:00:00 [ 4/400] test_builtin -- test_dict took 1 sec'
218218
regex = re.compile(r'\btest_[a-zA-Z0-9_]+\b')
219-
with open(os.path.join(support.SAVEDCWD, self.ns.fromfile)) as fp:
219+
with open(os.path.join(os_helper.SAVEDCWD, self.ns.fromfile)) as fp:
220220
for line in fp:
221221
line = line.split('#', 1)[0]
222222
line = line.strip()
@@ -559,7 +559,7 @@ def save_xml_result(self):
559559
for k, v in totals.items():
560560
root.set(k, str(v))
561561

562-
xmlpath = os.path.join(support.SAVEDCWD, self.ns.xmlpath)
562+
xmlpath = os.path.join(os_helper.SAVEDCWD, self.ns.xmlpath)
563563
with open(xmlpath, 'wb') as f:
564564
for s in ET.tostringlist(root):
565565
f.write(s)
@@ -597,7 +597,7 @@ def create_temp_dir(self):
597597
test_cwd = 'test_python_worker_{}'.format(pid)
598598
else:
599599
test_cwd = 'test_python_{}'.format(pid)
600-
test_cwd += support.FS_NONASCII
600+
test_cwd += os_helper.FS_NONASCII
601601
test_cwd = os.path.join(self.tmp_dir, test_cwd)
602602
return test_cwd
603603

@@ -609,10 +609,10 @@ def cleanup(self):
609609
for name in glob.glob(path):
610610
if os.path.isdir(name):
611611
print("Remove directory: %s" % name)
612-
support.rmtree(name)
612+
os_helper.rmtree(name)
613613
else:
614614
print("Remove file: %s" % name)
615-
support.unlink(name)
615+
os_helper.unlink(name)
616616

617617
def main(self, tests=None, **kwargs):
618618
self.parse_args(kwargs)
@@ -629,7 +629,7 @@ def main(self, tests=None, **kwargs):
629629
# Run the tests in a context manager that temporarily changes the CWD
630630
# to a temporary and writable directory. If it's not possible to
631631
# create or change the CWD, the original CWD will be used.
632-
# The original CWD is available from support.SAVEDCWD.
632+
# The original CWD is available from os_helper.SAVEDCWD.
633633
with os_helper.temp_cwd(test_cwd, quiet=True):
634634
# When using multiprocessing, worker processes will use test_cwd
635635
# as their parent temporary directory. So when the main process

Lib/test/libregrtest/runtest_mp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import traceback
1212
import types
1313
from test import support
14+
from test.support import os_helper
1415

1516
from test.libregrtest.runtest import (
1617
runtest, INTERRUPTED, CHILD_ERROR, PROGRESS_MIN_TIME,
@@ -70,7 +71,7 @@ def run_test_in_subprocess(testname, ns):
7071
stderr=subprocess.PIPE,
7172
universal_newlines=True,
7273
close_fds=(os.name != 'nt'),
73-
cwd=support.SAVEDCWD,
74+
cwd=os_helper.SAVEDCWD,
7475
**kw)
7576

7677

Lib/test/test_aifc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from test.support import check_no_resource_warning, findfile, TESTFN, unlink
1+
from test.support import findfile
2+
from test.support.os_helper import TESTFN, unlink
3+
from test.support.warnings_helper import check_no_resource_warning
24
import unittest
35
from unittest import mock
46
from test import audiotests

0 commit comments

Comments
 (0)