Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 675
    • Issues 675
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPyPyPy
  • pypypypy
  • Issues
  • #3217
Closed
Open
Issue created Apr 30, 2020 by Michał Górny@mgornyDeveloper

hashlib: update() raises TypeError when given memoryview (e.g. BytesIO)

This is causing problems with csv23 package.

Trivial reproducer:

import hashlib
import io

hashlib.new('sha512').update(io.BytesIO().getbuffer())

Exception:

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    hashlib.new('sha512').update(io.BytesIO().getbuffer())
  File "/usr/lib/pypy3.6/lib_pypy/_hashlib/__init__.py", line 59, in update
    buf = ffi.from_buffer(string)
TypeError: from_buffer() got a 'memoryview' object, which supports the buffer interface but cannot be rendered as a plain raw address on PyPy
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking