Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Enrico Jorns <ejo@pengutronix.de>
To: openembedded-core@lists.openembedded.org
Cc: Enrico Jorns <ejo@pengutronix.de>
Subject: [PATCH][krogoth] bs4: fix bitbake build error with latest html5lib version
Date: Tue, 29 Nov 2016 10:29:57 +0100	[thread overview]
Message-ID: <20161129092957.22133-1-ejo@pengutronix.de> (raw)

Since the 0.999999999 release of python-html5lib, the module
`treewalkers._base` was changed to `treewalkers.base` (without
underscore). This breaks bitbake is it uses the old module name.

|   [...]
|   File "[...]/bitbake/lib/bs4/builder/_html5lib.py", line 57, in <module>
|       class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
| AttributeError: 'module' object has no attribute '_base'
| [...]/bitbake/lib/bb/event.py:119: RuntimeWarning: Parent module 'bb' not found while handling absolute import

This patch renames all occurrences of the `_base` module to `base`.

Note that this patch will break builds with older versions of
python-html5lib.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
---
 bitbake/lib/bs4/builder/_html5lib.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bs4/builder/_html5lib.py b/bitbake/lib/bs4/builder/_html5lib.py
index 7de36ae..529ce5a 100644
--- a/bitbake/lib/bs4/builder/_html5lib.py
+++ b/bitbake/lib/bs4/builder/_html5lib.py
@@ -54,7 +54,7 @@ class HTML5TreeBuilder(HTMLTreeBuilder):
         return u'<html><head></head><body>%s</body></html>' % fragment
 
 
-class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
+class TreeBuilderForHtml5lib(html5lib.treebuilders.base.TreeBuilder):
 
     def __init__(self, soup, namespaceHTMLElements):
         self.soup = soup
@@ -115,7 +115,7 @@ class AttrList(object):
         return name in list(self.attrs.keys())
 
 
-class Element(html5lib.treebuilders._base.Node):
+class Element(html5lib.treebuilders.base.Node):
     def __init__(self, element, soup, namespace):
         html5lib.treebuilders._base.Node.__init__(self, element.name)
         self.element = element
-- 
2.10.2



                 reply	other threads:[~2016-11-29  9:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161129092957.22133-1-ejo@pengutronix.de \
    --to=ejo@pengutronix.de \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox