python / python/cpython

io.BytesIO.truncate does not work as advertised

Open
#71,448 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

stdlib topic-IO type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
Avg merge
1d 9h
Merged PRs (30d)
558

Description

BPO 27261
Nosy @avassalotti, @vadmium, @serhiy-storchaka, @swarmer, @zhangyangyu, @teythoon, @tirkarthi

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 = None
created_at = <Date 2016-06-07.20:52:57.361>
labels = ['type-bug', 'library', 'expert-IO']
title = 'io.BytesIO.truncate does not work as advertised'
updated_at = <Date 2018-10-12.10:55:18.233>
user = 'https://github.com/teythoon'

bugs.python.org fields:

activity = <Date 2018-10-12.10:55:18.233>
actor = 'anton.barkovsky'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)', 'IO']
creation = <Date 2016-06-07.20:52:57.361>
creator = 'justus.winter'
dependencies = []
files = []
hgrepos = []
issue_num = 27261
keywords = []
message_count = 5.0
messages = ['267748', '267758', '267765', '267848', '327578']
nosy_count = 7.0
nosy_names = ['alexandre.vassalotti', 'martin.panter', 'serhiy.storchaka', 'anton.barkovsky', 'xiang.zhang', 'justus.winter', 'xtreak']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue27261'
versions = ['Python 2.7', 'Python 3.5', 'Python 3.6']

Linked PRs
  • gh-152252

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the io.BytesIO.truncate entry point and the documentation describing its advertised behavior. Inspect linked PR gh-152252 and compare its changes with the reported discrepancy; done means the implementation matches the documented behavior and regression coverage verifies it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.