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/01/10 21:57:57 UTC
[allura] branch db/8347 created (now f784a72)
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a change to branch db/8347
in repository https://gitbox.apache.org/repos/asf/allura.git.
at f784a72 [#8347] drop "poster" dep
This branch includes the following new commits:
new 076736c [#8347] only install faulthandler when on py2 environments (py3.3 stdlib) and upgrade pip-tools
new 57660a7 [#8347] disable pylint, remove dep
new f784a72 [#8347] drop "poster" dep
The 3 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.
[allura] 02/03: [#8347] disable pylint, remove dep
Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/8347
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 57660a713378b27c75a6274f4aa45d7ee1b15e3b
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Thu Jan 9 23:20:08 2020 +0000
[#8347] disable pylint, remove dep
---
AlluraTest/alluratest/test_syntax.py | 2 ++
requirements.in | 2 +-
requirements.txt | 12 ++----------
3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/AlluraTest/alluratest/test_syntax.py b/AlluraTest/alluratest/test_syntax.py
index cc4646d..36fa733 100644
--- a/AlluraTest/alluratest/test_syntax.py
+++ b/AlluraTest/alluratest/test_syntax.py
@@ -19,6 +19,7 @@ import os.path
from subprocess import Popen, PIPE
import sys
from itertools import izip_longest
+from unittest import SkipTest
toplevel_dir = os.path.abspath(os.path.dirname(__file__) + "/../..")
@@ -71,6 +72,7 @@ def test_no_tabs():
def run_linter(files):
+ raise SkipTest('pylint see [#8346]')
if run('pylint -E --disable=all --enable=exposed-api-needs-kwargs --load-plugins alluratest.pylint_checkers {}'.format(' '.join(files))) != 0:
raise Exception('Custom Allura pylint errors found.')
diff --git a/requirements.in b/requirements.in
index d2d28c3..7c70916 100644
--- a/requirements.in
+++ b/requirements.in
@@ -54,7 +54,7 @@ mock
nose
poster==0.8.1
pyflakes
-pylint
+#pylint -- disabled due to [#8346] (also requires diff versions on py2 vs 3, including transitive deps which gets tricky with pip-compile)
testfixtures
WebTest==2.0.33
diff --git a/requirements.txt b/requirements.txt
index 5a7b7c2..640726b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,9 +6,8 @@
#
activitystream==0.2.2
asn1crypto==0.24.0 # via cryptography
-astroid==1.6.6 # via pylint
backlash==0.1.4
-backports.functools-lru-cache==1.5 # via astroid, isort, pylint, soupsieve
+backports.functools-lru-cache==1.5 # via soupsieve
backports.shutil-get-terminal-size==1.0.0 # via ipython
beaker==1.10.1
beautifulsoup4==4.8.0
@@ -17,7 +16,6 @@ certifi==2019.6.16 # via requests
cffi==1.12.2 # via cryptography
chardet==3.0.4
colander==1.7.0
-configparser==3.7.4 # via pylint
crank==0.8.1 # via turbogears2
creoleparser==0.7.5 # via pypeline
cryptography==2.6.1
@@ -26,13 +24,12 @@ decorator==4.4.0
docutils==0.15.2 # via pypeline
easywidgets==0.3.5
emoji==0.5.3
-enum34==1.1.6 # via astroid, colander, cryptography, traitlets
+enum34==1.1.6 # via colander, cryptography, traitlets
faulthandler==3.1 ; python_version < "3.3"
feedparser==5.2.1
formencode==1.3.1
funcsigs==1.0.2 # via beaker, mock
future==0.17.1 # via timermiddleware
-futures==3.3.0 # via isort
genshi==0.7.3 # via creoleparser
gitdb2==2.0.4 # via gitpython
gitpython==2.1.11
@@ -45,13 +42,10 @@ ipaddress==1.0.22 # via cryptography
ipython-genutils==0.2.0 # via traitlets
ipython==5.8.0
iso8601==0.1.12 # via colander
-isort==4.3.21 # via pylint
jinja2==2.10
-lazy-object-proxy==1.4.1 # via astroid
markdown-checklist==0.4.1
markdown==2.6.11
markupsafe==1.1.1
-mccabe==0.6.1 # via pylint
ming==0.5.6
mock==3.0.5
nose==1.3.7
@@ -71,7 +65,6 @@ ptyprocess==0.6.0 # via pexpect
pycparser==2.19 # via cffi
pyflakes==2.1.1
pygments==2.4.2
-pylint==1.9.5
pymongo==2.8.1
pypeline[creole,markdown,rst,textile]==0.5.1
pysolr==3.6.0
@@ -86,7 +79,6 @@ requests==2.22.0
scandir==1.10.0 # via pathlib2
setproctitle==1.1.9
simplegeneric==0.8.1 # via ipython
-singledispatch==3.4.0.3 # via astroid, pylint
six==1.12.0
smmap2==2.0.4 # via gitdb2
soupsieve==1.9.3 # via beautifulsoup4
[allura] 03/03: [#8347] drop "poster" dep
Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/8347
in repository https://gitbox.apache.org/repos/asf/allura.git
commit f784a726fbd88035daf836110f8e6b7544ca206d
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Thu Jan 9 23:36:29 2020 +0000
[#8347] drop "poster" dep
---
Allura/setup.py | 2 +-
AlluraTest/alluratest/validation.py | 19 ++++++++++---------
requirements.in | 1 -
requirements.txt | 1 -
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/Allura/setup.py b/Allura/setup.py
index 6f25a17..47bd1bd 100644
--- a/Allura/setup.py
+++ b/Allura/setup.py
@@ -54,7 +54,7 @@ setup(
packages=find_packages(exclude=['ez_setup']),
include_package_data=True,
test_suite='nose.collector',
- tests_require=['WebTest >= 1.2', 'BeautifulSoup', 'poster', 'nose'],
+ tests_require=['WebTest >= 1.2', 'BeautifulSoup', 'nose'],
package_data={'allura': ['i18n/*/LC_MESSAGES/*.mo',
'templates/**.html',
'templates/**.py',
diff --git a/AlluraTest/alluratest/validation.py b/AlluraTest/alluratest/validation.py
index 25d51b6..5076cbe 100644
--- a/AlluraTest/alluratest/validation.py
+++ b/AlluraTest/alluratest/validation.py
@@ -34,9 +34,8 @@ import pkg_resources
import webtest
from webtest import TestApp
from nose.tools import ok_
-from poster.encode import multipart_encode
-from poster.streaminghttp import register_openers
from ming.utils import LazyProperty
+import requests
from allura.lib import utils
@@ -127,23 +126,25 @@ def validate_html5(html_or_response):
html = html_or_response.body
else:
html = html_or_response
- register_openers()
- params = [("out", "text"), ("content", html)]
- datagen, headers = multipart_encode(params)
- request = urllib2.Request("http://html5.validator.nu/", datagen, headers)
count = 3
while True:
try:
- resp = urllib2.urlopen(request, timeout=3).read()
+ # TODO switch to http://validator.w3.org/nu/?out=text but it has more validation errors for us to fix
+ # Docs: https://github.com/validator/validator/wiki/Service-%C2%BB-Input-%C2%BB-POST-body and other pages
+ resp = requests.post('http://html5.validator.nu/nu/?out=text', # could do out=json
+ data=html,
+ headers={'Content-Type': str('text/html; charset=utf-8')},
+ timeout=3)
+ resp = resp.text
break
- except:
+ except Exception:
resp = "Couldn't connect to validation service to check the HTML"
count -= 1
if count == 0:
sys.stderr.write('WARNING: ' + resp + '\n')
break
- resp = resp.replace('“', '"').replace('”', '"').replace('–', '-')
+ resp = resp.replace(u'“', u'"').replace(u'”', u'"').replace(u'–', u'-')
ignored_errors = [
'Required attributes missing on element "object"',
diff --git a/requirements.in b/requirements.in
index 7c70916..1596d95 100644
--- a/requirements.in
+++ b/requirements.in
@@ -52,7 +52,6 @@ datadiff
ipython<6 # Ipython 7 starts to require py3
mock
nose
-poster==0.8.1
pyflakes
#pylint -- disabled due to [#8346] (also requires diff versions on py2 vs 3, including transitive deps which gets tricky with pip-compile)
testfixtures
diff --git a/requirements.txt b/requirements.txt
index 640726b..3ba5fb4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -58,7 +58,6 @@ pathlib2==2.3.4 # via ipython, pickleshare
pexpect==4.7.0 # via ipython
pickleshare==0.7.5 # via ipython
pillow==6.1.0
-poster==0.8.1
profanityfilter==2.0.6
prompt-toolkit==1.0.16 # via ipython
ptyprocess==0.6.0 # via pexpect
[allura] 01/03: [#8347] only install faulthandler when on py2
environments (py3.3 stdlib) and upgrade pip-tools
Posted by br...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/8347
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 076736cda59adb200b13bf067d5bd02974e5cfa6
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Thu Jan 9 23:19:13 2020 +0000
[#8347] only install faulthandler when on py2 environments (py3.3 stdlib) and upgrade pip-tools
---
requirements-dev.txt | 4 ++--
requirements.in | 2 +-
requirements.txt | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 0621a1a..f92e32b 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -16,7 +16,7 @@ imagesize==1.1.0 # via sphinx
jinja2==2.10 # via sphinx
markupsafe==1.1.1 # via jinja2
packaging==19.0 # via sphinx
-pip-tools==4.0.0
+pip-tools==4.3.0
pygments==2.4.2 # via sphinx
pyparsing==2.4.0 # via packaging
pytz==2019.1 # via babel
@@ -33,4 +33,4 @@ typing==3.7.4 # via sphinx
urllib3==1.25.3 # via requests
# The following packages are considered to be unsafe in a requirements file:
-# setuptools==41.4.0 # via sphinx
+# setuptools==44.0.0 # via sphinx
diff --git a/requirements.in b/requirements.in
index a8276a7..d2d28c3 100644
--- a/requirements.in
+++ b/requirements.in
@@ -8,7 +8,7 @@ cryptography==2.6.1
decorator
EasyWidgets>=0.3.3
emoji
-faulthandler
+faulthandler ; python_version < "3.3"
feedparser
# FormEncode may need v2.0 to work past py3.3 or so? https://github.com/formencode/formencode/issues/140
FormEncode
diff --git a/requirements.txt b/requirements.txt
index 91b2080..5a7b7c2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -27,7 +27,7 @@ docutils==0.15.2 # via pypeline
easywidgets==0.3.5
emoji==0.5.3
enum34==1.1.6 # via astroid, colander, cryptography, traitlets
-faulthandler==3.1
+faulthandler==3.1 ; python_version < "3.3"
feedparser==5.2.1
formencode==1.3.1
funcsigs==1.0.2 # via beaker, mock
@@ -106,4 +106,4 @@ webtest==2.0.33
wrapt==1.11.2
# The following packages are considered to be unsafe in a requirements file:
-# setuptools==41.2.0 # via ipython
+# setuptools