mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-30 00:34:00 +00:00
pythonPackages: bump pyramid, webob and btrees
This commit is contained in:
parent
3e600a805d
commit
d8c1284d81
79
pkgs/development/python-modules/btrees-py35.patch
Normal file
79
pkgs/development/python-modules/btrees-py35.patch
Normal file
@ -0,0 +1,79 @@
|
||||
From eee0beef88d135640871050b40844272a3aee790 Mon Sep 17 00:00:00 2001
|
||||
From: Tres Seaver <tseaver@palladion.com>
|
||||
Date: Tue, 15 Sep 2015 17:20:18 -0400
|
||||
Subject: [PATCH 1/2] Ensure that we don't overlook errors in first
|
||||
PyObject_RichCompareBool call.
|
||||
|
||||
Python 3.5 turns such cases into SystemErrors.
|
||||
|
||||
See: https://bugs.python.org/issue23571
|
||||
|
||||
Fixes #15.
|
||||
---
|
||||
BTrees/_compat.h | 22 +++++++++++++++++++---
|
||||
1 file changed, 19 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/BTrees/_compat.h b/BTrees/_compat.h
|
||||
index e004d54..19dd377 100644
|
||||
--- a/BTrees/_compat.h
|
||||
+++ b/BTrees/_compat.h
|
||||
@@ -27,9 +27,25 @@
|
||||
#define TEXT_FROM_STRING PyUnicode_FromString
|
||||
#define TEXT_FORMAT PyUnicode_Format
|
||||
|
||||
-#define COMPARE(lhs, rhs) \
|
||||
- PyObject_RichCompareBool((lhs), (rhs), Py_LT) > 0 ? -1 : \
|
||||
- (PyObject_RichCompareBool((lhs), (rhs), Py_EQ) > 0 ? 0 : 1)
|
||||
+/* Emulate Python2's __cmp__, wrapping PyObject_RichCompareBool(),
|
||||
+ * Return -2/-3 for errors, -1 for lhs<rhs, 0 for lhs==rhs, 1 for lhs>rhs.
|
||||
+ */
|
||||
+static inline
|
||||
+int __compare(PyObject *lhs, PyObject *rhs) {
|
||||
+ int less, equal;
|
||||
+
|
||||
+ less = PyObject_RichCompareBool(lhs, rhs, Py_LT);
|
||||
+ if ( less == -1 ) {
|
||||
+ return -2;
|
||||
+ }
|
||||
+ equal = PyObject_RichCompareBool(lhs, rhs, Py_EQ);
|
||||
+ if ( equal == -1 ) {
|
||||
+ return -3;
|
||||
+ }
|
||||
+ return less ? -1 : (equal ? 0 : 1);
|
||||
+}
|
||||
+
|
||||
+#define COMPARE(lhs, rhs) __compare((lhs), (rhs))
|
||||
|
||||
|
||||
#else
|
||||
|
||||
From ff4c3309fe471f2b9bdd642b8f7d1c2fe0f5e458 Mon Sep 17 00:00:00 2001
|
||||
From: Tres Seaver <tseaver@palladion.com>
|
||||
Date: Sun, 20 Sep 2015 11:07:10 -0400
|
||||
Subject: [PATCH 2/2] Avoid unnecessary comparison for 'Py_EQ' if 'Py_LT'
|
||||
returned True.
|
||||
|
||||
---
|
||||
BTrees/_compat.h | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/BTrees/_compat.h b/BTrees/_compat.h
|
||||
index 19dd377..ece2bf9 100644
|
||||
--- a/BTrees/_compat.h
|
||||
+++ b/BTrees/_compat.h
|
||||
@@ -38,11 +38,14 @@ int __compare(PyObject *lhs, PyObject *rhs) {
|
||||
if ( less == -1 ) {
|
||||
return -2;
|
||||
}
|
||||
+ if (less) {
|
||||
+ return -1;
|
||||
+ }
|
||||
equal = PyObject_RichCompareBool(lhs, rhs, Py_EQ);
|
||||
if ( equal == -1 ) {
|
||||
return -3;
|
||||
}
|
||||
- return less ? -1 : (equal ? 0 : 1);
|
||||
+ return equal ? 0 : 1;
|
||||
}
|
||||
|
||||
#define COMPARE(lhs, rhs) __compare((lhs), (rhs))
|
@ -4533,15 +4533,15 @@ let
|
||||
};
|
||||
|
||||
pyramid = buildPythonPackage rec {
|
||||
name = "pyramid-1.5.2";
|
||||
name = "pyramid-1.5.7";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "http://pypi.python.org/packages/source/p/pyramid/${name}.tar.gz";
|
||||
md5 = "d56b140b41d42f818f4349d94d968c9a";
|
||||
sha256 = "1d29fj86724z68zcj9ximl2nrn34pflrlr6v9mwyhcv8rdf2sc61";
|
||||
};
|
||||
|
||||
preCheck = ''
|
||||
# test is failing, see https://github.com/Pylons/pyramid/issues/1405
|
||||
# this will be fixed for 1.6 release, see https://github.com/Pylons/pyramid/issues/1405
|
||||
rm pyramid/tests/test_response.py
|
||||
'';
|
||||
|
||||
@ -15600,12 +15600,12 @@ let
|
||||
};
|
||||
|
||||
webob = buildPythonPackage rec {
|
||||
version = "1.4";
|
||||
version = "1.4.1";
|
||||
name = "webob-${version}";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "http://pypi.python.org/packages/source/W/WebOb/WebOb-${version}.tar.gz";
|
||||
md5 = "8437607c0cc00c35f658f972516ffb55";
|
||||
sha256 = "1nz9m6ijf46wfn33zfza13c0k1n4kjnmn3icdlrlgz5yj21vky0j";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with self; [ nose ];
|
||||
@ -16049,6 +16049,8 @@ let
|
||||
sha256 = "1avvhkd7rvp3rzhw20v6ank8a8m9a1lmh99c4gjjsa1ry0zsri3y";
|
||||
};
|
||||
|
||||
patches = [ ../development/python-modules/btrees-py35.patch ];
|
||||
|
||||
meta = {
|
||||
description = "scalable persistent components";
|
||||
homepage = http://packages.python.org/BTrees;
|
||||
|
Loading…
Reference in New Issue
Block a user