* [gentoo-commits] repo/gentoo:master commit in: dev-python/beaker/, dev-python/beaker/files/
@ 2015-08-16 5:33 Ian Delaney
0 siblings, 0 replies; only message in thread
From: Ian Delaney @ 2015-08-16 5:33 UTC (permalink / raw
To: gentoo-commits
commit: 5af0dc4424114509ec3e5277d7a7690f23f8cdfd
Author: Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 16 05:32:33 2015 +0000
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Sun Aug 16 05:32:33 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5af0dc44
dev-python/beaker: patch to fix failed test, fixes bug #557026
Package-Manager: portage-2.2.20
dev-python/beaker/beaker-1.7.0-r1.ebuild | 5 +++
.../beaker/files/beaker-1.7.0-cookie-testfix.patch | 40 ++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/dev-python/beaker/beaker-1.7.0-r1.ebuild b/dev-python/beaker/beaker-1.7.0-r1.ebuild
index 13b2fe6..032a14b 100644
--- a/dev-python/beaker/beaker-1.7.0-r1.ebuild
+++ b/dev-python/beaker/beaker-1.7.0-r1.ebuild
@@ -27,8 +27,13 @@ DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
)"
RDEPEND=""
+# Py2.7 fais some tests without this
+DISTUTILS_IN_SOURCE_BUILD=1
+
S="${WORKDIR}/${P}dev"
+PATCHES=( "${FILESDIR}"/${P}-cookie-testfix.patch )
+
python_prepare_all() {
# Workaround for http://bugs.python.org/issue11276.
sed -e "s/import anydbm/& as anydbm/;/import anydbm/a dbm = anydbm" \
diff --git a/dev-python/beaker/files/beaker-1.7.0-cookie-testfix.patch b/dev-python/beaker/files/beaker-1.7.0-cookie-testfix.patch
new file mode 100644
index 0000000..364d112
--- /dev/null
+++ b/dev-python/beaker/files/beaker-1.7.0-cookie-testfix.patch
@@ -0,0 +1,40 @@
+https://github.com/bbangert/beaker/commit/714f464cac9d14e338cf4420163292acaab3bb49
+diff --git a/beaker/session.py b/beaker/session.py
+index 10a87f2..f1a585f 100644
+--- a/beaker/session.py
++++ b/beaker/session.py
+@@ -226,7 +226,7 @@ def _create_id(self, set_new=True):
+ self.last_accessed = None
+ if self.use_cookies:
+ self._set_cookie_values()
+- sc = set_new == False
++ sc = set_new is False
+ self._update_cookie_out(set_cookie=sc)
+
+ @property
+diff --git a/tests/test_session.py b/tests/test_session.py
+index 82ed74d..926dabb 100644
+--- a/tests/test_session.py
++++ b/tests/test_session.py
+@@ -218,7 +218,8 @@ def test_cookies_enabled():
+
+ # test for secure
+ session = get_session(use_cookies=True, secure=True)
+- assert 'secure' in session.request['cookie_out']
++ cookie = session.request['cookie_out'].lower() # Python3.4.3 outputs "Secure", while previous output "secure"
++ assert 'secure' in cookie, cookie
+
+ # test for httponly
+ class ShowWarning(object):
+@@ -233,7 +234,9 @@ def __call__(self, message, category, filename, lineno, file=None, line=None):
+ if sys.version_info < (2, 6):
+ assert sw.msg == 'Python 2.6+ is required to use httponly'
+ else:
+- assert 'httponly' in session.request['cookie_out']
++ # Python3.4.3 outputs "HttpOnly", while previous output "httponly"
++ cookie = session.request['cookie_out'].lower()
++ assert 'httponly' in cookie, cookie
+ warnings.showwarning = orig_sw
+
+ def test_cookies_disabled():
+
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-16 5:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-16 5:33 [gentoo-commits] repo/gentoo:master commit in: dev-python/beaker/, dev-python/beaker/files/ Ian Delaney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox