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.stat on osx 10.5 or later doesn't expose all fields in struct stat #52249

Closed
ronaldoussoren opened this issue Feb 23, 2010 · 2 comments
Closed
Assignees
Labels
extension-modules C modules in the Modules dir OS-mac type-bug An unexpected behavior, bug, or error

Comments

@ronaldoussoren
Copy link
Contributor

BPO 8001
Nosy @ronaldoussoren

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 = 'https://github.com/ronaldoussoren'
closed_at = <Date 2010-04-18.19:33:42.171>
created_at = <Date 2010-02-23.15:19:47.108>
labels = ['extension-modules', 'OS-mac', 'type-bug']
title = "os.stat on osx 10.5 or later doesn't expose all fields in struct stat"
updated_at = <Date 2010-04-18.19:33:42.170>
user = 'https://github.com/ronaldoussoren'

bugs.python.org fields:

activity = <Date 2010-04-18.19:33:42.170>
actor = 'ronaldoussoren'
assignee = 'ronaldoussoren'
closed = True
closed_date = <Date 2010-04-18.19:33:42.171>
closer = 'ronaldoussoren'
components = ['Extension Modules', 'macOS']
creation = <Date 2010-02-23.15:19:47.108>
creator = 'ronaldoussoren'
dependencies = []
files = []
hgrepos = []
issue_num = 8001
keywords = []
message_count = 2.0
messages = ['99924', '103522']
nosy_count = 1.0
nosy_names = ['ronaldoussoren']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = 'needs patch'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue8001'
versions = ['Python 2.7', 'Python 3.2']

@ronaldoussoren
Copy link
Contributor Author

The stat implementation on osx 10.5 or later can provide additional fields beyond the tradional unix ones (such as "st_birthtimespec"). Those are by default only available when using 'stat64' instead of the regular stat, but that can be changed using a preprocessor define.

The additional fields are not yet present in the python wrapper (posix.stat) and are apparently useful (according to a mail exchange on the python-nl mailinglist).

It should be possible to add the additional fields in the struct-view of the statresults object without affecting existing code and other platforms. Care should be taken to still enabling building a binary on 10.5 that works on 10.4 (where the stat64 function is not present).

@ronaldoussoren ronaldoussoren self-assigned this Feb 23, 2010
@ronaldoussoren ronaldoussoren added extension-modules C modules in the Modules dir OS-mac type-bug An unexpected behavior, bug, or error labels Feb 23, 2010
@ronaldoussoren
Copy link
Contributor Author

Fixing this requires duplicating a significant amount of code in posixmodule.c and is imho not worth the effort.

@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
extension-modules C modules in the Modules dir OS-mac type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant