GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-111856: fix os.fstat on windows with fat32 and exfat filesystem by aisk · Pull Request #112038 · python/cpython

Conversation

@aisk

@aisk aisk commented Nov 13, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The change is just like #104892.

I think this is hard to test this on GHA, since it needs a disk with fat32 or exfat filesystem. I made a test on my local machine, the drive "E://" is a fat32 filesystem.

Test codes:

import os

f = open("e://a.jpg")
print(os.stat(f.fileno()))
f.close()

Before the comit:

C:\Users\xxxxx\Source\cpython>python a.py
Running Debug|x64 interpreter...
Traceback (most recent call last):
  File "C:\Users\xxxxx\Source\cpython\a.py", line 4, in <module>
    print(os.stat(f.fileno()))
          ^^^^^^^^^^^^^^^^^^^
OSError: [WinError 87] 参数错误。: 3
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='e://a.jpg' mode='r' encoding='cp936'>

After the commit:

C:\Users\xxxxx\Source\cpython>python a.py
Running Debug|x64 interpreter...
os.stat_result(st_mode=33206, st_ino=4194592, st_dev=1548577950, st_nlink=1, st_uid=0, st_gid=0, st_size=2812450, st_atime=1699718400, st_mtime=1673715360, st_ctime=-11644473600)
  • Issue: os.fstat() fails on FAT32 file system on Windows #111856

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aisk
fix os.fstat on windows with fat32 and exfat filesystem
101b49a
@bedevere-app bedevere-app Bot added the awaiting review label Nov 13, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Nov 13, 2023
os.fstat() fails on FAT32 file system on Windows #111856
Closed
@zooba zooba added the needs backport to 3.12 only security fixes label Nov 13, 2023
@zooba
zooba merged commit 29af736 into python:main Nov 13, 2023
@miss-islington-app

miss-islington-app Bot commented Nov 13, 2023

Copy link
Copy Markdown

Thanks @aisk for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting review label Nov 13, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 13, 2023
@aisk @miss-islington
pythongh-111856: Fix os.fstat on windows with FAT32 and exFAT filesys…
41d64a3
…tem (pythonGH-112038)

(cherry picked from commit 29af736)

Co-authored-by: AN Long <[email protected]>
@bedevere-app

bedevere-app Bot commented Nov 13, 2023

Copy link
Copy Markdown

GH-112044 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Nov 13, 2023
zooba pushed a commit that referenced this pull request Nov 13, 2023
@miss-islington @aisk
gh-111856: Fix os.fstat on windows with FAT32 and exFAT filesystem (G…
dfdbfc5
…H-112038)

(cherry picked from commit 29af736)

Co-authored-by: AN Long <[email protected]>
@aisk
aisk deleted the fix-fstat-fat32 branch November 14, 2023 01:19
aisk added a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@aisk
pythongh-111856: Fix os.fstat on windows with FAT32 and exFAT filesys…
ba6d722
…tem (pythonGH-112038)
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@aisk @Glyphack
pythongh-111856: Fix os.fstat on windows with FAT32 and exFAT filesys…
75e2854
…tem (pythonGH-112038)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@aisk @zooba
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.