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

#23001: Accept mutable bytes-like objects

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years ago by storchaka+cpython
Modified:
4 years, 8 months ago
Reviewers:
vadmium+py
CC:
AntoinePitrou, haypo, Arfrever, stoneleaf, devnull_psf.upfronthosting.co.za, Martin Panter, storchaka, Josh.R
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/fcntl.rst View 1 2 chunks +9 lines, -5 lines 0 comments Download
Doc/library/mmap.rst View 1 3 chunks +9 lines, -0 lines 0 comments Download
Doc/library/ossaudiodev.rst View 1 1 chunk +19 lines, -10 lines 0 comments Download
Doc/library/socket.rst View 1 5 chunks +28 lines, -14 lines 4 comments Download
Doc/library/ssl.rst View 1 1 chunk +3 lines, -0 lines 0 comments Download
Lib/test/test_codecs.py View 1 1 chunk +1 line, -0 lines 0 comments Download
Lib/test/test_fcntl.py View 1 1 chunk +1 line, -0 lines 0 comments Download
Lib/test/test_mmap.py View 1 3 chunks +6 lines, -2 lines 0 comments Download
Lib/test/test_socket.py View 1 5 chunks +10 lines, -0 lines 0 comments Download
Lib/test/test_ssl.py View 1 1 chunk +2 lines, -0 lines 0 comments Download
Modules/_codecsmodule.c View 1 1 chunk +9 lines, -6 lines 0 comments Download
Modules/fcntlmodule.c View 1 1 chunk +6 lines, -4 lines 4 comments Download
Modules/mmapmodule.c View 1 3 chunks +20 lines, -14 lines 0 comments Download
Modules/ossaudiodev.c View 1 3 chunks +21 lines, -10 lines 0 comments Download
Modules/socketmodule.c View 1 12 chunks +61 lines, -48 lines 0 comments Download
Modules/_ssl.c View 1 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 2
Martin Panter
http://bugs.python.org/review/23001/diff/14242/Doc/library/socket.rst File Doc/library/socket.rst (right): http://bugs.python.org/review/23001/diff/14242/Doc/library/socket.rst#newcode616 Doc/library/socket.rst:616: characters in length) to its standard dotted-quad string representation ...
4 years, 8 months ago #1
storchaka_gmail.com
4 years, 8 months ago #2
http://bugs.python.org/review/23001/diff/14242/Doc/library/socket.rst
File Doc/library/socket.rst (right):

http://bugs.python.org/review/23001/diff/14242/Doc/library/socket.rst#newcode616
Doc/library/socket.rst:616: characters in length) to its standard dotted-quad
string representation (for example,
On 2015/03/20 02:41:08, vadmium wrote:
> four bytes in length

Done.

http://bugs.python.org/review/23001/diff/14242/Doc/library/socket.rst#newcode653
Doc/library/socket.rst:653: characters) to its standard, family-specific string
representation (for
On 2015/03/20 02:41:08, vadmium wrote:
> Probably should be “some number of bytes”, since they are not ASCII characters

Done.

http://bugs.python.org/review/23001/diff/14242/Modules/fcntlmodule.c
File Modules/fcntlmodule.c (right):

http://bugs.python.org/review/23001/diff/14242/Modules/fcntlmodule.c#newcode73
Modules/fcntlmodule.c:73: if ((size_t)view.len > sizeof buf) {
On 2015/03/20 02:41:08, vadmium wrote:
> Probably should release the buffer in this case

Done.

http://bugs.python.org/review/23001/diff/14242/Modules/fcntlmodule.c#newcode79
Modules/fcntlmodule.c:79: memcpy(buf, view.buf, len);
On 2015/03/20 02:41:08, vadmium wrote:
> An argument could be made for passing the buffer directly without copying if
it
> is writable, and maybe even returning the actual fcntl() return value, like
> ioctl() does since Issue 555817. If you allow writable buffers, but do not
> return the true return value (as in this patch), I think you lose the chance
to
> make that change in the future without breaking compatibility. But maybe
nobody
> cares that much about this.

Agree with you, this is not easy issue. I'll left fcntl changes for separate
issue.
Sign in to reply to this message.

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