List of commits:
Subject Hash Author Date (UTC)
bpo-30263: regrtest: log system load (#1452) 3d0056842c5e06b4102f990b59ab3b607f932dd8 Victor Stinner 2017-05-04 13:21:12
bpo-29956: Improve the math.exp() related documentation. (#1073) dbaf746b6de0ee431c809d3175ab40ccc18898a8 Serhiy Storchaka 2017-05-04 09:25:09
bpo-30166: Import command-line parsing modules only when needed. (#1293) 7e4db2f253c555568d56177c2fd083bcf8f88d34 Serhiy Storchaka 2017-05-04 05:17:47
bpo-30225: Fix is_valid_fd() on macOS Tiger (#1443) 1c4670ea0cc3d208121af11b9b973e6bb268e570 Victor Stinner 2017-05-03 22:45:56
bpo-30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords. (#1316) 5f161fd86dd5bb936a1a2a13391b13b7e59ec201 Serhiy Storchaka 2017-05-03 21:03:23
Add myself to mention-bot's alwaysNotifyForPaths for ssl/hashlib (#1425) feec3dc9c308052754f9e4848c1c1ddb007e9f66 Christian Heimes 2017-05-03 18:17:54
Explicitly mention what should (not) be discussed on GitHub (GH-1437) 7fdd30975e3fa9ec4be62464a9fcab7798d0ed6e Brett Cannon 2017-05-03 17:51:55
bpo-28315: Improve code examples in docs (GH-1372) 8856940cf2e82cb17db2b684cd5732fe658605ca UltimateCoder 2017-05-03 16:46:45
bpo-23404: make touch becomes make regen-all (#1405) a5c62a8e9f0de6c4133825a5710984a3cd5e102b Victor Stinner 2017-05-03 16:21:48
bpo-30103: Allow Uuencode in Python using backtick as zero instead of space (#1326) 13f1f423fac39f8f14a3ce919dd236975517d5c6 Xiang Zhang 2017-05-03 03:16:21
Fix tests: getsockname() can return None on OS X on unbound sockets (#1400) 0360a9d015ddbc4e3d58e3ab4b433da27bf1db3a Antoine Pitrou 2017-05-02 21:48:26
bpo-30232: Regenerate configure (#1396) 9ed34a89532763cf89f5e11fffb91ef7dee29fed Victor Stinner 2017-05-02 20:35:58
bpo-30232: Support Git worktree in configure.ac (#1391) 5facdbb29169c2799c42f887cef4cd9d087b0167 Victor Stinner 2017-05-02 19:42:48
Remove outdated tests in test_isinstance (GH-1393) 094909ad69a6654ac43c69ebdced060fbbbbede8 Jim Fasarakis-Hilliard 2017-05-02 17:17:18
bpo-28556: Routine updates to typing (#1366) f06e0218ef6007667f5d61184b85a81a0466d3ae Ivan Levkivskyi 2017-05-02 17:14:07
bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux (#1370) 495b5021e73e3c4b6404417ecf4fa83aa10297f0 Antoine Pitrou 2017-05-02 15:20:00
Fix typo in selectors.rst (#1383) b0d82036549074357717d130a772d1e2ebc8ea01 Tong SHEN 2017-05-02 13:27:57
bpo-30228: FileIO seek() and tell() set seekable (#1384) 999707373630ce090300c3c542066f493b12faa0 Victor Stinner 2017-05-02 13:10:39
bpo-30199: test_ssl closes all asyncore channels (#1381) 1dae7450c68bad498e57800387b24cb103c461fa Victor Stinner 2017-05-02 11:12:02
bpo-30132: distutils BuildExtTestCase use temp_cwd (#1380) 92fd6c9ef54a857815e3dca8ee74b2b4f5cdf154 Victor Stinner 2017-05-02 11:11:50
Commit 3d0056842c5e06b4102f990b59ab3b607f932dd8 - bpo-30263: regrtest: log system load (#1452)
* bpo-30263: regrtest: log system load

* regrtest: log the number of CPUs

Log the number of CPUs in the header. --verbose now imply --header.
Author: Victor Stinner
Author date (UTC): 2017-05-04 13:21
Committer name: GitHub
Committer date (UTC): 2017-05-04 13:21
Parent(s): dbaf746b6de0ee431c809d3175ab40ccc18898a8
Signing key:
Tree: 1652727e44d9e15ade65e3c3bbc762a4ea445d0c
File Lines added Lines deleted
Lib/test/libregrtest/cmdline.py 2 0
Lib/test/libregrtest/main.py 33 24
Lib/test/test_regrtest.py 4 1
File Lib/test/libregrtest/cmdline.py changed (mode: 100644) (index d621f5f9f3..8260b091fb)
... ... def _parse_args(args, **kwargs):
343 343 ns.use_resources.append(r) ns.use_resources.append(r)
344 344 if ns.random_seed is not None: if ns.random_seed is not None:
345 345 ns.randomize = True ns.randomize = True
346 if ns.verbose:
347 ns.header = True
346 348
347 349 return ns return ns
File Lib/test/libregrtest/main.py changed (mode: 100644) (index de1f4f9505..2cfbdd12b2)
... ... class Regrtest:
120 120 def display_progress(self, test_index, test): def display_progress(self, test_index, test):
121 121 if self.ns.quiet: if self.ns.quiet:
122 122 return return
123
124 # "[ 51/405/1] test_tcl passed"
125 line = f"{test_index:{self.test_count_width}}{self.test_count}"
123 126 if self.bad and not self.ns.pgo: if self.bad and not self.ns.pgo:
124 fmt = "{time} [{test_index:{count_width}}{test_count}/{nbad}] {test_name}"
125 else:
126 fmt = "{time} [{test_index:{count_width}}{test_count}] {test_name}"
127 line = f"{line}/{len(self.bad)}"
128 line = f"[{line}] {test}"
129
130 # add the system load prefix: "load avg: 1.80 "
131 if hasattr(os, 'getloadavg'):
132 load_avg_1min = os.getloadavg()[0]
133 line = f"load avg: {load_avg_1min:.2f} {line}"
134
135 # add the timestamp prefix: "0:01:05 "
127 136 test_time = time.monotonic() - self.start_time test_time = time.monotonic() - self.start_time
128 137 test_time = datetime.timedelta(seconds=int(test_time)) test_time = datetime.timedelta(seconds=int(test_time))
129 line = fmt.format(count_width=self.test_count_width,
130 test_index=test_index,
131 test_count=self.test_count,
132 nbad=len(self.bad),
133 test_name=test,
134 time=test_time)
138 line = f"{test_time} {line}"
135 139 print(line, flush=True) print(line, flush=True)
136 140
137 141 def parse_args(self, kwargs): def parse_args(self, kwargs):
 
... ... class Regrtest:
376 380 if self.bad: if self.bad:
377 381 return return
378 382
383 def display_header(self):
384 # Print basic platform information
385 print("==", platform.python_implementation(), *sys.version.split())
386 print("==", platform.platform(aliased=True),
387 "%s-endian" % sys.byteorder)
388 print("== hash algorithm:", sys.hash_info.algorithm,
389 "64bit" if sys.maxsize > 2**32 else "32bit")
390 print("== cwd:", os.getcwd())
391 cpu_count = os.cpu_count()
392 if cpu_count:
393 print("== CPU count:", cpu_count)
394 print("== encodings: locale=%s, FS=%s"
395 % (locale.getpreferredencoding(False),
396 sys.getfilesystemencoding()))
397 print("Testing with flags:", sys.flags)
398
379 399 def run_tests(self): def run_tests(self):
380 400 # For a partial run, we do not need to clutter the output. # For a partial run, we do not need to clutter the output.
381 if (self.ns.verbose
382 or self.ns.header
383 or not (self.ns.pgo or self.ns.quiet or self.ns.single
384 or self.tests or self.ns.args)):
385 # Print basic platform information
386 print("==", platform.python_implementation(), *sys.version.split())
387 print("== ", platform.platform(aliased=True),
388 "%s-endian" % sys.byteorder)
389 print("== ", "hash algorithm:", sys.hash_info.algorithm,
390 "64bit" if sys.maxsize > 2**32 else "32bit")
391 print("== cwd:", os.getcwd())
392 print("== encodings: locale=%s, FS=%s"
393 % (locale.getpreferredencoding(False),
394 sys.getfilesystemencoding()))
395 print("Testing with flags:", sys.flags)
401 if (self.ns.header
402 or not(self.ns.pgo or self.ns.quiet or self.ns.single
403 or self.tests or self.ns.args)):
404 self.display_header()
396 405
397 406 if self.ns.randomize: if self.ns.randomize:
398 407 print("Using random seed", self.ns.random_seed) print("Using random seed", self.ns.random_seed)
File Lib/test/test_regrtest.py changed (mode: 100644) (index 0bd62985d9..d3492604cb)
... ... class ParseArgsTestCase(unittest.TestCase):
118 118 ns = libregrtest._parse_args(['--header']) ns = libregrtest._parse_args(['--header'])
119 119 self.assertTrue(ns.header) self.assertTrue(ns.header)
120 120
121 ns = libregrtest._parse_args(['--verbose'])
122 self.assertTrue(ns.header)
123
121 124 def test_randomize(self): def test_randomize(self):
122 125 for opt in '-r', '--randomize': for opt in '-r', '--randomize':
123 126 with self.subTest(opt=opt): with self.subTest(opt=opt):
 
... ... class BaseTestCase(unittest.TestCase):
354 357 self.assertRegex(output, regex) self.assertRegex(output, regex)
355 358
356 359 def parse_executed_tests(self, output): def parse_executed_tests(self, output):
357 regex = (r'^[0-9]+:[0-9]+:[0-9]+ \[ *[0-9]+(?:/ *[0-9]+)*\] (%s)'
360 regex = (r'^[0-9]+:[0-9]+:[0-9]+ (?:load avg: [0-9]+\.[0-9]{2} )?\[ *[0-9]+(?:/ *[0-9]+)*\] (%s)'
358 361 % self.TESTNAME_REGEX) % self.TESTNAME_REGEX)
359 362 parser = re.finditer(regex, output, re.MULTILINE) parser = re.finditer(regex, output, re.MULTILINE)
360 363 return list(match.group(1) for match in parser) return list(match.group(1) for match in parser)
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/benf_wspdigital/cpython

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/benf_wspdigital/cpython

Clone this repository using git:
git clone git://git.rocketgit.com/user/benf_wspdigital/cpython

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main