From 63dc8117e8f396b25688623c7f1920b4f0911373 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 27 Feb 2011 18:17:24 -0500 Subject: Got rid of __package__; hopefully this is the only thing holding up 2.5 support. --- TODO | 2 -- bs4/builder/__init__.py | 2 +- 2 files changed, 1 insertion(+), 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) -- cgit v1.2.3