List of commits:
Subject Hash Author Date (UTC)
bpo-27200: Fix pathlib, ssl, turtle and weakref doctests (GH-616) 7b2491a6aa5cdc1f8f9e3fd9df91f29ee69aa982 Marco Buttu 2017-04-13 14:17:59
Blacklist myself from mention-bot (#1114) d1dc65dc820649e59633142a88eaf97f930963a9 Berker Peksag 2017-04-13 14:14:37
bpo-29791: Clarify that flush is keyword-only argument (#1093) 61b9ac93712df8092a25223cd56fa6528359792b Berker Peksag 2017-04-13 12:48:18
bpo-30055: add testcleanup to leave a fresh context (#1094) 2c0b5c664ba7d36dc09788d3778d5b33e3fa1bd0 Marco Buttu 2017-04-13 11:30:25
convert from long long to PyLong loselessly (#1106) 2c134c31252612ed4729fd05df6ab0e96de8d0b1 Benjamin Peterson 2017-04-13 08:44:54
bpo-26985: Add missing info of code object in inspect documentation (GH-1090) a6902e662c18dc837d40664eaafe50a44aae6366 Xiang Zhang 2017-04-13 02:38:28
bpo-30017: Allowed calling the close() method of the zip entry writer object (#1041) 4c0d9ea995da595e90e08813b89510de59907802 Serhiy Storchaka 2017-04-12 13:03:23
bpo-30047: Fix a typo in Doc/library/select.rst (#1086) 3e0f1fc4e0ffcfcc706015fa3d67c262948ef171 NAKAMURA Osamu 2017-04-12 10:30:40
Remove two legacy constants which hopefully have no consumers (#1087) c7cc14a825ec156c76329f65bed0d0bd6e03d035 Alex Gaynor 2017-04-12 02:41:42
Reimplement tempfile._RandomNameSequence using a generator function. (#1075) f50354adaaafebe95ad09d09b825804a686ea843 Serhiy Storchaka 2017-04-11 19:45:59
bpo-29692: Add missing ACKS entry (#1079) e8a6bb4f3936123f3eca0b6cea05e2875a2722bc Nick Coghlan 2017-04-11 09:47:39
bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError (GH-949) 00c75e9a45ff0366c185e9e8a2e23af5a35481b0 svelankar 2017-04-11 09:11:13
Remove superfluous comment in urllib.error. (#1076) 6fab78e9027f9ebd6414995580781b480433e595 Senthil Kumaran 2017-04-11 04:08:35
Remove OSError related comment in urllib.request. (#1070) 6dfcc81f6b1c82a71a1c876e14424fb8b3573447 Senthil Kumaran 2017-04-10 02:49:34
bpo-29506: Clarify deep copy note in copy module 19e04942562a980ad2519f6ff79c455a7472783b Sanyam Khurana 2017-04-09 10:22:30
bpo-26187: Test that set_trace_callback() is not called multiple times (GH-461) 0e6cb2ea624570ed08c354f1ed1f595dab4192d6 Aviv Palivoda 2017-04-09 09:11:59
Issue #29798: Handle git worktree in patchcheck (#1058) 2abfdf5a81383d3b1ed6b7321903a9a168c373c5 Nick Coghlan 2017-04-09 08:33:03
bpo-29951: Include function name for some error messages in `PyArg_ParseTuple*` (#916) 64c8f705c0121a4b45ca2c3bc7b47b282e9efcd8 Michael Seifert 2017-04-09 07:47:12
Remove invalid comment in urllib.request. (#1054) a2a9ddd923a849124bdd1c484f70f02df6fde0e9 Senthil Kumaran 2017-04-09 06:27:25
Improvements to typing documentation (#967) 45d22c256bce3afcf57f49032a6b20fdec4f26ad Jelle Zijlstra 2017-04-08 16:09:14
Commit 7b2491a6aa5cdc1f8f9e3fd9df91f29ee69aa982 - bpo-27200: Fix pathlib, ssl, turtle and weakref doctests (GH-616)
Author: Marco Buttu
Author date (UTC): 2017-04-13 14:17
Committer name: Berker Peksag
Committer date (UTC): 2017-04-13 14:17
Parent(s): d1dc65dc820649e59633142a88eaf97f930963a9
Signer:
Signing key:
Signing status: N
Tree: a36719b82f5922e0102d2a0b4bbb5686b50ba045
File Lines added Lines deleted
Doc/library/pathlib.rst 11 1
Doc/library/ssl.rst 11 4
Doc/library/turtle.rst 2 3
Doc/library/weakref.rst 1 1
File Doc/library/pathlib.rst changed (mode: 100644) (index 34ab3b8edf..1445226447)
... ... property:
271 271 Methods and properties Methods and properties
272 272 ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
273 273
274 .. testsetup::
275
276 from pathlib import PurePosixPath, PureWindowsPath
277
274 278 Pure paths provide the following methods and properties: Pure paths provide the following methods and properties:
275 279
276 280 .. data:: PurePath.drive .. data:: PurePath.drive
 
... ... call fails (for example because the path doesn't exist):
657 661 Return information about this path (similarly to :func:`os.stat`). Return information about this path (similarly to :func:`os.stat`).
658 662 The result is looked up at each call to this method. The result is looked up at each call to this method.
659 663
664 ::
665
660 666 >>> p = Path('setup.py') >>> p = Path('setup.py')
661 667 >>> p.stat().st_size >>> p.stat().st_size
662 668 956 956
 
... ... call fails (for example because the path doesn't exist):
948 954 .. method:: Path.rglob(pattern) .. method:: Path.rglob(pattern)
949 955
950 956 This is like calling :meth:`Path.glob` with "``**``" added in front of the This is like calling :meth:`Path.glob` with "``**``" added in front of the
951 given *pattern*:
957 given *pattern*::
952 958
953 959 >>> sorted(Path().rglob("*.py")) >>> sorted(Path().rglob("*.py"))
954 960 [PosixPath('build/lib/pathlib.py'), [PosixPath('build/lib/pathlib.py'),
 
... ... call fails (for example because the path doesn't exist):
972 978 An :exc:`OSError` can be raised if either file cannot be accessed for some An :exc:`OSError` can be raised if either file cannot be accessed for some
973 979 reason. reason.
974 980
981 ::
982
975 983 >>> p = Path('spam') >>> p = Path('spam')
976 984 >>> q = Path('eggs') >>> q = Path('eggs')
977 985 >>> p.samefile(q) >>> p.samefile(q)
 
... ... call fails (for example because the path doesn't exist):
988 996 *target_is_directory* must be true (default ``False``) if the link's target *target_is_directory* must be true (default ``False``) if the link's target
989 997 is a directory. Under POSIX, *target_is_directory*'s value is ignored. is a directory. Under POSIX, *target_is_directory*'s value is ignored.
990 998
999 ::
1000
991 1001 >>> p = Path('mylink') >>> p = Path('mylink')
992 1002 >>> p.symlink_to('setup.py') >>> p.symlink_to('setup.py')
993 1003 >>> p.resolve() >>> p.resolve()
File Doc/library/ssl.rst changed (mode: 100644) (index bbb13745b2..e3945191f5)
... ... Random generation
369 369 Certificate handling Certificate handling
370 370 ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
371 371
372 .. testsetup::
373
374 import ssl
375
372 376 .. function:: match_hostname(cert, hostname) .. function:: match_hostname(cert, hostname)
373 377
374 378 Verify that *cert* (in decoded format as returned by Verify that *cert* (in decoded format as returned by
 
... ... Certificate handling
415 419
416 420 >>> import ssl >>> import ssl
417 421 >>> timestamp = ssl.cert_time_to_seconds("Jan 5 09:34:43 2018 GMT") >>> timestamp = ssl.cert_time_to_seconds("Jan 5 09:34:43 2018 GMT")
418 >>> timestamp
422 >>> timestamp # doctest: +SKIP
419 423 1515144883 1515144883
420 424 >>> from datetime import datetime >>> from datetime import datetime
421 >>> print(datetime.utcfromtimestamp(timestamp))
425 >>> print(datetime.utcfromtimestamp(timestamp)) # doctest: +SKIP
422 426 2018-01-05 09:34:43 2018-01-05 09:34:43
423 427
424 428 "notBefore" or "notAfter" dates must use GMT (:rfc:`5280`). "notBefore" or "notAfter" dates must use GMT (:rfc:`5280`).
 
... ... to speed up repeated connections from the same clients.
1378 1382 'strength_bits': 128}] 'strength_bits': 128}]
1379 1383
1380 1384 On OpenSSL 1.1 and newer the cipher dict contains additional fields:: On OpenSSL 1.1 and newer the cipher dict contains additional fields::
1385
1381 1386 >>> ctx.get_ciphers() # OpenSSL 1.1+ >>> ctx.get_ciphers() # OpenSSL 1.1+
1382 1387 [{'aead': True, [{'aead': True,
1383 1388 'alg_bits': 256, 'alg_bits': 256,
 
... ... to speed up repeated connections from the same clients.
1638 1643 .. versionchanged:: 3.6 .. versionchanged:: 3.6
1639 1644 :attr:`SSLContext.options` returns :class:`Options` flags: :attr:`SSLContext.options` returns :class:`Options` flags:
1640 1645
1641 >>> ssl.create_default_context().options
1646 >>> ssl.create_default_context().options # doctest: +SKIP
1642 1647 <Options.OP_ALL|OP_NO_SSLv3|OP_NO_SSLv2|OP_NO_COMPRESSION: 2197947391> <Options.OP_ALL|OP_NO_SSLv3|OP_NO_SSLv2|OP_NO_COMPRESSION: 2197947391>
1643 1648
1644 1649 .. attribute:: SSLContext.protocol .. attribute:: SSLContext.protocol
 
... ... to speed up repeated connections from the same clients.
1658 1663 .. versionchanged:: 3.6 .. versionchanged:: 3.6
1659 1664 :attr:`SSLContext.verify_flags` returns :class:`VerifyFlags` flags: :attr:`SSLContext.verify_flags` returns :class:`VerifyFlags` flags:
1660 1665
1661 >>> ssl.create_default_context().verify_flags
1666 >>> ssl.create_default_context().verify_flags # doctest: +SKIP
1662 1667 <VerifyFlags.VERIFY_X509_TRUSTED_FIRST: 32768> <VerifyFlags.VERIFY_X509_TRUSTED_FIRST: 32768>
1663 1668
1664 1669 .. attribute:: SSLContext.verify_mode .. attribute:: SSLContext.verify_mode
 
... ... recommended to use :const:`PROTOCOL_TLS_CLIENT` or
2259 2264 :const:`PROTOCOL_TLS_SERVER` as the protocol version. SSLv2 and SSLv3 are :const:`PROTOCOL_TLS_SERVER` as the protocol version. SSLv2 and SSLv3 are
2260 2265 disabled by default. disabled by default.
2261 2266
2267 ::
2268
2262 2269 >>> client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) >>> client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
2263 2270 >>> client_context.options |= ssl.OP_NO_TLSv1 >>> client_context.options |= ssl.OP_NO_TLSv1
2264 2271 >>> client_context.options |= ssl.OP_NO_TLSv1_1 >>> client_context.options |= ssl.OP_NO_TLSv1_1
File Doc/library/turtle.rst changed (mode: 100644) (index 1986972549..6f2626cef2)
... ... Color control
936 936 >>> turtle.fillcolor("violet") >>> turtle.fillcolor("violet")
937 937 >>> turtle.fillcolor() >>> turtle.fillcolor()
938 938 'violet' 'violet'
939 >>> col = turtle.pencolor()
940 >>> col
939 >>> turtle.pencolor()
941 940 (50.0, 193.0, 143.0) (50.0, 193.0, 143.0)
942 >>> turtle.fillcolor(col)
941 >>> turtle.fillcolor((50, 193, 143)) # Integers, not floats
943 942 >>> turtle.fillcolor() >>> turtle.fillcolor()
944 943 (50.0, 193.0, 143.0) (50.0, 193.0, 143.0)
945 944 >>> turtle.fillcolor('#ffffff') >>> turtle.fillcolor('#ffffff')
File Doc/library/weakref.rst changed (mode: 100644) (index b02a006d73..40bb06adfd)
... ... the constructor when it was created.
478 478 >>> obj = Object() >>> obj = Object()
479 479 >>> f = weakref.finalize(obj, callback, 1, 2, z=3) >>> f = weakref.finalize(obj, callback, 1, 2, z=3)
480 480 >>> f.detach() #doctest:+ELLIPSIS >>> f.detach() #doctest:+ELLIPSIS
481 (<__main__.Object object ...>, <function callback ...>, (1, 2), {'z': 3})
481 (<...Object object ...>, <function callback ...>, (1, 2), {'z': 3})
482 482 >>> newobj, func, args, kwargs = _ >>> newobj, func, args, kwargs = _
483 483 >>> assert not f.alive >>> assert not f.alive
484 484 >>> assert newobj is obj >>> assert newobj is obj
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