checkbox-support has a number of probably obsolete path functions

Bug #1320824 reported by Zygmunt Krynicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Support Library
Fix Released
Low
Sylvain Pineau

Bug Description

Looking at checkbox_support.lib.path I see the following (undocumented) functions:

path_common(l1, l2, common=[])
path_expand(path)
path_expand_recursive(path)
path_relative(p1, p2)
path_split(path)

Those should be probably removed and any code calling them migrated to os.path

Related branches

Zygmunt Krynicki (zyga)
affects: plainbox → checkbox-support
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

path_common() is only used by path.py itself

./checkbox-support/checkbox_support/lib/path.py:def path_common(l1, l2, common=[]):
./checkbox-support/checkbox_support/lib/path.py: return path_common(l1[1:], l2[1:], common + [l1[0]])
./checkbox-support/checkbox_support/lib/path.py: (common, l1, l2) = path_common(path_split(p1), path_split(p2))

path_expand() is again used by path.py itself

./checkbox_support/lib/path.py:def path_expand(path):
./checkbox_support/lib/path.py:def path_expand_recursive(path):
./checkbox_support/lib/path.py: for path in path_expand(path):

path_expand_recursive() is used by filter_templates

./providers/plainbox-provider-checkbox/bin/filter_templates:from checkbox_support.lib.path import path_expand_recursive
./providers/plainbox-provider-checkbox/bin/filter_templates: for filename in path_expand_recursive(path):
./checkbox-support/checkbox_support/lib/path.py:def path_expand_recursive(path):

./checkbox_support/lib/path.py:def path_expand_recursive(path):

path_relative() not used by anything in lp:checkbox (can be removed)

./checkbox-support/checkbox_support/lib/path.py:def path_relative(p1, p2):

path_split() is used by path.py itself

./checkbox-support/checkbox_support/lib/path.py:def path_split(path):
./checkbox-support/checkbox_support/lib/path.py: (common, l1, l2) = path_common(path_split(p1), path_split(p2))

Changed in checkbox-support:
status: New → Triaged
importance: Undecided → Low
Changed in checkbox-support:
assignee: nobody → Sylvain Pineau (sylvain-pineau)
milestone: none → 0.35.0
status: Triaged → In Progress
Changed in checkbox-support:
status: In Progress → Fix Committed
Changed in checkbox-support:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.