[issue12939] Add new io.FileIO using the native Windows API

2011-09-12 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12939>
___
___
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

2011-09-19 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<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

2011-09-19 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue7434>
___
___
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

2011-10-03 Thread Santoso Wijaya

Santoso Wijaya  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 
<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

2011-10-03 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
type:  -> crash

___
Python tracker 
<http://bugs.python.org/issue13081>
___
___
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

2011-10-11 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12641>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13210] Support Visual Studio 2010

2011-10-18 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue13210>
___
___
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

2011-10-21 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<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

2011-10-21 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
components: +Windows
type:  -> behavior

___
Python tracker 
<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

2011-10-23 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<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

2011-10-24 Thread Santoso Wijaya

Santoso Wijaya  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 "", line 1, in 
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 "", line 1, in 
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 
<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

2011-10-24 Thread Santoso Wijaya

Santoso Wijaya  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 "", line 1, in 
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 "", line 1, in 
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 
<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

2011-10-24 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Additionally, there might be issues in other APIs when handling with extended 
path lengths:

D:\Temp\tempdir>dir
 Volume in drive D is Data
 Volume Serial Number is 7E3D-EC81

 Directory of D:\Temp\tempdir

10/24/2011  04:22 PM  .
10/24/2011  04:22 PM  ..
10/24/2011  04:28 PM  A


AA
10/24/2011  01:31 PM  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\tempdir>cd A


AA

D:\Temp\tempdir\


AAA>dir
 Volume in drive D is Data
 Volume Serial Number is 7E3D-EC81

 Directory of D:\Temp\tempdir\AA


A

10/24/2011  04:28 PM  .
10/24/2011  04:28 PM  ..
10/24/2011  04:14 PM 0 1234567.txt
10/24/2011  04:28 PM  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 
<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

2011-10-25 Thread Santoso Wijaya

Santoso Wijaya  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 
<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

2011-10-25 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Addressing patch comments.

--
Added file: http://bugs.python.org/file23519/issue13234_py33_v3.patch

___
Python tracker 
<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

2011-10-25 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Fair enough. Simplifying.

--
Added file: http://bugs.python.org/file23520/issue13234_py33_v4.patch

___
Python tracker 
<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

2011-10-25 Thread Santoso Wijaya

Santoso Wijaya  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 
<http://bugs.python.org/issue13234>
___
___
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

2011-10-26 Thread Santoso Wijaya

Santoso Wijaya  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 
<http://bugs.python.org/issue13207>
___
___
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

2011-11-09 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt
versions: +Python 3.3

___
Python tracker 
<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

2011-11-09 Thread Santoso Wijaya

Santoso Wijaya  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 
<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

2011-11-09 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue13374>
___
___
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

2012-01-11 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<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.

2012-01-11 Thread Santoso Wijaya

New submission from Santoso Wijaya :

Consider:

>>> os.symlink('.\\test', 'Lib\\bar')
Traceback (most recent call last):
  File "", line 1, in 
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 
<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.

2012-01-11 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Simple patch.

--
keywords: +patch
Added file: http://bugs.python.org/file24208/issue13775_py33.patch

___
Python tracker 
<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

2012-01-11 Thread Santoso Wijaya

Santoso Wijaya  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 
<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

2012-01-11 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Confirmed (on latest py33 build):

>>> os.listdir('Lib\\bar')[:4]
Traceback (most recent call last):
  File "", line 1, in 
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 
<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

2012-01-11 Thread Santoso Wijaya

Santoso Wijaya  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 
<http://bugs.python.org/issue13772>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12163] str.count

2011-05-28 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
components: +Interpreter Core
versions: +Python 3.2, Python 3.3

___
Python tracker 
<http://bugs.python.org/issue12163>
___
___
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

2011-05-31 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

FYI, the dependency is introduced in changeset 
http://hg.python.org/cpython/rev/0daa6ba25d9b

--
components: +Build
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12225>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12244] cStringIO inconsistencies

2011-06-02 Thread Santoso Wijaya

New submission from Santoso Wijaya :

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 "", line 1, in 
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 
<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

2011-06-02 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

>_< Should've read the docs again more carefully before submitting.

--

___
Python tracker 
<http://bugs.python.org/issue12244>
___
___
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

2011-06-13 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue7860>
___
___
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

2011-06-15 Thread Santoso Wijaya

Santoso Wijaya  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 
<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

2011-06-16 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

As for the "" 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 
<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

2011-06-16 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Note: Removing threading call (lock acquire, release) would remove the crash, 
but still triggers the "" conversion of PyMemoryView.

--

___
Python tracker 
<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

2011-06-16 Thread Santoso Wijaya

Changes by Santoso Wijaya :


Added file: http://bugs.python.org/file22380/test_bufio_nothreading.py

___
Python tracker 
<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

2011-06-16 Thread Santoso Wijaya

Santoso Wijaya  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 
<http://bugs.python.org/issue12340>
___
___
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

2011-06-17 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<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

2011-06-17 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12346>
___
___
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

2011-06-20 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12213>
___
___
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

2011-06-24 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt
versions: +Python 3.3

___
Python tracker 
<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

2011-06-24 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<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

2011-06-24 Thread Santoso Wijaya

Santoso Wijaya  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 
<http://bugs.python.org/issue6068>
___
___
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

2011-06-28 Thread Santoso Wijaya

Santoso Wijaya  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 
<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

2011-06-28 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<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

2011-06-28 Thread Santoso Wijaya

Santoso Wijaya  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 
<http://bugs.python.org/issue12437>
___
___
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

2011-06-30 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12455>
___
___
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

2011-07-01 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<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

2011-07-01 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<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

2011-07-01 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12460>
___
___
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

2011-07-10 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12528>
___
___
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

2011-07-17 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt
versions: +Python 3.3

___
Python tracker 
<http://bugs.python.org/issue12576>
___
___
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

2011-07-22 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
versions: +Python 3.3 -Python 3.2

___
Python tracker 
<http://bugs.python.org/issue12614>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12615] add array.zeroes

2011-07-25 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12615>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12676] Bug in http.client

2011-08-01 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
type:  -> behavior

___
Python tracker 
<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

2011-08-01 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<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

2011-08-01 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
keywords: +patch
Added file: http://bugs.python.org/file22821/issue12676_py33.patch

___
Python tracker 
<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

2011-08-01 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt
versions: +Python 3.3 -Python 3.2

___
Python tracker 
<http://bugs.python.org/issue10395>
___
___
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

2011-08-02 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12681>
___
___
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

2011-08-03 Thread Santoso Wijaya

Santoso Wijaya  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 
<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

2011-08-03 Thread Santoso Wijaya

Santoso Wijaya  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 
<http://bugs.python.org/issue12437>
___
___
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

2011-08-17 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12750>
___
___
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

2011-08-24 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue12801>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6706] asyncore's accept() is broken

2010-09-13 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue6706>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8033] sqlite: broken long integer handling for arguments to user-defined functions

2010-11-05 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue8033>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue11395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1602] windows console doesn't print or input Unicode

2011-03-04 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue1602>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
components: +Windows

___
Python tracker 
<http://bugs.python.org/issue11395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11399] python.exe -u fails to parse input to the interactive interpreter

2011-03-04 Thread Santoso Wijaya

New submission from Santoso Wijaya :

Observe:

C:\Users\santa>C:\Python27\python.exe -u
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.
>>> print 'Hello world'
  File "", line 1
print 'Hello world'
   ^
SyntaxError: invalid syntax
>>>

--
components: Windows
messages: 130068
nosy: santa4nt
priority: normal
severity: normal
status: open
title: python.exe -u fails to parse input to the interactive interpreter
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue11399>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11399] cmd.exe: python.exe -u fails to parse input to the interactive interpreter

2011-03-04 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
title: python.exe -u fails to parse input to the interactive interpreter -> 
cmd.exe: python.exe -u fails to parse input to the interactive interpreter

___
Python tracker 
<http://bugs.python.org/issue11399>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11403] Add some generated files in PC/ to .hgignore.

2011-03-04 Thread Santoso Wijaya

New submission from Santoso Wijaya :

Here's a patch for .hgignore file to include some more build files emitted on 
Windows.

--
components: None
files: pcignore.patch
keywords: patch
messages: 130097
nosy: santa4nt
priority: normal
severity: normal
status: open
title: Add some generated files in PC/ to .hgignore.
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file21000/pcignore.patch

___
Python tracker 
<http://bugs.python.org/issue11403>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11403] Add some generated files in PC/ to .hgignore.

2011-03-04 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
versions: +Python 2.7, Python 3.1

___
Python tracker 
<http://bugs.python.org/issue11403>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

I'm adding a test that will reproduce the crash.

--
keywords: +patch
Added file: http://bugs.python.org/file21003/writeconsole.patch

___
Python tracker 
<http://bugs.python.org/issue11395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5870] subprocess.DEVNULL

2011-03-05 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue5870>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11397] os.path.realpath() may produce incorrect results

2011-03-05 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue11397>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11395] print(s) fails on Windows with long strings

2011-03-05 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

And a patch for the test + fix.

--
Added file: http://bugs.python.org/file21012/wconsole_large.patch

___
Python tracker 
<http://bugs.python.org/issue11395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11395] print(s) fails on Windows with long strings

2011-03-05 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

> Indeed, Python3.1 fails with the -u option.

I'm also attaching another test to reproduce the crash with '-u' option.

--
Added file: http://bugs.python.org/file21013/test_wconsole_binlarge.patch

___
Python tracker 
<http://bugs.python.org/issue11395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11395] print(s) fails on Windows with long strings

2011-03-06 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Thanks for the comment. It's my first patch. :-)

> - the patch doesn't apply on Python 3.3

That latest patch file I generated against the tip of 3.1 branch. Should I 
create two separate patches for 3.1 and 3.2+ (which will apply on 3.3, as 
well)? Actually, this crash will reproduce on (from my testing) 2.7 with "-u" 
option on, as well...

>  - I don't want to commit the tests because they write 66000 * 2 characters 
> to the test output, which floods the test output. I don't know how to create 
> a fake stdout which is a TTY but not the real stdout, especially on Windows. 
> I think that manual tests only once should be enough. Or does anyone know how 
> to create a fake TTY output?

I have a few ideas to work around this and still have a unit test...

--
versions: +Python 2.7, Python 3.1

___
Python tracker 
<http://bugs.python.org/issue11395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11395] print(s) fails on Windows with long strings

2011-03-06 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Attached a modified patch that should work against 3.2+ heads:

- Added `isatty` bit field in isatty that's evaluated during its
  construction. This should eliminate the need to call `isatty()` on 
  every write.
- Cap buffer length to 32767 (4 * 1024 - 1) when writing to a tty.
- Test this by supplying `CREATE_NEW_CONSOLE` to `subprocess.call`, so 
  we do not flood regrtest's console output.

These changes are conditionally compiled on Windows only.

Should a similar patch be made for 2.7+ (maybe earlier)?

--
Added file: http://bugs.python.org/file21021/winconsole_large_py33.patch

___
Python tracker 
<http://bugs.python.org/issue11395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11418] Method's global scope is module containing function definition, not class.

2011-03-06 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue11418>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11395] print(s) fails on Windows with long strings

2011-03-06 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

FWIW, here's the Microsoft's source for isatty (in VC\crt\src\isatty.c):

/***
*int _isatty(handle) - check if handle is a device
*
*Purpose:
*   Checks if the given handle is associated with a character device
*   (terminal, console, printer, serial port)
*
*Entry:
*   int handle - handle of file to be tested
*
*Exit:
*   returns non-0 if handle refers to character device,
*   returns 0 otherwise
*
*Exceptions:
*
***/

int __cdecl _isatty (
int fh
)
{
#if defined (_DEBUG) && !defined (_SYSCRT)
/* make sure we ask debugger only once and cache the answer */
static int knownHandle = -1;
#endif  /* defined (_DEBUG) && !defined (_SYSCRT) */

/* see if file handle is valid, otherwise return FALSE */
_CHECK_FH_RETURN(fh, EBADF, 0);
_VALIDATE_RETURN((fh >= 0 && (unsigned)fh < (unsigned)_nhandle), EBADF, 
0);

#if defined (_DEBUG) && !defined (_SYSCRT)
if (knownHandle == -1) {
knownHandle = DebuggerKnownHandle();
}

if (knownHandle) {
return TRUE;
}
#endif  /* defined (_DEBUG) && !defined (_SYSCRT) */

/* check file handle database to see if device bit set */
return (int)(_osfile(fh) & FDEV);
}

--

___
Python tracker 
<http://bugs.python.org/issue11395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11395] print(s) fails on Windows with long strings

2011-03-06 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Attached a version of the last patch without `.isatty` caching.

--
Added file: http://bugs.python.org/file21025/winconsole_large_py33_direct.patch

___
Python tracker 
<http://bugs.python.org/issue11395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7990] xml.etree.cElementTree lacks full dir() on Element

2011-03-07 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Attached a patch with test for this:

Following the suggestion, I put "tag", "text", "tail", and "attrib" to be 
accessible via tp_getset for _etree.Element type.

--
keywords: +patch
nosy: +santa4nt
Added file: http://bugs.python.org/file21041/dir_elem_c.patch

___
Python tracker 
<http://bugs.python.org/issue7990>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7990] xml.etree.cElementTree lacks full dir() on Element

2011-03-07 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
versions: +Python 3.1, Python 3.3

___
Python tracker 
<http://bugs.python.org/issue7990>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2011-03-07 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue7769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2011-03-08 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

I'm attaching a patch against 2.7 tip for an initial implementation of this 
decorator feature as well as sample usage in unittest, to get the ball rolling.

The modified function should work as a decorator while preserving backward 
compatibility to be used in a traditional method call.

--
components: +Library (Lib) -Extension Modules
keywords: +patch
Added file: 
http://bugs.python.org/file21057/xmlrpc_register_decorator_py27.patch

___
Python tracker 
<http://bugs.python.org/issue7769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2011-03-08 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

I see. Attaching a patch against 3.3 tip, then.

--
Added file: 
http://bugs.python.org/file21058/xmlrpc_register_decorator_py33.patch

___
Python tracker 
<http://bugs.python.org/issue7769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3591] elementtree tests do not include bytes handling

2011-03-10 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt
versions: +Python 3.1, Python 3.2, Python 3.3

___
Python tracker 
<http://bugs.python.org/issue3591>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue706263] print raises exception when no console available

2011-03-11 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt
versions: +Python 2.7

___
Python tracker 
<http://bugs.python.org/issue706263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue706263] print raises exception when no console available

2011-03-11 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
components: +IO

___
Python tracker 
<http://bugs.python.org/issue706263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue706263] print raises exception when no console available

2011-03-11 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

This is indeed reproducible in Python 2.7. The following unittest will expose 
it. However, patching sys.std* to None will break `print` statements to raise 
AttributeError in pythonw.exe programs, though it won't mysteriously break only 
after printing 4 kbytes...

diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
old mode 100644
new mode 100755
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -58,6 +58,19 @@
 new = sys.getrefcount(path)
 self.assertEqual(old, new)
 
+@unittest.skipUnless(sys.platform == 'win32',
+ 'test specific to Windows console')
+def test_print_no_stdout(self):
+# Issue #706263: pythonw.exe will raise an IOError after
+# attempting to print more than 4096 bytes (it silently
+# succeeds for the first 4096 bytes and fails with an
+# IOError: "[Errno 9] Bad file descriptor" on the 4097th byte.
+DETACHED_PROCESS = 0x0008
+command = [sys.executable, '-c',
+   'for _ in xrange(10): print "a", ']
+retcode = subprocess.call(command, creationflags=DETACHED_PROCESS)
+self.assertEqual(retcode, 0)
+
 
 class TemporaryFileTests(unittest.TestCase):
 def setUp(self):

--

___
Python tracker 
<http://bugs.python.org/issue706263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1635741] Interpreter seems to leak references after finalization

2011-03-13 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue1635741>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11474] url2pathname() handling of '/C|/' on Windows

2011-03-13 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

I agree. Attaching a patch with a fix and unittest.

--
keywords: +patch
nosy: +santa4nt
Added file: http://bugs.python.org/file21104/nturl2path.patch

___
Python tracker 
<http://bugs.python.org/issue11474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11467] urlparse.urlsplit() regression for paths consisting of digits

2011-03-13 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt
versions: +Python 3.3

___
Python tracker 
<http://bugs.python.org/issue11467>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11474] url2pathname() handling of '/C|/' on Windows

2011-03-13 Thread Santoso Wijaya

Changes by Santoso Wijaya :


Removed file: http://bugs.python.org/file21104/nturl2path.patch

___
Python tracker 
<http://bugs.python.org/issue11474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11474] url2pathname() handling of '/C|/' on Windows

2011-03-13 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

Oops, wrong library name in patch comment.

--
Added file: http://bugs.python.org/file21105/nturl2path.patch

___
Python tracker 
<http://bugs.python.org/issue11474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11474] url2pathname() handling of '/C|/' on Windows

2011-03-13 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
type:  -> behavior

___
Python tracker 
<http://bugs.python.org/issue11474>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11485] Default SDK value on MacOSX needs changing

2011-03-13 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

> Running configure on a MacOSX system will set
> MACOSX_DEPLOYMENT_TARGET to 10.4, which is probably not optimal
> for anyone on a recentish system.

What's more, when I first tried to compile Python on Mac OS X, and I have 
MacPorts' version of Python as the default interpreter in the terminal, I get 
the following errors when trying to do bare `./configure; make`:

bash-3.2$ make 
./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl
Traceback (most recent call last):
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py",
 line 553, in 
main()
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py",
 line 535, in main
known_paths = addusersitepackages(known_paths)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py",
 line 268, in addusersitepackages
user_site = getusersitepackages()
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py",
 line 243, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py",
 line 233, in getuserbase
USER_BASE = get_config_var('userbase')
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py",
 line 535, in get_config_var
return get_config_vars().get(name)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py",
 line 434, in get_config_vars
_init_posix(_CONFIG_VARS)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py",
 line 313, in _init_posix
raise IOError(msg)
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.4" but "10.6" during 
configure
make: *** [Include/Python-ast.h] Error 1


I worked around this by adding MACOSX_DEPLOYMENT_TARGET=10.6 to the configure 
script, but I have to remember to do that every time I configured a fresh clone 
of the source.

--
nosy: +santa4nt

___
Python tracker 
<http://bugs.python.org/issue11485>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11493] Add python.exe-gdb.py to .hgignore

2011-03-14 Thread Santoso Wijaya

New submission from Santoso Wijaya :

The 3.x branch has python.exe-gdb.py entry in its .hgignore file, but the 2.7 
branch does not. Can we please add it?

--
components: Build
files: gdbignore.patch
keywords: patch
messages: 130794
nosy: santa4nt
priority: normal
severity: normal
status: open
title: Add python.exe-gdb.py to .hgignore
versions: Python 2.7
Added file: http://bugs.python.org/file21109/gdbignore.patch

___
Python tracker 
<http://bugs.python.org/issue11493>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11467] urlparse.urlsplit() regression for paths consisting of digits

2011-03-14 Thread Santoso Wijaya

Santoso Wijaya  added the comment:

I'm attaching a patch with a fix and a unittest using the email example. I put 
this in a new test_RFC2368 (the mailto URL scheme) method. Seems like there is 
no unittest for parsing mailto scheme to begin with.

--
Added file: http://bugs.python.org/file21110/urlparse.patch

___
Python tracker 
<http://bugs.python.org/issue11467>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   >