Title: missing module fcntl
Type: behaviour Severity: normal
Components: Any Versions: Jython 2.7
Milestone: Jython 2.7.2
Status: open Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: amak, fwierzbicki, wbrana, zyasoft
Priority: low Keywords:

Created on 2012-07-01.10:30:37 by wbrana, last changed 2015-11-17.16:41:09 by zyasoft.

msg7297 (view) Author: (wbrana) Date: 2012-07-01.10:30:36
Jython 2.7.0a2+ (default:e4afcd777d1b+, Jul 1 2012, 12:22:26) 
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_33
Type "help", "copyright", "credits" or "license" for more information.
>>> import fcntl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named fcntl
inst@local /mnt/md3/cache/inst/jython2 $ python
Python 2.7.3 (default, May  5 2012, 10:54:18) 
[GCC 4.4.7] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import fcntl
>>> dir(fcntl)
msg7517 (view) Author: Alan Kennedy (amak) Date: 2012-11-07.22:39:05
35.10. fcntl — The fcntl() and ioctl() system calls

Platforms: Unix

This module performs file control and I/O control on file descriptors. It is an interface to the fcntl() and ioctl() Unix routines.

DO you expect that this should work on jython on non-Unix platforms?

Should it work on Windows? It doesn't on cpython.

What do you want to use the fcntl module for?
msg7713 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-20.00:18:21
I don't think this one makes sense for us, closing.
msg10484 (view) Author: Jim Baker (zyasoft) Date: 2015-11-17.16:35:29
Let's reopen this. It's still a low priority, but it should be eminently doable for 2.7.2, given that JNR already supports this functionality:

Through the ugliness that is PosixModule#getFD, we already support int file descriptors where possible (at least for files that are not sockets), so this would be a straightforward addition.
msg10485 (view) Author: Jim Baker (zyasoft) Date: 2015-11-17.16:41:08
A real test of how far we can push fcntl will be working with os.pipe descriptors, as seen with

(FWIW, this is motivated by attempting to run the Tornado test suite, which is further motivated by the Tornado benchmark that Jython does not yet run, see Brett Cannon's notebook on Python performance,
Date User Action Args
2015-11-17 16:41:09zyasoftsetmessages: + msg10485
2015-11-17 16:35:30zyasoftsetstatus: closed -> open
nosy: + zyasoft
messages: + msg10484
assignee: fwierzbicki ->
milestone: Jython 2.7.2
resolution: wont fix -> accepted
2013-02-20 00:18:31fwierzbickisetstatus: open -> closed
versions: + Jython 2.7, - 2.7a2
2013-02-20 00:18:21fwierzbickisetpriority: low
assignee: fwierzbicki
resolution: wont fix
messages: + msg7713
nosy: + fwierzbicki
2012-11-07 22:39:06amaksetmessages: + msg7517
2012-08-28 22:22:05amaksetnosy: + amak
2012-07-01 10:30:37wbranacreate