Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Delta Between Two Patch Sets: Doc/library/os.rst

Issue 26826: Expose new copy_file_range() syscal in os module and use it to improve shutils.copy()
Left Patch Set: Created 3 years, 7 months ago
Right Patch Set: Created 3 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « configure.ac ('k') | Lib/test/test_os.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 :mod:`os` --- Miscellaneous operating system interfaces 1 :mod:`os` --- Miscellaneous operating system interfaces
2 ======================================================= 2 =======================================================
3 3
4 .. module:: os 4 .. module:: os
5 :synopsis: Miscellaneous operating system interfaces. 5 :synopsis: Miscellaneous operating system interfaces.
6 6
7 7
8 This module provides a portable way of using operating system dependent 8 This module provides a portable way of using operating system dependent
9 functionality. If you just want to read or write a file see :func:`open`, if 9 functionality. If you just want to read or write a file see :func:`open`, if
10 you want to manipulate paths, see the :mod:`os.path` module, and if you want to 10 you want to manipulate paths, see the :mod:`os.path` module, and if you want to
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 must reside in the same filesystem, otherwise a :exc:`OSError` is 689 must reside in the same filesystem, otherwise a :exc:`OSError` is
690 raised with :attr:`~OSError.errno` set to :data:`errno.EXDEV`. 690 raised with :attr:`~OSError.errno` set to :data:`errno.EXDEV`.
691 691
692 This copy is done without using any user space buffers, and some 692 This copy is done without using any user space buffers, and some
693 filesystems could implement optimizations. The copy is done as if 693 filesystems could implement optimizations. The copy is done as if
694 both files are opened as binary. 694 both files are opened as binary.
695 695
696 The return value is the amount of bytes copied. This could be less than the 696 The return value is the amount of bytes copied. This could be less than the
697 amount requested. 697 amount requested.
698 698
699 Availability: some recent flavors of Unix (see the man page 699 Availability: Linux 4.5, released May 2016 (see the man page
700 :manpage:`copy_file_range(2)` for further information). 700 :manpage:`copy_file_range(2)` for further information).
701 701
702 .. versionadded:: 3.6 702 .. versionadded:: 3.6
703 703
704 .. function:: device_encoding(fd) 704 .. function:: device_encoding(fd)
705 705
706 Return a string describing the encoding of the device associated with *fd* 706 Return a string describing the encoding of the device associated with *fd*
707 if it is connected to a terminal; else return :const:`None`. 707 if it is connected to a terminal; else return :const:`None`.
708 708
709 709
(...skipping 3092 matching lines...) Expand 10 before | Expand all | Expand 10 after
3802 3802
3803 .. versionchanged:: 3.5.2 3803 .. versionchanged:: 3.5.2
3804 On Linux, if ``getrandom()`` blocks (the urandom entropy pool is not 3804 On Linux, if ``getrandom()`` blocks (the urandom entropy pool is not
3805 initialized yet), fall back on reading ``/dev/urandom``. 3805 initialized yet), fall back on reading ``/dev/urandom``.
3806 3806
3807 .. versionchanged:: 3.5 3807 .. versionchanged:: 3.5
3808 On Linux 3.17 and newer, the ``getrandom()`` syscall is now used 3808 On Linux 3.17 and newer, the ``getrandom()`` syscall is now used
3809 when available. On OpenBSD 5.6 and newer, the C ``getentropy()`` 3809 when available. On OpenBSD 5.6 and newer, the C ``getentropy()``
3810 function is now used. These functions avoid the usage of an internal file 3810 function is now used. These functions avoid the usage of an internal file
3811 descriptor. 3811 descriptor.
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+