Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-python-qdatamatrix for
openSUSE:Factory checked in at 2021-11-27 23:42:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-qdatamatrix (Old)
and /work/SRC/openSUSE:Factory/.python-python-qdatamatrix.new.1895 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-qdatamatrix"
Sat Nov 27 23:42:26 2021 rev:3 rq:933948 version:0.1.31
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-python-qdatamatrix/python-python-qdatamatrix.changes
2021-02-20 22:13:17.607103026 +0100
+++
/work/SRC/openSUSE:Factory/.python-python-qdatamatrix.new.1895/python-python-qdatamatrix.changes
2021-11-27 23:42:27.360466995 +0100
@@ -1,0 +2,8 @@
+Thu Nov 25 20:52:01 UTC 2021 - Ben Greiner <[email protected]>
+
+- Update to 0.1.31
+ * Fix order of columns after undo
+ * Fix pasting of data with existing column names
+ * Avoid empty trailing row after pasting
+
+-------------------------------------------------------------------
Old:
----
python-qdatamatrix-0.1.29.tar.gz
New:
----
python-qdatamatrix-0.1.31.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-qdatamatrix.spec ++++++
--- /var/tmp/diff_new_pack.S2b3Ed/_old 2021-11-27 23:42:27.892465252 +0100
+++ /var/tmp/diff_new_pack.S2b3Ed/_new 2021-11-27 23:42:27.896465238 +0100
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-python-qdatamatrix
-Version: 0.1.29
+Version: 0.1.31
Release: 0
Summary: A PyQt4/PyQt5 widget for viewing and editing a DataMatrix
object
License: GPL-3.0-or-later
@@ -28,20 +28,20 @@
Source:
https://files.pythonhosted.org/packages/source/p/python-qdatamatrix/python-qdatamatrix-%{version}.tar.gz
Source1:
https://raw.githubusercontent.com/open-cogsci/python-qdatamatrix/master/copyright
Source2:
https://raw.githubusercontent.com/open-cogsci/python-qdatamatrix/master/example.py
-BuildRequires: %{python_module PrettyTable}
BuildRequires: %{python_module QtPy}
-BuildRequires: %{python_module fastnumbers}
BuildRequires: %{python_module python-datamatrix}
# QtPy has a number of possible backends, none of them mandatory, use PyQt5
for the build
BuildRequires: %{python_module qt5}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+# SECTION TEST REQUIREMENTS (recommendations by datamatrix)
BuildRequires: xvfb-run
-Requires: python-PrettyTable
+BuildRequires: %{python_module fastnumbers}
+BuildRequires: %{python_module prettytable}
+#/SECTION
Requires: python-QtPy
Requires: python-python-datamatrix
-Recommends: python-fastnumbers
BuildArch: noarch
%python_subpackages
++++++ example.py ++++++
--- /var/tmp/diff_new_pack.S2b3Ed/_old 2021-11-27 23:42:27.928465133 +0100
+++ /var/tmp/diff_new_pack.S2b3Ed/_new 2021-11-27 23:42:27.928465133 +0100
@@ -24,14 +24,22 @@
from qtpy import QtWidgets
import qtpy
-dm = DataMatrix(length=3)
-dm.col1 = 1, 2, 3
-dm.col2 = 'a', 'b', 'c'
-print(dm)
+def show():
+ print(qdm._dm)
+ for n, c in qdm._dm.columns:
+ print(n, repr(c._rowid))
+
+
+dm = DataMatrix(length=4)
+dm.sorted = False
+dm.col1 = range(4)
+dm.col3 = ['a', 'b', 'c', 'd']
+dm.col2 = ['e', 'f', 'g', 'h']
+print(dm)
app = QtWidgets.QApplication(sys.argv)
-qdm = QDataMatrix(dm)
-qdm.resize(600,400)
-# qdm.refresh()
+qdm = QDataMatrix(dm, read_only=False)
+qdm.resize(600, 400)
+qdm.changed.connect(show)
qdm.show()
sys.exit(app.exec_())
++++++ python-qdatamatrix-0.1.29.tar.gz -> python-qdatamatrix-0.1.31.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-qdatamatrix-0.1.29/PKG-INFO
new/python-qdatamatrix-0.1.31/PKG-INFO
--- old/python-qdatamatrix-0.1.29/PKG-INFO 2020-11-26 19:54:29.000000000
+0100
+++ new/python-qdatamatrix-0.1.31/PKG-INFO 2021-06-04 13:08:30.935625600
+0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-qdatamatrix
-Version: 0.1.29
+Version: 0.1.31
Summary: A PyQt4/PyQt5 widget for viewing and editing a DataMatrix object
Home-page: https://github.com/smathot/python-qdatamatrix
Author: Sebastiaan Mathot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-qdatamatrix-0.1.29/python_qdatamatrix.egg-info/PKG-INFO
new/python-qdatamatrix-0.1.31/python_qdatamatrix.egg-info/PKG-INFO
--- old/python-qdatamatrix-0.1.29/python_qdatamatrix.egg-info/PKG-INFO
2020-11-26 19:54:29.000000000 +0100
+++ new/python-qdatamatrix-0.1.31/python_qdatamatrix.egg-info/PKG-INFO
2021-06-04 13:08:30.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-qdatamatrix
-Version: 0.1.29
+Version: 0.1.31
Summary: A PyQt4/PyQt5 widget for viewing and editing a DataMatrix object
Home-page: https://github.com/smathot/python-qdatamatrix
Author: Sebastiaan Mathot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-qdatamatrix-0.1.29/qdatamatrix/_qspreadsheet.py
new/python-qdatamatrix-0.1.31/qdatamatrix/_qspreadsheet.py
--- old/python-qdatamatrix-0.1.29/qdatamatrix/_qspreadsheet.py 2020-11-26
17:56:47.000000000 +0100
+++ new/python-qdatamatrix-0.1.31/qdatamatrix/_qspreadsheet.py 2021-06-04
13:05:24.000000000 +0200
@@ -299,7 +299,8 @@
self._setcell(0, colnr, new_name)
try:
self.dm.rename(old_name, new_name)
- self._qdm.changed.emit()
+ if not self._silent:
+ self._qdm.changed.emit()
except:
self._setcell(0, colnr, old_name)
@@ -414,7 +415,9 @@
"""
if not self._in_undo_action:
- self._undo_stack.append( (self._cursor_pos, self.dm[:])
)
+ dm = self.dm[:]
+ dm.sorted = False
+ self._undo_stack.append((self._cursor_pos, dm))
@undoable
def _cut(self):
@@ -492,7 +495,7 @@
# Convert the selection to text and put it on the clipboard
txt = u'\n'.join([u'\t'.join(_col) for _col in matrix])
self._clipboard.setText(txt)
-
+
@silent
@undoable
def _paste(self):
@@ -504,15 +507,39 @@
txt = self._clipboard.mimeData().text()
rows = self.newlines_re.sub('\n', txt).split(u'\n')
- columns = []
+ changed_columns = set()
+ first_col = self.currentColumn()
+ first_row = self.currentRow()
for i, row in enumerate(rows):
+ if not row: # avoid pasting an empty row at the end
+ continue
cells = row.split(u'\t')
for j, cell in enumerate(cells):
- if cell != EMPTY_STR:
- col = self.currentColumn()
- if col not in columns:
- columns.append(col)
- self._setcell(self.currentRow()+i,
col+j, cell)
- for col in columns:
+ if cell == EMPTY_STR:
+ continue
+ col = first_col + j
+ row = first_row + i
+ if row == 0:
+ # If the column name overlaps with a
previous column name,
+ # then we add a suffix to distinguish
it.
+ colname = cell
+ colname_suffix = 1
+ while colname in
self.dm.column_names[:col]:
+ colname = u'{}_{}'.format(cell,
colname_suffix)
+ colname_suffix += 1
+ cell = colname
+ # then we add a suffix to that other
column name
+ # If the column name overlaps with a
following column name
+ if cell in self.dm.column_names[col +
1:]:
+ conflict_index =
self.dm.column_names.index(colname)
+ colname = cell
+ colname_suffix = 1
+ while colname in
self.dm.column_names[col + 1:]:
+ colname =
u'{}_{}'.format(cell, colname_suffix)
+ colname_suffix += 1
+ self._setcell(row,
conflict_index, colname)
+ self._setcell(row, col, cell)
+ changed_columns.add(col)
+ for col in changed_columns:
self._optimize_column_width(col)
self._qdm.changed.emit()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-qdatamatrix-0.1.29/qdatamatrix/_version.py
new/python-qdatamatrix-0.1.31/qdatamatrix/_version.py
--- old/python-qdatamatrix-0.1.29/qdatamatrix/_version.py 2020-11-25
16:16:56.000000000 +0100
+++ new/python-qdatamatrix-0.1.31/qdatamatrix/_version.py 2021-06-04
13:06:21.000000000 +0200
@@ -17,4 +17,4 @@
along with qdatamatatrix. If not, see <http://www.gnu.org/licenses/>.
"""
-__version__ = '0.1.29'
+__version__ = '0.1.31'