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.

Title: BytesWarning is missing from the documents
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: benjamin.peterson, cocoatomo, docs@python, martin.panter, methane, r.david.murray, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2017-04-22 03:49 by cocoatomo, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1249 merged cocoatomo, 2017-04-22 03:57
PR 12738 merged methane, 2019-04-09 06:33
PR 12739 merged methane, 2019-04-09 07:08
Messages (9)
msg292099 - (view) Author: Tomohiko Kinebuchi (cocoatomo) * Date: 2017-04-22 03:49
In Python 2.6, BytesWarning was added, but a description of that warning is missing from the document, library/exceptions.rst.
msg292101 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-04-22 04:41
BytesWarning should be added in the table in warnings.rst (and check that all other built-in warning categories are in this table). It is worth to mention the -b option.

And I think the docstring of BytesWarning should be corrected. "Unicode" should be used rather that "str" since str and bytes is the same in 2.7.
msg292145 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2017-04-23 01:13
Issue 11681 is already open for the -b option, with a patch in progress.

If updating the doc string, also change “buffer” to “bytearray”. This is what “bytearray” was originally called in Python 3, and “buffer” is something different in Python 2.
msg339701 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-04-09 05:43
New changeset d012d64b6a513e760abb6745f7f7ce5e6a31f274 by Inada Naoki (cocoatomo) in branch '2.7':
bpo-30134: add an explanation of BytesWarning (GH-1249)
msg339704 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-04-09 05:59
This PR was not ready to merge. Please address my and Martin's comments.
msg339707 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-04-09 06:31
I addressed Martin's comment (buffer -> bytesarray).
But I missed your point, sorry.
msg339708 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-04-09 07:00
New changeset 87ed1beb3e15c619f25b9a9308d1ec35659feffd by Inada Naoki in branch '2.7':
bpo-30134: add BytesWarning in warnings.rst (GH-12738)
msg339713 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-04-09 08:16
In 2.7 BytesWarning is emitted only on comparison between bytearray and unicode. All descriptions and comments should be corrected.
msg339741 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-04-09 12:49
New changeset 4e8e8aabc6e6ae1c989ef288be7bddfdbbc3187d by Inada Naoki in branch '2.7':
bpo-30134: fix BytesWarning doc, docstring and message (GH-12739)
Date User Action Args
2022-04-11 14:58:45adminsetgithub: 74320
2019-04-09 12:50:05methanesetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-04-09 12:49:52methanesetmessages: + msg339741
2019-04-09 08:16:18serhiy.storchakasetmessages: + msg339713
2019-04-09 07:08:44methanesetpull_requests: + pull_request12661
2019-04-09 07:00:55methanesetmessages: + msg339708
2019-04-09 06:33:32methanesetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request12660
2019-04-09 06:31:56methanesetmessages: + msg339707
2019-04-09 06:00:16serhiy.storchakasetstatus: closed -> open
resolution: fixed -> (no value)
stage: resolved -> needs patch
2019-04-09 05:59:24serhiy.storchakasetmessages: + msg339704
2019-04-09 05:43:23methanesetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-04-09 05:43:14methanesetnosy: + methane
messages: + msg339701
2017-04-23 01:13:15martin.pantersetnosy: + martin.panter
messages: + msg292145
2017-04-22 04:41:59serhiy.storchakasetnosy: + serhiy.storchaka, r.david.murray, benjamin.peterson
messages: + msg292101

type: enhancement
stage: patch review
2017-04-22 03:57:05cocoatomosetpull_requests: + pull_request1365
2017-04-22 03:49:31cocoatomocreate