This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年05月25日 16:16 by larry, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| larry.deprecate.target_is_directory.1.diff | larry, 2012年06月24日 05:46 | First patch implementing this. | review | |
| Messages (6) | |||
|---|---|---|---|
| msg161587 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2012年05月25日 16:16 | |
The prototype for os.symlink on Windows adds a "target_is_directory" flag, which indicates whether or not the destination is a directory. Surely we could detect that and pass in the correct value ourselves? A quick GetFileAttributes() call would do. I doubt this would make the function much slower, as it's about to write to that area of the disk anyway. And if os.symlink is a performance-critical function on Windows I'll eat my hat. Since os.symlink support for Windows shipped in 3.2, we can't get rid of the argument at the same time. But we could just ignore it, and since it's marked as optional people could start removing it, and maybe we could deprecate it. |
|||
| msg163716 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2012年06月24日 05:46 | |
Patch attached. Implementation now uses GetFileAttributes (A or W) to determine whether or not src is a directory. Fixed docstring, docs, and updated Misc/NEWS. |
|||
| msg163717 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2012年06月24日 06:00 | |
Note: I can't test this, as I only run Windows XP. But it compiles cleanly on Windows, and on Linux it compiles and passes the test suite fine. |
|||
| msg163777 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2012年06月24日 11:40 | |
Martin: does this sound good or bad? |
|||
| msg163779 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年06月24日 11:46 | |
Uh. This was *removed* in a7406565ef1c :) See issue13772. |
|||
| msg163781 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2012年06月24日 11:51 | |
Well then! Let's close this before the adults notice. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:30 | admin | set | github: 59122 |
| 2012年06月24日 11:51:35 | larry | set | status: open -> closed resolution: wont fix messages: + msg163781 stage: patch review -> resolved |
| 2012年06月24日 11:46:49 | pitrou | set | nosy:
+ pitrou messages: + msg163779 |
| 2012年06月24日 11:40:42 | larry | set | nosy:
+ loewis messages: + msg163777 |
| 2012年06月24日 06:00:03 | larry | set | messages: + msg163717 |
| 2012年06月24日 05:46:38 | larry | set | files:
+ larry.deprecate.target_is_directory.1.diff assignee: larry keywords: + patch nosy: + mhammond messages: + msg163716 stage: needs patch -> patch review |
| 2012年05月25日 16:16:00 | larry | create | |