[issue21598] Is __getitem__ and __len__ implementations enough to make a user-defined class sliceable?
New submission from Santoso Wijaya: The reference doc for Python data model says that __getslice__ is deprecated [1], and that __getitem__ should be used instead: Deprecated since version 2.0: Support slice objects as parameters to the __getitem__() method. (However, built-in types in CPython currently still implement __getslice__(). Therefore, you have to override it in derived classes when implementing slicing.) But I'm getting the following behavior when I try it myself. Is there something I'm missing? $ python Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type help, copyright, credits or license for more information. class tup(object): ... def __getitem__(self, i): ... if i == 0: return 0 ... if i == 1: return 1 ... KeyboardInterrupt class tup(object): ... def __getitem__(self, i): ... if i in (0, 1): return i ... else: raise IndexError() ... def __len__(self): ... return 2 ... t = tup() len(t) 2 t[0], t[1] (0, 1) t[:2] Traceback (most recent call last): File stdin, line 1, in module File stdin, line 4, in __getitem__ IndexError t[:1] Traceback (most recent call last): File stdin, line 1, in module File stdin, line 4, in __getitem__ IndexError [1] https://docs.python.org/2/reference/datamodel.html#object.__getslice__ -- components: Library (Lib) messages: 219326 nosy: santa4nt priority: normal severity: normal status: open title: Is __getitem__ and __len__ implementations enough to make a user-defined class sliceable? type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21598 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21598] Is __getitem__ and __len__ implementations enough to make a user-defined class sliceable?
Santoso Wijaya added the comment: Hm. The docstring for __getitem__ doesn't mention it can/should be accepting slice object as argument. That's what I'm missing. Doc patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21598 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21598] Is __getitem__ and __len__ implementations enough to make a user-defined class sliceable?
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21598 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21531] Sending a zero-length UDP packet to asyncore invokes handle_close()
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21531 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks
Santoso Wijaya added the comment: I think you should use codecs.BOM_UTF8 rather than using hardcoded string \xef\xbb\xbf directly. And why special casing UTF-8 while we're at it? What about other encodings and their BOMs? -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21509 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21386] ipaddress.IPv4Address.is_global not implemented
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21386 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21403] cElementTree's Element creation handles attrib argument different from ET
Santoso Wijaya added the comment: There is still a matter of inconsistency between the two implementations and between 2.7 and 3.x. IMO, the Python-based ElementTree implementation is more graceful at handling the attrib argument. The signature of the factory function Element (and SubElement) in the doc is thus: class xml.etree.ElementTree.Element(tag, attrib={}, **extra) which is fair game for the user to use attrib as a keyword argument. Further, this serialization (in 3.x) does not really make sense, anyway: cET.tostring(root) b'root attrib={\'Name\': \'Root\'}child attrib={\'Name\': \'Child\'} //root' -- components: +XML ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21403 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21403] cElementTree's Element creation handles attrib argument different from ET
Santoso Wijaya added the comment: Quoting dabrahams in issue 1572710: On second thought, I see what effbot is trying to say... but it's still a bug. Given the way the interface is declared and the behavior of regular python functions: Element(tag, attrib={}, **extra) indicates that I can pass attrib (or tag, for that matter) as a keyword argument. Nothing in the documentation gives the C implementation permission to behave differently. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21403 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21403] cElementTree node creation with attributes is bugged
New submission from Santoso Wijaya: Observe: Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type help, copyright, credits or license for more information. import xml.etree.ElementTree as ET root = ET.Element('root', attrib={'Name':'Root'}) child = ET.SubElement(root, 'child', attrib={'Name':'Child'}) ET.tostring(root) 'root Name=Rootchild Name=Child //root' import xml.etree.cElementTree as cET root = cET.Element('root', attrib={'Name':'Root'}) child = cET.SubElement(root, 'child', attrib={'Name':'Child'}) cET.tostring(root) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.7/xml/etree/ElementTree.py, line 1126, in tostring ElementTree(element).write(file, encoding, method=method) File /usr/lib/python2.7/xml/etree/ElementTree.py, line 820, in write serialize(write, self._root, encoding, qnames, namespaces) File /usr/lib/python2.7/xml/etree/ElementTree.py, line 932, in _serialize_xml v = _escape_attrib(v, encoding) File /usr/lib/python2.7/xml/etree/ElementTree.py, line 1092, in _escape_attrib _raise_serialization_error(text) File /usr/lib/python2.7/xml/etree/ElementTree.py, line 1052, in _raise_serialization_error cannot serialize %r (type %s) % (text, type(text).__name__) TypeError: cannot serialize {'Name': 'Root'} (type dict) -- components: Library (Lib) messages: 217652 nosy: santa4nt priority: normal severity: normal status: open title: cElementTree node creation with attributes is bugged type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21403 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21403] cElementTree node creation with attributes is bugged
Santoso Wijaya added the comment: Or, more succintly: Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type help, copyright, credits or license for more information. import xml.etree.ElementTree as ET root = ET.Element('Root', attrib={'Name':'Root'}) root.attrib {'Name': 'Root'} import xml.etree.cElementTree as cET root = cET.Element('Root', attrib={'Name':'Root'}) root.attrib {'attrib': {'Name': 'Root'}} -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21403 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21403] cElementTree creation of nodes with attributes is bugged
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- title: cElementTree node creation with attributes is bugged - cElementTree creation of nodes with attributes is bugged ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21403 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Santoso Wijaya added the comment: Here you go. -- Added file: http://bugs.python.org/file32334/issue13234_tip_refresh.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18199 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17517] StringIO() does not behave like cStringIO() when given an array object
New submission from Santoso Wijaya: Python 2.7.3 (default, Sep 26 2012, 21:51:14) [GCC 4.7.2] on linux2 Type help, copyright, credits or license for more information. import array, cStringIO, StringIO a = array.array('B', [1,2,3]) cStringIO.StringIO(a).getvalue() '\x01\x02\x03' StringIO.StringIO(a).getvalue() array('B', [1, 2, 3]) -- components: Library (Lib) messages: 184939 nosy: santa4nt priority: normal severity: normal status: open title: StringIO() does not behave like cStringIO() when given an array object versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17517 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17517] StringIO() does not behave like cStringIO() when given an array object
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17517 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Santoso Wijaya added the comment: Done. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17400] ipaddress.is_private needs to take into account of rfc6598
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17400 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17343] Add a version of str.split which returns an iterator
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16376] wrong type for wintypes.BYTE
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16376] wrong type for wintypes.BYTE
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16076] xml.etree.ElementTree.Element is no longer pickleable
Santoso Wijaya added the comment: OTOH, xml.etree.cElementTree.Element in Python 3.2 and earlier has never been pickleable, either. Python 3.2.3+ (3.2:24499eebbc2f, Oct 10 2012, 13:54:45) [GCC 4.6.3] on linux2 Type help, copyright, credits or license for more information. from xml.etree.cElementTree import Element repr(Element) 'built-in function Element' import pickle pickle.dumps(Element('foo')) Traceback (most recent call last): File stdin, line 1, in module _pickle.PicklingError: Can't pickle class 'Element': attribute lookup builtins.Element failed -- components: +Library (Lib) versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16201] socket.gethostbyname incorrectly parses ip
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- components: +Extension Modules nosy: +santa4nt type: - behavior versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16201 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16201] socket.gethostbyname incorrectly parses ip
Santoso Wijaya added the comment: Attaching patch to trim leading and trailing whitespaces prior to processing. Incidentally, this also means: socket.gethostbyname('') '0.0.0.0' socket.gethostbyname(' ') Traceback (most recent call last): File stdin, line 1, in module socket.gaierror: [Errno -5] No address associated with hostname But I'm not sure if we're okay with changing that semantics, so I left it be in this patch. -- keywords: +patch Added file: http://bugs.python.org/file27537/gethostbyname_whitespace.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16201 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16076] xml.etree.ElementTree.Element is no longer pickleable
Santoso Wijaya added the comment: This is because, in Python 3.3, xml.etree.ElementTree.Element is overridden by the C accelerator version, _elementtree.Element. If you remove the statement, 1708from _elementtree import * the behavior from Python 3.2 comes back. -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7897] Support parametrized tests in unittest
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7897 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14465] xml.etree.ElementTree: add feature to prettify XML output
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14465 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14310] Socket duplication for windows
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14310 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8713] multiprocessing needs option to eschew fork() under Linux
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: -santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- components: +Library (Lib), XML nosy: +santa4nt versions: +Python 3.3 -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13782 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument
Santoso Wijaya santoso.wij...@gmail.com added the comment: This does not only affect `append`, but also, `insert`, `extend`, etc. In fact, the list-like operations on Element are merely forwarded to its `_children` (a list) field. Should we really type check these methods' arguments each? Doesn't strike as Pythonic to me... OTOH, in cElementTree, by virtue of C-API's tuple unpacking convention, the argument's type is always strictly checked prior to accessing the children list. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13782 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13775] Access Denied message on symlink creation misleading for an existing file/directory target.
New submission from Santoso Wijaya santoso.wij...@gmail.com: Consider: os.symlink('.\\test', 'Lib\\bar') Traceback (most recent call last): File stdin, line 1, in module WindowsError: [Error 5] Access is denied: '.\\test' Where Lib\\bar is previously created. The symlink creation is rightly rejected, but with a misleading message. The failure is because 'Lib\\bar' already exists, not because of '.\\test'. -- components: Windows messages: 151101 nosy: santa4nt priority: normal severity: normal status: open title: Access Denied message on symlink creation misleading for an existing file/directory target. type: behavior versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13775 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13775] Access Denied message on symlink creation misleading for an existing file/directory target.
Santoso Wijaya santoso.wij...@gmail.com added the comment: Simple patch. -- keywords: +patch Added file: http://bugs.python.org/file24208/issue13775_py33.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13775 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Santoso Wijaya santoso.wij...@gmail.com added the comment: I think this is because Lib\\bar is NOT being created as a directory symlink, but rather as a regular one. As such, the documentation for symlink where it states the optional `target_is_directory=False` argument should be automatically detect whether the source is a file or directory does not hold true. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Santoso Wijaya santoso.wij...@gmail.com added the comment: Confirmed (on latest py33 build): os.listdir('Lib\\bar')[:4] Traceback (most recent call last): File stdin, line 1, in module NotADirectoryError: [Error 267] The directory name is invalid: 'Lib\\bar\\*.*' [61658 refs] ... after manually deleting the file-symlink `bar` ... os.symlink('.\\test', 'Lib\\bar', target_is_directory=True) [61658 refs] os.listdir('Lib\\bar')[:4] ['185test.db', 'audiotest.au', 'autotest.py', 'badcert.pem'] [61666 refs] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Santoso Wijaya santoso.wij...@gmail.com added the comment: I agree that it's probably not a good idea. Windows users should be aware of symlink limitation on the platform to begin with, IMHO. Besides, keeping the detection behaviour in light of this defect would be adding unnecessary complexity to the code. Currently, the `src` argument (=.\\test) is simply given to a Windows function to see if it is a directory, from the currently working directory. To make it aware of its path relativity, in the context of the target, is much harder than just changing the documentation. ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11427] ctypes from_buffer no longer accepts bytes
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11427] ctypes from_buffer no longer accepts bytes
Santoso Wijaya santoso.wij...@gmail.com added the comment: From what I understand, even in 2.7 the exception is expected. The doc for `from_buffer` says: The source object must support the writeable buffer interface. Is there any reason why `from_buffer_copy` cannot be used, instead? The latter only requires readable buffer interface. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13374] Deprecate usage of the Windows ANSI API in the nt module
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13207] os.path.expanduser breaks when using unicode character in the username
Santoso Wijaya santoso.wij...@gmail.com added the comment: Unicode environment vars work properly in Python 3.x on Windows, too, because the convertenviron() function in posixmodule.c uses extern _wenviron PyUnicode_FromWideChar() in Python 3.x. In Python 2.7, convertenviron() uses extern environ and PyString_FromString*(). -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13207 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Santoso Wijaya santoso.wij...@gmail.com added the comment: Even if we decide not to convert any forward slash, listdir() adds u\\*.* when the input is unicode, but it adds /*.* when it is not, before passing it off to Windows API. Hence the inconsistency and the problem Manuel saw. IMO, his patch shouldn't have differentiated if the path starts with r\\?\ and just be consistent with adding \\*.*, unicode or not. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Santoso Wijaya santoso.wij...@gmail.com added the comment: Addressing patch comments. -- Added file: http://bugs.python.org/file23519/issue13234_py33_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Santoso Wijaya santoso.wij...@gmail.com added the comment: Fair enough. Simplifying. -- Added file: http://bugs.python.org/file23520/issue13234_py33_v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Santoso Wijaya santoso.wij...@gmail.com added the comment: I don't understand this change in issue13234_py33_v4.patch (the change looks to be useless). It's pedantic correctness on my part. SEP and ALTSEP are defined as wide strings L'\\' and L'/' respectively. Their usage in the unicode conditional branch and the bytes conditional branch seem to have been reversed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Santoso Wijaya santoso.wij...@gmail.com added the comment: I'd also like to point out that Unicode path is handled correctly in both 2.7.x and 3.x: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win 32 Type help, copyright, credits or license for more information. import os os.listdir(u'?\\D:\\Temp\\tempdir') [u'sub1', u'test1.txt'] os.listdir('?\\D:\\Temp\\tempdir') Traceback (most recent call last): File stdin, line 1, in module WindowsError: [Error 123] The filename, directory name, or volume label syntax i s incorrect: '?\\D:\\Temp\\tempdir/*.*' Python 3.2 (r32:88445, Feb 20 2011, 21:30:00) [MSC v.1500 64 bit (AMD64)] on win 32 Type help, copyright, credits or license for more information. import os os.listdir('?\\D:\\Temp\\tempdir') ['sub1', 'test1.txt'] os.listdir(b'?\\D:\\Temp\\tempdir') Traceback (most recent call last): File stdin, line 1, in module WindowsError: [Error 123] The filename, directory name, or volume label syntax i s incorrect: '?\\D:\\Temp\\tempdir/*.*' The problem only lies in the code handling narrow string paths. If you look at (py33) posixmodule.c:2545-6, the bare path is appended with L\\*.*. Whereas in the narrow string case, posixmodule.c:2625-6, the bare path is appended with /*.*, instead. To be consistent, we should use '\\'. -- Added file: http://bugs.python.org/file23512/issue13234_py33.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Santoso Wijaya santoso.wij...@gmail.com added the comment: There are also several other edge cases to be taken care of: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win 32 Type help, copyright, credits or license for more information. import os os.listdir(r'\\?\C:\Python27/') Traceback (most recent call last): File stdin, line 1, in module WindowsError: [Error 123] The filename, directory name, or volume label syntax i s incorrect: '?\\C:\\Python27/*.*' os.listdir(r'\\?\C:/Python27\Lib') Traceback (most recent call last): File stdin, line 1, in module WindowsError: [Error 3] The system cannot find the path specified: '?\\C:/Py thon27\\Lib/*.*' -- Added file: http://bugs.python.org/file23513/issue13234_py33_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Santoso Wijaya santoso.wij...@gmail.com added the comment: Additionally, there might be issues in other APIs when handling with extended path lengths: D:\Temp\tempdirdir Volume in drive D is Data Volume Serial Number is 7E3D-EC81 Directory of D:\Temp\tempdir 10/24/2011 04:22 PMDIR . 10/24/2011 04:22 PMDIR .. 10/24/2011 04:28 PMDIR A AA 10/24/2011 01:31 PMDIR sub1 10/24/2011 03:39 PM 262 test1.txt 1 File(s)262 bytes 4 Dir(s) 244,483,321,856 bytes free D:\Temp\tempdircd A AA D:\Temp\tempdir\ AAAdir Volume in drive D is Data Volume Serial Number is 7E3D-EC81 Directory of D:\Temp\tempdir\AA A 10/24/2011 04:28 PMDIR . 10/24/2011 04:28 PMDIR .. 10/24/2011 04:14 PM 0 1234567.txt 10/24/2011 04:28 PMDIR B 1 File(s) 0 bytes 3 Dir(s) 244,483,321,856 bytes free Python 3.2 (r32:88445, Feb 20 2011, 21:30:00) [MSC v.1500 64 bit (AMD64)] on win 32 Type help, copyright, credits or license for more information. import os subdir = 'B'*13 os.path.isdir(subdir) False os.getcwd() 'D:\\Temp\\tempdir\\ AAA' subdir_abs = os.path.join(os.getcwd(), subdir) os.path.isdir(subdir) False subdir_ext = r'\\?\%s' % subdir_abs os.path.isdir(subdir_ext) True In the above example, perhaps a ValueError('path too long') is better than returning False? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13249] argparse.ArgumentParser() lists arguments in the wrong order
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13249 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13234] os.listdir breaks with literal paths
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- components: +Windows type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13210] Support Visual Studio 2010
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13210 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12641] Remove -mno-cygwin from distutils
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13081] Crash in Windows with unknown cause
Santoso Wijaya santoso.wij...@gmail.com added the comment: Without the aforementioned minidump library, you can also kick off the Python interpreter using a debugger (or have a debugger break into an already-running one) [1]. When the crash happens--presumably the debugger will break at this point--you can export the mini dump into a file for us to look at [2]. [1] I like using windbg (http://msdn.microsoft.com/en-us/windows/hardware/gg463009). [2] It would be something like, `.dump /ma C:\path\to\crash.DMP` -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13081] Crash in Windows with unknown cause
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13004] pprint: add option to truncate sequences
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13004 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7434] general pprint rewrite
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12939] Add new io.FileIO using the native Windows API
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12801] C realpath not used by os.path.realpath
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12801 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12750] datetime.strftime('%s') should respect tzinfo
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12750 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12437] _ctypes.dlopen does not include errno in OSError
Santoso Wijaya santoso.wij...@gmail.com added the comment: At least in Windows, the exception object has its `winerror` attribute correctly set to 126, which is also translated to POSIX `errno` with `winerror_to_errno()`; the latter gives us EINVAL (22). -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12437 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12437] _ctypes.dlopen does not include errno in OSError
Santoso Wijaya santoso.wij...@gmail.com added the comment: From what I gather from the code, when dlopen fails in POSIX platforms, ctypes raises an PyExc_OSError instantiated with a simple string (via PyErr_SetString()). I suppose this could be changed to raise a more complex tuple, instead (like its WindowsError equivalent when LoadLibrary fails in Windows platforms), but that might break existing code that relies on this behavior. 3.3 only? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12437 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12681] unittest expectedFailure could take a message argument like skip does
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12681 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12676] Bug in http.client
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12676] Bug in http.client
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12676] Bug in http.client
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file22821/issue12676_py33.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10395] new os.path function to extract common prefix based on path components
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10395 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12615] add array.zeroes
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12614] Allow to explicitly set the method of urllib.request.Request
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12614 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12576] urlib.request fails to open some sites
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12528] Implement configurable bitfield allocation strategy
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12459] time.sleep(-1.0) behaviour
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12463] Calling SocketServer.shutdown() when server_forever() was not called will hang
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12463 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12460] SocketServer.shutdown() does not have timeout=None parameter
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12460 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12455] urllib2 forces title() on header names, breaking some requests
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12431] urllib2.Request.get_full_url() broken in newer versions of Python
Santoso Wijaya santoso.wij...@gmail.com added the comment: This has been fixed with issue #11703, latest version of Python 2.7 does not exhibit this behaviour anymore: Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win 32 Type help, copyright, credits or license for more information. import urllib2 urllib2.Request('http://host/path#fragment').get_full_url() 'http://host/path#fragment' -- components: +Library (Lib) nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12431 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12435] Input function does not strip trailing '\r' from string input
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12435 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12437] _ctypes.dlopen does not include errno in OSError
Santoso Wijaya santoso.wij...@gmail.com added the comment: On Windows: try: ... ctypes.CDLL('somelib') ... except OSError as exc: ... print repr(exc) ... print exc.errno ... WindowsError(126, 'The specified module could not be found') 22 -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12437 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12403] Allow overriding of writing to stdout in code.InteractiveConsole
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12403 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6068] ctypes is not correctly handling bitfields backed by 64 bit integers on Windows
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6068 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6068] ctypes is not correctly handling bitfields backed by 64 bit integers on Windows
Santoso Wijaya santoso.wij...@gmail.com added the comment: FWIW, I tested the patch on a 64-bit Python build and test_ctypes passes with the new unittest added. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6068 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12213 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9246] os.getcwd() hardcodes max path len
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9246 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12346] Python 2.7.2 source code build (release) depends on mercurial
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12346 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
Santoso Wijaya santoso.wij...@gmail.com added the comment: As for the memory at %p string, when _io.BufferedWriter prepares the byte buffer into a PyMemoryView wrapper and passes it into the raw IO object: res = PyObject_CallMethodObjArgs(self-raw, _PyIO_str_write, memobj, NULL); For some reason, memobj.__repr__ is called before being passed to the raw IO's write method. I can't reproduce this odd behavior using a dumb raw IO that extends _io.RawIOBase. Mimicking what pyserial does, however, reproduces both issues (see attached). -- Added file: http://bugs.python.org/file22379/test_bufio.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
Santoso Wijaya santoso.wij...@gmail.com added the comment: Note: Removing threading call (lock acquire, release) would remove the crash, but still triggers the memory at %p conversion of PyMemoryView. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
Changes by Santoso Wijaya santoso.wij...@gmail.com: Added file: http://bugs.python.org/file22380/test_bufio_nothreading.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
Santoso Wijaya santoso.wij...@gmail.com added the comment: If `write(self, data)` is expected to receive `data` as a memoryview object, then it's up to pyserial to use `data.tobytes()` instead of `bytes(data)`, though this does not seem to be documented in the io module doc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
Santoso Wijaya santoso.wij...@gmail.com added the comment: Regarding the crash, From what I can see, the `tp_clear` method of bufferedrwpair is called during Py_Finalize() that leads to garbage collection. This NULLs `self-writer` for the rwpair object. Later, in the same garbage collection routine, the `tp_clear` of textio (the wrapper) is called. This attempts to finalize its wrapped object by first calling the `closed` property of the wrapped object. This property read is propagated down to the wrapped bufferedrwpair, `bufferedrwpair_closed_get()`. At this point, `self-writer` for the bufferedrwpair object is already NULL from the previous clear. Hence, the crash happens because a NULL pointer dereferencing is attempted. -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12244] cStringIO inconsistencies
New submission from Santoso Wijaya santoso.wij...@gmail.com: Observe: Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. from cStringIO import StringIO result = StringIO('Hello, ') result.write('world') Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'cStringIO.StringI' object has no attribute 'write' result = StringIO() result.write('Hello, world') print result.getvalue() Hello, world from StringIO import StringIO result = StringIO('Hello, ') result.write('world') print result.getvalue() world, Few things: 1. The error message says, StringI instead of StringIO. 2. Why does a cStringIO.StringIO object instantiated with a starter string not have the `write` attribute? 3. Using the pure-Python equivalent, (2) succeeds but it overwrites the starter string? 4. Regardless, (2) and (3) are not consistent with each other. -- components: Library (Lib) messages: 137490 nosy: santa4nt priority: normal severity: normal status: open title: cStringIO inconsistencies type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12244] cStringIO inconsistencies
Santoso Wijaya santoso.wij...@gmail.com added the comment: _ Should've read the docs again more carefully before submitting. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12225] current tip doesn't build without mercurial installed
Santoso Wijaya santoso.wij...@gmail.com added the comment: FYI, the dependency is introduced in changeset http://hg.python.org/cpython/rev/0daa6ba25d9b -- components: +Build nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12225 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12163] str.count
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- components: +Interpreter Core versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9811] strftime strips '%' from unknown format codes on OS X
Santoso Wijaya santoso.wij...@gmail.com added the comment: Yeah, I meant undefined. I looked that up when writing a patch for issue #10762. Correction: It *used to* crash on Windows, before the patch was applied. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9811 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1746656] IPv6 Interface naming/indexing functions
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9811] strftime strips '%' from unknown format codes on OS X
Santoso Wijaya santoso.wij...@gmail.com added the comment: `strftime` does not, indeed, seem to define what behaviour it is supposed to do when given non-supported format characters. Under Windows, in fact, it will crash the runtime (see: issue #10762). -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9811 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12084] os.stat() on windows doesn't consider relative symlink
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12084 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12018] No tests for ntpath.samefile, ntpath.sameopenfile
Santoso Wijaya santoso.wij...@gmail.com added the comment: Attaching a patch to test a use case for ntpath.samefile (looks like sameopenfile is already tested--or at least a use case of it). -- components: +Library (Lib) keywords: +patch nosy: +santa4nt versions: -Python 3.4 Added file: http://bugs.python.org/file21985/test_samefile.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12018 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12064] unexpected behavior with exception variable
Santoso Wijaya santoso.wij...@gmail.com added the comment: Looks like a regression from 2.x. On 2.7: Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. e = True try: raise Exception() ... except Exception as e: pass ... print repr(e) Exception() On 3.2: Python 3.2 (r32:88445, Feb 20 2011, 21:30:00) [MSC v.1500 64 bit (AMD64)] on win 32 Type help, copyright, credits or license for more information. e = True try: raise Exception() ... except Exception as e: pass ... print(repr(e)) Traceback (most recent call last): File stdin, line 1, in module NameError: name 'e' is not defined -- nosy: +santa4nt versions: +Python 3.1, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12064 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6727] ImportError when package is symlinked on Windows
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com