bpo-31854: Added mmap.ACCESS_DEFAULT to namespace.#4093
bpo-31854: Added mmap.ACCESS_DEFAULT to namespace.#4093vstinner merged 1 commit intopython:masterfrom jusjusjus:add-enhancment-31854
Conversation
|
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! |
vstinner
left a comment
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I don't understand "Add ... to namespace": which namespace?
I propose to rephase the NEWS entry as: "Add mmap.ACCESS_DEFAULT constant."
|
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 |
|
Thanks for making the requested changes! @Haypo: please review the changes made to this pull request. |
vstinner
left a comment
There was a problem hiding this comment.
LGTM, thanks. It's perfect with the documentation update ;-)
This request adds
mmap.ACCESS_DEFAULTinto the namespace. Accessing the default value might be necessary, if one needs to overwrite anACCESSkeyword 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 trackenum access_mode.https://bugs.python.org/issue31854