[issue19973] Deprecate pyio

2013-12-13 Thread Larry Hastings

New submission from Larry Hastings:

Does it make sense to finally deprecate pyio, so we can eventually delete it?

--
messages: 206060
nosy: larry
priority: normal
severity: normal
status: open
title: Deprecate pyio
versions: Python 3.5

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



[issue19973] Deprecate pyio

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

I like the _pyio module! It's useful to test some new features.

For example, I'm using it to identify where a file is destroyed without being 
closed (get where the object was created):
https://bitbucket.org/haypo/misc/src/tip/python/res_warn.py

I didn't find how to implement that using the C module.

It's name is _pyio, not pyio. It is a private module.

It was also written to provide a working and well tested pure Python 
implementation for other Python virtual machines like PyPy, IronPython and 
Jython.

--
nosy: +haypo

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



[issue19973] Deprecate pyio

2013-12-13 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
nosy: +pitrou

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



[issue19973] Deprecate pyio

2013-12-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Larry, I think Brett won't like you.
(have you read PEP 399?)

--
nosy: +brett.cannon

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



[issue19973] Deprecate pyio

2013-12-13 Thread Larry Hastings

Larry Hastings added the comment:

I hadn't!  I guess we're signed up to maintain two implementations of a bunch 
of things for eternity, then.

--
resolution:  - wont fix
stage:  - committed/rejected
status: open - closed
type:  - enhancement

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



[issue19973] Deprecate pyio

2013-12-13 Thread Brett Cannon

Brett Cannon added the comment:

Only if we keep the C version around do we have to care about two versions. =)

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Larry Hastings

Larry Hastings added the comment:

We tried a pure python implementation of io once.  Didn't go so well.  :p

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread STINNER Victor

STINNER Victor added the comment:

 We tried a pure python implementation of io once.  Didn't go so well.  :p

It is _pyio.

Note: _pyio is not 100% *pure* Python, it relies on FileIO which is implemented 
in C. I always found this surprising. One day I will maybe rewrite it using 
os.read() and os.write() :-)

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Note: _pyio is not 100% *pure* Python, it relies on FileIO which is
 implemented in C. I always found this surprising. One day I will maybe
 rewrite it using os.read() and os.write() :-)

Then you need to rewrite os.read() and os.write() in pure Python!

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Brett Cannon

Brett Cannon added the comment:

Key point is it didn't go so well **for us**; works fine for PyPy.

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

PyPy also has a C-translated version of the io module.
It's a bit faster I think, but more importantly it has correct behavior with 
signals and other asynchronous errors.

_pyio.py can be stopped in the middle of any function, and is not completely 
signal-safe.

--
nosy: +amaury.forgeotdarc

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



[issue19973] Deprecate pyio

2013-12-13 Thread Brett Cannon

Brett Cannon added the comment:

Then if Jython and IronPython are not using _pyio we can probably remove the 
file.

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Then if Jython and IronPython are not using _pyio we can probably remove the 
 file.

_pyio can be useful for prototyping. Whether or not other
implementations use it is quite irrelevant IMO.

--

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



[issue19973] Deprecate pyio

2013-12-13 Thread Larry Hastings

Larry Hastings added the comment:

Yes, but it's a small utility.  If it costs nothing to maintain _pyio then 
okay.  But if we're spending measurable time on it but it's only a nice-to-have 
then we should drop it.

(Full disclosure: I have no idea how much work goes into maintaining _pyio.)

--

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