diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-14 15:50:51 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-16 15:35:07 +0000 |
commit | e5455662a9762fc2cb8859134d855413d84fd265 (patch) | |
tree | ad7c3c6b258415ab9b92ed4b04a1ce0c2f6c9eb7 /bitbake/lib/bs4/dammit.py | |
parent | ca4a8eea6284aad41ec67b375c2a7c7855b5fe11 (diff) | |
download | poky-e5455662a9762fc2cb8859134d855413d84fd265.tar.gz |
bitbake: bitbake: Fix Deprecated warnings from regexs
Fix handling of escape characters in regexs and hence fix python
Deprecation warnings which will be problematic in python 3.8.
(Bitbake rev: c1fcc46e2498ddd41425d8756754f814d682aba3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bs4/dammit.py')
-rw-r--r-- | bitbake/lib/bs4/dammit.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bs4/dammit.py b/bitbake/lib/bs4/dammit.py index 68d419feb5..805aa908a5 100644 --- a/bitbake/lib/bs4/dammit.py +++ b/bitbake/lib/bs4/dammit.py | |||
@@ -45,9 +45,9 @@ except ImportError: | |||
45 | pass | 45 | pass |
46 | 46 | ||
47 | xml_encoding_re = re.compile( | 47 | xml_encoding_re = re.compile( |
48 | '^<\?.*encoding=[\'"](.*?)[\'"].*\?>'.encode(), re.I) | 48 | r'^<\?.*encoding=[\'"](.*?)[\'"].*\?>'.encode(), re.I) |
49 | html_meta_re = re.compile( | 49 | html_meta_re = re.compile( |
50 | '<\s*meta[^>]+charset\s*=\s*["\']?([^>]*?)[ /;\'">]'.encode(), re.I) | 50 | r'<\s*meta[^>]+charset\s*=\s*["\']?([^>]*?)[ /;\'">]'.encode(), re.I) |
51 | 51 | ||
52 | class EntitySubstitution(object): | 52 | class EntitySubstitution(object): |
53 | 53 | ||
@@ -80,11 +80,11 @@ class EntitySubstitution(object): | |||
80 | ">": "gt", | 80 | ">": "gt", |
81 | } | 81 | } |
82 | 82 | ||
83 | BARE_AMPERSAND_OR_BRACKET = re.compile("([<>]|" | 83 | BARE_AMPERSAND_OR_BRACKET = re.compile(r"([<>]|" |
84 | "&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;)" | 84 | r"&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;)" |
85 | ")") | 85 | r")") |
86 | 86 | ||
87 | AMPERSAND_OR_BRACKET = re.compile("([<>&])") | 87 | AMPERSAND_OR_BRACKET = re.compile(r"([<>&])") |
88 | 88 | ||
89 | @classmethod | 89 | @classmethod |
90 | def _substitute_html_entity(cls, matchobj): | 90 | def _substitute_html_entity(cls, matchobj): |