You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2023/03/29 16:42:06 UTC

[allura] branch master updated: fixes for Python 3.10 & 3.11

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


The following commit(s) were added to refs/heads/master by this push:
     new 9bf8d21a7 fixes for Python 3.10 & 3.11
9bf8d21a7 is described below

commit 9bf8d21a7cd233be202920b03e3b5d9f668b15df
Author: Ellery Alvarez <el...@hotmail.com>
AuthorDate: Fri Mar 24 20:42:38 2023 -0500

    fixes for Python 3.10 & 3.11
---
 Allura/allura/tasks/admin_tasks.py                      | 3 ++-
 Allura/allura/tests/functional/test_root.py             | 2 +-
 ForgeTracker/forgetracker/tests/functional/test_root.py | 6 +++---
 requirements.in                                         | 2 +-
 requirements.txt                                        | 4 ++--
 5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/Allura/allura/tasks/admin_tasks.py b/Allura/allura/tasks/admin_tasks.py
index 7a71444a9..9e30247a5 100644
--- a/Allura/allura/tasks/admin_tasks.py
+++ b/Allura/allura/tasks/admin_tasks.py
@@ -16,6 +16,7 @@
 #       under the License.
 
 import inspect
+import wrapt
 
 from tg import tmpl_context as c
 
@@ -34,6 +35,6 @@ def install_app(*args, **kwargs):
 install_app.__doc__ += '''
     Arguments::
 
-        ''' + inspect.formatargspec(*inspect.getargspec(
+        ''' + wrapt.formatargspec(*inspect.getfullargspec(
     M.Project.install_app
 )).replace('self, ', '')
diff --git a/Allura/allura/tests/functional/test_root.py b/Allura/allura/tests/functional/test_root.py
index 224172f49..fa6224046 100644
--- a/Allura/allura/tests/functional/test_root.py
+++ b/Allura/allura/tests/functional/test_root.py
@@ -57,7 +57,7 @@ def assert_globals_are_reset():
 
     with pytest.raises(AttributeError) as exc_info:
         tg.request._object_stack()
-    assert str(exc_info.value) == 'request', exc_info
+    assert 'request' in str(exc_info.value), exc_info
 
 
 class TestRootController(TestController):
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 82dc642de..73a294bb5 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -894,7 +894,7 @@ class TestFunctionalController(TrackerTestController):
         assert file_name in ticket_editor, ticket_editor.showbrowser()
         req = self.app.get('/bugs/1/')
         form = self._find_update_ticket_form(req)
-        file_link = BeautifulSoup(form.text).findAll('a')[2]
+        file_link = BeautifulSoup(form.text, features="html5lib").findAll('a')[2]
         assert file_link.string == file_name
         self.app.post(str(file_link['href']), {
             'delete': 'True'
@@ -937,7 +937,7 @@ class TestFunctionalController(TrackerTestController):
             'summary': 'zzz'
         }, upload_files=[upload]).follow()
         form = self._find_update_ticket_form(ticket_editor)
-        download = self.app.get(str(BeautifulSoup(form.text).findAll('a')[2]['href']))
+        download = self.app.get(str(BeautifulSoup(form.text, features="html5lib").findAll('a')[2]['href']))
         assert download.body == file_data
 
     def test_two_attachments(self):
@@ -1317,7 +1317,7 @@ class TestFunctionalController(TrackerTestController):
         error_form = form.submit()
         form = self._find_new_ticket_form(error_form)
         assert form['ticket_form.labels'].value == 'foo'
-        error_message = BeautifulSoup(form.text).find('div', {'class': 'error'})
+        error_message = BeautifulSoup(form.text, features="html5lib").find('div', {'class': 'error'})
         assert error_message
         assert (error_message.string == 'You must provide a Title' or
                 error_message.string == 'Missing value')
diff --git a/requirements.in b/requirements.in
index 0644bdfdb..9039b2c80 100644
--- a/requirements.in
+++ b/requirements.in
@@ -1,13 +1,13 @@
 ActivityStream
 beautifulsoup4
 Beaker
-cchardet
 colander
 cryptography
 decorator
 EasyWidgets
 # https://github.com/carpedm20/emoji/issues/191
 emoji
+faust-cchardet
 feedgenerator
 feedparser
 FormEncode
diff --git a/requirements.txt b/requirements.txt
index 8fbdcde41..9d2bbdf00 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -16,8 +16,6 @@ beautifulsoup4==4.11.1
     #   webtest
 bleach[css]==5.0.1
     # via pypeline
-cchardet==2.1.7
-    # via -r requirements.in
 certifi==2022.12.7
     # via requests
 cffi==1.15.1
@@ -44,6 +42,8 @@ exceptiongroup==1.1.0
     # via pytest
 execnet==1.9.0
     # via pytest-xdist
+faust-cchardet==2.1.18
+    # via -r requirements.in
 feedgenerator==2.0.0
     # via -r requirements.in
 feedparser==6.0.10