This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: io.open() handles errors differently on different platforms
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, benjamin.peterson, nnorwitz, pitrou
Priority: critical Keywords:

Created on 2008-03-26 04:24 by nnorwitz, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py-org.html nnorwitz, 2008-03-26 04:24 python.org home page on 25-Mar-2008
Messages (5)
msg64540 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2008-03-26 04:24
The attached file has a snapshot of the python.org homepage that was
causing test_urllibnet to fail on some platforms (2 sparc, and ia64 at
least), but not other platforms.  This should be handled consistently.

I don't know if there are really errors in the attached web page or not.
 The problem occurs at byte offset 13259:

>>> data[13250:13270]
'r - Journ\xc3\xa9es Python'

I suppose that's invalid for ASCII, but valid UTF-8.

See r61921.  There is a problem that the API for fdopen doesn't accept
errors, encoding, etc. so it's problematic to handle this condition.
msg64548 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-03-26 09:43
With python3.0, os.fdopen() is a simple call to io.open(), which has
these missing options.

Maybe os.fdopen should be deprecated or removed, and replaced by io.open.
Moreover, the comment in os.py is wrong: subprocess does not use fdopen
any more, but io.open instead.
msg70355 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-07-28 16:59
What's the status of this?
msg70428 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-07-30 15:40
I think the proposal to deprecate os.fdopen should be brought on
python-3000.
msg70534 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-08-01 00:08
Committed r65343: os.fdopen accepts the same parameters as io.open().
History
Date User Action Args
2022-04-11 14:56:32adminsetgithub: 46743
2008-11-26 12:10:36amaury.forgeotdarcsetstatus: open -> closed
resolution: fixed
2008-08-01 00:08:43amaury.forgeotdarcsetmessages: + msg70534
2008-07-30 15:40:34pitrousetnosy: + pitrou
messages: + msg70428
2008-07-28 16:59:02benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg70355
2008-03-26 09:43:24amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg64548
2008-03-26 04:24:18nnorwitzcreate