This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: TypeErrors not formatting values correctly
Type: behavior Stage: resolved
Components: asyncio, Library (Lib) Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Jim Fasarakis-Hilliard, giampaolo.rodola, josiahcarlson, stutzbach, vstinner, yselivanov
Priority: normal Keywords:

Created on 2017-03-25 21:10 by Jim Fasarakis-Hilliard, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 819 closed Jim Fasarakis-Hilliard, 2017-03-25 22:32
PR 993 merged Jim Fasarakis-Hilliard, 2017-04-04 20:49
PR 2061 merged yselivanov, 2017-06-10 03:17
PR 2060 merged yselivanov, 2017-06-10 03:17
Messages (3)
msg290499 - (view) Author: Jim Fasarakis-Hilliard (Jim Fasarakis-Hilliard) * Date: 2017-03-25 21:10
Specifically, in both Lib/async/proactor_events.py and asynchat.py there's a comma where a % should be thereby not formatting the value correctly:

    TypeError('data argument must be byte-ish (%r)', type(data))
    TypeError('data argument must be byte-ish (%r)', type(data))

proposed fix is to change them to:

    TypeError('data argument must be a bytes-like object, not %r' % type(data).__name__)
    TypeError('data argument must be a bytes-like object, not %r' % type(data).__name__)
msg291134 - (view) Author: Jim Fasarakis-Hilliard (Jim Fasarakis-Hilliard) * Date: 2017-04-04 19:31
As per #issue25002 and, specifically #msg250151, the TypeError in `asynchat` should probably not be included, I'll just make a PR for the TypeError in asyncio/proactor_events
msg295624 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-10 09:00
It seems like the bug has been fixed in all branches, so I close the issue.
History
Date User Action Args
2022-04-11 14:58:44adminsetgithub: 74091
2017-06-10 09:00:18vstinnersetstatus: open -> closed
versions: + Python 3.5, Python 3.6
messages: + msg295624

components: + asyncio
resolution: fixed
stage: resolved
2017-06-10 03:17:59yselivanovsetpull_requests: + pull_request2122
2017-06-10 03:17:51yselivanovsetpull_requests: + pull_request2121
2017-04-04 20:49:58Jim Fasarakis-Hilliardsetpull_requests: + pull_request1166
2017-04-04 19:31:43Jim Fasarakis-Hilliardsetmessages: + msg291134
2017-03-25 22:32:34Jim Fasarakis-Hilliardsetpull_requests: + pull_request725
2017-03-25 21:14:34serhiy.storchakasetnosy: + josiahcarlson, vstinner, giampaolo.rodola, stutzbach, yselivanov
2017-03-25 21:10:20Jim Fasarakis-Hilliardcreate