
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2012-12-05 19:34 byserhiy.storchaka, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue16620.diff | berker.peksag,2013-02-27 15:04 | review | ||
| msilib_no_glob1.patch | serhiy.storchaka,2016-01-02 15:51 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg177001 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2012-12-05 19:34 | |
Private function glob.glob1() used inLib/msilib andTools/msi to prevent unexpected globbing in parent directory name. ``glob.glob1(dirname, pattern)`` should be replaced by ``glob.glob(os.path.join(fnmatch.escape(dirname), pattern)`` in external code. | |||
| msg183433 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2013-03-04 12:04 | |
I have added some comments on Rietveld.Note that glob.glob() and glob.glob1() returns different filenames. The first returns full paths and the second returns bare filenames without a directory path. Workarounding this may require more in-depth changes to the code.Actually this is a low priority issue. It is no so bad to use private functions from other modules inside Python stdlib. But it can be a bad example for a third party code. | |||
| msg222921 -(view) | Author: Mark Lawrence (BreamoreBoy)* | Date: 2014-07-13 12:33 | |
Just a reminder that there are comments on Rietveld. | |||
| msg223005 -(view) | Author: Raymond Hettinger (rhettinger)*![]() | Date: 2014-07-14 09:01 | |
Martin, this patch touches some of your code. Do you care to take a look at it? | |||
| msg257348 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-01-02 15:51 | |
For now there is only one place left that uses glob1(). Here is a patch that inlines glob1() in that place. | |||
| msg257349 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-01-02 15:54 | |
The patch forissue25596 removes glob1(), so we should get rid of its usage. | |||
| msg258541 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-01-18 19:53 | |
It looks to me that the glob() method of msilib.Directory is broken from the born. It uses the function from the glob module, but the glob module is not imported in this source file.Even if add missed import, returned value is incorrect in Python 3. In Python 2 glob.glob1() always returned a list, but in in Python 3 it can return an empty list or an iterator. After iterating on it msilib.Directory returns an empty list or exhausted iterator. | |||
| msg258585 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-01-19 12:10 | |
New changeset652a50208e89 by Serhiy Storchaka in branch '3.5':Issue#16620: Fixed AttributeError in msilib.Directory.glob().https://hg.python.org/cpython/rev/652a50208e89New changeset158ae15f5809 by Serhiy Storchaka in branch '2.7':Issue#16620: Fixed AttributeError in msilib.Directory.glob().https://hg.python.org/cpython/rev/158ae15f5809New changeset84a50f14a266 by Serhiy Storchaka in branch 'default':Issue#16620: Fixed AttributeError in msilib.Directory.glob().https://hg.python.org/cpython/rev/84a50f14a266New changesetf2586c381b0b by Serhiy Storchaka in branch 'default':Issue#16620: Got rid of using undocumented function glob.glob1().https://hg.python.org/cpython/rev/f2586c381b0b | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:39 | admin | set | github: 60824 |
| 2016-01-19 12:11:07 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2016-01-19 12:10:42 | python-dev | set | nosy: +python-dev messages: +msg258585 |
| 2016-01-19 09:43:32 | BreamoreBoy | set | nosy: -BreamoreBoy |
| 2016-01-18 19:53:09 | serhiy.storchaka | set | type: enhancement -> behavior messages: +msg258541 versions: + Python 2.7, Python 3.5 |
| 2016-01-02 15:54:04 | serhiy.storchaka | set | priority: low -> normal messages: +msg257349 |
| 2016-01-02 15:52:32 | serhiy.storchaka | link | issue25596 dependencies |
| 2016-01-02 15:51:35 | serhiy.storchaka | set | files: +msilib_no_glob1.patch versions: + Python 3.6, - Python 3.5 messages: +msg257348 components: - Demos and Tools, Windows stage: needs patch -> patch review |
| 2016-01-02 15:24:23 | serhiy.storchaka | set | assignee:loewis ->serhiy.storchaka |
| 2015-04-28 02:59:23 | BreamoreBoy | set | nosy: +steve.dower |
| 2014-07-14 09:01:56 | rhettinger | set | assignee:loewis messages: +msg223005 nosy: +loewis,rhettinger |
| 2014-07-13 12:33:08 | BreamoreBoy | set | nosy: +BreamoreBoy messages: +msg222921 versions: + Python 3.5, - Python 3.4 |
| 2013-03-04 12:04:33 | serhiy.storchaka | set | priority: normal -> low messages: +msg183433 components: + Windows |
| 2013-02-27 15:04:58 | berker.peksag | set | files: +issue16620.diff nosy: +berker.peksag keywords: +patch |
| 2012-12-05 19:35:28 | serhiy.storchaka | set | dependencies: +Add a function to escape metacharacters in glob/fnmatch |
| 2012-12-05 19:34:09 | serhiy.storchaka | create | |