Skip to content

bpo-31854: Added mmap.ACCESS_DEFAULT to namespace.#4093

Merged
vstinner merged 1 commit intopython:masterfrom
jusjusjus:add-enhancment-31854
Nov 7, 2017
Merged

bpo-31854: Added mmap.ACCESS_DEFAULT to namespace.#4093
vstinner merged 1 commit intopython:masterfrom
jusjusjus:add-enhancment-31854

Conversation

@jusjusjus
Copy link
Contributor

@jusjusjus jusjusjus commented Oct 23, 2017

This request adds mmap.ACCESS_DEFAULT into the namespace. Accessing the default value might be necessary, if one needs to overwrite an ACCESS keyword argument.

I have that situation in numpy.memap, and currently just overwrite by access=0 (=mmap.ACCESS_DEFAULT) if needed. However, it would be better to track enum access_mode.

https://bugs.python.org/issue31854

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

You have to document the new constant in Doc/library/mmap.rst:

access accepts one of three
values: :const:ACCESS_READ, :const:ACCESS_WRITE, or :const:ACCESS_COPY
to specify read-only, write-through or copy-on-write memory respectively.

Please add this to the doc as well:

... versionchanged:: 3.7
    Added :const:`ACCESS_DEFAULT` constant.

Copy link
Member

Choose a reason for hiding this comment

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

I don't understand "Add ... to namespace": which namespace?

I propose to rephase the NEWS entry as: "Add mmap.ACCESS_DEFAULT constant."

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@jusjusjus
Copy link
Contributor Author

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@Haypo: please review the changes made to this pull request.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM, thanks. It's perfect with the documentation update ;-)

@vstinner vstinner merged commit 5a8a84b into python:master Nov 7, 2017
embray pushed a commit to embray/cpython that referenced this pull request Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants