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.

Author martin.panter
Recipients JohnLeitch, eric.smith, mark.dickinson, martin.panter, python-dev, serhiy.storchaka
Date 2015-11-07.05:35:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446874535.66.0.011996607623.issue24802@psf.upfronthosting.co.za>
In-reply-to
Content
I have committed changes to Python 3. The compile() test now exists as test_compile.TestSpecifics.test_null_terminated.

Serhiy: You set these bugs for Python 2 as well. Is there a way to produce a non-null-terminated buffer in Python 2 to help verify this? Both John’s original array() tests and the memoryview() tests don’t seem to be supported by Python 2’s idea of buffer objects:

>>> float(array.array("B",b"A"*0x10))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: float() argument must be a string or a number
>>> float(memoryview(b"1234")[1:-1])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: float() argument must be a string or a number

I have a half-ported patch for Python 2, but it would be nice to know (a) if it is actually needed, and (b) what to do about unit tests.
History
Date User Action Args
2015-11-07 05:35:35martin.pantersetrecipients: + martin.panter, mark.dickinson, eric.smith, python-dev, serhiy.storchaka, JohnLeitch
2015-11-07 05:35:35martin.pantersetmessageid: <1446874535.66.0.011996607623.issue24802@psf.upfronthosting.co.za>
2015-11-07 05:35:35martin.panterlinkissue24802 messages
2015-11-07 05:35:34martin.pantercreate