summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-02-27 18:17:24 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2011-02-27 18:17:24 -0500
commit63dc8117e8f396b25688623c7f1920b4f0911373 (patch)
tree4f294dbc0d92a69ba018b3bbae8dfc778d7488b9
parent683e1a1371065c0c98c8cab6c296ecff6e5f8ea3 (diff)
Got rid of __package__; hopefully this is the only thing holding up 2.5 support.
-rw-r--r--TODO2
-rw-r--r--bs4/builder/__init__.py2
2 files changed, 1 insertions, 3 deletions
diff --git a/TODO b/TODO
index 01499c1..a6f444f 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,3 @@
-Doesn't work with Python 2.5, which doesn't have __package__.
-
Bare ampersands should be converted to HTML entities upon output.
Add namespace support.
diff --git a/bs4/builder/__init__.py b/bs4/builder/__init__.py
index 17dcff3..afd49b9 100644
--- a/bs4/builder/__init__.py
+++ b/bs4/builder/__init__.py
@@ -233,7 +233,7 @@ class HTMLTreeBuilder(TreeBuilder):
def register_treebuilders_from(module):
"""Copy TreeBuilders from the given module into this module."""
# I'm fairly sure this is not the best way to do this.
- this_module = sys.modules[__package__]
+ this_module = sys.modules['bs4.builder']
for name in module.__all__:
obj = getattr(module, name)