Skip to content

Commit 1fb6a43

Browse files
committed
Avoid calling the deprecated "findAll" BeautifulSoup4 method
The latest release of BeautifulSoup4 (4.13.0, released yesterday) has started to emit DeprecationWarnings when calling methods that have been marked as deprecated for over a decade, and the deprecated methods are scheduled to be removed in version 4.15.0: https://git.launchpad.net/beautifulsoup/commit/?id=e9629a8aafc737578bd509ffc6b989ffedae7c41. This changes the one call to `findAll` to instead be `find_all` to avoid triggering a DeprecationWarning and to ensure the library keeps working with newer versions of BeautifulSoup4.
1 parent a068809 commit 1fb6a43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webtest/forms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def _parse_fields(self):
432432
fields = OrderedDict()
433433
field_order = []
434434
tags = ('input', 'select', 'textarea', 'button')
435-
for pos, node in enumerate(self.html.findAll(tags)):
435+
for pos, node in enumerate(self.html.find_all(tags)):
436436
attrs = dict(node.attrs)
437437
tag = node.name
438438
name = None

0 commit comments

Comments
 (0)