Issue 1102: Add support for _msi.Record.GetString() and _msi.Record.GetInteger() (original) (raw)

Created on 2007-09-04 21:01 by atuining, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
_msi.patch.txt atuining,2008-10-20 18:47 Patch to fix fetching from views
_msi_fetch.patch.txt atuining,2012-03-12 17:52 Simplified patch for fixing fetching from views (against 2.7.2)
Pull Requests
URL Status Linked Edit
PR 4459 merged berker.peksag,2017-11-19 06:51
PR 4520 merged berker.peksag,2017-11-23 13:22
Messages (16)
msg55644 - (view) Author: Anthony Tuininga (atuining) * Date: 2007-09-04 21:06
Attached is a patch that adds the requested support. This is in relation to the thread at http://www.gossamer-threads.com/lists/python/python/584264 In addition to the two methods I also "fixed" Fetch() by ensuring that when the records are exhausted None is returned instead of an error. If something further is required of me or I submitted this patch incorrectly, please let me know so I don't screw it up next time. :-)
msg67691 - (view) Author: Anthony Tuininga (atuining) * Date: 2008-06-04 13:56
This patch appears to be mostly duplicated by patch 2125 which has been accepted. Would it be helpful if I separated out the parts that have now been accepted?
msg67694 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-06-04 18:47
Yes, please do provide an updated patch.
msg75000 - (view) Author: Anthony Tuininga (atuining) * Date: 2008-10-20 18:47
With apologies for the delay, I have modified the patch to remove the stuff that has been added already. Some of the other changes are to make use of new C API functionality but they can be ignored, if desired. The changes that are relevant are in the view_fetch() routine. Again, if you have questions, let me know.
msg138211 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-06-12 18:46
Martin, would this go in a bugfix release or is it a new feature for 3.3 only?
msg138212 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2011-06-12 18:52
I lost track what problem precisely this patch solves, so it's hard to tell whether it's a bug fix or not.
msg155456 - (view) Author: Anthony Tuininga (atuining) * Date: 2012-03-12 17:52
All, I have trimmed this patch down to the bare minimum required to solve this problem. Please review this as I would dearly love to have this committed. The error received without this patch is MSIError: unknown error 103 This occurs when there are no more records to fetch from the view. The patch simply returns None when there are no more records to fetch -- similar to what is done by the DB API.
msg220649 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-15 16:23
Can someone review the latest patch please as it's only five additional lines of C code.
msg225877 - (view) Author: Anthony Tuininga (atuining) * Date: 2014-08-25 15:02
I note that this patch has still not been accepted! Please let me know what needs to be done. I just tried against Python 3.4 and the patch works as expected -- other than the starting line number is now 715. I have signed the contributor agreement if that is what is holding things up.
msg226053 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-08-29 05:51
Sorry, I have no familiarity with msilib, _msi, or the internals of MSIs in general. The patch looks reasonably harmless to me, but I don't have the confidence to take responsibility for it.
msg306498 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-11-19 06:56
I've opened PR 4459 to fix this. Here's a simple reproducer I adapted from the script uploaded by uday kiran in issue 32064.
msg306814 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-11-23 12:47
New changeset bdb8315c21825487b54852ff0511fb4881ea2181 by Berker Peksag in branch 'master': bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459) https://github.com/python/cpython/commit/bdb8315c21825487b54852ff0511fb4881ea2181
msg306816 - (view) Author: uday kiran (uday kiran) * Date: 2017-11-23 13:23
Will it be added to 3.6 also? And when it will be available in the windows installations you release?
msg306817 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-11-23 13:27
> Will it be added to 3.6 also? Yes, I've created a backport PR: PR 4520 > And when it will be available in the windows installations you release? The dates for 3.6.4 release is listed at https://www.python.org/dev/peps/pep-0494/#id4
msg306821 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-11-23 14:33
New changeset 4b3042900e7e8dc120408bab86642c09c9d25a5a by Berker Peksag in branch '3.6': bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459) https://github.com/python/cpython/commit/4b3042900e7e8dc120408bab86642c09c9d25a5a
msg306822 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-11-23 14:34
Thank you, Anthony. I added a test case and committed your patch to 3.6 and master branches.
History
Date User Action Args
2022-04-11 14:56:26 admin set github: 45443
2017-11-23 14:34:19 berker.peksag set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2017-11-23 14:33:14 berker.peksag set messages: +
2017-11-23 13:27:30 berker.peksag set messages: +
2017-11-23 13:23:58 uday kiran set messages: +
2017-11-23 13:22:18 berker.peksag set stage: backport needed -> patch reviewpull_requests: + <pull%5Frequest4457>
2017-11-23 12:48:15 berker.peksag set stage: patch review -> backport neededversions: - Python 2.7
2017-11-23 12:47:35 berker.peksag set messages: +
2017-11-19 13:54:54 BreamoreBoy set nosy: - BreamoreBoy
2017-11-19 06:56:35 berker.peksag set nosy: + berker.peksag, uday kiranmessages: + versions: + Python 3.6, Python 3.7, - Python 3.4, Python 3.5
2017-11-19 06:51:48 berker.peksag link issue32064 superseder
2017-11-19 06:51:01 berker.peksag set keywords: + patchpull_requests: + <pull%5Frequest4396>
2017-02-01 19:34:04 berker.peksag link issue29364 superseder
2014-08-29 05:51:17 zach.ware set messages: +
2014-08-25 15:02:23 atuining set messages: +
2014-06-15 18:24:49 terry.reedy set nosy: - terry.reedy
2014-06-15 16:23:35 BreamoreBoy set nosy: + BreamoreBoy, zach.ware, steve.dowermessages: + versions: + Python 3.4, Python 3.5, - Python 3.2, Python 3.3
2012-03-12 17:52:23 atuining set files: + _msi_fetch.patch.txtmessages: +
2011-06-12 18:52:16 loewis set messages: +
2011-06-12 18:46:08 terry.reedy set nosy: + terry.reedymessages: + versions: + Python 3.3, - Python 3.1
2010-08-16 16:17:20 tim.golden set nosy: + tim.goldencomponents: + Windows
2010-08-16 16:14:17 BreamoreBoy set stage: patch reviewtype: behaviorversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
2008-10-20 21:33:21 loewis set priority: normal -> high
2008-10-20 18:47:46 atuining set files: + _msi.patch.txtmessages: + versions: + Python 2.6, - Python 2.5
2008-10-20 18:45:10 atuining set files: - _msi.patch.txt
2008-06-04 18:47:53 loewis set messages: +
2008-06-04 13:56:21 atuining set messages: +
2007-09-17 08:08:43 jafo set priority: normal
2007-09-04 21:35:57 loewis set assignee: loewisnosy: + loewis
2007-09-04 21:10:28 atuining set type: behavior -> (no value)
2007-09-04 21:06:50 atuining set files: + _msi.patch.txtnosy: + atuiningmessages: +
2007-09-04 21:01:54 atuining create