[issue27655] [Patch] Don't require presence of POLLPRI

2016-08-02 Thread Ed Schouten

Ed Schouten added the comment:

Believe it our not, dealing with the absence of those system calls is more 
contained than you'd think. What is pretty nice about Python is that (almost) 
all of the file system operations are performed through posixmodule.c. Most of 
the changes in that area are thus made to that source file (and configure.ac).

Furthermore, it looks like posixmodule.c can be simplified a lot. What makes it 
so incredibly complex right now is that it wants to fall back to non-at() 
operations in case no directory file descriptor is provided, which is not 
needed. If that would get fixed, we'd kill two birds with one stone: the code 
would get a lot simpler, while almost automatically gaining support for 
CloudABI. But let's save this discussion for a separate thread.

--

___
Python tracker 

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



[issue27655] [Patch] Don't require presence of POLLPRI

2016-08-02 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Are you planning on sending us patches to make Python compile without open(2)? 
Putting #ifdef around various constants is one thing but it seems like this 
could become quite invasive.

--

___
Python tracker 

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



[issue27655] [Patch] Don't require presence of POLLPRI

2016-08-02 Thread Ed Schouten

Ed Schouten added the comment:

That's a very good question. One of the goals of CloudABI's C library is to 
leave out definitions for things that are known not to work in the environment. 
For example, our  doesn't contain open(), as with our security model 
(Capsicum), there is nothing meaningful that this function could do anyway. 
Though this may seem annoying, this actually saves us a lot of time by allowing 
us to very easily detect software that will break.

The same reasoning applies to POLLPRI here. We could in theory implement it as 
an event that simply never triggers, but then it would be nothing more than a 
convoluted way of letting your program get stuck indefinitely.

Also worth taking into account here: I understand why the selectmodule provides 
support for POLLPRI. It simply wants to expose the entire poll() interface into 
Python code, but I'd argue that we'd have to look at the bigger picture. 
Support for out-of-band data in Python is incomplete anyway. The socket module 
also doesn't provide a binding for sockatmark().

--

___
Python tracker 

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



[issue27655] [Patch] Don't require presence of POLLPRI

2016-08-01 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Why do you remove the flag rather than just making it a noop?

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue27655] [Patch] Don't require presence of POLLPRI

2016-07-30 Thread Ed Schouten

New submission from Ed Schouten:

RFC 6093 states that applications "SHOULD NOT" make use of TCP's out-of-band 
data. For this reason, CloudABI 
(https://mail.python.org/pipermail/python-dev/2016-July/145708.html) does not 
provide support for it. This means that its poll() function does provide 
support for POLLIN and POLLOUT, but not for POLLPRI.

Attached is a patch that patches up the selectmodule to not define POLLPRI in 
case the host environment does not support it.

--
components: Extension Modules
files: pollpri.diff
keywords: patch
messages: 271689
nosy: EdSchouten
priority: normal
severity: normal
status: open
title: [Patch] Don't require presence of POLLPRI
versions: Python 3.6
Added file: http://bugs.python.org/file43951/pollpri.diff

___
Python tracker 

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