Skip to content
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

memoryview of bytes is not readonly #46790

Closed
amauryfa opened this issue Apr 3, 2008 · 6 comments
Closed

memoryview of bytes is not readonly #46790

amauryfa opened this issue Apr 3, 2008 · 6 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) release-blocker type-bug An unexpected behavior, bug, or error

Comments

@amauryfa
Copy link
Member

amauryfa commented Apr 3, 2008

BPO 2538
Nosy @theller, @gpshead, @amauryfa, @pitrou, @benjaminp
Files
  • buffer.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-08-02.21:03:18.843>
    created_at = <Date 2008-04-03.00:26:21.768>
    labels = ['interpreter-core', 'type-bug', 'release-blocker']
    title = 'memoryview of bytes is not readonly'
    updated_at = <Date 2008-08-02.21:03:18.842>
    user = 'https://github.com/amauryfa'

    bugs.python.org fields:

    activity = <Date 2008-08-02.21:03:18.842>
    actor = 'pitrou'
    assignee = 'teoliphant'
    closed = True
    closed_date = <Date 2008-08-02.21:03:18.843>
    closer = 'pitrou'
    components = ['Interpreter Core']
    creation = <Date 2008-04-03.00:26:21.768>
    creator = 'amaury.forgeotdarc'
    dependencies = []
    files = ['9929']
    hgrepos = []
    issue_num = 2538
    keywords = ['patch']
    message_count = 6.0
    messages = ['64886', '64964', '65068', '70357', '70390', '70644']
    nosy_count = 7.0
    nosy_names = ['nnorwitz', 'theller', 'gregory.p.smith', 'teoliphant', 'amaury.forgeotdarc', 'pitrou', 'benjamin.peterson']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2538'
    versions = ['Python 3.0']

    @amauryfa
    Copy link
    Member Author

    amauryfa commented Apr 3, 2008

    Bytes should be immutable, but in test_socket.py:
    buf = b" "*1024
    nbytes = self.cli_conn.recv_into(buf)

    This patch attempts to enforce readonly buffer on bytes

    @amauryfa amauryfa added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Apr 3, 2008
    @nnorwitz
    Copy link
    Mannequin

    nnorwitz mannequin commented Apr 5, 2008

    Travis, could you take a look?

    @nnorwitz nnorwitz mannequin assigned teoliphant Apr 5, 2008
    @gpshead
    Copy link
    Member

    gpshead commented Apr 7, 2008

    This patch looks good.

    One question: in Objects/abstract.c in PyBuffer_FillInfo, why is it even
    testing for the PyBUF_LOCK flag at all? PEP-3118 says its valid for
    both reading and writing (if the underlying object supports locked access).

    BTW, I is someone is going to merge any py3k buffer api related changes
    back into the backport that is in 2.6?

    @benjaminp benjaminp added the type-bug An unexpected behavior, bug, or error label May 23, 2008
    @benjaminp
    Copy link
    Contributor

    How's this coming?

    @pitrou
    Copy link
    Member

    pitrou commented Jul 29, 2008

    The patch should probably come with a test :)

    @pitrou
    Copy link
    Member

    pitrou commented Aug 2, 2008

    Fixed in r65420, with a test.

    @pitrou pitrou closed this as completed Aug 2, 2008
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs) release-blocker type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants