[issue41625] Add splice() to the os module

2020-12-08 Thread Michael Felt


Michael Felt  added the comment:

Sorry Victor - family matters - so I was not watching for several days.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-12-02 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-12-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset dedc2cd5f02a2e2fc2c995a36a3dccf9d93856bb by Pablo Galindo in 
branch 'master':
bpo-41625: Do not add os.splice on AIX due to compatibility issues (GH-23608)
https://github.com/python/cpython/commit/dedc2cd5f02a2e2fc2c995a36a3dccf9d93856bb


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-12-02 Thread STINNER Victor


STINNER Victor  added the comment:

> Seems that adding #include  does not work so I am going to skip 
> adding this function on AIX.

I'm fine with not implementing the function on AIX for now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-12-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Seems that adding #include  does not work so I am going to skip 
adding this function on AIX. If someone is interested in fixing it, they can 
remove the #ifdef and figure out what's going on with that buildbot

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-12-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Started custom build of PR 23608 in 
https://buildbot.python.org/all/#/buildrequests/84365

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-12-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

https://buildbot.python.org/all/#/builders/526/builds/3

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-12-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +22476
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23608

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-26 Thread STINNER Victor


Change by STINNER Victor :


--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-26 Thread STINNER Victor


STINNER Victor  added the comment:

> ./Modules/posixmodule.c:10429:15: error: implicit declaration of function 
> 'splice'; did you mean 'plock'? [-Werror=implicit-function-declaration]

Is it possible that posixmodule.c lacks an #include to get the function on AIX?

On AIX 7.1, man splice says:

   #include 
   #include 
   int splice(socket1, socket2, flags)
   int socket1, socket2;
   int flags;

posixmodule.c doesn't include it on AIX:

#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
#  ifdef HAVE_SYS_SOCKET_H
#include 
#  endif
#endif


Michael: Would you mind to try building the master branch of Python with 
attached socket.patch? (on the worker where Python no longer builds)

--
Added file: https://bugs.python.org/file49624/socket.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-26 Thread Michael Felt


Michael Felt  added the comment:

This is still broken.

Since this was included in master - the AIX buildbot is failing to compile 
(https://buildbot.python.org/all/#/builders/438/builds/391 and 
https://buildbot.python.org/all/#/builders/302/builds/377)

Strangely enough - the first bot continues to fail compile at the same location 
- while the second bot (running in a different environment) starting passing 
compile and all tests starting with 
https://buildbot.python.org/all/#/builders/302/builds/406.

Note: bot 1 is using what I call (personal opinion) a mixed environment with 
some libraries coming from OSS packages and some from IBM AIX. bot 2 - relies 
on IBM AIX libraries.

++
Note: manual build on same system as bot 1 using gcc - gives same error:

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]make V=1
gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv 
-O3 -Wall  -O  -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration 
-fvisibility=hidden  -I./Include/internal  -I. -I./Include-DPy_BUILD_CORE  
-DABIFLAGS='""'-o Python/sysmodule.o ./Python/sysmodule.c
gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv 
-O3 -Wall  -O  -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration 
-fvisibility=hidden  -I./Include/internal  -I. -I./Include-DPy_BUILD_CORE 
-o Modules/config.o Modules/config.c
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 
-Wall  -O  -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration 
-fvisibility=hidden  -I./Include/internal  -I. -I./Include
-DPy_BUILD_CORE_BUILTIN  -DPy_BUILD_CORE_BUILTIN -I./Include/internal -c 
./Modules/posixmodule.c -o Modules/posixmodule.o
./Modules/posixmodule.c: In function 'os_splice_impl':
./Modules/posixmodule.c:10429:15: error: implicit declaration of function 
'splice'; did you mean 'plock'? [-Werror=implicit-function-declaration]
 ret = splice(src, p_offset_src, dst, p_offset_dst, count, flags);
   ^~
   plock
cc1: some warnings being treated as errors
make: 1254-004 The error code from the last command is 1.

* On same system, using xlc-v13, the build completes normally.

--
nosy: +Michael.Felt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks a lot Victor

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread STINNER Victor


STINNER Victor  added the comment:

FYI I checked and AIX is fixed. All tests pass again on POWER6 AIX 3.x buildbot.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1de61d3923840b29e847d311f0c7d4c5821d98e6 by Victor Stinner in 
branch 'master':
bpo-41625: Skip os.splice() tests on AIX (GH-23354)
https://github.com/python/cpython/commit/1de61d3923840b29e847d311f0c7d4c5821d98e6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread STINNER Victor


STINNER Victor  added the comment:

Nice, AIX can build again Python. But now the 3 tests fail since the test uses 
a pipe and a file, whereas on AIX, it seems like splice() requires one end to 
be a socket.

I wrote attached PR 23354 to skip the 3 tests on AIX.

==
ERROR: test_splice (test.test_os.FileTests)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.aixtools-aix-power6/build/Lib/test/test_os.py", 
line 406, in test_splice
i = os.splice(in_fd, write_fd, 5)
OSError: [Errno 57] Socket operation on non-socket

==
ERROR: test_splice_offset_in (test.test_os.FileTests)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.aixtools-aix-power6/build/Lib/test/test_os.py", 
line 440, in test_splice_offset_in
i = os.splice(in_fd, write_fd, bytes_to_copy, offset_src=in_skip)
OSError: [Errno 57] Socket operation on non-socket

==
ERROR: test_splice_offset_out (test.test_os.FileTests)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.aixtools-aix-power6/build/Lib/test/test_os.py", 
line 479, in test_splice_offset_out
i = os.splice(read_fd, out_fd, bytes_to_copy, offset_dst=out_seek)
OSError: [Errno 57] Socket operation on non-socket

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +22247
pull_request: https://github.com/python/cpython/pull/23354

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread miss-islington


miss-islington  added the comment:


New changeset 2a9eddf070f72060f62db1856a0af2e08729a46c by Pablo Galindo in 
branch 'master':
bpo-41625: Add a guard for Linux for splice() constants in the os module 
(GH-23350)
https://github.com/python/cpython/commit/2a9eddf070f72060f62db1856a0af2e08729a46c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread miss-islington

miss-islington  added the comment:


New changeset e59958f8b6815f51f6c33b6a613cf8467ca18a11 by Pablo Galindo in 
branch 'master':
bpo-41625: Specify that Linux >= 2.6.17 *and* glibc >= 2.5 are requir… 
(GH-23351)
https://github.com/python/cpython/commit/e59958f8b6815f51f6c33b6a613cf8467ca18a11


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +22245
pull_request: https://github.com/python/cpython/pull/23351

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +22244
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23350

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset fa96608513b6eafe48777f1a5504134939dcbebc by Pablo Galindo in 
branch 'master':
bpo-41625: Add versionadded to os.splice() constants (GH-23340)
https://github.com/python/cpython/commit/fa96608513b6eafe48777f1a5504134939dcbebc


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread STINNER Victor


STINNER Victor  added the comment:

> The splice() system call first appeared in Linux 2.6.17;
> library support was added to glibc in version 2.5.

There is no emulation. It's just a function which wraps the syscall:

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/splice.c;h=fe21cf1988c48ce887a22c9e5e5f36cbd653a4c8;hb=HEAD

I understand that you need Linux kernel >= 2.6.17 *and* glibc >= 2.5.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue. This issue broke Python compilation on AIX.

https://buildbot.python.org/all/#/builders/302/builds/377

configure: "checking for splice... yes"

"./Modules/posixmodule.c", line 15146.53: 1506-045 (S) Undeclared identifier 
SPLICE_F_MOVE.
"./Modules/posixmodule.c", line 15147.57: 1506-045 (S) Undeclared identifier 
SPLICE_F_NONBLOCK.
"./Modules/posixmodule.c", line 15148.53: 1506-045 (S) Undeclared identifier 
SPLICE_F_MORE.

make: 1254-004 The error code from the last command is 1.


The code:

/* constants for splice */
#ifdef HAVE_SPLICE
if (PyModule_AddIntConstant(m, "SPLICE_F_MOVE", SPLICE_F_MOVE)) return -1;
if (PyModule_AddIntConstant(m, "SPLICE_F_NONBLOCK", SPLICE_F_NONBLOCK)) 
return -1;
if (PyModule_AddIntConstant(m, "SPLICE_F_MORE", SPLICE_F_MORE)) return -1;
#endif

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +22231
pull_request: https://github.com/python/cpython/pull/23340

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Do you mean "Linux kernel >= 2.6.17 and glibc >= 2.5" ?

My understanding is that glibc provides emulation for glibc >= 2.5

The section from the manpage says:

   The splice() system call first appeared in Linux 2.6.17; library
   support was added to glibc in version 2.5.

Not sure how to interpret that. You want to change the "or" to "and"?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread STINNER Victor


STINNER Victor  added the comment:

> .. availability:: Linux kernel >= 2.6.17 or glibc >= 2.5 

Do you mean "Linux kernel >= 2.6.17 and glibc >= 2.5" ?

> .. data:: SPLICE_F_MOVE

Maybe also add ".. versionadded:: 3.10" on these constants.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-16 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset a57b3d30f66c90f42da751bf82256b9b22961ed0 by Pablo Galindo in 
branch 'master':
bpo-41625: Expose the splice() system call in the os module (GH-21947)
https://github.com/python/cpython/commit/a57b3d30f66c90f42da751bf82256b9b22961ed0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-10-13 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Heads up: I plant to land this next week in case someone could to do a review 
or has something against

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-25 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Since it is Linux-specific API, would not be better to add a purposed module 
> linux?

This is an interesting point, but I think that at this particular point it 
would be more confusing for users than not (normally people go to the os module 
for system calls) and as Victor mention, we would need to update the os module 
if some other operative system adds the system call later

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> OpenBSD uses a different API:

The semantics are considerably different (splice() is about pipes while 
sosplice() talks about general sockets). Also, the point of splice() is to skip 
copying from kernel buffers, but sosplice() does not mention that it does not 
copy between userspace and kernel space

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> The API of splice() looks complicated. How would you use it in Python?

It has the same API as copy_file_range and other similar system calls that we 
already expose, so we just need to do the same thing we do there.

> Are off_in and off_out adjusted as in copy_file_range() and sendfile()? It is 
> not clear from the man page. If they are, how would you return updated values?

It behaves the same as in copy_file_range() with the exception that one has to 
be None (the one associated with the pipe file descriptor). We don't return the 
updated values (neither we do in copy_file_range()).

> Are you going to add vmsplice() and tee() too? Since it is Linux-specific 
> API, would not be better to add a purposed module linux?

We can certainly discuss adding vmsplice() and tee() (probably tee is more 
interesting), but in my humble oppinion that would be a different discussion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-25 Thread STINNER Victor


STINNER Victor  added the comment:

OpenBSD uses a different API:
https://man.openbsd.org/sosplice.9

int sosplice(struct socket *so, int fd, off_t max, struct timeval *tv);
int somove(struct socket *so, int wait);

"The function sosplice() is used to splice together a source and a drain 
socket."

"The function somove() transfers data from the source's receive buffer to the 
drain's send buffer."

"Socket splicing can be invoked from userland via the setsockopt(2) system-call 
at the SOL_SOCKET level with the socket option SO_SPLICE."

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-25 Thread STINNER Victor


STINNER Victor  added the comment:

> Are you going to add vmsplice() and tee() too? Since it is Linux-specific 
> API, would not be better to add a purposed module linux?

It's not uncommon that a syscall added to the Linux kernel is later added to 
other platforms.

Example: getrandom() exists in Linux and Solaris.

Example: memfd_create() was designed in Linux, and added later to FreeBSD: 
https://github.com/freebsd/freebsd/commit/575e351fdd996f72921b87e71c2c26466e887ed2
 (see bpo-41013).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The API of splice() looks complicated. How would you use it in Python?

Are off_in and off_out adjusted as in copy_file_range() and sendfile()? It is 
not clear from the man page. If they are, how would you return updated values?

Are you going to add vmsplice() and tee() too? Since it is Linux-specific API, 
would not be better to add a purposed module linux?

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-24 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> I don't recall the subtle differences between sendfile() and splice().

Basically, splice() is specialized for pipes:


splice() only works if one of the file descriptors refer to a pipe. So you can 
use for e.g. socket-to-pipe or pipe-to-file without copying the data into 
userspace. But you can't do file-to-file copies with it.

sendfile() only works if the source file descriptor refers to something that 
can be mmap()ed (i.e. mostly normal files) and before 2.6.33 the destination 
must be a socket.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-24 Thread STINNER Victor


STINNER Victor  added the comment:

I don't recall the subtle differences between sendfile() and splice(). I recall 
that in early Linux versions, one was limited to sockets, and only on one side. 
But later, it became possible to pass two sockets, or one file on disk and one 
socket, etc.

Python exposes sendfile() as os.sendfile() since Python 3.3:
https://docs.python.org/dev/library/os.html#os.sendfile

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +21057
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21947

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
assignee:  -> pablogsal
components: +Library (Lib)
versions: +Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-08-24 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

The splice system call moves data between two file descriptors without copying 
between kernel address space and user address space.  This can be a very useful 
addition for libraries implementing low-level file management.

--
messages: 375851
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Add splice() to the os module

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com