This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: msilib Directory.start_component() fails if keyfile is not None
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.8, Python 3.7, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, john.keeping, loewis, miss-islington, pablogsal, steve.dower
Priority: normal Keywords: patch

Created on 2011-07-25 16:23 by john.keeping, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
msilib.gen_id.patch john.keeping, 2011-07-25 16:23 Patch to fix this issue review
Pull Requests
URL Status Linked Edit
PR 13688 merged ZackerySpytz, 2019-05-30 22:25
PR 13703 closed miss-islington, 2019-05-31 16:43
PR 13704 merged miss-islington, 2019-05-31 16:43
PR 13705 merged miss-islington, 2019-05-31 16:44
Messages (10)
msg141098 - (view) Author: John Keeping (john.keeping) Date: 2011-07-25 16:23
If msilib.Directory.start_component() is called with the keyfile argument not None then it attempts to call self.cab.gen_id(self.absolute, keyfile) but the msilib.CAB.gen_id() method takes only two arguments (not three).
msg235994 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-02-14 22:01
@Steve can you take a look at the patch please, it only changes one line.
msg236009 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-02-14 23:29
I guess it's okay, but I have literally zero knowledge or experience with the msilib module. Martin is still maintainer for that, as far as I know.
msg344089 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-05-31 16:43
New changeset c8d5bf6c3fa09b43f6a5ee779d493d251dbcc53c by Steve Dower (Zackery Spytz) in branch 'master':
bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688)
https://github.com/python/cpython/commit/c8d5bf6c3fa09b43f6a5ee779d493d251dbcc53c
msg344091 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-05-31 16:46
Thanks, Zackery!

The backports are running CI now and should merge if everything passes.
msg344094 - (view) Author: miss-islington (miss-islington) Date: 2019-05-31 17:22
New changeset 49fc57abf5fcf60129e460046d78c9bf20a19931 by Miss Islington (bot) in branch '3.7':
bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688)
https://github.com/python/cpython/commit/49fc57abf5fcf60129e460046d78c9bf20a19931
msg344101 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-05-31 18:43
Looks like the tests need to be customized for 2.7 and 3.6:

Traceback (most recent call last):
  File "D:\a\1\s\lib\test\test_msilib.py", line 64, in test_directory_start_component_keyfile
    self.addCleanup(db.Close)
AttributeError: '_msi.Database' object has no attribute 'Close'

I can edit directly in miss-islington's branch, but what's the change? Do we just remove the addCleanup code? Or should we just skip the backport?
msg344107 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2019-05-31 19:07
Thanks for looking at this issue, Steve.

At this point in time, 3.6 only takes security fixes, so PR 13703 should be closed.

The Close() method was added in 3.7, so I think removing the addCleanup() call is the way to go for 2.7.
msg344136 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-05-31 22:39
New changeset bfc1f605609218b9734d3cf3eab3531a2f4624e1 by Steve Dower (Miss Islington (bot)) in branch '2.7':
[2.7] bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688)
https://github.com/python/cpython/commit/bfc1f605609218b9734d3cf3eab3531a2f4624e1
msg344299 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-06-02 18:05
test_msilib is leaking references https://bugs.python.org/issue37124
History
Date User Action Args
2022-04-11 14:57:20adminsetgithub: 56848
2019-06-02 18:05:40pablogsalsetnosy: + pablogsal
messages: + msg344299
2019-05-31 22:39:58steve.dowersetstatus: open -> closed
resolution: fixed
stage: backport needed -> resolved
2019-05-31 22:39:42steve.dowersetmessages: + msg344136
2019-05-31 19:07:23ZackerySpytzsetmessages: + msg344107
2019-05-31 18:43:25steve.dowersetmessages: + msg344101
2019-05-31 17:22:21miss-islingtonsetnosy: + miss-islington
messages: + msg344094
2019-05-31 16:46:16steve.dowersetmessages: + msg344091
stage: patch review -> backport needed
2019-05-31 16:44:03miss-islingtonsetpull_requests: + pull_request13591
2019-05-31 16:43:55miss-islingtonsetpull_requests: + pull_request13590
2019-05-31 16:43:45miss-islingtonsetpull_requests: + pull_request13589
2019-05-31 16:43:18steve.dowersetmessages: + msg344089
2019-05-30 22:28:45ZackerySpytzsetnosy: + ZackerySpytz

type: behavior
versions: + Python 2.7, Python 3.7, Python 3.8, - Python 3.4, Python 3.5
2019-05-30 22:25:32ZackerySpytzsetstage: patch review
pull_requests: + pull_request13576
2019-03-15 22:59:34BreamoreBoysetnosy: - BreamoreBoy
2015-02-14 23:29:26steve.dowersetmessages: + msg236009
2015-02-14 22:01:45BreamoreBoysetnosy: + BreamoreBoy
messages: + msg235994
2014-06-24 03:09:53BreamoreBoysetnosy: + loewis, steve.dower

versions: + Python 3.5, - Python 2.6, Python 3.1, Python 2.7, Python 3.2, Python 3.3
2011-07-25 16:23:26john.keepingcreate