Skip to content

bpo-29746: Update marshal docs to Python 3. #547

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

Merged

Conversation

serhiy-storchaka
Copy link
Member

No description provided.

@serhiy-storchaka serhiy-storchaka added docs Documentation in the Doc dir needs backport to 3.5 labels Mar 7, 2017
@mention-bot
Copy link

@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kristjanvalur, @vsajip, @benjaminp, @birkenfeld and @tim-one to be potential reviewers.

:func:`open` or :func:`os.popen`. It must be opened in binary mode (``'wb'``
or ``'w+b'``).
file must be an open file object opened in binary mode (``'wb'`` or
``'w+b'``).
Copy link
Member

Choose a reason for hiding this comment

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

Is it restricted to OS files and pipes? If BytesIO and custom objects are also supported, maybe use “binary file” from the glossary:

The file must be an open binary file object, for example as returned by open(. . ., 'wb').

Copy link
Member Author

Choose a reason for hiding this comment

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

I think examples of open modes can be omitted. They are more specific for Python 2 (there is even special C API for FILE*).

Python/marshal.c Outdated
@@ -1810,8 +1809,8 @@ Functions:\n\
\n\
dump() -- write value to a file\n\
load() -- read value from a file\n\
dumps() -- write value to a string\n\
loads() -- read value from a string");
dumps() -- write value to a bytes object\n\
Copy link
Member

Choose a reason for hiding this comment

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

Maybe “marshal value as a bytes object” or “convert value to a bytes object”. Writing to a bytes object sounds like you pass the bytes object in and it is modified.

@serhiy-storchaka serhiy-storchaka merged commit c611a5b into python:master Mar 12, 2017
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Mar 12, 2017
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Mar 12, 2017
@serhiy-storchaka serhiy-storchaka deleted the bpo-29746-marshal-docs-py3 branch March 12, 2017 07:20
serhiy-storchaka added a commit that referenced this pull request Mar 12, 2017
serhiy-storchaka added a commit that referenced this pull request Mar 12, 2017
jaraco pushed a commit that referenced this pull request Dec 2, 2022
Bumps [click](https://github.com/pallets/click) from 8.1.2 to 8.1.3.
- [Release notes](https://github.com/pallets/click/releases)
- [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst)
- [Commits](pallets/click@8.1.2...8.1.3)

---
updated-dependencies:
- dependency-name: click
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants