[Python-modules-commits] r28333 - in packages/numpy/trunk/debian (4 files)

jtaylor-guest at users.alioth.debian.org jtaylor-guest at users.alioth.debian.org
Thu Mar 27 19:25:20 UTC 2014


    Date: Thursday, March 27, 2014 @ 19:25:19
  Author: jtaylor-guest
Revision: 28333

New upstream bugfix release

- remove upstream applied quantities-linspace.patch
- remove upstream applied restore-3kcompat-api.patch

Modified:
  packages/numpy/trunk/debian/changelog
  packages/numpy/trunk/debian/patches/series
Deleted:
  packages/numpy/trunk/debian/patches/quantities-linspace.patch
  packages/numpy/trunk/debian/patches/restore-3kcompat-api.patch

Modified: packages/numpy/trunk/debian/changelog
===================================================================
--- packages/numpy/trunk/debian/changelog	2014-03-27 17:20:14 UTC (rev 28332)
+++ packages/numpy/trunk/debian/changelog	2014-03-27 19:25:19 UTC (rev 28333)
@@ -1,3 +1,11 @@
+python-numpy (1:1.8.1-1) unstable; urgency=medium
+
+  * New upstream bugfix release
+    - remove upstream applied quantities-linspace.patch
+    - remove upstream applied restore-3kcompat-api.patch
+
+ -- Julian Taylor <jtaylor.debian at googlemail.com>  Thu, 27 Mar 2014 19:29:12 +0100
+
 python-numpy (1:1.8.1~rc1-2) unstable; urgency=medium
 
   * fix -arch build by only calling dh_sphinxdoc in -indep

Deleted: packages/numpy/trunk/debian/patches/quantities-linspace.patch
===================================================================
--- packages/numpy/trunk/debian/patches/quantities-linspace.patch	2014-03-27 17:20:14 UTC (rev 28332)
+++ packages/numpy/trunk/debian/patches/quantities-linspace.patch	2014-03-27 19:25:19 UTC (rev 28333)
@@ -1,18 +0,0 @@
-Description: Fix linspace for use with physical quantities
- The fix for issue 3504 led to errors when using linspace with the quantities package.
-Origin: ffc0d2c498cb990ca07fe18f3a5b57bb9af48636
-Bug: https://github.com/numpy/numpy/pull/4503
-Applied-Upstream: 1.8.1
---- a/numpy/core/function_base.py
-+++ b/numpy/core/function_base.py
-@@ -76,8 +76,8 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False):
-     num = int(num)
- 
-     # Convert float/complex array scalars to float, gh-3504 
--    start = start + 0.
--    stop = stop + 0.
-+    start = start * 1.
-+    stop = stop * 1.
- 
-     if num <= 0:
-         return array([], float)

Deleted: packages/numpy/trunk/debian/patches/restore-3kcompat-api.patch
===================================================================
--- packages/numpy/trunk/debian/patches/restore-3kcompat-api.patch	2014-03-27 17:20:14 UTC (rev 28332)
+++ packages/numpy/trunk/debian/patches/restore-3kcompat-api.patch	2014-03-27 19:25:19 UTC (rev 28333)
@@ -1,147 +0,0 @@
-Author: Julian Taylor <jtaylor.debian at googlemail.com>
-Origin 0bfcb0e36e90f1300a27848ce7d419292d0a53c0
-Applied-Upstream: 1.8.1
-Description: restore api for file npy_PyFile_Dup and npy_PyFile_DupClose
-
---- a/doc/release/1.8.1-notes.rst
-+++ b/doc/release/1.8.1-notes.rst
-@@ -47,3 +47,16 @@ Issues fixed
- * gh-4225: fix log1p and exmp1 return for np.inf on windows compiler builds
- * gh-4359: Fix infinite recursion in str.format of flex arrays
- * gh-4145: Incorrect shape of broadcast result with the exponent operator
-+
-+Deprecations
-+============
-+
-+C-API
-+~~~~~
-+
-+The utility function npy_PyFile_Dup and npy_PyFile_DupClose are broken by the
-+internal buffering python 3 applies to its file objects.
-+To fix this two new functions npy_PyFile_Dup2 and npy_PyFile_DupClose2 are
-+declared in npy_3kcompat.h and the old functions are deprecated.
-+Due to the fragile nature of these functions it is recommended to instead use
-+the python API when possible.
---- a/numpy/core/include/numpy/npy_3kcompat.h
-+++ b/numpy/core/include/numpy/npy_3kcompat.h
-@@ -141,12 +141,11 @@ PyUnicode_Concat2(PyObject **left, PyObj
-  * PyFile_* compatibility
-  */
- #if defined(NPY_PY3K)
--
- /*
-  * Get a FILE* handle to the file represented by the Python object
-  */
- static NPY_INLINE FILE*
--npy_PyFile_Dup(PyObject *file, char *mode, npy_off_t *orig_pos)
-+npy_PyFile_Dup2(PyObject *file, char *mode, npy_off_t *orig_pos)
- {
-     int fd, fd2;
-     PyObject *ret, *os;
-@@ -221,7 +220,7 @@ npy_PyFile_Dup(PyObject *file, char *mod
-  * Close the dup-ed file handle, and seek the Python one to the current position
-  */
- static NPY_INLINE int
--npy_PyFile_DupClose(PyObject *file, FILE* handle, npy_off_t orig_pos)
-+npy_PyFile_DupClose2(PyObject *file, FILE* handle, npy_off_t orig_pos)
- {
-     int fd;
-     PyObject *ret;
-@@ -269,10 +268,55 @@ npy_PyFile_Check(PyObject *file)
-     return 1;
- }
- 
-+/*
-+ * DEPRECATED DO NOT USE
-+ * use npy_PyFile_Dup2 instead
-+ * this function will mess ups python3 internal file object buffering
-+ * Get a FILE* handle to the file represented by the Python object
-+ */
-+static NPY_INLINE FILE*
-+npy_PyFile_Dup(PyObject *file, char *mode)
-+{
-+    npy_off_t orig;
-+    if (DEPRECATE("npy_PyFile_Dup is deprecated, use "
-+                  "npy_PyFile_Dup2") < 0) {
-+        return NULL;
-+    }
-+
-+    return npy_PyFile_Dup2(file, mode, &orig);
-+}
-+
-+/*
-+ * DEPRECATED DO NOT USE
-+ * use npy_PyFile_DupClose2 instead
-+ * this function will mess ups python3 internal file object buffering
-+ * Close the dup-ed file handle, and seek the Python one to the current position
-+ */
-+static NPY_INLINE int
-+npy_PyFile_DupClose(PyObject *file, FILE* handle)
-+{
-+    PyObject *ret;
-+    Py_ssize_t position;
-+    position = npy_ftell(handle);
-+    fclose(handle);
-+
-+    ret = PyObject_CallMethod(file, "seek", NPY_SSIZE_T_PYFMT "i", position, 0);
-+    if (ret == NULL) {
-+        return -1;
-+    }
-+    Py_DECREF(ret);
-+    return 0;
-+}
-+
-+
- #else
- 
--#define npy_PyFile_Dup(file, mode, orig_pos_p) PyFile_AsFile(file)
--#define npy_PyFile_DupClose(file, handle, orig_pos) (0)
-+/* DEPRECATED DO NOT USE */
-+#define npy_PyFile_Dup(file, mode) PyFile_AsFile(file)
-+#define npy_PyFile_DupClose(file, handle) (0)
-+/* use these */
-+#define npy_PyFile_Dup2(file, mode, orig_pos_p) PyFile_AsFile(file)
-+#define npy_PyFile_DupClose2(file, handle, orig_pos) (0)
- #define npy_PyFile_Check PyFile_Check
- 
- #endif
---- a/numpy/core/src/multiarray/methods.c
-+++ b/numpy/core/src/multiarray/methods.c
-@@ -588,7 +588,7 @@ array_tofile(PyArrayObject *self, PyObje
-         own = 0;
-     }
- 
--    fd = npy_PyFile_Dup(file, "wb", &orig_pos);
-+    fd = npy_PyFile_Dup2(file, "wb", &orig_pos);
-     if (fd == NULL) {
-         PyErr_SetString(PyExc_IOError,
-                 "first argument must be a string or open file");
-@@ -597,7 +597,7 @@ array_tofile(PyArrayObject *self, PyObje
-     if (PyArray_ToFile(self, fd, sep, format) < 0) {
-         goto fail;
-     }
--    if (npy_PyFile_DupClose(file, fd, orig_pos) < 0) {
-+    if (npy_PyFile_DupClose2(file, fd, orig_pos) < 0) {
-         goto fail;
-     }
-     if (own && npy_PyFile_CloseFile(file) < 0) {
---- a/numpy/core/src/multiarray/multiarraymodule.c
-+++ b/numpy/core/src/multiarray/multiarraymodule.c
-@@ -1995,7 +1995,7 @@ array_fromfile(PyObject *NPY_UNUSED(igno
-         Py_INCREF(file);
-         own = 0;
-     }
--    fp = npy_PyFile_Dup(file, "rb", &orig_pos);
-+    fp = npy_PyFile_Dup2(file, "rb", &orig_pos);
-     if (fp == NULL) {
-         PyErr_SetString(PyExc_IOError,
-                 "first argument must be an open file");
-@@ -2007,7 +2007,7 @@ array_fromfile(PyObject *NPY_UNUSED(igno
-     }
-     ret = PyArray_FromFile(fp, type, (npy_intp) nin, sep);
- 
--    if (npy_PyFile_DupClose(file, fp, orig_pos) < 0) {
-+    if (npy_PyFile_DupClose2(file, fp, orig_pos) < 0) {
-         goto fail;
-     }
-     if (own && npy_PyFile_CloseFile(file) < 0) {

Modified: packages/numpy/trunk/debian/patches/series
===================================================================
--- packages/numpy/trunk/debian/patches/series	2014-03-27 17:20:14 UTC (rev 28332)
+++ packages/numpy/trunk/debian/patches/series	2014-03-27 19:25:19 UTC (rev 28333)
@@ -4,5 +4,3 @@
 #05_fix_endianness_detection.patch
 10_use_local_python.org_object.inv_sphinx.diff
 python3-soabi.patch
-restore-3kcompat-api.patch
-quantities-linspace.patch




More information about the Python-modules-commits mailing list