[issue45616] Python Launcher Matches 3.10 instead of 3.1
Yu Liu added the comment: Had a quick look at the launcher file. Maybe something like this? diff --git a/PC/launcher.c b/PC/launcher.c index fbfb49a..a965a9d 100644 --- a/PC/launcher.c +++ b/PC/launcher.c @@ -542,7 +542,7 @@ find_python_by_version(wchar_t const * wanted_ver) } for (i = 0; i < num_installed_pythons; i++, ip++) { n = wcslen(ip->version); -if (n > wlen) +if (n != wlen) n = wlen; if ((wcsncmp(ip->version, wanted_ver, n) == 0) && /* bits == 0 => don't care */ -- nosy: +yuliu2016 ___ Python tracker <https://bugs.python.org/issue45616> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45616] Python Launcher Matches 3.10 instead of 3.1
Yu Liu added the comment: Had a quick look in the launcher file. Maybe something like this? diff --git a/PC/launcher.c b/PC/launcher.c index fbfb49a..a965a9d 100644 --- a/PC/launcher.c +++ b/PC/launcher.c @@ -542,7 +542,7 @@ find_python_by_version(wchar_t const * wanted_ver) } for (i = 0; i < num_installed_pythons; i++, ip++) { n = wcslen(ip->version); -if (n > wlen) +if (n != wlen) n = wlen; if ((wcsncmp(ip->version, wanted_ver, n) == 0) && /* bits == 0 => don't care */ -- nosy: +yuliu2016 ___ Python tracker <https://bugs.python.org/issue45616> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33240] shutil.rmtree fails when the inner floder is opened in Explorer on Windows
Yu Liu <neophyl...@gmail.com> added the comment: These are results on another slower machine. Note these results are attained on Windows 10, while the above on Windows 7. Just in case it has some influence. $ python test.py num_retries: 6 wait_time: 0.0008691726957804373 $ python test.py num_retries: 3 wait_time: 0.0007175661796639806 $ python test.py num_retries: 6 wait_time: 0.0007962191842657514 $ python test.py num_retries: 3 wait_time: 0.0006970480045504753 $ python test.py num_retries: 4 wait_time: 0.0009637842810260455 $ python test.py num_retries: 4 wait_time: 0.001005390580561765 $ python test.py num_retries: 3 wait_time: 0.000654301806397339 $ python test.py num_retries: 6 wait_time: 0.0008857012257329832 $ python test.py num_retries: 4 wait_time: 0.0009227479307990348 $ python test.py num_retries: 4 wait_time: 0.0008976701612158615 And this is result without `bar` opened in Explorer. $ python test.py num_retries: 0 wait_time: 0.00019834235943055225 -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33240> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33240] shutil.rmtree fails when the inner floder is opened in Explorer on Windows
Yu Liu <neophyl...@gmail.com> added the comment: This time I run it a couple of consecutive times manually. The result shows that the first time it retried 12 times and the wait time was 0.0004259171330071893. Then it seems to be steady, and the num_retried is 3 or 4, and the wait_time is about 0.00025. I also run it without `bar` opened in Explorer. The num_retried is 0 and the wait_time is 4.46745114706336e-05. Because of some reasons, I can't post the exact results here. I will run it on another computer later and post the results if you need all of the exact results. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33240> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33240] shutil.rmtree fails when the inner floder is opened in Explorer on Windows
Yu Liu <neophyl...@gmail.com> added the comment: The result is 0.00026412295632975946 on my computer. Does this mean it is caused by an anti-malware program? -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33240> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33240] shutil.rmtree fails when the inner floder is opened in Explorer on Windows
New submission from Yu Liu <neophyl...@gmail.com>: Given the following directory structure on a Windows machine: - foo - bar a call to `shutil.rmtree("foo")` will fail when the inner folder `bar` is opened in an Explorer. The error message indicates the `foo` directory is not empty, while after the execution, although it failed, the `foo` directory is empty. So the inner folder `bar` was removed successfully, but `foo` was not. And the error message is misleading. It will not fail when `foo` is opened in an Explorer, neither on Linux system. -- components: Library (Lib), Windows messages: 315077 nosy: giampaolo.rodola, paul.moore, philius, steve.dower, tarek, tim.golden, zach.ware priority: normal severity: normal status: open title: shutil.rmtree fails when the inner floder is opened in Explorer on Windows type: behavior versions: Python 3.6 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33240> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com