[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-10-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset e0b61b28641bdd20cfeff6d9878f1318b711ca19 by Pablo Galindo (Miss Islington (bot)) in branch '3.10': bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28508)

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 09390c837a0bf73e213db2fbde34d756fa77a837 by Miss Islington (bot) in branch '3.9': bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28507)

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 41d48bc038b254cc4a78a2d840097196b9545a84 by Miss Islington (bot) in branch '3.10': bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28508)

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +26903 pull_request: https://github.com/python/cpython/pull/28507 ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +26905 pull_request: https://github.com/python/cpython/pull/28508 ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b7eac52b466f697d3e89f47508e0df0196a98970 by andrei kulakov in branch 'main': bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421)

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-17 Thread Alex Grund
Alex Grund added the comment: The changelog wrongfully links to https://bugs.python.org/issue41928 instead of this issue. Also the fix introduced a regression: Trying to copy a directory now raises a FileNotFoundError -- nosy: +Alex Grund ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: Thanks for reporting Jakub, and for patching Gregory! -- ___ Python tracker ___ ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread miss-islington
miss-islington added the comment: New changeset 574da4633b44b4048f74c93da496ed2a3ead99dd by Miss Islington (bot) in branch '3.10': [3.10] bpo-43219: skip Solaris in the test as well (GH-27257) (GH-27268) https://github.com/python/cpython/commit/574da4633b44b4048f74c93da496ed2a3ead99dd

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread miss-islington
miss-islington added the comment: New changeset dae4928dd07109db69e090b1c8193a023ce695cd by Miss Islington (bot) in branch '3.9': [3.9] bpo-43219: skip Solaris in the test as well (GH-27257) (GH-27267) https://github.com/python/cpython/commit/dae4928dd07109db69e090b1c8193a023ce695cd

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +25812 pull_request: https://github.com/python/cpython/pull/27268 ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 6564656495d456a1bcc1aaa06abfc696209f37b2 by Jakub Kulík in branch 'main': bpo-43219: skip Solaris in the test as well (GH-27257) https://github.com/python/cpython/commit/6564656495d456a1bcc1aaa06abfc696209f37b2 --

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +25811 pull_request: https://github.com/python/cpython/pull/27267 ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread Jakub Kulik
Change by Jakub Kulik : -- pull_requests: +25802 pull_request: https://github.com/python/cpython/pull/27257 ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-20 Thread Jakub Kulik
Jakub Kulik added the comment: On Solaris (I checked this on Oracle and SmartOS), the error is: NotADirectoryError: [Errno 20] Not a directory: 'not_a_dir/' which I think belongs to the 'errors are not confusing' category with Windows and macOS. -- nosy: +kulikjak

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-10 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-09 Thread miss-islington
miss-islington added the comment: New changeset c89f0b2587eb0b16175a0bbb12d0b86314ff9320 by Miss Islington (bot) in branch '3.9': [3.9] bpo-43219: shutil.copyfile, raise a less confusing exception instead of IsADirectoryError (GH-27049) (GH-27082)

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-09 Thread miss-islington
miss-islington added the comment: New changeset 1577259cc51d0d46ad676798ce0a130039acf956 by Miss Islington (bot) in branch '3.10': bpo-43219: shutil.copyfile, raise a less confusing exception instead of IsADirectoryError (GH-27049)

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 248173cc0483a9ad9261353302f1234cf9eb2ebe by andrei kulakov in branch 'main': bpo-43219: shutil.copyfile, raise a less confusing exception instead of IsADirectoryError (GH-27049)

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-09 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +25630 pull_request: https://github.com/python/cpython/pull/27081 ___ Python tracker

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +25631 pull_request: https://github.com/python/cpython/pull/27082 ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-08 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith versions: +Python 3.11 -Python 3.8 ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-07 Thread Andrei Kulakov
Andrei Kulakov added the comment: Note that someone else ran into this confusion here: https://bugs.python.org/issue43153 . -- ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-06 Thread Andrei Kulakov
Andrei Kulakov added the comment: I'm not sure if shutil module docs should be updated or not, as this change applies to a narrow corner case. -- ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-06 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've opened the PR here: https://github.com/python/cpython/pull/27049/files .. but can someone trigger builds for other OSes like Aix, FreeBSD, etc? I'm not sure what errors they would use for this case so the unit test may have to be updated to skip some

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-06 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch nosy: +andrei.avk nosy_count: 2.0 -> 3.0 pull_requests: +25605 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27049 ___ Python tracker

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-02-16 Thread Eryk Sun
Eryk Sun added the comment: I left this open in case someone wants to modify shutil.copy() and shutil.copy2() to raise a less misleading exception when `dst` names a non-existing directory such as 'not_a_dir/'. Failing with IsADirectoryError (errno EISDIR) is confusing since shutil.copy()

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-02-13 Thread Eryk Sun
Eryk Sun added the comment: > IsADirectoryError: [Errno 21] Is a directory: 'not_a_dir/' The trailing slash forces the OS to handle "not_a_dir" as a directory [1]. A pathname that contains at least one non- character and that ends with one or more trailing characters shall not be

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-02-13 Thread Jeremy Pinto
Jeremy Pinto added the comment: In fact, the issue seems to be coming from open() itself when opening a non-existent directory in write mode: [nav] In [1]: import os ...: nonexixstent_dir = 'not_a_dir/' ...: assert not os.path.exists(nonexixstent_dir) ...: with

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-02-13 Thread Jeremy Pinto
New submission from Jeremy Pinto : Issue: If you try to copy a file to a directory that doesn't exist using shutil.copy, a IsADirectory error is raised saying the directory exists. This issue is actually caused when `open(not_a_dir, 'wb') is called on a non-existing dir. Expected