[Python-Dev] [Python-checkins] peps: Note that ImportError will no longer be raised due to a missing init.py (original) (raw)
Eric V. Smith eric at trueblade.com
Fri Apr 20 10:52:33 CEST 2012
- Previous message: [Python-Dev] [Python-checkins] peps: Note that ImportError will no longer be raised due to a missing __init__.py
- Next message: [Python-Dev] [Python-checkins] peps: Note that ImportError will no longer be raised due to a missing __init__.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 4/19/2012 10:59 PM, Brett Cannon wrote:
It's actually an ImportWarning, not Error (or at least that's what I meant on import-sig). If the module is eventually found then there is no error.
My error. Fixed.
Eric.
On Thu, Apr 19, 2012 at 18:56, eric.smith <python-checkins at python.org_ _<mailto:python-checkins at python.org>> wrote: http://hg.python.org/peps/rev/af61fe9a56fb changeset: 4281:af61fe9a56fb user: Eric V. Smith <eric at trueblade.com_ _<mailto:eric at trueblade.com>> date: Thu Apr 19 18:56:22 2012 -0400 summary: Note that ImportError will no longer be raised due to a missing init.py file. files: pep-0420.txt | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/pep-0420.txt b/pep-0420.txt --- a/pep-0420.txt +++ b/pep-0420.txt @@ -148,6 +148,11 @@ path. With namespace packages, all entries in the path must be scanned. +Note that an ImportError will no longer be raised for a directory +lacking an
_init_.py
file. Such a directory will now be imported +as a namespace package, whereas in prior Python versions an +ImportError would be raised. + At PyCon 2012, we had a discussion about namespace packages at which PEP 382 and PEP 402 were rejected, to be replaced by this PEP [1]. -- Repository URL: http://hg.python.org/peps
Python-checkins mailing list Python-checkins at python.org <mailto:Python-checkins at python.org> http://mail.python.org/mailman/listinfo/python-checkins
Python-checkins mailing list Python-checkins at python.org http://mail.python.org/mailman/listinfo/python-checkins
- Previous message: [Python-Dev] [Python-checkins] peps: Note that ImportError will no longer be raised due to a missing __init__.py
- Next message: [Python-Dev] [Python-checkins] peps: Note that ImportError will no longer be raised due to a missing __init__.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]