GeezerVison is showing github.com — gh-142419: Add mmap.set_name method for user custom annotation by corona10 · Pull Request #142480 · python/cpython
Conversation
corona10
commented
Dec 9, 2025
•
edited by github-actions
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
@picnixz: What do you think of not adding cpython:mmap: prefix? set_name("abc") would sets the memory mapping name to [abc].
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Personally, I think we should at least indicate cpython. As I don't have a kernel recent enough, I can't test this, but I guess that seeing "cpython" could help users grepping for whatever is related to cpython. I don't think we really need :mmap though but it could help distinguishing between what's been created from the interpreter directly and what's been created by a direct call to mmap. We could instead have cpython:<name> prefix for the interpreter and cpython:[<name>] for what's being used by mmap.
Is it because you're worried about the allowed length? or something else?
|
corona10 reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Personally, I think we should at least indicate cpython. As I don't have a kernel recent enough, I can't test this, but I guess that seeing "cpython" could help users grepping for whatever is related to cpython. I don't think we really need :mmap though but it could help distinguishing between what's been created from the interpreter directly and what's been created by a direct call to mmap. We could instead have cpython: prefix for the interpreter and cpython:[] for what's being used by mmap.
@vstinner @picnixz
I still prefer to keep the current convention as much as possible. As Bénédikt mentioned, having a common prefix is important for filtering.
Regarding using different conventions for CPython-defined versus user-defined mappings, I would prefer not to introduce additional distinctions that people need to learn or interpret. Keeping things simple and consistent feels more important here.
For that reason, my preference is to maintain the same convention across the board.
If there is no strong objection with this, I hope that I can merge this PR soon.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
Ok, let's add the cpython:mmap: prefix.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Report error to the caller
|
@picnixz I think that we are ready to land this feature :)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|