Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero #71810

Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error
@socketpair

Description

@socketpair
BPO27623
Nosy@mdickinson,@socketpair,@vadmium,@serhiy-storchaka,@Vgr255,@lucasem,@Phaqui
Files
  • int_to_bytes_overflow_1.patch
  • int_to_bytes_overflow_cornercase.patch: Throws OverflowError on (-1).to_bytes(0, 'big', signed=True)
  • int_to_bytes_overflow_cornercase2.patch: (-x).to_bytes(0, 'big', signed=True), x=0 or -1 now throws OverflowError; also updated the tests. They run successfully.
  • 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=Noneclosed_at=Nonecreated_at=<Date2016-07-26.06:26:20.726>labels= ['interpreter-core','type-bug']title='int.to_bytes() and int.from_bytes(): raise ValueError when bytes count is zero'updated_at=<Date2016-07-30.01:21:55.777>user='https://github.com/socketpair'

    bugs.python.org fields:

    activity=<Date2016-07-30.01:21:55.777>actor='martin.panter'assignee='none'closed=Falseclosed_date=Nonecloser=Nonecomponents= ['Interpreter Core']creation=<Date2016-07-26.06:26:20.726>creator='socketpair'dependencies= []files= ['43913','43925','43942']hgrepos= []issue_num=27623keywords= ['patch']message_count=14.0messages= ['271329','271330','271476','271479','271484','271485','271487','271499','271504','271506','271564','271565','271657','271660']nosy_count=7.0nosy_names= ['mark.dickinson','socketpair','martin.panter','serhiy.storchaka','abarry','lucasem','Phaqui']pr_nums= []priority='normal'resolution=Nonestage='patch review'status='open'superseder=Nonetype='behavior'url='https://bugs.python.org/issue27623'versions= ['Python 3.6']

    Linked PRs

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


        [8]ページ先頭

        ©2009-2025 Movatter.jp