Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-111835: Add seekable method to mmap.mmap#111852

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
corona10 merged 17 commits intopython:mainfromcorona10:gh-111835
Nov 9, 2023

Conversation

corona10
Copy link
Member

@corona10corona10 commentedNov 8, 2023
edited by bedevere-appbot
Loading

technillogue reacted with heart emoji
@corona10
Copy link
MemberAuthor

corona10 commentedNov 8, 2023
edited
Loading

@serhiy-storchaka cc@vstinner
As the issue reporter said, they can use seekable by subclassing mmap itself.
But this change definitely helpful to people who need to use library which checks that the file object supports seekable() method.
(I don't want to say it must be added but it is good to be added)

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.

@serhiy-storchaka
Copy link
Member

mmap.seek() always return None. It can makemmap not appropriate substitution for files. Addingseekable() method can break existing code.

corona10 reacted with thumbs up emoji

@corona10
Copy link
MemberAuthor

mmap.seek() always return None. It can make mmap not appropriate substitution for files. Adding seekable() method can break existing code.

I left a comment for this.
#111835 (comment)
But I'm not sure how it will break the user's code even if we update seek() to return the current position.
I can not guess how people are doing something with None value.

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.

@corona10corona10 merged commit6046aec intopython:mainNov 9, 2023
@corona10
Copy link
MemberAuthor

@serhiy-storchaka@vstinner
Thank you for the reviews!!

vstinner reacted with hooray emoji

@corona10corona10 deleted the gh-111835 branchNovember 9, 2023 11:13
aisk pushed a commit to aisk/cpython that referenced this pull requestFeb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@vstinnervstinnervstinner approved these changes

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@corona10@serhiy-storchaka@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp