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 2020/02/26 19:56:54 UTC

[allura] branch master updated (140bea7 -> 03d9ac0)

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

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


    from 140bea7  [#8351] use codecs.open instead of io.open when dumping json https://stackoverflow.com/a/31343739/
     new f60155e  Work around virtualenv 20 issue causing our entry points to not be found
     new 03d9ac0  Handle str vs unicode in ApacheAccessHandler.py

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 scripts/ApacheAccessHandler.py | 6 +++---
 scripts/init-docker-dev.sh     | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)


[allura] 02/02: Handle str vs unicode in ApacheAccessHandler.py

Posted by br...@apache.org.
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 03d9ac0ffa44156b0a9a53ad259f5a54b9542876
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Wed Feb 26 14:56:26 2020 -0500

    Handle str vs unicode in ApacheAccessHandler.py
---
 scripts/ApacheAccessHandler.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/ApacheAccessHandler.py b/scripts/ApacheAccessHandler.py
index 39c35b6..4632541 100644
--- a/scripts/ApacheAccessHandler.py
+++ b/scripts/ApacheAccessHandler.py
@@ -45,7 +45,7 @@ def log(req, message):
 
 
 def load_requests_lib(req):
-    virtualenv_path = req.get_options().get('ALLURA_VIRTUALENV', None)
+    virtualenv_path = req.get_options().get(str('ALLURA_VIRTUALENV'), None)
     if virtualenv_path:
         activate_this = '%s/bin/activate_this.py' % virtualenv_path
         exec(compile(open(activate_this, "rb").read(), activate_this, 'exec'), {'__file__': activate_this})
@@ -104,7 +104,7 @@ def check_authentication(req):
     log(req, "checking auth for: %s" % username)
     if not username or not password:
         return False
-    auth_url = req.get_options().get('ALLURA_AUTH_URL', 'https://127.0.0.1/auth/do_login')
+    auth_url = req.get_options().get(str('ALLURA_AUTH_URL'), 'https://127.0.0.1/auth/do_login')
 
     # work through our own Antispam protection
     auth_form_url = auth_url.replace('/do_login', '/')
@@ -175,7 +175,7 @@ def check_authentication(req):
 def check_permissions(req):
     req_path = str(req.parsed_uri[apache.URI_PATH])
     req_query = str(req.parsed_uri[apache.URI_QUERY])
-    perm_url = req.get_options().get('ALLURA_PERM_URL', 'https://127.0.0.1/auth/repo_permissions')
+    perm_url = req.get_options().get(str('ALLURA_PERM_URL'), 'https://127.0.0.1/auth/repo_permissions')
     r = requests.get(perm_url, params={'username': req.user, 'repo_path': mangle(req_path)})
     if r.status_code != 200:
         log(req, "repo_permissions return error (%d)" % r.status_code)


[allura] 01/02: Work around virtualenv 20 issue causing our entry points to not be found

Posted by br...@apache.org.
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 f60155ed39ca98243100e668b36412ae70b85bce
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Wed Feb 26 14:55:55 2020 -0500

    Work around virtualenv 20 issue causing our entry points to not be found
---
 scripts/init-docker-dev.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/init-docker-dev.sh b/scripts/init-docker-dev.sh
index c0d7d13..fa4905f 100755
--- a/scripts/init-docker-dev.sh
+++ b/scripts/init-docker-dev.sh
@@ -38,7 +38,7 @@ echo "# No robots.txt rules here" > /allura-data/www-misc/robots.txt
 # share venv to allow update and sharing across containers
 if [ ! -e /allura-data/virtualenv ]; then
     echo -e "Creating virtualenv\n"
-    pip install virtualenv
+    pip install 'virtualenv < 20'  # https://github.com/pypa/virtualenv/issues/1670
     virtualenv /allura-data/virtualenv
     ln -s /usr/lib/python2.7/dist-packages/pysvn /allura-data/virtualenv/lib/python2.7/site-packages/
     echo # just a new line