[issue13315] Unable to deal with large tarfile

2011-11-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's more likely an issue with the chown call. Indeed, the tar file contains a gid of 4294967295, which is too large for an int. Normally this was fixed by issue1747858, which was included in Python 2.6.5 and 2.7. Are you sure you

[issue12760] Add create mode to open()

2011-10-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: issue12797 would allow things like: def create_exclusive_file(filename): return open(filename, w, opener=lambda path, mode: os.open(path, mode|os.O_CREAT|os.O_EXCL

[issue12797] io.FileIO and io.open should support openat

2011-10-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Is an open file descriptor correct in English? I'd have written an opened file descriptor instead (in 5 places). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue4431] Distutils MSVC doesn't create manifest file

2011-10-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: If I can provide the patch to support Visual Studio 2010 and setup a builtbot that will pass most of the tests, could we get Python supported on this platform? Yes. Even if VS2008 remains the preferred compiler to build Python

[issue6715] xz compressor support

2011-10-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: *Very* good news for lzma on windows: The precompiled static library liblzma.a works very well with MSVC (tested with VS2008 on Windows XP, 32bit). This was a surprise for me... Here is a patch for the win32 build files

[issue13133] FD leaks in ZipFile.read(), ZipFile.extract() and also using explicit arc_member.close()

2011-10-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, in 2.7 many parts of the stdlib relies on reference counting to close files. But 3.2 introduced a ResourceWarning which is emitted (in debug mode) each time a __del__ closes a valuable resource like a file or a socket

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: If the output is redirected (e.g. into a file), TextIOWrapper is created with line_buffering=False. How does this affect the \r\n translation? -- ___ Python tracker rep...@bugs.python.org

[issue6715] xz compressor support

2011-10-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: On http://tukaani.org/xz, I downloaded the file named xz-5.0.3-windows.zip. It contains precompiled dlls for both platforms: bin_i486/liblzma.dll and bin_x86_64/liblzma.dll Unfortunately, there is no import library for VS. It should

[issue6715] xz compressor support

2011-10-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Ah indeed, the zip archive contains a doc/liblzma.def which can be used to build a liblzma.lib -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6715

[issue6715] xz compressor support

2011-10-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Hey, today I learnt something about mingw! Rename liblzma.a to e.g. liblzma_static.lib and tell MSVC to link against it. Apparently mingw can generate COFF libraries. This may simplify things *a lot

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: To people who open the file in their browser: text files are very similar, but newline_3.1.txt has CRLF line endings and newline_3.2.txt has LF line endings. M.Z, how did you obtain them? did you start a subprocess? -- nosy

[issue13118] Py_BuildValue format f incorrect description.

2011-10-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I've checked in the code: 'f' and 'd' are really the same (Python/modsupport.c). And in http://en.wikipedia.org/wiki/Stdarg.h, you can read: A float will automatically be promoted to a double. -- nosy: +amaury.forgeotdarc

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Your application does not segfault with 2.7 because buffered files and sockets use a very different implementation. The io module is present in all versions, but only Python3 uses it for all file-like objects. If the unit test

[issue6715] xz compressor support

2011-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: For bz2, Tools/buildbot/external-common.bat has code to download bz2 source, and PCbuild/_bz2.vcproj include and compile these files together with _bz2.pyd. The _ssl module does a similar thing, except that libeay32.lib

[issue13103] copy of an asyncore dispatcher causes infinite recursion

2011-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: So, in 3.1 hasattr(y, '__setstate__') *did* recurse and hit the limit, but the exception was caught and hasattr returned False? I think I prefer the new behavior... The patch looks good, I would simply have raised AttributeError(name

[issue13103] copy of an asyncore dispatcher causes infinite recursion

2011-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Let's add the test to 3.3 nonetheless. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13103

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: An unraisable exception warning will be displayed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13070

[issue13071] IDLE refuses to open on windows 7

2011-10-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This issue is very similar to issue5707: it is possible to define a custom key binding to Alt or Control: just click the Alt box and don't select a letter. There is no check, it's possible to save this buggy key binding, and IDLE won't

[issue13071] IDLE refuses to open on windows 7

2011-10-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What did you do to solve the problem? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13071

[issue13091] ctypes: memory leak

2011-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: How did you obtain this? the resize() function is not called by test_multiprocessing. And are you sure that it's not some kind of reference leak? (this pointer is tied to a CDataObject; its tp_alloc should free the memory

[issue13044] pdb throws AttributeError at end of debugging session

2011-09-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: By modifying a bit the Python intepreter, I got this traceback: Traceback (most recent call last): File /home/amauryfa/python/cpython2.7/Lib/_weakrefset.py, line 38, in _remove def _remove(item, selfref=ref(self)): File /home

[issue13006] bug in core python variable binding

2011-09-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is a bug in the script; the code is similar to the following:: funclist = [] global_list = [] funclist.append(global_list) global_list.append(1) funclist.append(global_list) print funclist [[1], [1]] i.e

[issue6715] xz compressor support

2011-09-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I'm a bit worried by the Windows version: - liblzma can't be compiled by Visual Studio: too many C99 isms, mostly variables declared in the middle of a block. It's doable for sure, but it's a lot of work. - liblzma is normally

[issue12881] ctypes: segfault with large structure field names

2011-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Note that there is at least one other place where alloca() is used with potentially large values: the POINTER() function in callproc.c. Also, PyUnicode_FromFormat could be used instead of sprintf

[issue12483] CThunkObject_dealloc should call PyObject_GC_UnTrack?

2011-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I was going to say that the patch has no visible effect, since PyObject_GC_Del() calls something which has the same effect as PyObject_GC_Untrack... But the following code crashes the interpreter! And of course the patch fixes

[issue12483] CThunkObject_dealloc should call PyObject_GC_UnTrack?

2011-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Thanks for your help! I fear they are many other places like this one in CPython code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12483

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2011-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The path with PyDict_New() is never taken, because PyModule_New already fills md_dict. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue12951] List behavior is different

2011-09-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: See also http://docs.python.org/faq/programming.html#how-do-i-create-a-multidimensional-list -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-09-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: O_CLOEXEC is not linux-only. Windows has the same flag. In file-opening functions there is lpSecurityAttributes argument How do you suggest to use it? Even on Windows, python calls open(). And lpSecurityAttributes is an argument

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-09-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Why not to use CreateFile() on Windows platform? Good idea! Please open a separate issue for it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105

[issue12876] Make Test Error : ImportError: No module named _sha256

2011-09-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The setup.py script does not look correct when openssl is not installed: the _sha256 and _sha512 modules are compiled under this condition:: if COMPILED_WITH_PYDEBUG or openssl_ver min_sha2_openssl_ver: By comparison, the _md5

[issue12861] PyOS_Readline uses single lock

2011-09-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Well, readline is supposed to be used with a console, and there is only one usually. Why would you want to use readline from multiple threads? -- nosy: +amaury.forgeotdarc ___ Python

[issue12878] io.StringIO doesn't provide a __dict__ field

2011-09-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Actually it already fails with 3.1 (I tried hg up v3.1) Then I played with hg bisect, and unsurprisingly it answered: Traceback (most recent call last): File string, line 1, in module AttributeError: '_io.StringIO' object has

[issue12882] mmap crash on Windows

2011-09-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Is it a crash, or do you get a exception with a nice message? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12882

[issue12881] ctypes: segfault with large structure field names

2011-09-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Certainly the effect of some alloca call with a large value, then the stack overflows. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12881

[issue12876] Make Test Error : ImportError: No module named _sha256

2011-09-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Please run the make command again. It will list the modules that were skipped and not compiled. Which modules do you see there? Also, which version of OpenSSL is installed? -- nosy: +amaury.forgeotdarc

[issue9651] ctypes crash when writing zerolength string buffer to file

2011-08-30 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9651

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-08-30 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- resolution: accepted - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11241

[issue12865] import SimpleHTTPServer

2011-08-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is a duplicate of issue9291. -- nosy: +amaury.forgeotdarc resolution: - duplicate status: open - closed superseder: - mimetypes initialization fails on Windows because of non-Latin characters in registry

[issue12843] file object read* methods in append mode overflows

2011-08-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: You should call the .flush() method when switching from writes to reads. Nothing really overflows, but the fread() function may return uninitialized memory. In versions 2.x, python uses the fopen, fread and fwrite function (from

[issue12802] Windows error code 267 should be mapped to ENOTDIR, not EINVAL

2011-08-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Unfortunately, it won't work. _dosmaperr() is not exported by msvcrt.dll, it is only available when you link against the static version of the C runtime. -- ___ Python tracker rep

[issue12802] Windows error code 267 should be mapped to ENOTDIR, not EINVAL

2011-08-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Note that this file is not written by hand. It's generated by PC/generrmap.c, which uses the _dosmaperr() function provided by the msvcrt. If we want to modify it, this should be clearly marked somewhere

[issue12802] Windows error code 267 should be mapped to ENOTDIR, not EINVAL

2011-08-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: If you have a copy of Visual Studio, you can see the code of _dosmaperr() in VC/crt/src/dosmap.c. Otherwise the Google query inurl:dosmap.c returns some online copies of this file

[issue12760] Add create mode to open()

2011-08-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: - os.open followed by os.fdopen is easy: it isn't that easy to get the incantation right (the pure Python open() in _pyio is 70 lines of code), especially if you want the file object to have the right name attribute What if we can

[issue9200] Make the str.is* methods work with non-BMP chars on narrow builds

2011-08-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This issue and #5127 should not be backported to 2.7: narrow builds don't even accept unichar(0x1). Only python 3 can slowly pretend to implement utf-16 features. -- ___ Python tracker

[issue12797] io.FileIO and io.open should support openat

2011-08-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A third idea is to find a way to override the low-level open() function (the one that returns a fd). openat() seems to exist only on Linux, so I'm -1 on adding new parameters to support this function only. -- nosy

[issue12775] immense performance problems related to the garbage collector

2011-08-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Which version of Python did you test with? Can you try with version 3.2? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12775

[issue12755] Service application crash in python25!PyObject_Malloc

2011-08-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: With a buffer overrun anything can happen... Here, I would recommend PyErr_Format() instead. But it also may be some other corruption happening before! -- ___ Python tracker rep

[issue12755] Service application crash in python25!PyObject_Malloc

2011-08-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Can you please give more context? From the information you gave: - Python is embedded in some program adem.exe. - Memory seems corrupted, and a C call to PyString_FromStringAndSize() segfaults in PyObject_Malloc(). Most of the time

[issue12764] segfault in ctypes.Struct with bad _fields_

2011-08-16 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: This crashes on python 3.3:: class S(ctypes.Structure): _fields_ = [(b'x', ctypes.c_int)] This also crashes on python 2.7:: class S(ctypes.Structure): _fields_ = [(u'x\xe9', ctypes.c_int)] The cause is the same

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-08-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, the patch looks good! -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11241

[issue11866] race condition in threading._newname()

2011-08-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Are you sure that counter.next() cannot release the GIL? Remember that any DECREF can trigger the garbage collector and execute arbitrary code... -- nosy: +amaury.forgeotdarc ___ Python

[issue12708] multiprocessing.Pool is missing a starmap[_async]() method.

2011-08-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: +def starmapstar(args): +return list(itertools.starmap(args[0], args[1])) Is your new function restricted to 2 arguments? -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue12655] Expose sched.h functions

2011-07-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: @@ -10330,26 +10899,34 @@ INITFUNC(void) I know that it's only an increase of 5%, but I feel that posixmodule.c is already large enough. Does this feature belongs to the os module? Or is it time to split posixmodule.c in several pieces

[issue12632] Windows GPF with Code Page 65001

2011-07-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: First, a call to abort() is not a GPF: it's not an interrupt from the kernel or the OS, it's just an explicit (albeit brutal) way to exit from an application. There is no potential back door here. Then, the Fatal Python error: line

[issue3581] failures in test_uuid

2011-07-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What is the output of this command? ./python -m test.regrtest -v test_uuid -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3581

[issue3581] failures in test_uuid

2011-07-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: hum, maybe an issue with the MAC address of your virtual server? What do you get if you run: ifconfig -a | grep -i -e hwaddr -e ether -- ___ Python tracker rep...@bugs.python.org http

[issue3581] failures in test_uuid

2011-07-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Well, without a valid MAC address the function cannot work... On the other hand, I would not worry too much: uuid._ifconfig_getnode() is an internal function; and since all the other tests pass, uuid.getnode() probably has other ways

[issue12591] TextIOWrapper should fall back on read() if read1() doesn't exist

2011-07-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: write_through is not used in _pyio.py, is it expected? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12591

[issue12591] TextIOWrapper should fall back on read() if read1() doesn't exist

2011-07-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Looks good, then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12591 ___ ___ Python

[issue12528] Implement configurable bitfield allocation strategy

2011-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: My review of the patch: http://bugs.python.org/review/12528/show -- nosy: +amaury.forgeotdarc stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue12569] sqlite3 segfaults and bus errors when given certain unicode strings as queries

2011-07-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It seems that a fix was merged in the 3.1 branch, somewhere between 3.1.2 and 3.1.3. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12569

[issue12569] sqlite3 segfaults and bus errors when given certain unicode strings as queries

2011-07-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The fix was c073f3c3276e (thanks to hg bisect) the variable operation_cstr is not used before the call to pysqlite_cache_get(), which also tries to encode the statement into utf8 and correctly raises an exception. In early 3.1.2

[issue12559] gzip.open() needs an optional encoding argument

2011-07-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: There remains a difference between open() and gzip.open(): open(filename, 'r', encoding=None) is a text file (with a default encoding), gzip.open() with the same arguments returns a binary file. Don't know how to fix this though

[issue4376] Nested ctypes 'BigEndianStructure' fails

2011-07-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Is there a unit test about the actual feature: that the bytes are actually swapped in the structure? For example, with a class T(BigEndianStructure): _fields_ = [(a, c_int), (b, c_int)] cast a pointer to T into a pointer to c_int

[issue12499] textwrap.wrap: add control for fonts with different character widths

2011-07-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: About the patch: the function should not be passed to the constructor, it could be a regular method that can be overridden in subclasses. -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue12489] email.errors.HeaderParseError if base64url is used

2011-07-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This gives the correct result: decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU/xkcmluZzNwLmpwZw==?=') (I replaced _ with /) The header was probably generated by a variant of the base64 encoding, like this one: http

[issue12476] ctypes: need example how to pass raw data from Python

2011-07-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Can you suggest a patch? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12476

[issue12412] non defined representation for pwd.struct_passwd

2011-07-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: pypy did not use a structseq in this case. Fixed in (pypy's repo) dded6e510044 -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12412

[issue12482] input() not working correctly on Mac OS X

2011-07-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: You are certainly using Python 2 with code designed for Python 3... Can you check? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12482

[issue12473] factory func of collections.defaultdict should receive the missing key as args when called.

2011-07-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: -1. Besides compatibility issues, defaultdict is a dict: it contains data, and is not meant to consume CPU when accessing items. Its default function should return initial values, like 0 or an empty list. I think what you want

[issue12465] gc.get_referents can be used to crash Python

2011-07-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This looks a lot like the crasher described in Lib/test/crashers/underlying_dict.py For the record, the similar issue1517663 was closed even though there was a patch, with a comment of the if it hurts, don't do it kind

[issue12450] Use the Grisu algorithms to convert floats to strings

2011-07-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Agreed. If some volunteer wants to work on it, I suggest to make an extension module first, so that everybody can try and compare with the current routines. -- ___ Python tracker rep

[issue12450] Use the Grisu algorithms to convert floats to strings

2011-06-30 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: Reported by Michael Ford in msg139402: http://www.serpentine.com/blog/2011/06/29/here-be-dragons-advances-in-problems-you-didnt-even-know-you-had/ describes a new algorithm for float-str conversions. It would be interesting to see

[issue7117] Backport py3k float repr to trunk

2011-06-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I've filed issue12450 to track this last idea. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7117

[issue12446] StreamReader Readlines behavior odd

2011-06-29 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- nosy: +haypo, lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12446 ___ ___ Python

[issue12447] ~True is not False

2011-06-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Did you try the not operator? http://docs.python.org/reference/expressions.html#boolean-operations not True False not False True -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - pending

[issue12435] Input function does not strip trailing '\r' from string input

2011-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Already fixed with issue11272, which will be included in 3.2.1 and 3.3. -- nosy: +amaury.forgeotdarc resolution: - out of date status: open - closed superseder: - input() has trailing carriage return on windows

[issue12362] General Windows stdout redirection not working

2011-06-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: IMO the cause is actually the same as the one for issue9390, i.e. a bug in the Windows console. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12362

[issue12362] General Windows stdout redirection not working

2011-06-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The file association for .py is pythonw Really? http://docs.python.org/using/windows.html#executing-scripts -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-06-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What is the use of these code_page_encode() functions? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12281

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-06-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't know yet how Windows do decode bytes filenames (especially how it handles undecodable bytes), I suppose that it uses MultiByteToWideChar using cp=CP_ACP and flags=0. It's likely, yes. But you don't need a new codec function

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The change to sys.platform=='linux' would break code even on current platforms. OTOH, we have sys.platform=='win32' even on Windows 64bit; would this favor keeping 'linux2' on all versions of Linux as well

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This change is reasonable for the long term. But it *will* break a lot of code. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12326

[issue12287] ossaudiodev: stack corruption with FD = FD_SETSIZE

2011-06-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't understand if socket file descriptors are different than (classic) file descriptors. On Windows, sockets are completely independent from file descriptors. A socket id can be large (typically over 1000), fortunately a fd_set

[issue1195571] simple callback system for Py_FatalError

2011-06-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Sorry, the documentation in the patch is wrong. It should be: Cause :cfunc:`Py_FatalError` to invoke the given function before printing to standard error and aborting out of the process. I don't think it's worth making it more complex

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Sadly, marshal.load() looks broken: - The function starts with the comment /* XXX Quick hack -- need to do this differently */ - It starts by calling f.read() which consumes the whole file (and explains the issue reported here

[issue12292] bpython

2011-06-09 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12292

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: - Please replace tabs characters by space - // comments are not accepted by some picky C89 compilers Also, calling f.read(1) for each character may have a large performance impact. I don't know how this can be solved though

[issue2057] difflib: add patch capability

2011-06-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Anatoly, Even if I remove all sarcasm from your previous answer, I don't see what it brings to the current issue. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue12276] 3.x ignores sys.tracebacklimit=0

2011-06-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This was changed a long time ago with 565012d1123d -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12276

[issue12232] embedded python import cmath

2011-06-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Is it possible that the problem is related to floating point exceptions? A quick Google search showed similar issue in another embedded library: http://www.softintegration.com/support/faq/embed.html#borland It seems important to add

[issue12262] Not Inheriting File Descriptors on Windows?

2011-06-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, that's probably how the cygwin runtime library works. But this method is difficult to use from a shell script. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue12252] '\u' in unicode raw string raise an syntax error

2011-06-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Even in raw unicode strings, \u is processed as an escape sequence; see the very last paragraph of http://docs.python.org/reference/lexical_analysis.html#string-literals Yes, this can be surprising, and was changed with Python 3

[issue12262] Not Inheriting File Descriptors on Windows?

2011-06-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Is socat a cygwin utility? In this case, you should use the python interpreter built for the cygwin platform. I'm quite certain that the standard win32 python cannot work the way you want. Keep in mind that on Windows, file

[issue12247] Finding subprocess.py depends on how IDLE is opened

2011-06-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: sys.path is probably not relevant here (it's used to import python modules). Can you print the value of os.environ['PATH'] instead? -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue12106] reflect syntatic sugar in with ast

2011-05-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Does this change have a visible effect? If so, can it have some unit test? Otherwise pypy and other alternative implementations are likely to miss this change. -- nosy: +amaury.forgeotdarc

[issue12106] reflect syntatic sugar in with ast

2011-05-28 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12106 ___ ___ Python

[issue12106] reflect syntatic sugar in with ast

2011-05-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Thanks for this answer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12106

[issue1526] DeprecationWarning in zipfile.py while zipping 113000 files

2011-05-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The ZIP file format is unable to store dates before 1980. With version 3.2, your script even raises an exception. Please file this in a different issue. -- nosy: +amaury.forgeotdarc

<    1   2   3   4   5   6   7   8   9   10   >