* Fix documentation build (Sphinx now defaults to Python 3).
(Closes: #804552, LP: #1803018)
Important bug (the documentation wasn't being shipped at all). This is not a
complete fix: would you like me to go further or is now not the time?
- The 'Styling' documentation page
(http://pandas.pydata.org/pandas-docs/version/0.23/style.html) is missing as it
is in a different source format, that requires Pandoc
- Several examples (run at build time) contain exception messages because
their dependencies aren't installed
These two variants would be "add pandoc to Build-Depends-Indep" and "add
python3-sqlalchemy+python3-statsmodels+python3-xarray to
Build-Depends-Indep".
Someone asked for the debdiff *from sid*, so here it is.
diff --git a/debian/changelog b/debian/changelog
index 5c5bbed07..bb24569f0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+pandas (0.23.3+dfsg-3) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * Make np.array @ Series act the right way round. (Closes: #923708)
+ * Replace #918206 fix with a fix that doesn't change the return type
+ and inplace-ness of np.array += DataFrame. (Closes: #923707)
+ * Revert "Add documentation examples dependencies" to comply with
+ freeze policy.
+
+ -- Rebecca N. Palmer <rebecca_pal...@zoho.com> Mon, 04 Mar 2019
21:59:43 +0000
+
pandas (0.23.3+dfsg-2) unstable; urgency=medium
* Team upload.
diff --git a/debian/control b/debian/control
index e36eca515..a7b429d6a 100644
--- a/debian/control
+++ b/debian/control
@@ -53,13 +53,6 @@ Build-Depends: debhelper (>= 9),
xclip,
Build-Depends-Indep:
ipython3,
-# these are for not having (as many) exception messages in
documentation examples
-# RC-buggy python3-feather-format <!nodoc>,
-# not in Debian python3-pyarrow <!nodoc> | python3-fastparquet <!nodoc>,
-# would rather not add a big dependency (R) right now python3-rpy2
<!nodoc>,
- python3-sqlalchemy <!nodoc>,
- python3-statsmodels <!nodoc>,
- python3-xarray <!nodoc>,
Build-Conflicts: python-tables (= 3.3.0-4), python3-tables (= 3.3.0-4)
X-Python-Version: >= 2.7
X-Python3-Version: >= 3.2
diff --git a/debian/patches/918206.patch b/debian/patches/918206.patch
new file mode 100644
index 000000000..b4168bf49
--- /dev/null
+++ b/debian/patches/918206.patch
@@ -0,0 +1,38 @@
+Description: Fix np.array @ DataFrame matrix multiplication
+
+Using this and not upstream's __array_priority__ fix
+https://github.com/pandas-dev/pandas/commit/ad2a14f4bec8a004b2972c12f12ed3e4ce37ff52
+to allow np.array += DataFrame to remain in-place (same object ID /
+other views also affected) and an array (not a DataFrame).
+
+Author: jbrockmendel, Rebecca N. Palmer <rebecca_pal...@zoho.com>
+Origin: upstream
+Bug-Debian: https://bugs.debian.org/918206 https://bugs.debian.org/923707
+Forwarded: not-needed
+
+--- a/pandas/core/generic.py
++++ b/pandas/core/generic.py
+@@ -1607,6 +1607,8 @@ class NDFrame(PandasObject, SelectionMixin):
+
+ def __array_wrap__(self, result, context=None):
+ d = self._construct_axes_dict(self._AXIS_ORDERS, copy=False)
++ if context is not None and context[0]==np.matmul and not
hasattr(context[1][0],'index'):
++ d.pop('index',None)
+ return self._constructor(result, **d).__finalize__(self)
+
+ # ideally we would define this to avoid the getattr checks, but
+--- a/pandas/tests/frame/test_analytics.py
++++ b/pandas/tests/frame/test_analytics.py
+@@ -2283,8 +2283,11 @@ class TestDataFrameAnalytics(TestData):
+
+ # np.array @ DataFrame
+ result = operator.matmul(a.values, b)
++ assert isinstance(result, DataFrame)
++ assert result.columns.equals(b.columns)
++ assert result.index.equals(pd.Index(range(3)))
+ expected = np.dot(a.values, b.values)
+- tm.assert_almost_equal(result, expected)
++ tm.assert_almost_equal(result.values, expected)
+
+ # nested list @ DataFrame (__rmatmul__)
+ result = operator.matmul(a.values.tolist(), b)
diff --git a/debian/patches/array_priority.patch
b/debian/patches/array_priority.patch
deleted file mode 100644
index b38e78d52..000000000
--- a/debian/patches/array_priority.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Description: Fix np.array @ DataFrame matrix multiplication
-
-Author: jbrockmendel
-Origin: upstream
https://github.com/pandas-dev/pandas/commit/ad2a14f4bec8a004b2972c12f12ed3e4ce37ff52
-Bug-Debian: https://bugs.debian.org/918206
-Forwarded: not-needed
-
---- a/pandas/core/generic.py
-+++ b/pandas/core/generic.py
-@@ -1602,6 +1602,7 @@ class NDFrame(PandasObject, SelectionMix
- #
----------------------------------------------------------------------
- # Array Interface
-
-+ __array_priority__ = 1000
- def __array__(self, dtype=None):
- return com._values_from_object(self)
-
---- a/pandas/tests/frame/test_analytics.py
-+++ b/pandas/tests/frame/test_analytics.py
-@@ -2283,8 +2283,11 @@ class TestDataFrameAnalytics(TestData):
-
- # np.array @ DataFrame
- result = operator.matmul(a.values, b)
-+ assert isinstance(result, DataFrame)
-+ assert result.columns.equals(b.columns)
-+ assert result.index.equals(pd.Index(range(3)))
- expected = np.dot(a.values, b.values)
-- tm.assert_almost_equal(result, expected)
-+ tm.assert_almost_equal(result.values, expected)
-
- # nested list @ DataFrame (__rmatmul__)
- result = operator.matmul(a.values.tolist(), b)
diff --git a/debian/patches/array_series_matmul.patch
b/debian/patches/array_series_matmul.patch
new file mode 100644
index 000000000..6fde8d986
--- /dev/null
+++ b/debian/patches/array_series_matmul.patch
@@ -0,0 +1,32 @@
+Description: Fix ordering of np.array @ Series
+
+Author: Ming Li
+Origin: upstream
+Bug-Debian: https://bugs.debian.org/923708
+Forwarded: not-needed
+
+--- pandas-0.23.3+dfsg.orig/pandas/core/series.py
++++ pandas-0.23.3+dfsg/pandas/core/series.py
+@@ -2058,7 +2058,7 @@ class Series(base.IndexOpsMixin, generic
+
+ def __rmatmul__(self, other):
+ """ Matrix multiplication using binary `@` operator in
Python>=3.5 """
+- return self.dot(other)
++ return self.dot(np.transpose(other)).T
+
+ @Substitution(klass='Series')
+ @Appender(base._shared_docs['searchsorted'])
+--- pandas-0.23.3+dfsg.orig/pandas/tests/series/test_analytics.py
++++ pandas-0.23.3+dfsg/pandas/tests/series/test_analytics.py
+@@ -950,6 +950,11 @@ class TestSeriesAnalytics(TestData):
+ expected = np.dot(a.values, a.values)
+ assert_almost_equal(result, expected)
+
++ # np.array (matrix) @ Series (__rmatmul__)
++ result = operator.matmul(b.T.values, a)
++ expected = np.dot(b.T.values, a.values)
++ assert_almost_equal(result, expected)
++
+ # mixed dtype DataFrame @ Series
+ a['p'] = int(a.p)
+ result = operator.matmul(b.T, a)
diff --git a/debian/patches/series b/debian/patches/series
index 332cf647b..e50e1bb9c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,10 +20,11 @@ mark_tests_failing_on_386.patch
mathjax-path.patch
deb_ndsphinx_optional
deb_skip_difffailingtests
-array_priority.patch
+918206.patch
# lintian: patch-file-present-but-not-mentioned-in-series
# Don't remove this comment, so that we can avoid a lintian warning.
# This patch is conditionally applied via d/rules.
# 0001-TST-pytest-deprecation-warnings-GH17197-17253-reversed.patch
skip_tests_copyright.patch
+array_series_matmul.patch