[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-12-01 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: Tested locally on Win10 pro, and both suggestions of steve.dower worked. I've put a PR (https://github.com/python/cpython/pull/17435) based on his second suggestion. The rationale being that that way, the format function (zip/bztar/etc) will get

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-12-01 Thread Bruno P. Kinoshita
Change by Bruno P. Kinoshita : -- keywords: +patch, patch pull_requests: +16914, 16915 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17435 ___ Python tracker <https://bugs.python.org/issu

[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-12-01 Thread Bruno P. Kinoshita
Change by Bruno P. Kinoshita : -- keywords: +patch pull_requests: +16914 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17435 ___ Python tracker <https://bugs.python.org/issu

[issue38868] Shutil cannot delete a folder that contains an .ini file

2019-12-01 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: I think eryksun is correct. Reproduced it locally. Setting to read-only initially did not raise the issue, but then as administrator I removed the inherited permissions and set it to read-only for my user, then it raised the exact same WinError 5

[issue38720] Logging failure with timestamp messages

2019-12-01 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: I think this needs a script to reproduce the problem. Tested first with Anaconda Python 3.7.1 on Win10 Pro. Not able to reproduce the issue. Smae with the latest version. Using Python master and Win10Pro and timezone set to NZ (not that really matter

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-26 Thread Bruno P. Kinoshita
Change by Bruno P. Kinoshita : -- pull_requests: +16878 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/17397 ___ Python tracker <https://bugs.python.org/issu

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-21 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: Done. Rebased on master too, and edited commit message & GH PR title. Thanks Giampaolo! -- ___ Python tracker <https://bugs.python.org/iss

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-21 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: I really liked that improvement, and didn't think it needed to be removed. That's why the PR reverts it partially. I think the os.stat improvements were in the other methods changed, and should not be changed in my PR - unless I changed it b

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-21 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: Hi Giampaolo, I think it is more or less the same as the previous code, which was using os.list to return a list in memory. My first tentative fix was: def copytree(src, ...): entries = os.list(src) return _copytree(entries=entries

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-09 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: Hi, I did a quick `git bisect` using the example provided, and looks like this regression was added in the fix for bpo-33695, commit 19c46a4c96553b2a8390bf8a0e138f2b23e28ed6. It looks to me that the iterator returned by with os.scandir(...) is

[issue38688] Python 3.8 regression: endless loop in shutil.copytree

2019-11-09 Thread Bruno P. Kinoshita
Change by Bruno P. Kinoshita : -- keywords: +patch pull_requests: +16604 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17098 ___ Python tracker <https://bugs.python.org/issu

[issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s

2019-11-09 Thread Bruno P. Kinoshita
Change by Bruno P. Kinoshita : -- pull_requests: +16605 pull_request: https://github.com/python/cpython/pull/17098 ___ Python tracker <https://bugs.python.org/issue33

[issue37647] Wrong lineno in traceback when formatting strings with % and multilines

2019-07-22 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: Hi, Thanks for the explanation. Could you elaborate a bit on this one: >In Python 3.8 the traceback points to the start of the subexpression that >raises an exception. Just wanted to understand why I get the desired line number when I call Z()._

[issue37647] Wrong lineno in traceback when formatting strings with % and multilines

2019-07-21 Thread Bruno P. Kinoshita
Bruno P. Kinoshita added the comment: Hi Ammar, thanks for the quick reply and for the suggestion. Tried on the latest version on master, and looks like it's indeed different, though still looks like it is displaying the wrong line number. ``` kinow@localhost:~/Development/python/work

[issue37647] Wrong lineno in traceback when formatting strings with % and multilines

2019-07-21 Thread Bruno P. Kinoshita
New submission from Bruno P. Kinoshita : Hi, Tested on Python 3.7 on Ubuntu LTS. But I believe this affects previous versions too, as found it from an issue posted in Jinja2 in 2013: https://github.com/pallets/jinja/issues/276 This code simulates the issue where the traceback has the wrong