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

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


The following commit(s) were added to refs/heads/db/8386 by this push:
     new a4aa7e9  fixup! [#8386] remove chardet, make requests library still 
work
a4aa7e9 is described below

commit a4aa7e923c5419ac052aae30311b172e82d07eef
Author: Dave Brondsema <[email protected]>
AuthorDate: Mon May 3 15:49:48 2021 -0400

    fixup! [#8386] remove chardet, make requests library still work
---
 .travis.yml                                                          | 1 +
 Allura/allura/lib/phone/nexmo.py                                     | 1 +
 Allura/allura/lib/project_create_helpers.py                          | 2 +-
 Allura/allura/lib/security.py                                        | 2 +-
 Allura/allura/webhooks.py                                            | 2 +-
 AlluraTest/alluratest/validation.py                                  | 3 ++-
 ForgeImporters/forgeimporters/github/__init__.py                     | 1 +
 ForgeImporters/forgeimporters/tests/github/functional/test_github.py | 2 +-
 ForgeImporters/forgeimporters/trac/__init__.py                       | 1 +
 9 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e078ee3..3b1cee2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,6 +32,7 @@ jobs:
         - pip install 
https://sourceforge.net/projects/pysvn/files/pysvn/V1.9.12/pysvn-1.9.12.tar.gz
 install:
   - sudo apt-get install -qq libjpeg8-dev zlib1g-dev
+  - pip install nose
   - pip install -r requirements.txt --no-deps --upgrade 
--upgrade-strategy=only-if-needed
   - npm install
 script:
diff --git a/Allura/allura/lib/phone/nexmo.py b/Allura/allura/lib/phone/nexmo.py
index f251c93..f5025d7 100644
--- a/Allura/allura/lib/phone/nexmo.py
+++ b/Allura/allura/lib/phone/nexmo.py
@@ -22,6 +22,7 @@ from six.moves.urllib.parse import urljoin
 import cgi
 import json
 
+from allura.lib import helpers as h  # to get requests/chardet patched
 import requests
 import jinja2
 
diff --git a/Allura/allura/lib/project_create_helpers.py 
b/Allura/allura/lib/project_create_helpers.py
index 5e08fb3..026b197 100644
--- a/Allura/allura/lib/project_create_helpers.py
+++ b/Allura/allura/lib/project_create_helpers.py
@@ -29,7 +29,6 @@ except ImportError:  # py2 doesn't have typing yet
 
 import colander as col
 import bson
-import requests
 import formencode
 import six
 from six.moves.urllib.parse import urlparse
@@ -43,6 +42,7 @@ from tg import tmpl_context as c, app_globals as g
 
 from allura import model as M
 from allura.lib import helpers as h
+import requests
 from allura.lib.plugin import ProjectRegistrationProvider
 
 
diff --git a/Allura/allura/lib/security.py b/Allura/allura/lib/security.py
index 4ff62f7..2889c9e 100644
--- a/Allura/allura/lib/security.py
+++ b/Allura/allura/lib/security.py
@@ -25,7 +25,6 @@ import sys
 import logging
 from collections import defaultdict
 import hashlib
-import requests
 
 from tg import tmpl_context as c
 from tg import request
@@ -563,6 +562,7 @@ class HIBPClient(object):
         Raises a named HIBPCompromisedCredentials exception if any found
         :param password: user-supplied password
         """
+        import requests
         result = 0
         try:
             # sha1 it
diff --git a/Allura/allura/webhooks.py b/Allura/allura/webhooks.py
index a5f0004..5778b44 100644
--- a/Allura/allura/webhooks.py
+++ b/Allura/allura/webhooks.py
@@ -25,7 +25,6 @@ import time
 import socket
 import ssl
 
-import requests
 from bson import ObjectId
 from tg import expose, validate, redirect, flash, config
 from tg.decorators import with_trailing_slash, without_trailing_slash
@@ -40,6 +39,7 @@ from paste.deploy.converters import asint, aslist
 from allura.app import AdminControllerMixin
 from allura.controllers import BaseController
 from allura.lib import helpers as h
+import requests
 from allura.lib import validators as v
 from allura.lib.decorators import require_post, task
 from allura.lib.utils import DateJSONEncoder
diff --git a/AlluraTest/alluratest/validation.py 
b/AlluraTest/alluratest/validation.py
index 30f9c46..b10a783 100644
--- a/AlluraTest/alluratest/validation.py
+++ b/AlluraTest/alluratest/validation.py
@@ -39,9 +39,10 @@ import six
 import webtest
 from webtest import TestApp
 from ming.utils import LazyProperty
-import requests
 
 from allura.lib import utils
+from allura.lib import helpers as h  # to get requests/chardet patched
+import requests
 
 log = logging.getLogger(__name__)
 
diff --git a/ForgeImporters/forgeimporters/github/__init__.py 
b/ForgeImporters/forgeimporters/github/__init__.py
index 0983725..ebbf02f 100644
--- a/ForgeImporters/forgeimporters/github/__init__.py
+++ b/ForgeImporters/forgeimporters/github/__init__.py
@@ -29,6 +29,7 @@ from datetime import datetime
 from tg import config, session, redirect, request, expose
 from tg.decorators import without_trailing_slash
 from tg import tmpl_context as c
+from allura.lib import helpers as h  # to get requests/chardet patched
 from requests_oauthlib import OAuth2Session
 import requests
 from formencode import validators as fev
diff --git 
a/ForgeImporters/forgeimporters/tests/github/functional/test_github.py 
b/ForgeImporters/forgeimporters/tests/github/functional/test_github.py
index 5cb7b8f..c83cc50 100644
--- a/ForgeImporters/forgeimporters/tests/github/functional/test_github.py
+++ b/ForgeImporters/forgeimporters/tests/github/functional/test_github.py
@@ -16,7 +16,6 @@
 #       under the License.
 from __future__ import unicode_literals
 from __future__ import absolute_import
-import requests
 import tg
 from mock import patch, call, Mock
 from alluratest.tools import assert_equal
@@ -24,6 +23,7 @@ from unittest import TestCase
 
 from allura.tests import TestController
 from allura import model as M
+import requests
 
 
 class TestGitHubImportController(TestController, TestCase):
diff --git a/ForgeImporters/forgeimporters/trac/__init__.py 
b/ForgeImporters/forgeimporters/trac/__init__.py
index 3a0949d..7ba6693 100644
--- a/ForgeImporters/forgeimporters/trac/__init__.py
+++ b/ForgeImporters/forgeimporters/trac/__init__.py
@@ -18,6 +18,7 @@
 from __future__ import unicode_literals
 from __future__ import absolute_import
 from formencode import validators as fev
+from allura.lib import helpers as h  # to get requests/chardet patched
 import requests
 
 from allura.lib import validators

Reply via email to