Brett Cannon added the comment:
Is this still an issue in (at least) 3.4 with the new I/O exceptions? And I
feel like there was another bug about this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13192
Eric Snow added the comment:
Are you thinking of issue 15833?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13192
___
___
Python-bugs-list
Antoine Pitrou added the comment:
In 3.3 and 3.4, exceptions are not silenced anymore:
import resource
resource.setrlimit(resource.RLIMIT_NOFILE, (2, 100))
import encodings.idna
Traceback (most recent call last):
File stdin, line 1, in module
File frozen importlib._bootstrap, line 1584,
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13192
___
Eric Snow ericsnowcurren...@gmail.com added the comment:
Are you suggesting raising the OSError (or something else) rather than an
ImportError? If so, would it make sense to chain the exception instead. That
way the existing code that expects ImportError continues to work, while still
Antoine Pitrou pit...@free.fr added the comment:
Are you suggesting raising the OSError (or something else) rather than
an ImportError? If so, would it make sense to chain the exception
instead. That way the existing code that expects ImportError
continues to work
Does any existing code
New submission from Antoine Pitrou pit...@free.fr:
Not sure this is by design or not, but I wanted to report this issue (it's
rather hard to diagnose). Here the file descriptor limit is reached, and
import raises an ImportError while it would be more helpful to let the
original OS error slip
STINNER Victor victor.stin...@haypocalc.com added the comment:
_Py_fopen() returns NULL without raising an exception if fopen() fails.
Attached patch raises a OSError if fopen() if errno is different than ENOENT. I
don't know if ENOENT is the right error number on Windows. Should we ignore
Antoine Pitrou pit...@free.fr added the comment:
_Py_fopen() returns NULL without raising an exception if fopen() fails.
Attached patch raises a OSError if fopen() if errno is different than
ENOENT. I don't know if ENOENT is the right error number on Windows.
It seems so.
Should we
STINNER Victor victor.stin...@haypocalc.com added the comment:
I suggest also ignoring ENOTDIR and EISDIR. Not sure about EACCES.
We should maybe mimick the io module:
open('Lib')
IsADirectoryError: [Errno 21] Is a directory: 'Lib'
In the io module, opening a directory raises an exception.
Antoine Pitrou pit...@free.fr added the comment:
I don't think that fopen() can fails with ENOTDIR.
According to POSIX:
[ENOTDIR]
A component of the path prefix is not a directory, or the filename
argument contains at least one non- slash character and ends with one
or more trailing slash
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13192
___
___
Python-bugs-list
12 matches
Mail list logo