This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit dc3c91f60695b4faa21ff5f77f0c01ef8b0989bf
Author: Dave Brondsema <dbronds...@slashdotmedia.com>
AuthorDate: Tue Aug 12 18:29:37 2025 -0400

    [#8520] update deprecated beautifulsoup methods
---
 Allura/allura/scripts/trac_export.py                    | 2 +-
 Allura/allura/tests/test_webhooks.py                    | 4 ++--
 ForgeTracker/forgetracker/tests/functional/test_root.py | 8 ++++----
 ForgeWiki/forgewiki/converters.py                       | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Allura/allura/scripts/trac_export.py 
b/Allura/allura/scripts/trac_export.py
index 88b55496f..2341d2423 100644
--- a/Allura/allura/scripts/trac_export.py
+++ b/Allura/allura/scripts/trac_export.py
@@ -200,7 +200,7 @@ def parse_ticket_attachments(self, id):
         attach = soup.find('div', id='attachments')
         list = []
         while attach:
-            attach = attach.findNext('dt')
+            attach = attach.find_next('dt')
             if not attach:
                 break
             d = {}
diff --git a/Allura/allura/tests/test_webhooks.py 
b/Allura/allura/tests/test_webhooks.py
index d4460fb5e..dd373327d 100644
--- a/Allura/allura/tests/test_webhooks.py
+++ b/Allura/allura/tests/test_webhooks.py
@@ -163,10 +163,10 @@ def create_webhook(self, data, url=None):
     def find_error(self, r, field, msg, form_type='create'):
         form = r.html.find('form', attrs={'action': form_type})
         if field == '_the_form':
-            error = form.findPrevious('div', attrs={'class': 'error'})
+            error = form.find_previous('div', attrs={'class': 'error'})
         else:
             error = form.find('input', attrs={'name': field})
-            error = error.findNext('div', attrs={'class': 'error'})
+            error = error.find_next('div', attrs={'class': 'error'})
         if error:
             assert msg in error.getText()
         else:
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py 
b/ForgeTracker/forgetracker/tests/functional/test_root.py
index a57979e84..00cab0be8 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -1318,7 +1318,7 @@ def test_new_ticket_validation(self):
         assert error_message
         assert (error_message.string == 'You must provide a Title' or
                 error_message.string == 'Missing value')
-        assert error_message.findPreviousSibling('input').get('name') == 
'ticket_form.summary'
+        assert error_message.find_previous_sibling('input').get('name') == 
'ticket_form.summary'
         # set a summary, submit, and check for success
         form['ticket_form.summary'] = summary
         success = form.submit().follow().html
@@ -1340,7 +1340,7 @@ def test_edit_ticket_validation(self):
         error_message = error_form.html.find('div', {'class': 'error'})
         assert error_message
         assert error_message.string == 'You must provide a Title'
-        assert error_message.findPreviousSibling('input').get('name') == 
'ticket_form.summary'
+        assert error_message.find_previous_sibling('input').get('name') == 
'ticket_form.summary'
         # set a summary, submit, and check for success
         form = self._find_update_ticket_form(error_form)
         form['ticket_form.summary'] = new_summary
@@ -2900,7 +2900,7 @@ def test_blank_user(self):
         select = ticket_view.html.find('select',
                                        
dict(name='ticket_form.custom_fields._code_review'))
         selected = None
-        for option in select.findChildren():
+        for option in select.find_all():
             if option.has_attr('selected'):
                 selected = option
         assert selected is None
@@ -2915,7 +2915,7 @@ def test_project_member(self):
         select = ticket_view.html.find('select',
                                        
dict(name='ticket_form.custom_fields._code_review'))
         selected = None
-        for option in select.findChildren():
+        for option in select.find_all():
             if option.has_attr('selected'):
                 selected = option
         assert selected['value'] == 'test-admin'
diff --git a/ForgeWiki/forgewiki/converters.py 
b/ForgeWiki/forgewiki/converters.py
index 318ce6156..3fc6b9714 100644
--- a/ForgeWiki/forgewiki/converters.py
+++ b/ForgeWiki/forgewiki/converters.py
@@ -51,7 +51,7 @@ def _convert_toc(wiki_html):
     """Convert Table of Contents from mediawiki to markdown"""
     soup = BeautifulSoup(wiki_html, 'html.parser')
     for toc_div in soup.find_all('div', id='toc'):
-        toc_div.replaceWith('[TOC]')
+        toc_div.replace_with('[TOC]')
     return str(soup)
 
 

Reply via email to