cpython/Doc/library
Maxwell A McKinnon cf57cabef8 bpo-32689: Updates shutil.move to allow for Path objects to be used as source arg (GH-15326)
Important work originally done by @emilyemorehouse two years ago and nearly ready to go in.

This bug has affected many people and in some cases has been a dealbreaker to the adoption of the otherwise wonderful pathlib and PEP519. https://stackoverflow.com/questions/33625931/copy-file-with-pathlib-in-python.

This adds the outstanding test request from that PR @vstinner (https://github.com/python/cpython/pull/5393).

Test fails without the change, passes with it, along with every other test in test_shutil.

Some variants were experimented with to make the one line change and the most performant one was picked.


# Added Test for PathLike directory destination, the current fail case

```
Lib/test/test_shutil.py::TestMove::test_move_file_pathlike FAILED                                                               [100%]

============================================================== FAILURES ===============================================================
__________________________________________________ TestMove.test_move_file_pathlike ___________________________________________________

self = <test.test_shutil.TestMove testMethod=test_move_file_pathlike>

    def test_move_file_pathlike(self):
        # Move a file to another location on the same filesystem.
        src = pathlib.Path(self.src_file)
>       self._check_move_file(src, self.dst_dir, self.dst_file)

Lib/test/test_shutil.py:1563:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Lib/test/test_shutil.py:1545: in _check_move_file
    shutil.move(src, dst)
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shutil.py:562: in move
    real_dst = os.path.join(dst, _basename(src))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

path = PosixPath('/var/folders/r2/psq74t5x3nbfzlph8bh2pvdw0000gn/T/tmp9ie0wh9_/foo')

    def _basename(path):
        # A basename() variant which first strips the trailing slash, if present.
        # Thus we always get the last component of the path, even for directories.
        sep = os.path.sep + (os.path.altsep or '')
>       return os.path.basename(path.rstrip(sep))
E       AttributeError: 'PosixPath' object has no attribute 'rstrip'

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/shutil.py:526: AttributeError
============================================== 1 failed, 102 deselected in 0.30 seconds ===============================================
```

After change:

```
========================================================= test session starts =========================================================
platform darwin -- Python 3.7.4, pytest-5.0.1, py-1.8.0, pluggy-0.12.0 -- /Users/maxwellmckinnon/.venvs/TA3.7/bin/python3.7
cachedir: .pytest_cache
rootdir: /Users/maxwellmckinnon/dev/cpython
plugins: cov-2.7.1, mock-1.10.4
collected 103 items / 102 deselected / 1 selected

Lib/test/test_shutil.py::TestMove::test_move_file_pathlike PASSED                                                               [100%]

============================================== 1 passed, 102 deselected in 0.06 seconds ===============================================
```

Running all the tests in test_shutil.py
```
╰─ pytest Lib/test/test_shutil.py -v
========================================================= test session starts =========================================================
platform darwin -- Python 3.7.4, pytest-5.0.1, py-1.8.0, pluggy-0.12.0 -- /Users/maxwellmckinnon/.venvs/TA3.7/bin/python3.7
cachedir: .pytest_cache
rootdir: /Users/maxwellmckinnon/dev/cpython
plugins: cov-2.7.1, mock-1.10.4
collected 103 items

Lib/test/test_shutil.py::TestShutil::test_chown PASSED                                                                          [  0%]
Lib/test/test_shutil.py::TestShutil::test_copy PASSED                                                                           [  1%]
...
Lib/test/test_shutil.py::TermsizeTests::test_stty_match SKIPPED                                                                 [ 99%]
Lib/test/test_shutil.py::PublicAPITests::test_module_all_attribute PASSED                                                       [100%]

================================================ 96 passed, 7 skipped in 1.25 seconds =================================================
```

# Performance Considerations
Is it considered poor form to get rid of _basename altogether and make use of pathlib in the move function? I'm not sure if the idea is for all these modules to strictly avoid circular dependencies. They are already using os.path which is just as much a citizen in 3.8 as pathlib right?

e.g.

`real_dst = os.path.join(dst, _basename(src))`
becomes
`real_dst = Path(dst) / Path(src).name`

I've looked around and familiarized myself, and I now think importing pathlib here is fine. My only remaining concern is that of performance.

Here's the performance difference for this step. 

```
In [46]: %timeit real_dst = os.path.join("a/b/c", _basename('b/'))
2.71 µs ± 62.6 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)

In [47]: %timeit real_dst = Path("a/b/c") / Path('b/').name
12.4 µs ± 65.3 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
```

Is 10us significant or insignificant compared to the least expensive operation this function will do? I don't know. Let's find out.

```
In [55]: %timeit os.rename('/tmp/a/a.txt', '/tmp/a/b.txt'); os.rename('/tmp/a/b.txt', '/tmp/a/a.txt')
124 µs ± 2.18 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
62us to rename. 10us seems significant enough that we wouldn't want to favor the Path sugar suggestion. 16% speed decrease from adding the 10us.

What do people think? I was hoping to get to use pathlib.Path here, but I suspect for this low level move, it should be as fast as possible, and 16% is not worth one line of sugary code to me.



https://bugs.python.org/issue32689



Automerge-Triggered-By: @gvanrossum
2019-09-30 19:41:16 -07:00
..
2to3.rst
__future__.rst
__main__.rst
_thread.rst bpo-37077: Add native thread ID (TID) for AIX (GH-13624) 2019-06-13 15:34:46 -07:00
abc.rst Grammar corrections in abc.rst (GH-10525) 2018-11-13 16:40:44 -08:00
aifc.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
allos.rst
archiving.rst
argparse.rst bpo-8538: Add support for boolean actions to argparse (GH-11478) 2019-09-13 11:17:43 +01:00
array.rst bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388) 2019-08-22 16:28:28 +01:00
ast.rst bpo-38049: Add command-line interface for the ast module. (GH-15724) 2019-09-09 23:36:13 +03:00
asynchat.rst
asyncio-api-index.rst bpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482) 2019-09-29 21:59:55 -07:00
asyncio-dev.rst Fix grammar in asyncio-dev.rst (GH-15672) 2019-09-03 23:04:09 -07:00
asyncio-eventloop.rst bpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482) 2019-09-29 21:59:55 -07:00
asyncio-exceptions.rst bpo-37651: Document CancelledError is now a subclass of BaseException (GH-15950) 2019-09-11 07:12:51 -07:00
asyncio-future.rst Update asyncio.ensure_future() documentation (GH-15347) 2019-08-21 11:59:11 -04:00
asyncio-llapi-index.rst bpo-34746: Fix stop -> close (GH-9437) 2018-09-20 01:17:09 -04:00
asyncio-platforms.rst bpo-29883: Asyncio proactor udp (GH-13440) 2019-05-28 02:52:15 -07:00
asyncio-policy.rst bpo-35621: Support running subprocesses in asyncio when loop is executed in non-main thread (GH-14344) 2019-06-30 12:54:59 +03:00
asyncio-protocol.rst bpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482) 2019-09-29 21:59:55 -07:00
asyncio-queue.rst bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [queue] (GH-13950) 2019-09-10 04:46:12 -07:00
asyncio-stream.rst bpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482) 2019-09-29 21:59:55 -07:00
asyncio-subprocess.rst bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033) 2019-09-12 15:40:40 +03:00
asyncio-sync.rst bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [locks] (GH-13920) 2019-09-10 03:55:07 -07:00
asyncio-task.rst Fix and improve `asyncio.run()` docs (GH-16403) 2019-09-30 17:12:21 -07:00
asyncio.rst bpo-33649: Add a high-level section about Futures; few quick fixes (GH-9403) 2018-09-18 17:55:44 -04:00
asyncore.rst bpo-11233: Create availability directive for documentation (GH-9692) 2018-10-12 16:55:20 +02:00
atexit.rst
audioop.rst
audit_events.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
base64.rst
bdb.rst [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620) 2019-06-05 18:22:31 +03:00
binary.rst
binascii.rst bpo-22385: Support output separators in hex methods. (#13578) 2019-05-29 11:46:58 -07:00
binhex.rst
bisect.rst
builtins.rst
bz2.rst Fix docs bz.open default mode (GH-15100) 2019-09-09 08:49:47 -07:00
calendar.rst
cgi.rst
cgitb.rst
chunk.rst
cmath.rst bpo-36908: 'This module is always available' isn't helpful. (#13297) 2019-05-17 15:29:13 +05:30
cmd.rst bpo-35054: Add yet more index entries for symbols. (GH-10121) 2018-10-28 13:41:26 +02:00
code.rst
codecs.rst Correct typos in the codecs module documentation (#15135) 2019-09-12 08:41:32 +01:00
codeop.rst
collections.abc.rst
collections.rst bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700) 2019-06-01 11:00:15 +03:00
colorsys.rst Update link in colorsys docs to be https (GH-14062) 2019-06-15 07:09:36 -07:00
compileall.rst bpo-38112: Compileall improvements (GH-16012) 2019-09-26 08:28:26 +02:00
concurrency.rst bpo-37312: Remove _dummy_thread and dummy_threading modules (GH-14143) 2019-06-17 14:18:43 +02:00
concurrent.futures.rst Update concurrent.futures.rst (GH-14061) 2019-06-14 07:39:43 -07:00
concurrent.rst
configparser.rst bpo-21018: added missing documentation about escaping characters for configparser (GH-6137) 2019-09-10 14:51:09 +02:00
constants.rst bpo-35054: Add more index entries for symbols. (GH-10064) 2018-10-26 09:00:49 +03:00
contextlib.rst [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620) 2019-06-05 18:22:31 +03:00
contextvars.rst
copy.rst bpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465) 2019-08-24 11:15:44 -07:00
copyreg.rst Do not use explicit inheritance from object in the documentation. (GH-13936) 2019-06-10 13:35:52 +03:00
crypt.rst bpo-31904: Don't build the _crypt extension on VxWorks (GH-12833) 2019-04-15 11:02:20 +02:00
crypto.rst
csv.rst bpo-27497: Add return value to csv.DictWriter.writeheader (GH-12306) 2019-05-10 03:50:11 +02:00
ctypes.rst Fix typos in docs, comments and test assert messages (#14872) 2019-07-21 16:12:33 -04:00
curses.ascii.rst bpo-35054: Add yet more index entries for symbols. (GH-10121) 2018-10-28 13:41:26 +02:00
curses.panel.rst
curses.rst Doc: Fix link to window.getch in curses documentation (GH-16132) 2019-09-14 07:17:09 +01:00
custominterp.rst
dataclasses.rst bpo-37163: Make the obj argument of dataclasses.replace() a positional-only. (GH-14390) 2019-06-26 19:07:44 +03:00
datatypes.rst bpo-33602: Doc: Remove set and queue references from Data Types (GH-7055) 2019-09-10 17:11:16 +02:00
datetime.rst bpo-37488 : Document a warning for datetime.utcnow() and utcfromtimestamp() (GH-15773) 2019-09-11 06:58:42 -07:00
dbm.rst bpo-33106: change dbm key deletion error for readonly file from KeyError to dbm.error (#6295) 2018-12-12 20:46:55 +08:00
debug.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
decimal.rst bpo-26256: Document algorithm speed for the Decimal module. (#4808) 2019-02-02 15:37:39 +01:00
development.rst
dialog.rst bpo-25237: Documentation for tkinter modules (GH-1870) 2019-09-10 10:55:34 +02:00
difflib.rst bpo-35603: Add a note on difflib table header interpreted as HTML (GH-11439) 2019-09-11 13:21:30 +02:00
dis.rst bpo-34880: Add the LOAD_ASSERTION_ERROR opcode. (GH-15073) 2019-08-25 12:44:09 +03:00
distribution.rst
distutils.rst
doctest.rst bpo-36675: Remove obsolete code. (GH-16024) 2019-09-12 12:23:53 +01:00
email.charset.rst bpo-26441: Remove documentation for deleted to_splittable and from_splittable methods (#9865) 2018-10-18 20:13:23 -04:00
email.compat32-message.rst Doc fix: duplicate object description of email.message (GH-13742) 2019-06-03 17:17:03 +02:00
email.contentmanager.rst
email.encoders.rst Fix typos in comments, docs and test names (#15018) 2019-07-30 18:16:13 -04:00
email.errors.rst
email.examples.rst
email.generator.rst Fix typos in Doc/library/email.generator.rst documentation (GH-13539) 2019-05-24 09:50:35 -04:00
email.header.rst
email.headerregistry.rst bpo-35805: Add parser for Message-ID email header. (GH-13397) 2019-06-04 10:41:34 -07:00
email.iterators.rst
email.message.rst bpo-35404: Clarify how to import _structure in email.message doc (GH-10886) 2019-01-09 15:52:10 -07:00
email.mime.rst
email.parser.rst Correct a couple of unbalanced parenthesis. (GH-10779) 2018-12-05 21:45:30 +02:00
email.policy.rst
email.rst bpo-35035: Rename email.utils documentation to email.utils.rst (GH-10023) 2018-11-21 13:41:07 +01:00
email.utils.rst bpo-35035: Rename email.utils documentation to email.utils.rst (GH-10023) 2018-11-21 13:41:07 +01:00
ensurepip.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
enum.rst Minor documentation fixes on library/enum (GH-15234) 2019-08-19 18:41:31 -07:00
errno.rst
exceptions.rst Doc: update PendingDeprecationWarning explanation (GH-12837) 2019-04-15 22:40:23 +10:00
faulthandler.rst bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16249) 2019-09-18 14:15:10 +02:00
fcntl.rst Doc: fcntl.lockf() is more powerful than written (GH-6750) 2019-09-13 18:32:28 +01:00
filecmp.rst
fileformats.rst
fileinput.rst bpo-37014: Update docstring and Documentation of fileinput.FileInput(). (GH-13545) 2019-06-02 23:01:49 +02:00
filesys.rst bpo-35471: Remove the macpath module (GH-11129) 2018-12-14 13:37:26 +01:00
fnmatch.rst glob uses fnmatch.filter instead of fnmatch since 2001. (GH-10102) 2018-11-07 20:09:11 +02:00
formatter.rst
fractions.rst bpo-37819: Add Fraction.as_integer_ratio() (GH-15212) 2019-08-11 14:40:59 -07:00
frameworks.rst
ftplib.rst bpo-38244: [Documentation] Fix unreliable link to sever in ftplib.rst (#16319) 2019-09-26 17:22:31 +08:00
functional.rst
functions.rst bpo-38255: super() can search attributes as well as methods (GH-16368) 2019-09-25 08:13:19 -07:00
functools.rst Do not use explicit inheritance from object in the documentation. (GH-13936) 2019-06-10 13:35:52 +03:00
gc.rst bpo-36016: Add generation option to gc.getobjects() (GH-11909) 2019-02-23 12:02:06 +09:00
getopt.rst
getpass.rst
gettext.rst DOC: Unnecessary plural. (GH-13613) 2019-05-28 10:35:25 +02:00
glob.rst Doc: recursive glob ** follows symlinks to directories (GH-12918) 2019-09-11 19:17:05 +02:00
grp.rst
gzip.rst bpo-6584: Add a BadGzipFile exception to the gzip module. (GH-13022) 2019-05-13 10:50:52 +03:00
hashlib-blake2-tree.png
hashlib.rst bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044) 2019-09-12 19:30:00 -05:00
heapq.rst fix dangling keyfunc examples in documentation of heapq and sorted (#1432) 2018-10-15 13:06:53 -06:00
hmac.rst
html.entities.rst
html.parser.rst
html.rst bpo-31865: Fix a couple of typos in the html.unescape() docs. (GH-9662) 2018-10-01 17:34:46 -07:00
http.client.rst bpo-12707: deprecate info(), geturl(), getcode() methods in favor of headers, url, and status properties for HTTPResponse and addinfourl (GH-11447) 2019-09-13 12:40:07 +01:00
http.cookiejar.rst bpo-37580: Fix typo in http.cookiejar documentation (GH-14731) 2019-07-13 03:17:16 -07:00
http.cookies.rst bpo-11001: updated cookie docs (GH-13086) 2019-05-07 10:05:20 -07:00
http.rst bpo-26589: Add http status code 451 (GH-15413) 2019-08-23 10:19:15 -07:00
http.server.rst bpo-35640: Allow passing PathLike arguments to SimpleHTTPRequestHandler (GH-11398) 2019-09-11 14:03:46 +01:00
i18n.rst
idle.rst bpo-37748: Re-order the Run menu. (GH-15115) 2019-08-04 16:45:15 -04:00
imaplib.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
imghdr.rst
imp.rst bpo-35325: Doc: imp.find_module() return value documentation discrepancy (GH-11040) 2019-09-12 14:10:50 +02:00
importlib.metadata.rst bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. (GH-15840) 2019-09-10 14:53:31 +01:00
importlib.rst bpo-37574: Mention helper functions for find_spec documentation (GH-14739) 2019-09-10 17:06:22 +01:00
index.rst bpo-34717: Stop numbering stdlib titles/sections in the docs (GH-9370) 2018-09-17 18:12:21 -04:00
inspect.rst bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700) 2019-06-01 11:00:15 +03:00
internet.rst
intro.rst bpo-11233: Create availability directive for documentation (GH-9692) 2018-10-12 16:55:20 +02:00
io.rst Improve the io module documentation (GH-15099) 2019-09-11 15:55:13 +01:00
ipaddress.rst
ipc.rst bpo-33649: Fix asyncio-dev (GH-9324) 2018-09-14 16:57:11 -07:00
itertools.rst bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625) 2019-09-09 11:47:14 +03:00
json.rst Correct minor grammar mistake (GH-15404) 2019-08-23 10:58:27 +01:00
keyword.rst
language.rst
linecache.rst bpo-32797: improve documentation of linecache.getline (GH-9540) 2018-10-24 14:44:41 +02:00
locale.rst bpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606) 2018-11-20 16:20:16 +01:00
logging.config.rst bpo-35722: Updated the documentation for the 'disable_existing_loggers' parameter (GH-11525) 2019-01-23 07:12:39 +00:00
logging.handlers.rst bpo-38034: Fix typo in logging.handlers.rst (GH-15708) 2019-09-11 07:44:37 +01:00
logging.rst logging.Formatter docs: Add missing `validate` parameter, clarify `style` parameter (GH-15222) 2019-09-09 12:29:54 +01:00
lzma.rst
mailbox.rst bpo-30088: Document that existing dir structure isn't verified by mailbox.Maildir (GH-1163) 2019-07-13 07:47:14 -07:00
mailcap.rst
markup.rst
marshal.rst
math.rst bpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975) 2019-07-27 14:04:29 -07:00
mimetypes.rst bpo-4963: Fix for initialization and non-deterministic behavior issues in mimetypes (GH-3062) 2019-06-24 16:46:59 -07:00
misc.rst
mm.rst
mmap.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
modulefinder.rst
modules.rst bpo-34632: Add importlib.metadata (GH-12547) 2019-05-24 16:59:01 -07:00
msilib.rst
msvcrt.rst
multiprocessing.rst bpo-33725, multiprocessing doc: rephase warning against fork on macOS (GH-13841) 2019-06-05 21:59:33 +02:00
multiprocessing.shared_memory.rst bpo-36364: fix SharedMemoryManager examples (GH-12439) 2019-03-26 12:12:26 -07:00
netdata.rst
netrc.rst
nis.rst
nntplib.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
numbers.rst
numeric.rst
operator.rst bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700) 2019-06-01 11:00:15 +03:00
optparse.rst Remove duplicate "Reference Guide" in optparse.rst. (GH-10372) 2018-11-07 07:47:11 +02:00
os.path.rst Doc: Improve consistency of os.path.normcase with other os.path functions (GH-14004) 2019-09-13 14:01:02 +01:00
os.rst bpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479) 2019-09-07 10:05:29 +03:00
ossaudiodev.rst bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231) 2018-10-31 02:26:06 +02:00
othergui.rst
parser.rst bpo-37353: Updated parser note about source code compatibility(GH-14277) 2019-09-20 08:55:26 -05:00
pathlib-inheritance.png bpo-20001: update pathlib landing image (GH-11304) 2019-02-05 19:16:13 +09:00
pathlib-inheritance.svg bpo-20001: update pathlib landing image (GH-11304) 2019-02-05 19:16:13 +09:00
pathlib.rst bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) 2019-09-11 17:08:10 +02:00
pdb.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
persistence.rst
pickle.rst bpo-37977: Warn more strongly and clearly about pickle security (GH-15595) 2019-08-30 22:51:33 -07:00
pickletools.rst
pipes.rst
pkgutil.rst bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
platform.rst bpo-35920: Windows 10 ARM32 platform support (GH-11774) 2019-04-25 18:36:45 +00:00
plistlib.rst bpo-38053 Update documentation for plistlib (GH-15727) 2019-09-09 16:13:43 +02:00
poplib.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
posix.rst bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388) 2019-08-22 16:28:28 +01:00
pprint.rst bpo-37376: pprint support for SimpleNamespace (GH-14318) 2019-06-26 16:13:18 -07:00
profile.rst [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620) 2019-06-05 18:22:31 +03:00
pty.rst bpo-22865: Expand on documentation for the pty.spawn function (GH-11980) 2019-05-20 17:06:16 +02:00
pwd.rst
py_compile.rst bpo-22640: Add silent mode to py_compile.compile() (GH-12976) 2019-05-28 19:29:04 +03:00
pyclbr.rst bpo-36766: Typos in docs and code comments (GH-13116) 2019-05-06 14:57:17 -04:00
pydoc.rst
pyexpat.rst
python.rst
queue.rst Add note to Queue.get() docs about block=True (GH-2223) 2019-03-25 12:55:20 -07:00
quopri.rst
random.rst bpo-32554: Deprecate hashing arbitrary types in random.seed() (GH-15382) 2019-08-22 09:19:36 -07:00
re.rst Doc: Fix missing negation. (GH-14640) 2019-09-11 08:55:22 -07:00
readline.rst Docs: FIX broken links. (GH-13491) 2019-05-25 20:02:24 +02:00
reprlib.rst bpo-9842: Add references for using "..." as a placeholder to the index. (GH-10330) 2018-11-20 19:26:09 +02:00
resource.rst bpo-31904: Port test_resource to VxWorks (GH-12719) 2019-04-17 17:41:33 +02:00
rlcompleter.rst
runpy.rst
sched.rst Remove outdated time.monotonic reference (GH-13264) 2019-05-28 06:47:24 -04:00
secrets.rst
select.rst bpo-34369: make kqueue.control() docs better reflect that timeout is positional-only (GH-9499) 2019-07-11 17:00:34 +03:00
selectors.rst
shelve.rst
shlex.rst bpo-35168: Make shlex.punctuation_chars read-only (#11631) 2019-09-11 12:04:04 +01:00
shutil.rst bpo-32689: Updates shutil.move to allow for Path objects to be used as source arg (GH-15326) 2019-09-30 19:41:16 -07:00
signal.rst Improve signal documentation (GH-14274) 2019-08-06 14:12:22 -07:00
site.rst bpo-33944: note about the intended use of code in .pth files (GH-10131) 2019-09-11 06:21:04 -07:00
smtpd.rst
smtplib.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
sndhdr.rst
socket.rst bpo-28724: Add methods send_fds and recv_fds to the socket module (GH-12889) 2019-09-11 19:12:21 +02:00
socketserver.rst bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
spwd.rst
sqlite3.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
ssl.rst Doc: Fix grammar/spelling in ssl.VERIFY_CRL_CHECK_LEAF docs (GH-16221) 2019-09-17 12:42:30 +02:00
stat.rst bpo-37834: Normalise handling of reparse points on Windows (GH-15231) 2019-08-21 15:27:33 -07:00
statistics.rst bpo-36018: Address more reviewer feedback (GH-15733) 2019-09-08 16:57:58 -07:00
stdtypes.rst Doc: Clarify dict equality irrespective of ordering. (GH-16266) 2019-09-19 07:51:23 +02:00
string.rst bpo-32790: Add info about alt format using # for 'g' in chart (GH-6624) 2019-09-13 18:20:21 +01:00
stringprep.rst
struct.rst bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388) 2019-08-22 16:28:28 +01:00
subprocess.rst bpo-36046: Add user and group parameters to subprocess (GH-11950) 2019-09-12 18:15:44 +01:00
sunau.rst bpo-37320: Remove openfp() of aifc, sunau and wave (GH-14169) 2019-06-18 00:00:24 +02:00
superseded.rst
symbol.rst
symtable.rst bpo-34983: Expose symtable.Symbol.is_nonlocal() in the symtable module (GH-9872) 2018-10-20 01:46:00 +01:00
sys.rst bpo-37937: Mention frame.f_trace in sys.settrace docs (GH-15439) 2019-09-21 01:19:02 +10:00
sysconfig.rst Correct a couple of unbalanced parenthesis. (GH-10779) 2018-12-05 21:45:30 +02:00
syslog.rst Fix "Python" casing in a few places (GH-9001) 2018-09-14 10:13:09 -07:00
tabnanny.rst
tarfile.rst bpo-37408: Precise that Tarfile "format" argument only concerns writing. (GH-14389) 2019-09-28 08:04:44 -07:00
telnetlib.rst bpo-37823: Fix open() link in telnetlib doc (GH-15281) 2019-08-21 12:13:34 +01:00
tempfile.rst bpo-35803: Document and test dir=PathLike for tempfile (GH-11644) 2019-09-09 10:54:34 -05:00
termios.rst bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231) 2018-10-31 02:26:06 +02:00
test.rst bpo-18578: Rename and document test.bytecode_helper as test.support.bytecode_helper (GH-15168) 2019-09-12 10:02:59 +01:00
text.rst
textwrap.rst bpo-30754: Document textwrap.dedent blank line behavior. (GH-14469) 2019-06-29 21:20:03 -07:00
threading.rst bpo-10978: Semaphores can release multiple threads at a time (GH-15588) 2019-08-29 01:45:19 -07:00
time.rst bpo-13927: time.ctime and time.asctime return string explantion (GH-11303) 2019-09-12 11:22:30 +01:00
timeit.rst bpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787) 2019-05-13 21:27:17 +02:00
tk.rst bpo-25237: Documentation for tkinter modules (GH-1870) 2019-09-10 10:55:34 +02:00
tk_msg.png bpo-25237: Documentation for tkinter modules (GH-1870) 2019-09-10 10:55:34 +02:00
tkinter.colorchooser.rst bpo-25237: Documentation for tkinter modules (GH-1870) 2019-09-10 10:55:34 +02:00
tkinter.dnd.rst bpo-25237: Documentation for tkinter modules (GH-1870) 2019-09-10 10:55:34 +02:00
tkinter.font.rst bpo-25237: Documentation for tkinter modules (GH-1870) 2019-09-10 10:55:34 +02:00
tkinter.messagebox.rst bpo-25237: Documentation for tkinter modules (GH-1870) 2019-09-10 10:55:34 +02:00
tkinter.rst bpo-25237: Documentation for tkinter modules (GH-1870) 2019-09-10 10:55:34 +02:00
tkinter.scrolledtext.rst bpo-25237: Documentation for tkinter modules (GH-1870) 2019-09-10 10:55:34 +02:00
tkinter.tix.rst bpo-23156: Remove obsolete tix install directions (GH-11595) 2019-01-17 19:00:51 -05:00
tkinter.ttk.rst
token-list.inc bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) 2019-03-07 12:38:08 -08:00
token.rst bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) 2019-03-07 12:38:08 -08:00
tokenize.rst bpo-5028: Fix up rest of documentation for tokenize documenting line (GH-13686) 2019-05-30 15:06:32 -07:00
trace.rst [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620) 2019-06-05 18:22:31 +03:00
traceback.rst bpo-35054: Add yet more index entries for symbols. (GH-10121) 2018-10-28 13:41:26 +02:00
tracemalloc.rst
tty.rst
tulip_coro.dia
tulip_coro.png
turtle-star.pdf
turtle-star.png
turtle-star.ps
turtle.rst Doc: Correct the creation year and the credits of the Logo Programming language (GH-13520) 2019-06-01 07:41:33 -04:00
types.rst bpo-36896: Clarify that some types constructors are unstable (GH-13271) 2019-06-03 02:43:21 +02:00
typing.rst bpo-28556: Update the opening note in typing docs (GH-16204) 2019-09-16 23:04:06 +01:00
undoc.rst
unicodedata.rst bpo-36502: Update link to UAX #44, the Unicode doc on the UCD. (GH-15301) 2019-09-09 09:37:13 -07:00
unittest.mock-examples.rst bpo-38093: Correctly returns AsyncMock for async subclasses. (GH-15947) 2019-09-19 21:04:18 -07:00
unittest.mock.rst bpo-38163: Child mocks detect their type as sync or async (GH-16471) 2019-09-29 21:56:47 -07:00
unittest.rst bpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878) 2019-09-11 04:02:14 -07:00
unix.rst
urllib.error.rst
urllib.parse.rst bpo-35397: Remove deprecation and document urllib.parse.unwrap (GH-11481) 2019-05-27 09:43:45 -04:00
urllib.request.rst bpo-12707: deprecate info(), geturl(), getcode() methods in favor of headers, url, and status properties for HTTPResponse and addinfourl (GH-11447) 2019-09-13 12:40:07 +01:00
urllib.robotparser.rst
urllib.rst
uu.rst
uuid.rst
venv.rst bpo-37662: Documented venv.EnvBuilder.upgrade_dependencies(). (GH-15768) 2019-09-09 14:50:38 +01:00
warnings.rst bpo-35563: Add reference links to warnings.rst (GH-11289) 2019-05-20 18:45:05 -04:00
wave.rst bpo-37320: Remove openfp() of aifc, sunau and wave (GH-14169) 2019-06-18 00:00:24 +02:00
weakref.rst Update weakref.rst (GH-14098) 2019-06-15 04:33:23 -07:00
webbrowser.rst bpo-37390: Add audit event table to documentations (GH-14406) 2019-06-27 10:47:59 -07:00
windows.rst
winreg.rst bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in docs. (GH-15062) 2019-08-01 01:49:55 +03:00
winsound.rst
wsgiref.rst Update wsgiref.rst (#10488) 2019-05-06 09:01:17 -07:00
xdrlib.rst
xml.dom.minidom.rst bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13352) 2019-06-01 08:33:16 +02:00
xml.dom.pulldom.rst Fix Python version since which external enities are not resolved by default. (GH-11237) 2018-12-19 15:29:04 +02:00
xml.dom.rst
xml.etree.elementtree.rst bpo-33187: Document ElementInclude (XInclude) support in ElementTree (GH-8861) 2019-09-11 15:09:53 +01:00
xml.rst Fix Python version since which external enities are not resolved by default. (GH-11237) 2018-12-19 15:29:04 +02:00
xml.sax.handler.rst
xml.sax.reader.rst bpo-31658: Make xml.sax.parse accepting Path objects (GH-8564) 2019-04-14 11:16:54 +02:00
xml.sax.rst Fix Python version since which external enities are not resolved by default. (GH-11237) 2018-12-19 15:29:04 +02:00
xml.sax.utils.rst
xmlrpc.client.rst bpo-35153: Add headers parameter to xmlrpc.client.ServerProxy (GH-10308) 2019-02-19 17:18:50 +01:00
xmlrpc.rst
xmlrpc.server.rst
zipapp.rst bpo-34906: Doc: Fix typos (GH-9712) 2018-10-05 16:17:18 +02:00
zipfile.rst bpo-36260: Add pitfalls to zipfile module documentation (#13378) 2019-09-11 16:04:11 +01:00
zipimport.rst Reference zipimport source code from docs. (GH-13310) 2019-05-15 19:18:35 +03:00
zlib.rst bpo-37134: Add PEP570 notation to the documentation (GH-13743) 2019-06-05 13:24:28 -07:00