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

os.lstat/os.stat/os.fstat don't set st_dev (st_rdev) on Windows #54866

Closed
ocean-city mannequin opened this issue Dec 9, 2010 · 3 comments
Closed

os.lstat/os.stat/os.fstat don't set st_dev (st_rdev) on Windows #54866

ocean-city mannequin opened this issue Dec 9, 2010 · 3 comments

Comments

@ocean-city
Copy link
Mannequin

ocean-city mannequin commented Dec 9, 2010

BPO 10657
Nosy @briancurtin, @serhiy-storchaka
Superseder
  • bpo-11939: Implement stat.st_dev and os.path.samefile on windows
  • Files
  • py3k_add_st_dev_and_st_rdev.patch
  • 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-12-31.17:52:19.737>
    created_at = <Date 2010-12-09.08:28:30.183>
    labels = ['OS-windows']
    title = "os.lstat/os.stat/os.fstat don't set st_dev (st_rdev) on Windows"
    updated_at = <Date 2012-12-31.18:00:04.839>
    user = 'https://bugs.python.org/ocean-city'

    bugs.python.org fields:

    activity = <Date 2012-12-31.18:00:04.839>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-12-31.17:52:19.737>
    closer = 'brian.curtin'
    components = ['Windows']
    creation = <Date 2010-12-09.08:28:30.183>
    creator = 'ocean-city'
    dependencies = []
    files = ['19984']
    hgrepos = []
    issue_num = 10657
    keywords = ['patch']
    message_count = 3.0
    messages = ['123673', '178702', '178711']
    nosy_count = 4.0
    nosy_names = ['ocean-city', 'brian.curtin', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '11939'
    type = None
    url = 'https://bugs.python.org/issue10657'
    versions = ['Python 3.2', 'Python 3.3']

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Dec 9, 2010

    I noticed st_dev is not set yet. Attached patch
    fill this value, but sometimes it becomes negative
    value because dwVolumeSerialNumber is large enough.
    Maybe st_dev should be declared as unsigned int.

    # I think this is not new feature. Just bug. So I think
    # this can go into python3.2.

    @ocean-city ocean-city mannequin added the OS-windows label Dec 9, 2010
    @serhiy-storchaka
    Copy link
    Member

    This was implemented in bpo-11939 for Python 3.4 only.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 31, 2012

    New changeset 3738d270c54a by Brian Curtin in branch 'default':
    st_dev/st_rdev should be unsigned long as dwVolumeSerialNumber, which it is set to, is a DWORD. This was fixed in bpo-11939 and the overflow was mentioned in bpo-10657 and seen by me on some machines.
    http://hg.python.org/cpython/rev/3738d270c54a

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants