Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 8 x64 - IO-Error #60150

Closed
cmikula mannequin opened this issue Sep 15, 2012 · 5 comments
Closed

Windows 8 x64 - IO-Error #60150

cmikula mannequin opened this issue Sep 15, 2012 · 5 comments
Labels
OS-windows topic-IO type-bug An unexpected behavior, bug, or error

Comments

@cmikula
Copy link
Mannequin

cmikula mannequin commented Sep 15, 2012

BPO 15946
Nosy @loewis, @tjguk, @bitdancer, @briancurtin
Superseder
  • bpo-7443: test.support.unlink issue on Windows platform
  • Files
  • dir_test.png: image with error message
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-09-15.16:38:31.257>
    created_at = <Date 2012-09-15.12:57:39.845>
    labels = ['type-bug', 'expert-IO', 'OS-windows']
    title = 'Windows 8 x64 - IO-Error'
    updated_at = <Date 2012-09-19.09:32:23.211>
    user = 'https://bugs.python.org/cmikula'

    bugs.python.org fields:

    activity = <Date 2012-09-19.09:32:23.211>
    actor = 'loewis'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-09-15.16:38:31.257>
    closer = 'brian.curtin'
    components = ['Windows', 'IO']
    creation = <Date 2012-09-15.12:57:39.845>
    creator = 'cmikula'
    dependencies = []
    files = ['27193']
    hgrepos = []
    issue_num = 15946
    keywords = []
    message_count = 5.0
    messages = ['170514', '170515', '170517', '170524', '170717']
    nosy_count = 5.0
    nosy_names = ['loewis', 'tim.golden', 'r.david.murray', 'brian.curtin', 'cmikula']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '7443'
    type = 'behavior'
    url = 'https://bugs.python.org/issue15946'
    versions = ['Python 2.6', 'Python 2.7']

    @cmikula
    Copy link
    Mannequin Author

    cmikula mannequin commented Sep 15, 2012

    OS Windows 8 Enterprise x64 clean installed.
    Python Version 2.6.6 and 2.7.3 both x64 installed.

    Problem is to delete one Directory and immediately after create one new with the same Name!

    !!! Code !!!

    import sys, platform, os, shutil

    TEST_PATH = "/test"

    print "platform:\t", platform.platform()
    print "sys.platform:\t", sys.platform
    print "sys.version:\t", sys.version
    print "directory test:\t'%s'" % TEST_PATH
    print

    if os.path.exists(TEST_PATH):
        shutil.rmtree(TEST_PATH)
    if not os.path.exists(TEST_PATH):
        os.makedirs(TEST_PATH)

    print "success"

    !!! End of code !!!

    The error is only present if the Directory was deleted previously.

    Error:
    Traceback (most recent call last):
      File "dir_test.py", line 23, in <module>
        os.makedirs(BUILD_PATH)
      File "C:\Program Files\Python27\lib\os.py", line 157, in makedirs
        mkdir(name, mode)
    WindowsError: [Error 5] Zugriff verweigert: '/test'

    @cmikula cmikula mannequin added OS-windows topic-IO type-crash A hard crash of the interpreter, possibly with a core dump labels Sep 15, 2012
    @bitdancer
    Copy link
    Member

    I believe this is a Windows...feature? We have lots of trouble with this ourselves in the test suite, if I understand correctly.

    @cmikula
    Copy link
    Mannequin Author

    cmikula mannequin commented Sep 15, 2012

    I also think that it is a windows feature! who should report this problem with microsoft?

    @briancurtin
    Copy link
    Member

    I'm not sure Microsoft is going to change anything about this - it has done this for a long time, if not forever. We recently had bpo-15496 receive changes, and bpo-7443 is in the same area and has more details and some patches, so I'd suggest taking up the discussion over there.

    @briancurtin briancurtin added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Sep 15, 2012
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Sep 19, 2012

    I think it should be possible to add a wait=False parameter to rmtree which makes it block until the directory is gone away. This could be similar to the test.support feature added in bpo-15496.

    For compatibility, such a flag should default to False, and users need to be aware that this may block "indefinitely". I'd be opposed to specifying a timeout - users who need that can use the non-blocking version, and then loop themselves (or we expose a separate wait function with a timeout).

    Of course, such a feature could not be added to 2.7.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    OS-windows topic-IO type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants