Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • pygolang pygolang
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • pygolangpygolang
  • Repository

Switch branch/tag
  • pygolang
  • golang
  • golang_str_test.py
Find file BlameHistoryPermalink
  • Kirill Smelkov's avatar
    golang_str: Fix bstr.decode to handle 'string-escape' codec properly · cd632a66
    Kirill Smelkov authored May 01, 2023
    On py2 str.decode('string-escape') returns str, not unicode and this
    property is actually being used and relied upon by Lib/pickle.py:
    
    https://github.com/python/cpython/blob/v2.7.18-0-g8d21aa21f2c/Lib/pickle.py#L967-L977
    
    We promised bstr to be drop-in replacement for str on py2, so let's
    adjust its behaviour to match the original because if we do not,
    unpickling strings will break when str is replaced by bstr under
    gpython.
    
    Do not add bstr.encode yet until we hit a real case where it is actually used.
    cd632a66

Replace golang_str_test.py

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7