Ignore explicitly relative 'from' imports when scanning for dependencies
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-distutils-extra |
Fix Released
|
Undecided
|
Unassigned | ||
python-distutils-extra (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Natty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
===== SRU Justification =====
This causes a bad bug in Quickly (bug 775217). Basically, "quickly package" shows errors and suggests to the user that continuing is not safe. It is a bad user experience and a regression from past releases.
I wrote this patch here during natty's development to fix it, but it didn't make it in.
The attached debdiff will backport the upstream commit to natty's version of python-
To reproduce:
1) cd /tmp
2) quickly create ubuntu-application test-project
3) cd test-project
4) quickly package
What you see:
"""
-------
Command returned some ERRORS:
-------
ERROR: Python module test_projectconfig not found
ERROR: Python module Builder not found
ERROR: Python module helpers not found
ERROR: Python module preferences not found
ERROR: Python module Window not found
-------
Do you want to continue (this is not safe!)? y/[n]:
"""
What you should see:
"""Ubuntu package has been successfully created in ../test-
=======
Submodules of a program may use relative imports. These should not be treated as dependency-
So when scanning, we should ignore explicitly defined relative 'from' imports (they look like "from . sibling import foo" or "from .. uncle import bar").
Branch coming.
Related branches
- Martin Pitt (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedDistUtilsExtra/auto.py (+1/-1)
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Committed to trunk, thanks!