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 benjamin.peterson
Recipients benjamin.peterson, loewis
Date 2009-05-03.21:41:36
SpamBayes Score 1.7402e-07
Marked as misclassified No
Message-id <1241386901.69.0.882152046024.issue5915@psf.upfronthosting.co.za>
In-reply-to
Content
The calls to bytes2str are not checked in posixmodule.c.


http://codereview.appspot.com/52095/diff/1/5
File Include/unicodeobject.h (right):

http://codereview.appspot.com/52095/diff/1/5#newcode1254
Line 1254: The function is intended to be used for paths and file names
only
If these are only meant to be used internally during bootstrap, should
they have the _Py prefix?

http://codereview.appspot.com/52095/diff/1/10
File Lib/test/test_pep383.py (right):

http://codereview.appspot.com/52095/diff/1/10#newcode1
Line 1: from test import support
I'm not sure this deserves a whole new file. Couldn't UtfbTest go in
test_codecs and FileTests go in test_os?

http://codereview.appspot.com/52095/diff/1/10#newcode2
Line 2: import unittest, shutil, os, sys
PEP 8 says these should be on separate lines.

http://codereview.appspot.com/52095/diff/1/10#newcode33
Line 33: if os.name != 'win32':
Isn't os.name "nt" on Windows?

Also, you could skip this whole class on Windows by decorating the class
with @unittest.skipIf(sys.platform.startswith("win")).

http://codereview.appspot.com/52095/diff/1/10#newcode47
Line 47: f = open(self.bdir + b"/" + fn, "w")
Looks like a good place for os.path.join.

http://codereview.appspot.com/52095/diff/1/13
File Modules/posixmodule.c (right):

http://codereview.appspot.com/52095/diff/1/13#newcode547
Line 547: else if(PyByteArray_Check(o)) {
There's a small white space problem here.

http://codereview.appspot.com/52095/diff/1/13#newcode548
Line 548: if (lock && o->ob_type->tp_as_buffer->bf_getbuffer(o, NULL, 0)
< 0)
I believe you want PyObject_GetBuffer here.

http://codereview.appspot.com/52095/diff/1/13#newcode596
Line 596: bytes2str(name, 0));
What if byte2str returns NULL?

http://codereview.appspot.com/52095/diff/1/2
File Python/codecs.c (right):

http://codereview.appspot.com/52095/diff/1/2#newcode852
Line 852: if (!res)
This leaks "object".

http://codereview.appspot.com/52095/diff/1/2#newcode895
Line 895: return NULL;
This leaks "object".

http://codereview.appspot.com/52095
History
Date User Action Args
2009-05-03 21:41:42benjamin.petersonsetrecipients: + benjamin.peterson, loewis
2009-05-03 21:41:41benjamin.petersonsetmessageid: <1241386901.69.0.882152046024.issue5915@psf.upfronthosting.co.za>
2009-05-03 21:41:40benjamin.petersonlinkissue5915 messages
2009-05-03 21:41:37benjamin.petersoncreate