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 serhiy.storchaka
Recipients python-dev, serhiy.storchaka, vstinner
Date 2013-11-07.09:19:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383815946.74.0.807893460299.issue19512@psf.upfronthosting.co.za>
In-reply-to
Content
> What is the problem with these changes?

Usually CPython team avoids code churn without serious reasons. Performance reasons for the change PySys_GetObject("stdout") to _PySys_GetObjectId(&_PyId_stdout) are ridiculous. You changed hundreds lines of code for speed up interactive mode by perhaps several microseconds.

> Errors become more unlikely because objects are only initialized once, near startup. So it put also less pressure on code handling errors :) (it is usually the least tested part of the code)

If there are bugs in code handling errors, they should be fixed in maintenance releases too.

> You mean for PyRun_InteractiveOneObject()? Oh, it can be made private, but what is the problem of adding yet another PyRun_Interactive*() function? There are already a lot of them :-)

And this is a problem. Newly added function is not even documented.

> I also worked hard to support unencodable filenames: using char*, you cannot support arbitrary Unicode filename on Windows. That's why a added many various functions with "Object" suffix. Some examples: PyWarn_ExplicitObject(), PyParser_ParseStringObject(), PyImport_AddModuleObject(), etc.

"One bug per bug report" as Martin says.

> Another problem is that PyUnicode_FromString() failure is not handled correctly in some cases. PyUnicode_FromString() can fail because an decoder error, but also because of a MemoryError.

It can't fail on "stdout" because an decoder error.
History
Date User Action Args
2013-11-07 09:19:06serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, python-dev
2013-11-07 09:19:06serhiy.storchakasetmessageid: <1383815946.74.0.807893460299.issue19512@psf.upfronthosting.co.za>
2013-11-07 09:19:06serhiy.storchakalinkissue19512 messages
2013-11-07 09:19:06serhiy.storchakacreate