[issue20486] msilib: can't close opened database

2017-11-07 Thread Berker Peksag

Berker Peksag  added the comment:

Thank you, all. The OP's snippet should work now:

>>> import msilib as m
>>> db = m.OpenDatabase('py33.msi', m.MSIDBOPEN_TRANSACT)
>>> db.Commit()
>>> db2 = m.OpenDatabase('py33.msi', m.MSIDBOPEN_TRANSACT)
Traceback (most recent call last):
  File "", line 1, in 
_msi.MSIError: 1: 2203 2: py33.msi 3: -2147287008
>>> db.Close()
>>> db2 = m.OpenDatabase('py33.msi', m.MSIDBOPEN_TRANSACT)

I didn't backport this to bugfix branches since we added a new public function 
to the API.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2017-11-07 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset a935654f0613640535fbf0ba190f81d02a63d35c by Berker Peksag in 
branch 'master':
bpo-20486: Implement Database.Close() method in msilib (GH-4141)
https://github.com/python/cpython/commit/a935654f0613640535fbf0ba190f81d02a63d35c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2017-10-26 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +4105

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2017-10-26 Thread xoviat

xoviat  added the comment:

Unfortunately, this issue has taken on a much lower importance for me, and
as such, I won't be able to address it. Sorry about that.

2017-10-26 0:01 GMT-05:00 Berker Peksag :

>
> Berker Peksag  added the comment:
>
> xoviat, would you like to send your patch as a pull request on GitHub? It
> would be nice to add a simple test that the new Close() works correctly. I
> can do that if you don't have time, thank you!
>
> Steve, can we apply this to bugfix branches?
>
> --
> versions:  -Python 3.5
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2017-10-25 Thread Berker Peksag

Berker Peksag  added the comment:

xoviat, would you like to send your patch as a pull request on GitHub? It would 
be nice to add a simple test that the new Close() works correctly. I can do 
that if you don't have time, thank you!

Steve, can we apply this to bugfix branches?

--
versions:  -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2016-12-27 Thread 12345 67890

Changes by 12345 67890 :


Removed file: 
http://bugs.python.org/file45971/Add_ability_to_close_MSI_database_.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2016-12-27 Thread 12345 67890

12345 67890 added the comment:

The method is now capitalized. Unfortunately, none of the methods are compliant 
with PEP formatting, but it's far too late to do anything about that.

--
Added file: 
http://bugs.python.org/file46056/Add_ability_to_close_MSI_database_.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2016-12-27 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, 12345. Steve knows better, but I think the method should 
be named "Close" instead of "close" like _msi.View's Close method.

Also, I couldn't apply your patch:

$ hg imp 
http://bugs.python.org/file45971/Add_ability_to_close_MSI_database_.patch
applying 
http://bugs.python.org/file45971/Add_ability_to_close_MSI_database_.patch
unable to find '_msi.c' for patching
patching file _msi.c
2 out of 2 hunks FAILED -- saving rejects to file _msi.c.rej
abort: patch failed to apply

You may want to read https://docs.python.org/devguide/patch.html for details 
about creating a patch.

--
nosy: +berker.peksag
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2016-12-19 Thread 12345 67890

Changes by 12345 67890 :


--
keywords: +patch
Added file: 
http://bugs.python.org/file45971/Add_ability_to_close_MSI_database_.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2016-12-19 Thread 12345 67890

Changes by 12345 67890 :


Removed file: http://bugs.python.org/file45970/_msi.c

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2016-12-19 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2016-12-19 Thread 12345 67890

12345 67890 added the comment:

I will prefix this by saying that I have not contributed to the Python source 
before and this patch is probably wrong, but here is my attempt at a fix.

--
Added file: http://bugs.python.org/file45970/_msi.c

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2016-12-19 Thread Steve Dower

Steve Dower added the comment:

Guessing the msiobj_close function in PC/_msi.c ought to be exposed. 

Patches welcome.

--
keywords: +easy
priority: normal -> low
stage:  -> needs patch
versions: +Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2016-12-19 Thread 12345 67890

12345 67890 added the comment:

This is still present in Python 3.5. There is no way to unlock the MSI file 
without killing the Python process first.

--
nosy: +12345 67890
versions: +Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2015-02-12 Thread Mark Lawrence

Mark Lawrence added the comment:

Sorry folks I can't try this myself as I'm not running 2.7 and I don't know how 
to create the test.msi file.

--
nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20486
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2014-02-02 Thread Игорь Шаула

New submission from Игорь Шаула:

In Python 2.7.6 can't find any way to close MSI database after finish working 
with it.
As a result database is locked and can't be opened by any other application 
until Python process is finished.

import msilib
db = msilib.OpenDatabase('test.msi', msilib.MSIDBOPEN_TRANSACT)
view = db.OpenView(SELECT File, Component_, FileName FROM File)
view.Execute(None)
r1 = view.Fetch()
r1.SetString(3,test.txt)
view.Modify(msilib.MSIMODIFY_UPDATE, r1)
view.Close()
db.Commit()
del db
db2 = msilib.OpenDatabase('test.msi', msilib.MSIDBOPEN_TRANSACT)

MSIError: 1: 2203 2: test.msi 3: -2147287008

--
components: Library (Lib), Windows
messages: 209992
nosy: gentoo90
priority: normal
severity: normal
status: open
title: msilib: can't close opened database
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20486
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20486] msilib: can't close opened database

2014-02-02 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20486
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com