Bugs item #1550938, was opened at 2006-09-02 11:05
Message generated for change (Comment added) made by twouters
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1550938&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 9
Submitted By: ganges master (gangesmaster)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: from . import bug

Initial Comment:
>>> from . import foo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Relative importpath too deep

it should raise ImportError, as the module does not exist.
there's nothing wrong with the path being too deep.



----------------------------------------------------------------------

>Comment By: Thomas Wouters (twouters)
Date: 2006-09-05 16:14

Message:
Logged In: YES 
user_id=34209

I prefer ValueError over ImportError as the problem is in
the code doing the import, not in a missing module. I don't
have a strong feeling either way, though. The new messages
seem better.


----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-09-05 03:26

Message:
Logged In: YES 
user_id=33168

Thomas, could you take a look at this patch.  I'm not sure
it's correct.  I thought you had some reasons for these
ValueErrors (unless it was diff code).

----------------------------------------------------------------------

Comment By: Georg Brandl (gbrandl)
Date: 2006-09-03 09:10

Message:
Logged In: YES 
user_id=849994

See attached patch.

I couldn't find a mention of this ValueError in the PEP or
the docs, so changing it to ImportError and giving better
error messages looks like the way to go.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-09-02 20:49

Message:
Logged In: YES 
user_id=33168

Can you provide a patch to fix it?  I'll make a decision
partly based on the patch.

----------------------------------------------------------------------

Comment By: Georg Brandl (gbrandl)
Date: 2006-09-02 11:21

Message:
Logged In: YES 
user_id=849994

Agreed. Can we fix this for 2.5?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1550938&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to