[Python-modules-commits] [python-dsv] 02/12: Import python-dsv_1.4.1-3.debian.tar.xz

Aaron M. Ucko ucko at moszumanska.debian.org
Wed Jan 25 03:44:38 UTC 2017


This is an automated email from the git hooks/post-receive script.

ucko pushed a commit to branch master
in repository python-dsv.

commit 790e3969afc7df6005fc911b3547fb320b4d7aef
Author: Aaron M. Ucko <ucko at debian.org>
Date:   Wed Aug 27 23:33:10 2014 -0400

    Import python-dsv_1.4.1-3.debian.tar.xz
    
    [dgit import tarball python-dsv 1.4.1-3 python-dsv_1.4.1-3.debian.tar.xz]
---
 NEWS                                     |   9 +
 changelog                                | 127 +++++++++
 compat                                   |   1 +
 control                                  |  22 ++
 copyright                                |  69 +++++
 docs                                     |   1 +
 patches/01-leave-env-alone.patch         |  21 ++
 patches/02-wx-namespace-transition.patch | 435 +++++++++++++++++++++++++++++++
 patches/03-avoid-unicoditis.patch        |  21 ++
 patches/04-wx3.0-compat.patch            |  21 ++
 patches/series                           |   4 +
 rules                                    |   3 +
 source/format                            |   1 +
 watch                                    |   3 +
 14 files changed, 738 insertions(+)

diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..078c132
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,9 @@
+python-dsv (1.4.1-1) unstable; urgency=low
+
+  As the README notes, 1.4.1 incompatibly changes the type of importDSV's
+  optional errorHandler argument.  This change does not affect any official
+  Debian packages, but it may affect other code.
+
+ -- Aaron M. Ucko <ucko at debian.org>  Tue, 26 Jan 2010 22:00:10 -0500
+
+
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..f307c33
--- /dev/null
+++ b/changelog
@@ -0,0 +1,127 @@
+python-dsv (1.4.1-3) unstable; urgency=medium
+
+  [ Jakub Wilk ]
+  * Use canonical URIs for Vcs-* fields.
+
+  [ Aaron M. Ucko ]
+  * debian/control:
+    - Suggest python-wxgtk3.0 over 2.8.
+    - Standards-Version: 3.9.5.  (Already compliant.)
+  * debian/patches/04-wx3.0-compat.patch (new): Make the import dialog and
+    its demo play better with wxPython 3.0.  (Closes: #759076.)
+
+ -- Aaron M. Ucko <ucko at debian.org>  Wed, 27 Aug 2014 23:33:10 -0400
+
+python-dsv (1.4.1-2) unstable; urgency=low
+
+  * debian/source/format: advance to 3.0 (quilt).
+  * debian/README.source: retire accordingly.
+  * debian/rules:
+    - Simplify accordingly; now fully minimal.
+    - Invoke dh --with python2.
+  * debian/control:
+    - Tighten build dependency on python to (>= 2.6.6-3~) for dh_python2.
+    - Drop build dependencies on python-support and quilt, now superfluous.
+    - Formally set Provides: ${python:Provides}.
+    - Retire alternative suggestion of python-wxgtk2.6, now obsolescent.
+    - Advance Standards-Version to 3.9.2.  (Already compliant.)
+    - Tighten build dependency on debhelper to (>= 8).
+  * debian/compat: proceed to advance to 8, the currently recommended level.
+  * debian/pycompat: belatedly retire as obsolete.
+
+ -- Aaron M. Ucko <ucko at debian.org>  Sat, 22 Oct 2011 21:17:37 -0400
+
+python-dsv (1.4.1-1) unstable; urgency=low
+
+  [ Aaron M. Ucko ]
+  * New upstream release.
+  * debian/patches/*.patch: formally refresh.  (All still apply.)
+  * debian/control:
+    - Suggest python-wxgtk2.8 as a preferred alternative to 2.6.
+    - Depend on ${misc:Depends} in case Debhelper ever populates it.
+    - Eliminate spurious build-dependency on python-dev (vs. python).
+    - Note (preexisting) compliance with Policy version 3.8.3.
+  * debian/examples: retire (contents no longer shipped upstream).
+  * debian/NEWS (new): note minor incompatible API change.
+  * debian/rules: minimize further.
+
+  [Carlos Galisteo]
+  * debian/control:
+    - Added Homepage field.
+
+  [ Sandro Tosi ]
+  * debian/control
+    - switch Vcs-Browser field to viewsvn
+
+ -- Aaron M. Ucko <ucko at debian.org>  Tue, 26 Jan 2010 22:14:29 -0500
+
+python-dsv (1.4.0-7) unstable; urgency=low
+
+  * Migrate from CDBS's simple-patchsys to quilt.
+  * Migrate altogether from CDBS to Debhelper 7.
+  * Add a README.source pointing to quilt's.
+  * Declare compliance with Policy 3.8.0.
+
+ -- Aaron M. Ucko <ucko at debian.org>  Wed, 11 Jun 2008 19:50:12 -0400
+
+python-dsv (1.4.0-6) unstable; urgency=low
+
+  [ Piotr Ożarowski ]
+  * Rename XS-Vcs-* fields to Vcs-* (dpkg supports them now)
+
+  [ Aaron M. Ucko ]
+  * Formally advance to Debhelper 6 on principle.
+  * Declare compliance with Policy 3.7.3; no changes needed.
+
+ -- Aaron M. Ucko <ucko at debian.org>  Sat, 29 Mar 2008 19:01:54 -0400
+
+python-dsv (1.4.0-5) unstable; urgency=low
+
+  [Piotr Ożarowski]
+  * Fix typo in XS-Vcs-Svn: control field (misconverted from +ssh version)
+
+  [Aaron M. Ucko]
+  * debian/patches/02-wx-namespace-transition.patch (new, via Joe Pham
+    <djpham at bitpim.org>): use the modern wx package rather than the
+    clunkier wxPython package, which wxWidgets 2.8 will no longer provide.
+  * debian/patches/03-avoid-unicoditis.patch (new): Try to convert Unicode
+    delimiters back to ASCII (wxPython can be overenthusiastic), but
+    ultimately support either.
+  * Supply XS-Vcs-Browser in addition to XS-Vcs-Svn.
+
+ -- Aaron M. Ucko <ucko at debian.org>  Fri,  4 May 2007 20:02:56 -0400
+
+python-dsv (1.4.0-4) unstable; urgency=low
+
+  * Stop suggesting python-wxgtk2.4, which is obsolete and no longer
+    installable.  (Closes: #391992.)
+  * Update for recent Python policy tweaks.
+  * Add an XS-Vcs-Svn field (pointing to svn.debian.org).
+
+ -- Aaron M. Ucko <ucko at debian.org>  Mon,  9 Oct 2006 19:49:03 -0400
+
+python-dsv (1.4.0-3) unstable; urgency=low
+
+  * Patch DSV.py indirectly, via CDBS's simple patch system, in preparation
+    for switching to pure merge-with-upstream mode per DPMT conventions.
+  * Tweak packaging to comply with the new Python policy (version 0.4);
+    continue using python-support, as python-central is overkill here.
+    (Closes: #373530.)
+  * Standards-Version: 3.7.2 (no changes required).
+
+ -- Aaron M. Ucko <ucko at debian.org>  Wed, 14 Jun 2006 20:21:56 -0400
+
+python-dsv (1.4.0-2) unstable; urgency=low
+
+  * Maintain in conjunction with the new Debian Python Modules Team
+    <python-modules-team at lists.alioth.debian.org>.
+  * Migrate to python-support (in public-module mode, of course).
+
+ -- Aaron M. Ucko <ucko at debian.org>  Tue, 18 Apr 2006 20:51:11 -0400
+
+python-dsv (1.4.0-1) unstable; urgency=low
+
+  * Initial release.  (Closes: #351276.)
+
+ -- Aaron M. Ucko <ucko at debian.org>  Fri,  3 Feb 2006 15:19:35 -0500
+
diff --git a/compat b/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/compat
@@ -0,0 +1 @@
+8
diff --git a/control b/control
new file mode 100644
index 0000000..18f3b36
--- /dev/null
+++ b/control
@@ -0,0 +1,22 @@
+Source: python-dsv
+Section: python
+Priority: optional
+Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
+Uploaders: Aaron M. Ucko <ucko at debian.org>
+Build-Depends: debhelper (>= 8), python (>= 2.6.6-3~)
+Standards-Version: 3.9.5
+Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-dsv/trunk/
+Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-dsv/trunk/
+Homepage: http://python-dsv.sourceforge.net/
+
+Package: python-dsv
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends}
+Suggests: python-wxgtk3.0 | python-wxgtk2.8
+Provides: ${python:Provides}
+Description: Python module for delimiter-separated-value files
+ Python-DSV is an alternative to Python's standard csv module, with
+ somewhat different usage and optional support for wxWidgets-mediated
+ user interaction in the course of format autodetection.  Like the
+ standard module, it supports a wide range of delimiters and handles
+ both import and export.
diff --git a/copyright b/copyright
new file mode 100644
index 0000000..5062729
--- /dev/null
+++ b/copyright
@@ -0,0 +1,69 @@
+This package was debianized by Aaron M. Ucko <ucko at debian.org> on
+Fri,  3 Feb 2006 11:55:27 -0500.
+
+It was downloaded from https://sourceforge.net/projects/python-dsv/.
+
+Copyright Holder: Cliff Wells <cliffwells18 at users.sourceforge.net>
+
+License:
+
+Copyright (c) 2002 Cliff Wells <cliffwells18 at users.sourceforge.net>
+All Rights Reserved.
+
+This is the Python license. In short, you can use this product in
+commercial and non-commercial applications, modify it, redistribute it.
+A notification to the author when you use and/or modify it is welcome.
+
+
+TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING THIS SOFTWARE
+===================================================================
+
+LICENSE AGREEMENT
+-----------------
+
+1. This LICENSE AGREEMENT is between the copyright holder of this
+product, and the Individual or Organization ("Licensee") accessing
+and otherwise using this product in source or binary form and its
+associated documentation.
+
+2. Subject to the terms and conditions of this License Agreement,
+the copyright holder hereby grants Licensee a nonexclusive,
+royalty-free, world-wide license to reproduce, analyze, test,
+perform and/or display publicly, prepare derivative works, distribute,
+and otherwise use this product alone or in any derivative version,
+provided, however, that copyright holders License Agreement and
+copyright holders notice of copyright are retained in this product
+alone or in any derivative version prepared by Licensee.
+
+3. In the event Licensee prepares a derivative work that is based on
+or incorporates this product or any part thereof, and wants to make
+the derivative work available to others as provided herein, then
+Licensee hereby agrees to include in any such work a brief summary of
+the changes made to this product.
+
+4. The copyright holder is making this product available to Licensee on
+an "AS IS" basis. THE COPYRIGHT HOLDER MAKES NO REPRESENTATIONS OR
+WARRANTIES, EXPRESS OR IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION,
+THE COPYRIGHT HOLDER MAKES NO AND DISCLAIMS ANY REPRESENTATION OR
+WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR
+THAT THE USE OF THIS PRODUCT WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+5. THE COPYRIGHT HOLDER SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER
+USERS OF THIS PRODUCT FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL
+DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE
+USING THIS PRODUCT, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE
+POSSIBILITY THEREOF.
+
+6. This License Agreement will automatically terminate upon a material
+breach of its terms and conditions.
+
+7. Nothing in this License Agreement shall be deemed to create any
+relationship of agency, partnership, or joint venture between the
+copyright holder and Licensee. This License Agreement does not grant
+permission to use trademarks or trade names from the copyright holder
+in a trademark sense to endorse or promote products or services of
+Licensee, or any third party.
+
+8. By copying, installing or otherwise using this product, Licensee
+agrees to be bound by the terms and conditions of this License
+Agreement.
diff --git a/docs b/docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/docs
@@ -0,0 +1 @@
+README
diff --git a/patches/01-leave-env-alone.patch b/patches/01-leave-env-alone.patch
new file mode 100644
index 0000000..c2e7aee
--- /dev/null
+++ b/patches/01-leave-env-alone.patch
@@ -0,0 +1,21 @@
+Index: python-dsv-1.4.1/DSV/DSV.py
+===================================================================
+--- python-dsv-1.4.1.orig/DSV/DSV.py	2003-08-09 06:37:32.000000000 -0400
++++ python-dsv-1.4.1/DSV/DSV.py	2010-01-26 20:38:02.000000000 -0500
+@@ -127,11 +127,11 @@
+ import copy
+ import exceptions
+ import string
+-# RedHat 8.0 (or rather GTK2?) sets LANG = en_us.UTF-8 and apparently some
+-# older apps (including wxGTK) can't handle this.  The fix is to set LANG=C
+-# before running the app.  Thanks to Ahmad Baitalmal for supplying this info.
+-import os
+-os.putenv('LANG', 'C')
++## RedHat 8.0 (or rather GTK2?) sets LANG = en_us.UTF-8 and apparently some
++## older apps (including wxGTK) can't handle this.  The fix is to set LANG=C
++## before running the app.  Thanks to Ahmad Baitalmal for supplying this info.
++# import os
++# os.putenv('LANG', 'C')
+ 
+ try:
+     from wxPython import wx, grid
diff --git a/patches/02-wx-namespace-transition.patch b/patches/02-wx-namespace-transition.patch
new file mode 100644
index 0000000..c4b819f
--- /dev/null
+++ b/patches/02-wx-namespace-transition.patch
@@ -0,0 +1,435 @@
+Index: python-dsv-1.4.1/DSV/DSV.py
+===================================================================
+--- python-dsv-1.4.1.orig/DSV/DSV.py	2010-01-26 20:35:23.000000000 -0500
++++ python-dsv-1.4.1/DSV/DSV.py	2010-01-26 20:37:59.000000000 -0500
+@@ -2,6 +2,9 @@
+ DSV.py - Cliff Wells, 2002
+   Import/export DSV (delimiter separated values, a generalization of CSV).
+ 
++2007-01-09: Modified by Joe Pham <djpham at bitpim.org> to accommodate
++            wxPython 2.8+
++
+ Basic use:
+ 
+    from DSV import DSV
+@@ -133,8 +136,14 @@
+ # import os
+ # os.putenv('LANG', 'C')
+ 
++##try:
++##    from wxPython import wx, grid
++##except ImportError:
++##    wx = None
++
+ try:
+-    from wxPython import wx, grid
++    import wx
++    import wx.grid as gridlib
+ except ImportError:
+     wx = None
+ 
+@@ -625,19 +634,19 @@
+ 
+ if wx is not None:
+     # ------------------------------------------------------------------------------
+-    class ImportWizardPanel_Delimiters(wx.wxPanel):
++    class ImportWizardPanel_Delimiters(wx.Panel):
+         """
+         CLASS(SUPERCLASS):
+-          ImportWizardPanel_Delimiters(wx.wxPanel)
++          ImportWizardPanel_Delimiters(wx.Panel)
+         DESCRIPTION:
+-          A wx.wxPanel that provides a basic interface for validating and changing the
++          A wx.Panel that provides a basic interface for validating and changing the
+           parameters for importing a delimited text file. Similar to MS Excel's
+           CSV import wizard. Can be used in a series of wizards or embedded in an
+           application.
+         PROTOTYPE:
+           ImportWizardPanel_Delimiters(parent, id, file, data, isValidCallback = None,
+-                                       pos = wx.wxDefaultPosition, size = wx.wxDefaultSize,
+-                                       style = wx.wxTAB_TRAVERSAL, name = 'ImportWizardPanel')
++                                       pos = wx.DefaultPosition, size = wx.DefaultSize,
++                                       style = wx.TAB_TRAVERSAL, name = 'ImportWizardPanel')
+         ARGUMENTS:
+           - parent is the parent window
+           - id is the id of this wizard panel
+@@ -657,24 +666,24 @@
+         """
+ 
+         def __init__(self, parent, id, file, data, isValidCallback = None,
+-                     pos = wx.wxDefaultPosition, size = wx.wxDefaultSize,
+-                     style = wx.wxTAB_TRAVERSAL, name = "ImportWizardPanel"):
+-            wx.wxPanel.__init__(self, parent, id, pos, size, style, name)
+-            self.SetAutoLayout(wx.true)
+-            mainSizer = wx.wxFlexGridSizer(3, 1)
++                     pos = wx.DefaultPosition, size = wx.DefaultSize,
++                     style = wx.TAB_TRAVERSAL, name = "ImportWizardPanel"):
++            wx.Panel.__init__(self, parent, id, pos, size, style, name)
++            self.SetAutoLayout(True)
++            mainSizer = wx.FlexGridSizer(3, 1)
+             self.SetSizer(mainSizer)
+             mainSizer.AddGrowableCol(0)
+ 
+-            self.initialized = wx.false
++            self.initialized = False
+             self.data = data
+             self.isValidCallback = isValidCallback
+             self.Validate = (isValidCallback and self.Validate) or self.BuildPreview
+ 
+-            dlg = wx.wxProgressDialog("Import Wizard",
++            dlg = wx.ProgressDialog("Import Wizard",
+                                    "Analyzing %s... Please wait." % file,
+                                    3,
+                                    parent,
+-                                   wx.wxPD_APP_MODAL | wx.wxPD_AUTO_HIDE)
++                                   wx.PD_APP_MODAL | wx.PD_AUTO_HIDE)
+             textQualifier = guessTextQualifier(data)
+             dlg.Update(1)
+             newdata = organizeIntoLines(data, textQualifier = textQualifier, limit = 100)
+@@ -686,13 +695,13 @@
+             # -------------
+             msg = ("This screen lets you set the delimiters your data contains.\n"
+                    "You can see how your data is affected in the preview below.")
+-            message1 = wx.wxStaticText(self, -1, msg)
++            message1 = wx.StaticText(self, -1, msg)
+ 
+             # -------------
+-            delimiterBox = wx.wxBoxSizer(wx.wxHORIZONTAL)
+-            delimStaticBox = wx.wxStaticBox(self, -1, "Delimiters")
+-            delimStaticSizer = wx.wxStaticBoxSizer(delimStaticBox, wx.wxVERTICAL)
+-            delimGridSizer = wx.wxFlexGridSizer(2, 3)
++            delimiterBox = wx.BoxSizer(wx.HORIZONTAL)
++            delimStaticBox = wx.StaticBox(self, -1, "Delimiters")
++            delimStaticSizer = wx.StaticBoxSizer(delimStaticBox, wx.VERTICAL)
++            delimGridSizer = wx.FlexGridSizer(2, 3)
+ 
+             delims = {
+                 'Tab':       '\t',
+@@ -704,36 +713,36 @@
+             self.delimChecks = {}
+ 
+             for label, value in delims.items():
+-                self.delimChecks[value] = wx.wxCheckBox(self, -1, label)
+-                delimGridSizer.Add(self.delimChecks[value], 0, wx.wxALL, 3)
++                self.delimChecks[value] = wx.CheckBox(self, -1, label)
++                delimGridSizer.Add(self.delimChecks[value], 0, wx.ALL, 3)
+                 wx.EVT_CHECKBOX(self, self.delimChecks[value].GetId(), self.Validate)
+ 
+-            otherSizer = wx.wxBoxSizer(wx.wxHORIZONTAL)
++            otherSizer = wx.BoxSizer(wx.HORIZONTAL)
+ 
+-            self.delimChecks['Other'] = wx.wxCheckBox(self, -1, 'Other:')
++            self.delimChecks['Other'] = wx.CheckBox(self, -1, 'Other:')
+             wx.EVT_CHECKBOX(self, self.delimChecks['Other'].GetId(), self.Validate)
+ 
+-            self.otherDelim = wx.wxTextCtrl(self, -1, size = (20, -1))
++            self.otherDelim = wx.TextCtrl(self, -1, size = (20, -1))
+             wx.EVT_TEXT(self, self.otherDelim.GetId(), self.OnCustomDelim)
+ 
+             if self.delimChecks.has_key(delimiter):
+-                self.delimChecks[delimiter].SetValue(wx.true)
++                self.delimChecks[delimiter].SetValue(True)
+             elif delimiter is not None:
+-                self.delimChecks['Other'].SetValue(wx.true)
++                self.delimChecks['Other'].SetValue(True)
+                 self.otherDelim.SetValue(delimiter)
+ 
+             otherSizer.AddMany([
+-                (self.delimChecks['Other'], 0, wx.wxALL, 3),
+-                (self.otherDelim, 0, wx.wxALIGN_CENTER),
++                (self.delimChecks['Other'], 0, wx.ALL, 3),
++                (self.otherDelim, 0, wx.ALIGN_CENTER),
+                 ])
+             
+             delimGridSizer.Add(otherSizer)
+-            delimStaticSizer.Add(delimGridSizer, 1, wx.wxEXPAND)
+-            delimOtherSizer = wx.wxBoxSizer(wx.wxVERTICAL)
+-            self.consecutiveDelimsAs1 = wx.wxCheckBox(self, -1, "Treat consecutive delimiters as one")
+-            self.consecutiveDelimsAs1.Enable(wx.false)
+-            tqSizer = wx.wxBoxSizer(wx.wxHORIZONTAL)
+-            self.textQualifierChoice = wx.wxChoice(self, -1, choices = ['"', "'", "{None}"])
++            delimStaticSizer.Add(delimGridSizer, 1, wx.EXPAND)
++            delimOtherSizer = wx.BoxSizer(wx.VERTICAL)
++            self.consecutiveDelimsAs1 = wx.CheckBox(self, -1, "Treat consecutive delimiters as one")
++            self.consecutiveDelimsAs1.Enable(False)
++            tqSizer = wx.BoxSizer(wx.HORIZONTAL)
++            self.textQualifierChoice = wx.Choice(self, -1, choices = ['"', "'", "{None}"])
+             wx.EVT_CHOICE(self, self.textQualifierChoice.GetId(), self.BuildPreview)
+             if textQualifier is not None:
+                 self.textQualifierChoice.SetStringSelection(textQualifier)
+@@ -741,52 +750,52 @@
+                 self.textQualifierChoice.SetStringSelection('{None}')
+                 
+             tqSizer.AddMany([
+-                (wx.wxStaticText(self, -1, "Text qualifier:"), 0, wx.wxALIGN_RIGHT | wx.wxALIGN_CENTER_VERTICAL),
+-                (self.textQualifierChoice, 0, wx.wxALL | wx.wxALIGN_LEFT | wx.wxALIGN_CENTER_VERTICAL, 5),
++                (wx.StaticText(self, -1, "Text qualifier:"), 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL),
++                (self.textQualifierChoice, 0, wx.ALL | wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL, 5),
+                 ])
+             
+             delimOtherSizer.AddMany([
+-                (self.consecutiveDelimsAs1, 1, wx.wxEXPAND | wx.wxALL, 5),
+-                (tqSizer, 1, wx.wxALL | wx.wxALIGN_CENTER, 5),
++                (self.consecutiveDelimsAs1, 1, wx.EXPAND | wx.ALL, 5),
++                (tqSizer, 1, wx.ALL | wx.ALIGN_CENTER, 5),
+                 ])
+ 
+             delimiterBox.AddMany([
+-                (delimStaticSizer, 0, wx.wxALIGN_CENTER),
+-                (delimOtherSizer,  0, wx.wxALIGN_CENTER),
++                (delimStaticSizer, 0, wx.ALIGN_CENTER),
++                (delimOtherSizer,  0, wx.ALIGN_CENTER),
+                 ])
+             
+             delimStaticBox.Fit()
+ 
+             # -------------
+             self.displayRows = 6
+-            previewSettingsBox = wx.wxBoxSizer(wx.wxHORIZONTAL)
+-            self.hasHeaderRow = wx.wxCheckBox(self, -1, "First row is header")
++            previewSettingsBox = wx.BoxSizer(wx.HORIZONTAL)
++            self.hasHeaderRow = wx.CheckBox(self, -1, "First row is header")
+             wx.EVT_CHECKBOX(self, self.hasHeaderRow.GetId(), self.BuildPreview)
+ 
+-            if wx.wxPlatform in ('__WX.WXGTK__', '__WX.WXMSW__'):
+-                # wx.wxSpinCtrl causes seg fault under GTK when <enter> is hit in text - use wx.wxSpinButton instead
+-                self.previewRowsText = wx.wxTextCtrl(self, -1, str(self.displayRows),
+-                                                  size = (30, -1), style = wx.wxTE_PROCESS_ENTER)
++            if wx.Platform in ('__WX.WXGTK__', '__WX.WXMSW__'):
++                # wx.SpinCtrl causes seg fault under GTK when <enter> is hit in text - use wx.SpinButton instead
++                self.previewRowsText = wx.TextCtrl(self, -1, str(self.displayRows),
++                                                  size = (30, -1), style = wx.TE_PROCESS_ENTER)
+                 h = self.previewRowsText.GetSize().height
+-                self.previewRows = wx.wxSpinButton(self, -1, size = (-1, h), style = wx.wxSP_VERTICAL)
++                self.previewRows = wx.SpinButton(self, -1, size = (-1, h), style = wx.SP_VERTICAL)
+                 self.previewRows.SetRange(self.displayRows, 100)
+                 self.previewRows.SetValue(self.displayRows)
+                 wx.EVT_SPIN(self, self.previewRows.GetId(), self.OnSpinPreviewRows)
+                 wx.EVT_TEXT_ENTER(self, self.previewRowsText.GetId(), self.OnTextPreviewRows)
+             else:
+-                self.previewRows = wx.wxSpinCtrl(self, -1, str(self.displayRows),
++                self.previewRows = wx.SpinCtrl(self, -1, str(self.displayRows),
+                                               min = self.displayRows, max = 100, size = (50, -1))
+                 wx.EVT_SPINCTRL(self, self.previewRows.GetId(), self.BuildPreview)
+ 
+             previewSettingsBox.AddMany([
+-                (self.hasHeaderRow, 1, wx.wxALL | wx.wxEXPAND, 5),
+-                (wx.wxStaticText(self, -1, "Preview"), 0, wx.wxWEST | wx.wxALIGN_RIGHT | wx.wxALIGN_CENTER_VERTICAL, 10),
++                (self.hasHeaderRow, 1, wx.ALL | wx.EXPAND, 5),
++                (wx.StaticText(self, -1, "Preview"), 0, wx.WEST | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 10),
+                 ])
+-            if wx.wxPlatform in ('__WX.WXGTK__', '__WX.WXMSW__'):
+-                previewSettingsBox.Add(self.previewRowsText, 0, wx.wxALIGN_CENTER | wx.wxALL, 3)
++            if wx.Platform in ('__WX.WXGTK__', '__WX.WXMSW__'):
++                previewSettingsBox.Add(self.previewRowsText, 0, wx.ALIGN_CENTER | wx.ALL, 3)
+             previewSettingsBox.AddMany([
+-                (self.previewRows, 0, wx.wxALIGN_CENTER | wx.wxALL, 3),
+-                (wx.wxStaticText(self, -1, "rows"), 0, wx.wxALIGN_RIGHT | wx.wxALIGN_CENTER_VERTICAL),
++                (self.previewRows, 0, wx.ALIGN_CENTER | wx.ALL, 3),
++                (wx.StaticText(self, -1, "rows"), 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL),
+                 ])
+ 
+             # -------------
+@@ -804,28 +813,28 @@
+                 hasHeaders = 0
+                 cols = 1
+ 
+-            previewStaticBox = wx.wxStaticBox(self, -1, "Data Preview")
+-            previewStaticSizer = wx.wxStaticBoxSizer(previewStaticBox, wx.wxVERTICAL)
+-            self.preview = grid.wxGrid(self, -1)
++            previewStaticBox = wx.StaticBox(self, -1, "Data Preview")
++            previewStaticSizer = wx.StaticBoxSizer(previewStaticBox, wx.VERTICAL)
++            self.preview = gridlib.Grid(self, -1)
+             self.preview.CreateGrid(self.displayRows, cols)
+-            self.preview.SetDefaultRowSize(self.preview.GetCharHeight() + 4, wx.true)
+-            self.preview.EnableEditing(wx.false)
++            self.preview.SetDefaultRowSize(self.preview.GetCharHeight() + 4, True)
++            self.preview.EnableEditing(False)
+             self.preview.SetColLabelSize(0)
+             self.preview.SetRowLabelSize(0)
+             self.preview.SetMargins(1, 0)
+-            self.initialized = wx.true
++            self.initialized = True
+             self.BuildPreview()
+ 
+             rowheight = self.preview.GetRowSize(0) + 2
+             self.preview.SetSize((-1, rowheight * self.displayRows))
+-            previewStaticSizer.Add(self.preview, 0, wx.wxALL | wx.wxEXPAND, 5)
++            previewStaticSizer.Add(self.preview, 0, wx.ALL | wx.EXPAND, 5)
+ 
+             # -------------
+             mainSizer.AddMany([
+-                (message1,     0, wx.wxALL, 5),
+-                (delimiterBox, 0, wx.wxALL, 5),
+-                (previewSettingsBox, 0, wx.wxALL, 5),
+-                (previewStaticSizer, 0, wx.wxALL | wx.wxEXPAND, 5),
++                (message1,     0, wx.ALL, 5),
++                (delimiterBox, 0, wx.ALL, 5),
++                (previewSettingsBox, 0, wx.ALL, 5),
++                (previewStaticSizer, 0, wx.ALL | wx.EXPAND, 5),
+                 ])
+ 
+             self.Layout()
+@@ -855,9 +864,9 @@
+             if not self.initialized:
+                 return # got triggered before initialization was completed
+ 
+-            if wx.wxPlatform != '__WX.WXGTK__':
+-                wx.wxBeginBusyCursor() # causes a spurious spin event under GTK
+-            wx.wxYield() # allow controls to update first, in case of slow preview
++            if wx.Platform != '__WX.WXGTK__':
++                wx.BeginBusyCursor() # causes a spurious spin event under GTK
++            wx.Yield() # allow controls to update first, in case of slow preview
+             self.preview.BeginBatch()
+             self.preview.DeleteCols(0, self.preview.GetNumberCols())
+             self.preview.DeleteRows(0, self.preview.GetNumberRows())
+@@ -892,7 +901,7 @@
+                 for col in range(cols):
+                     try:    self.preview.SetColLabelValue(col, str(previewData[0][col]))
+                     except: self.preview.SetColLabelValue(col, "")
+-                # self.preview.AutoSizeColumns(wx.true) # size columns to headers
++                # self.preview.AutoSizeColumns(True) # size columns to headers
+             else:
+                 self.preview.SetColLabelSize(0)
+ 
+@@ -902,13 +911,13 @@
+                     except: pass
+ 
+             # if not hasHeaders:
+-            self.preview.AutoSizeColumns(wx.true) # size columns to data
++            self.preview.AutoSizeColumns(True) # size columns to data
+ 
+             rowheight = self.preview.GetRowSize(0)
+             self.preview.SetRowSize(0, rowheight)
+             self.preview.EndBatch()
+-            if wx.wxPlatform != '__WX.WXGTK__':
+-                wx.wxEndBusyCursor()
++            if wx.Platform != '__WX.WXGTK__':
++                wx.EndBusyCursor()
+ 
+             self.delimiters = delimiter
+             self.textQualifier = textQualifier
+@@ -928,17 +937,17 @@
+             return self.hasHeaders
+ 
+     # ------------------------------------------------------------------------------        
+-    class ImportWizardDialog(wx.wxDialog):
++    class ImportWizardDialog(wx.Dialog):
+         """
+         CLASS(SUPERCLASS):
+-          ImportWizardDialog(wx.wxDialog)
++          ImportWizardDialog(wx.Dialog)
+         DESCRIPTION:
+           A dialog allowing the user to preview and change the options for importing
+           a file.
+         PROTOTYPE:
+           ImportWizardDialog(parent, id, title, file,
+-                             pos = wx.wxDefaultPosition, size = wx.wxDefaultSize,
+-                             style = wx.wxDEFAULT_DIALOG_STYLE, name = 'ImportWizardDialog')
++                             pos = wx.DefaultPosition, size = wx.DefaultSize,
++                             style = wx.DEFAULT_DIALOG_STYLE, name = 'ImportWizardDialog')
+         ARGUMENTS:
+           - parent: the parent window
+           - id: the id of this window
+@@ -955,22 +964,22 @@
+         """
+ 
+         def __init__(self, parent, id, title, file,
+-                     pos = wx.wxDefaultPosition, size = wx.wxDefaultSize,
+-                     style = wx.wxDEFAULT_DIALOG_STYLE, name = "ImportWizardDialog"):
+-            wx.wxDialog.__init__(self, parent, id, title, pos, size, style, name)
+-            self.SetAutoLayout(wx.true)
++                     pos = wx.DefaultPosition, size = wx.DefaultSize,
++                     style = wx.DEFAULT_DIALOG_STYLE, name = "ImportWizardDialog"):
++            wx.Dialog.__init__(self, parent, id, title, pos, size, style, name)
++            self.SetAutoLayout(True)
+ 
+             self.file = file
+             f = open(file, 'r')
+             self.data = f.read()
+             f.close()
+ 
+-            sizer = wx.wxBoxSizer(wx.wxVERTICAL)
++            sizer = wx.BoxSizer(wx.VERTICAL)
+             self.delimPanel = ImportWizardPanel_Delimiters(self, -1, file, self.data, self.ValidState)
+             buttonBox = self.ButtonBox()
+             sizer.AddMany([
+-                (self.delimPanel, 0, wx.wxALL, 5),
+-                (buttonBox, 0, wx.wxSOUTH | wx.wxALIGN_CENTER_HORIZONTAL | wx.wxALIGN_TOP, 0),
++                (self.delimPanel, 0, wx.ALL, 5),
++                (buttonBox, 0, wx.SOUTH | wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_TOP, 0),
+                 ])
+ 
+             self.SetSizer(sizer)
+@@ -980,15 +989,15 @@
+             self.Centre()
+ 
+         def ButtonBox(self):
+-            panel = wx.wxPanel(self, -1)
+-            panel.SetAutoLayout(wx.true)
+-            sizer = wx.wxBoxSizer(wx.wxHORIZONTAL)
++            panel = wx.Panel(self, -1)
++            panel.SetAutoLayout(True)
++            sizer = wx.BoxSizer(wx.HORIZONTAL)
+             panel.SetSizer(sizer)
+-            self.ok = wx.wxButton(panel, wx.wxID_OK, "Ok")
+-            cancel = wx.wxButton(panel, wx.wxID_CANCEL, "Cancel")
++            self.ok = wx.Button(panel, wx.ID_OK, "Ok")
++            cancel = wx.Button(panel, wx.ID_CANCEL, "Cancel")
+             sizer.AddMany([
+-                (self.ok, 0, wx.wxALIGN_TOP | wx.wxEAST | wx.wxSOUTH, 10),
+-                (cancel, 0, wx.wxALIGN_TOP | wx.wxWEST | wx.wxSOUTH, 10),
++                (self.ok, 0, wx.ALIGN_TOP | wx.EAST | wx.SOUTH, 10),
++                (cancel, 0, wx.ALIGN_TOP | wx.WEST | wx.SOUTH, 10),
+                 ])
+             panel.Layout()
+             panel.Fit()
+@@ -1002,11 +1011,11 @@
+         def ImportData(self, errorHandler = skipRow):
+             delimiters, qualifier, hasHeaders = self.GetImportInfo()
+             self.data = organizeIntoLines(self.data, textQualifier = qualifier)
+-            dlg = wx.wxProgressDialog("Import DSV File",
++            dlg = wx.ProgressDialog("Import DSV File",
+                                    self.file,
+                                    100,
+                                    self,
+-                                   wx.wxPD_CAN_ABORT | wx.wxPD_APP_MODAL | wx.wxPD_AUTO_HIDE)
++                                   wx.PD_CAN_ABORT | wx.PD_APP_MODAL | wx.PD_AUTO_HIDE)
+             self.data = importDSV(self.data,
+                                   delimiter = delimiters,
+                                   textQualifier = qualifier,
+@@ -1034,12 +1043,12 @@
+ 
+ 
+     def demo():
+-        class SampleApp(wx.wxApp):
++        class SampleApp(wx.App):
+             def OnInit(self):
+-                dlg = wx.wxFileDialog(None, "Choose a file", ".", "",
++                dlg = wx.FileDialog(None, "Choose a file", ".", "",
+                                    "CSV files (*.csv)|*.csv|Text files (*.txt)|*.txt|All files (*.*)|*.*",
+-                                   wx.wxOPEN)
+-                if dlg.ShowModal() == wx.wxID_OK:
++                                   wx.OPEN)
++                if dlg.ShowModal() == wx.ID_OK:
+                     path = dlg.GetPath()
+                     dlg.Destroy()
+ 
+@@ -1049,7 +1058,7 @@
+                         file.write("LINE %d: %s\n" % (linenumber, oldrow))
+ 
+                     dlg = ImportWizardDialog(None, -1, 'CSV Import Wizard (v.%s)' % __version__, path)
+-                    if dlg.ShowModal() == wx.wxID_OK:
++                    if dlg.ShowModal() == wx.ID_OK:
+                         results = dlg.ImportData(errorHandler = logErrors)
+                         dlg.Destroy()
+                         errorLog.close()
+@@ -1074,7 +1083,7 @@
+                 else:
+                     dlg.Destroy()
+ 
+-                return wx.true
++                return True
+ 
+         app = SampleApp()
+         app.MainLoop()
diff --git a/patches/03-avoid-unicoditis.patch b/patches/03-avoid-unicoditis.patch
new file mode 100644
index 0000000..39faebe
--- /dev/null
+++ b/patches/03-avoid-unicoditis.patch
@@ -0,0 +1,21 @@
+Index: python-dsv-1.4.1/DSV/DSV.py
+===================================================================
+--- python-dsv-1.4.1.orig/DSV/DSV.py	2010-01-26 20:35:23.000000000 -0500
++++ python-dsv-1.4.1/DSV/DSV.py	2010-01-26 20:35:23.000000000 -0500
+@@ -486,8 +486,14 @@
+       list of lists of data
+     """
+     if type(input) != type([]):
+-        raise InvalidData, "expected list of lists of strings"  
+-    if type(delimiter) != type('') or not delimiter:
++        raise InvalidData, "expected list of lists of strings"
++    # Try to convert Unicode delimiters back to ASCII (wxPython can be
++    # overenthusiastic), but ultimately support either.
++    try:
++        delimiter = delimiter.encode()
++    except:
++        pass
++    if (type(delimiter) != str and type(delimiter) != unicode) or not delimiter:
+         raise InvalidDelimiter, `delimiter`
+ 
+ ##    if textQualifier:
diff --git a/patches/04-wx3.0-compat.patch b/patches/04-wx3.0-compat.patch
new file mode 100644
index 0000000..c5ed573
--- /dev/null
+++ b/patches/04-wx3.0-compat.patch
@@ -0,0 +1,21 @@
+--- a/DSV/DSV.py
++++ b/DSV/DSV.py
+@@ -676,7 +676,7 @@ if wx is not None:
+                      style = wx.TAB_TRAVERSAL, name = "ImportWizardPanel"):
+             wx.Panel.__init__(self, parent, id, pos, size, style, name)
+             self.SetAutoLayout(True)
+-            mainSizer = wx.FlexGridSizer(3, 1)
++            mainSizer = wx.FlexGridSizer(4, 1)
+             self.SetSizer(mainSizer)
+             mainSizer.AddGrowableCol(0)
+ 
+@@ -1089,7 +1089,8 @@ if __name__ == '__main__':
+                 else:
+                     dlg.Destroy()
+ 
+-                return True
++                # return True
++                sys.exit()
+ 
+         app = SampleApp()
+         app.MainLoop()
diff --git a/patches/series b/patches/series
new file mode 100644
index 0000000..eb38fd3
--- /dev/null
+++ b/patches/series
@@ -0,0 +1,4 @@
+01-leave-env-alone.patch -p1
+02-wx-namespace-transition.patch -p1
+03-avoid-unicoditis.patch -p1
+04-wx3.0-compat.patch
diff --git a/rules b/rules
new file mode 100755
index 0000000..18bcae9
--- /dev/null
+++ b/rules
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+%:
+	dh $@ --with python2
diff --git a/source/format b/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/watch b/watch
new file mode 100644
index 0000000..f53aa3b
--- /dev/null
+++ b/watch
@@ -0,0 +1,3 @@
+# See uscan(1) for format
+version=3
+http://sf.net/python-dsv/DSV-(.*)\.tar\.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-dsv.git



More information about the Python-modules-commits mailing list