classification
Title: pyclbr raises KeyError when the prefix of a dotted name is not a package
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: petri.lehtinen, python-dev, xdegaye
Priority: normal Keywords: needs review, patch

Created on 2012-05-13 16:38 by xdegaye, last changed 2012-05-18 19:04 by petri.lehtinen. This issue is now closed.

Files
File name Uploaded Description Edit
pdb_default.patch xdegaye, 2012-05-13 16:38
Messages (5)
msg160523 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2012-05-13 16:38
pyclbr must raise ImportError instead of KeyError.
The attached patch fixes the problem. A test case is included.
msg160908 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-05-16 18:32
Hi Xavier. I see you have posted quite many patches in the recent days. Thanks for doing so!

You should sign the Python Software Foundation Contributor Agreement to make it possible for us to apply the patches. See http://www.python.org/psf/contrib/ for more information. Basically, you just print the agreement, sign it, and send it via e-mail to the PSF.
msg160958 - (view) Author: Xavier de Gaye (xdegaye) * (Python committer) Date: 2012-05-17 09:48
Hi Petri
I have just sent the Contributor Agreement to PSF.
msg161074 - (view) Author: Roundup Robot (python-dev) Date: 2012-05-18 19:03
New changeset 2d2079593212 by Petri Lehtinen in branch '2.7':
#14798: pyclbr now raises ImportError instead of KeyError for missing packages
http://hg.python.org/cpython/rev/2d2079593212

New changeset 895246f1a06a by Petri Lehtinen in branch '3.2':
#14798: pyclbr now raises ImportError instead of KeyError for missing packages
http://hg.python.org/cpython/rev/895246f1a06a

New changeset 2f51c15bbc56 by Petri Lehtinen in branch 'default':
#14798: pyclbr now raises ImportError instead of KeyError for missing packages
http://hg.python.org/cpython/rev/2f51c15bbc56
msg161075 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-05-18 19:04
Fixed, thanks for the patch.
History
Date User Action Args
2012-05-18 19:04:19petri.lehtinensetstatus: open -> closed
resolution: fixed
messages: + msg161075

stage: patch review -> resolved
2012-05-18 19:03:22python-devsetnosy: + python-dev
messages: + msg161074
2012-05-17 09:48:41xdegayesetmessages: + msg160958
2012-05-16 18:32:31petri.lehtinensetmessages: + msg160908
2012-05-15 06:31:04petri.lehtinensetkeywords: + needs review
nosy: + petri.lehtinen

stage: patch review
2012-05-13 16:38:59xdegayecreate