[issue1029] py3k: io.StringIO.getvalue() returns \r\n

2007-08-26 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: io.StrinIO.getvalue() correctly decodes bytes from the underlying buffer, but does not translate \r\n to \n. Python 3.0x (py3k, Aug 26 2007, 14:39:16) [MSC v.1400 32 bit (Intel)] on win32 Type "help", "copyright", "

[issue1030] py3k: Adapt _winreg.c to the new buffer API

2007-08-26 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc: -- components: Windows files: winreg.diff severity: normal status: open title: py3k: Adapt _winreg.c to the new buffer API type: compile error versions: Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://b

[issue1031] py3k: compilation with VC2005

2007-08-26 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: This patch is necessary to compile inside the PCBuild8 directory -- components: Windows files: vc2005.diff messages: 55315 nosy: amaury.forgeotdarc severity: normal status: open title: py3k: compilation with VC2005 type: compile error ver

[issue1031] py3k: compilation with VC2005

2007-08-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Sorry, it's probably because I somehow converted the line endings. Attached a new version of the patch. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1031> ___

[issue1029] py3k: io.StringIO.getvalue() returns \r\n

2007-08-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > As far as I know, StringIO should not do any string transformations. (Not sure if you agree with the patch or not) That's why the current behaviour is not correct: When I write('\n'), getvalue()

[issue1031] py3k: compilation with VC2005

2007-08-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Yes, everything compiles now. I discovered that the additional libraries not necessary if I update my VC 2005 Express installation as in this post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=133236&SiteID=1 > The problem is that

[issue1029] py3k: io.StringIO.getvalue() returns \r\n

2007-08-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Here is a new version of the class, which removes the 'newline' argument from the constructor. I also removed the 'encoding' argument, since this is really an implementation detail of the underlying

[issue1047] py3k: corrections for test_subprocess on windows

2007-08-28 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: I join three patches for py3k on Windows: 1/ getargs.diff adds the 'Z' and 'Z#' format specifiers for PyArg_ParseTuple. They mimic z and z# for unicode strings, by accepting a Unicode or None (in which case the Py_UNICODE* poin

[issue1047] py3k: corrections for test_subprocess on windows

2007-08-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Did I say that test_subprocess now passes on windows? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1047> __ subprocess.diff Descrip

[issue1047] py3k: corrections for test_subprocess on windows

2007-08-28 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc: __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1047> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1048] py3k: correction for test_float on Windows

2007-08-28 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: test_float crashes on Windows, because the %zd format is used in a call to PyOS_snprintf(). The attached patch properly uses PY_FORMAT_SIZE_T. -- components: Windows files: formatter.diff messages: 55389 nosy: amaury.forgeotdarc severity: n

[issue1050] py3k: correction for test_marshal on Windows

2007-08-28 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: On Windows, debug builds insert stack probes, and recursive functions tend to exhaust the stack faster. This patch reduces the marshal maximum depth from 2000 to 1500 for debug builds only. Optimized builds are not affected. -- compo

[issue1050] py3k: correction for test_marshal on Windows

2007-08-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I forgot to say that this allows test_marshal to pass with debug builds. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1040] Unicode problem with TZ

2007-08-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I have a patch for this, which uses MBCS conversion instead of relying on the default utf-8 (here and several other places). Tested on a French version of winXP. Which leads me to the question: should Windows use MBCS encoding by default when conve

[issue1075] py3k: Unicode error in os.stat on Windows

2007-08-31 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: os.stat("nonexistent") raises a UnicodeDecodeError on German, Polish and French Windowses. The reason: Windows returns an error message which contains accented letters encoded as MBCS, but python decodes it with utf-8. This patch uses the

[issue1076] py3 patch: full Unicode version for winreg module

2007-08-31 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: With this patch, the winreg module is now completely unicode: it only uses Windows wide-char API functions, and all strings (keys, subkeys, values) are passed untranslated. str8 is banned, and byte objects are only allowed for raw binary data. Not

[issue1185] py3k: Completely remove nb_coerce slot

2007-09-20 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: Arguments coercion has been removed in py3k for a while, but there are still some traces of it. This patch removes the nb_coerce slot and the last usages of __coerce__. Documentation is also updated: Py_TPFLAGS_CHECKTYPES does not exists anymore.

[issue1189] Documentation for tp_as_number tp_as_sequence tp_as_mapping

2007-09-21 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: This patch adds documentation for all the fields in the tp_as_number, tp_as_sequence and tp_as_mapping structures. It may not be complete, but is still better than the XXX in the current docs. This is my first contribution to the doc, feel free to

[issue1199] Documentation for tp_as_number... version 2.6

2007-09-24 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: This patch is similar to http://bugs.python.org/issue1189, but in line with python svn trunk (and 2.5 most probably as well): documentation of all slots of tp_as_number, tp_as_mapping, tp_as_sequence. The main difference with 3.0 is the coe

[issue1297] pyconfig.h not compatible with MS VC++ Express Edition

2007-10-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I found that BaseTsd.h is part of the Windows SDK, which is not included in the Express Edition. It can be installed separately. OTOH, the python core still compiles without the #include (using VC++ 2005 Express Edition). What about other compilers?

[issue1304] py3k compilation on Windows

2007-10-19 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: This patch is needed to have py3k compile on win32, since the introduction of bytes_methods.c. Also, use the recently re-added md5module.c and sha1module.c, because a precompiled openssl library is difficult to obtain on Windows. Note: I tested

[issue1304] py3k compilation on Windows

2007-10-22 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I generated the file with "svn diff", on Windows. Is it a line ending issue in the diff file? Many text files have the svn:eol-style=native property, but the PCBuild8/*/*.vcproj don't. I upload a new version of the patch, with all li

[issue1319] py3k: fixes for test_ctypes

2007-10-23 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: Updates to ctypes for python 3.0 to make the tests pass. Notable changes are: - return bytes instead of str8 - integers in range(256) are accepted as "one char string": libc.strchr("abcdef", 98) is now valid. - directly use the

[issue1323] py3k: file.truncate() changes the file position

2007-10-24 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: This patch corrects a problem in test_file.py on Windows: f.truncate() seeks to the truncation point, but does not empty the buffers. In the test, f.tell() returns -1... Now we flush the file before, and seek to the initial position after. The

[issue1340] correction for test_tempfile in py3k on Windows

2007-10-26 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: This tiny patch correct a failure in test_tempfile on Windows: in SpooledTemporaryFile, avoid translating the newlines twice. Otherwise, in "universal" text mode, \n gets transformed to \r\n, then to \r\r\n, which is read as \n\n. Passing

[issue1341] correction for test_fileinput in py3k on Windows

2007-10-26 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: This patch corrects test_fileinput on Windows: when redirecting stdout, os.open should be given O_BINARY, because the file descriptor is then wrapped in a text-mode file; os.fdopen(fd, "w"). -- files: fileinput.diff messa

[issue1341] correction for test_fileinput in py3k on Windows

2007-10-26 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc: -- components: +Windows versions: +Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1341> __ ___ Python-

[issue1359] py3k: out of bounds read in PyUnicode_DecodeUnicodeEscape

2007-10-29 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: A correction for the problem found by GvR in change 58692: > There's one mystery: if I remove ob_sstate from the PyStringObject struct, > some (unicode) string literals are mutilated, e.g. ('\\1', '\1') prints >

[issue1359] py3k: out of bounds read in PyUnicode_DecodeUnicodeEscape

2007-10-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I don't like this assert either: this function is part of the public API, and should not crash the interpreter just because of a trailing \. To test easily: import ctypes decode = ctypes.pythonapi.PyUnicodeUCS2_DecodeUnicodeEscape deco

[issue1382] py3k-pep3137: patch for test_ctypes

2007-11-04 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: This patch corrects test_ctypes in the py3k-pep3137 branch. Replacing PyBytes_* by PyString_* was 99% of the task. Also had to modify binascii, which used to return buffers instead of bytes strings. Tested on winXP. -- components: Tests

[issue1386] py3k-pep3137: patch to ensure that all codecs return bytes

2007-11-04 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: Most codecs return buffer objects, when the rule is now to return bytes. This patch adds a test, and corrects failing codecs. (more PyBytes_* -> PyString_* replacements) -- components: Unicode files: codecs.diff messages: 57

[issue1387] py3k-pep3137: patch for hashlib on Windows

2007-11-04 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: On Windows, openssl is not always available, in this case python uses its own implementation of md5, sha1 &co. This patch correct the failing tests (test_hashlib and test_uuid), by returning bytes instead of buffers. -- components: Wind

[issue1384] Windows fix for inspect tests

2007-11-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: A slightly modified patch, which uses os.path.normcase before comparing file names. -- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file8700/py3k_inspect_2.diff __ Tracker <[EMAIL PROTECTED

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-05 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc: When reading a Windows text file one byte at a time, \r\n get split into two function calls, and the user receives two \n. The following test fails (put it somewhere in test_io.py, inside TextIOWrapperTest for example) def testReadOneByOne

[issue1384] Windows fix for inspect tests

2007-11-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Yes, the patch is needed. The problem arises when you run the python executable in different ways WITHOUT deleting the .pyc files. Example on my machine: Note that the exact path to run python is not the same: >cd C:\dev\python\py3k\PCbuild8

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Some thoughts: - is it ok to call replacenl multiple times on the same string? \r\r\n and other combinations like this. - I wonder if it is possible to correctly handle \r\n at the CHUNK_SIZE limit without an incremental decoder. it seems that we ne

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This patch goes in the right direction, but has several problems IMO: - it reads a complete chunk for just one more byte - the re-read should be disabled when lineends are not translated these two are minor annoyance and can be easily corrected

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > The new patch fixes test_netrc for me but test_csv and test_mailbox are > still broken. For test_mailbox at least, I think I have a clue: the _pending member now contains translated newlines. But in tell(), we use its length and compare

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > io3.diff does replacenl() in adjust_chunk() (trying Amaury's > suggestion). Can you see if it fixes test_mailbox failures? Unfortunately, it does not. And some tests now fail in test_io (correcting testTelling seems a good start poin

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: OK, I have taken another approach which seems to work (see io4.diff): It uses an IncrementalNewlineDecoder, which wraps the initial (e.g. utf-8) decoder. All the tests in test_io pass on Windows, including those added by io.diff and io2.diff. This wa

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Sorry, I think I corrupted the file by hand. Here is another version Added file: http://bugs.python.org/file8712/io4.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > About mailbox.py: it seems that the code cannot work Of course: the file mode was recently changed from rb+ to r+ (revision 57809). This means that every occurrence of os.linesep has to disappear. Oh my. __

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > The new io4.diff breaks test_io and test_univnewlines on Linux oops, I missed this one. Here is a new version: io5.diff, which should handle the "seen newlines" better. Two more bug fixes found by test_univnewlines: - write() should

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Updated patch (io6.diff): - simplifications in readline - seennl is now completely handled by the NewlineDecoder Added file: http://bugs.python.org/file8719/io6.diff __ Tracker <[EMAIL PROTECTED]> <http://b

[issue1415] py3k: pythonw.exe fails because std streams a missing

2007-11-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I made some checks with the vc2005 (msvcr80) runtime library: - fd==-2 corresponds to the _NO_CONSOLE_FILENO constant. A comment in the CRT code says: /* * For stdin, stdout & stderr, we use _NO_CONSOLE_FILENO (a value * diffe

[issue1415] py3k: pythonw.exe fails because std streams a missing

2007-11-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Doh, you're right: > c:\python24\pythonw -c "import sys;print sys.stderr.fileno()"|more -1 > c:\python24-vc8\pythonw -c "import sys;print sys.stderr.fileno()"|more -2 /me needs to get the code of msvcrt7. We could

[issue1265] pdb bug with "with" statement

2007-11-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Corrected by revision 58958. "with" is innocent. The problem is this function in abc.py which uses a generator expression: def __instancecheck__(cls, instance): """Override for isinstance(instance, c

[issue1265] pdb bug with "with" statement

2007-11-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: __instancecheck__ should be simpler: all classes are new-style, how is it possible to have different results for instance.__class__ and type(instance) ? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1265] pdb bug with "with" statement

2007-11-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > BTW**2: I've noticed that abc.py's __instancecheck__ gets called a lot > at times when I don't expect it. Can you research this a bit? In classobject.c, method_call() calls PyObject_IsInstance() on the first arg when the metho

[issue1415] py3k: pythonw.exe fails because std streams a missing

2007-11-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: (Sorry, I cannot test just now) What happens if pythonw.exe calls the print() function? Please tell me that it does not throw an exception. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1415] py3k: pythonw.exe fails because std streams a missing

2007-11-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Is it the only possibility? On Windows, it is quite common to print to stdout for debugging purposes, then deploy the application with pythonw.exe which suppresses the console. Without any change to the code. Most pygame programs I know work this way

[issue1415] py3k: pythonw.exe fails because std streams a missing

2007-11-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > As far as I can see print() works if sys.stdout is either None > (discard output ASAP) or a file like object. Even > print(file=syst.stderr) works. Ah, I prefer this. > sys.stdout.write() is going to fail when sys.stdout is None &g

[issue1134] Parsing a simple script eats all of your memory

2007-11-14 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: fp_readl is indeed broken in several ways: - decoding_buffer should be reset to NULL when all data has been read (buflen <= size). - the (buflen > size) case will cause an error on the next pass, since the function cannot handle PyBytesObject

[issue1134] Parsing a simple script eats all of your memory

2007-11-15 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Corrected in revision 59001, with a modified patch. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1452] subprocess's popen.stdout.seek(0) doesn't raise an error

2007-11-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Python 2.5 on Windows has the same behaviour, it does not fail. In general, python does not try to hide this kind of differences. -- nosy: +amaury.forgeotdarc __ Tracker <[EMAIL PROTECTED]> <http://b

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Committed the patch in r59060. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1342] Crash on Windows if Python runs from a directory with umlauts

2007-11-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Assign to myself. Among the things to do, use Py_FileSystemDefaultEncoding (=mbcs on Windows) to encode sys.path items; likewise in NullImporter_init and other functions. So many places to change, we need serious testcases. -- ass

[issue1193] os.system() encoding bug on Windows

2007-11-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Note that the final .encode("cp936") is now invalid: os.system accepts unicode strings, not bytes: >>> os.system(("echo " + sys.stdin.readline().rstrip("\n"))) Corrected as r59065. --

[issue1342] Crash on Windows if Python runs from a directory with umlauts

2007-11-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Agreed. I will try to stay with PyObjects* until really needed by a system call. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1460] codecs utf7 decoding error

2007-11-20 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The utf-7 incremental decoder was indeed losing its state between two chunks of data. Corrected as r59076. -- nosy: +amaury.forgeotdarc resolution: -> fixed status: open -> closed __ Tracker <[E

[issue1402] Interpreter cleanup: order of _PyGILState_Fini and PyInterpreterState_Clear

2007-11-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I managed to reproduce the problem consistently with the following code: import ctypes, sys, time, thread # Module globals are cleared before __del__ is run # So save the functions in class dict class C: ensure = ctypes.pythonapi.PyGILState_E

[issue1409] new keyword-only function parameters interact badly with nested functions

2007-11-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Corrected as r59155. Thanks for the report! -- nosy: +amaury.forgeotdarc resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1442] pythonstartup addition of minor error checking

2007-11-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Shall we close this issue? -- nosy: +amaury.forgeotdarc __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1442> __ _

[issue1445] SystemError accessing uninitialised cell contents

2007-11-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Fixed in r59170 (trunk) and r59171 (release25-maint). -- nosy: +amaury.forgeotdarc resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1402] Interpreter cleanup: order of _PyGILState_Fini and PyInterpreterState_Clear

2007-11-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > The _PyGILState_Fini function might cause user code to run as well, > it removes the thread-local variable that contains the PyThreadState > for threads, and that contains some Python objects that might contain > arbitrary values

[issue1045] Performance regression in 2.5

2007-11-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The slowdown is due to the new function _PyObject_LengthHint: on my Win2K machine, the command python -m timeit "tuple(1 for _ in xrange(3))" answers: 10 loops, best of 3: 4.14 usec per loop By adding a line "return rv;&qu

[issue1509] Documentation lacking for the sqlite3 module.

2007-11-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > I thought that at one point those methods were documented sqlite3 implements the DB-API: http://www.python.org/dev/peps/pep-0249/ is it the documentation you had in mind? -- nosy: +amaury.forgeotdarc __

[issue1521] string.decode() fails on long strings

2007-11-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I don't have any 64bit machine to test with, but it seems to me that there is a problem in the function getargs.c::convertsimple(): the t# and w# formats use the buffer interface, but the code uses an int to store its length! Look for the

[issue1521] string.decode() fails on long strings

2007-11-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Here is a patch, with a unit test (I was surprised that test_bigmem.py already contained a test_decode function, which was left empty). But I still don't have access to any 64bit machine. Can someone try and see if the new tests in test_bigm

[issue1402] Interpreter cleanup: order of _PyGILState_Fini and PyInterpreterState_Clear

2007-11-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Committed revision 59231 in trunk. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1529] Error when passing a file object to tarfile.open()

2007-11-30 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This problem was fixed in r57617. Can you check with a more recent build? -- nosy: +amaury.forgeotdarc resolution: -> works for me __ Tracker <[EMAIL PROTECTED]> <http://bugs.pyt

[issue12881] ctypes: segfault with large structure field names

2011-09-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 sp

[issue12483] CThunkObject_dealloc should call PyObject_GC_UnTrack?

2011-09-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 it... import ctype

[issue12483] CThunkObject_dealloc should call PyObject_GC_UnTrack?

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

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

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

[issue6715] xz compressor support

2011-09-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 nor

[issue13006] bug in core python variable binding

2011-09-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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(globa

[issue13044] pdb throws AttributeError at end of debugging session

2011-09-25 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 "/

[issue13091] ctypes: memory leak

2011-10-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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

[issue13071] IDLE refuses to open on windows 7

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

[issue13071] IDLE refuses to open on windows 7

2011-10-03 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: What did you do to solve the problem? -- ___ Python tracker <http://bugs.python.org/issue13071> ___ ___ Python-bugs-l

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

2011-10-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: An "unraisable exception" warning will be displayed. -- ___ Python tracker <http://bugs.python.org/issue13070> ___ _

[issue6715] xz compressor support

2011-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 and libssleay32.lib are bui

[issue13103] copy of an asyncore dispatcher causes infinite recursion

2011-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 AttributeErr

[issue13103] copy of an asyncore dispatcher causes infinite recursion

2011-10-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Let's add the test to 3.3 nonetheless. -- ___ Python tracker <http://bugs.python.org/issue13103> ___ ___

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

2011-10-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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

[issue6715] xz compressor support

2011-10-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 not be too diff

[issue6715] xz compressor support

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

[issue6715] xz compressor support

2011-10-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 librari

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

2011-10-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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: +amaury.forgeo

[issue13118] Py_BuildValue format f incorrect description.

2011-10-06 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 dou

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

2011-10-07 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 <http://bugs.python.

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

2011-10-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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. This was done exactl

[issue6715] xz compressor support

2011-10-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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, to be applied after Nad

[issue4431] Distutils MSVC doesn't create manifest file

2011-10-18 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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, and

[issue12760] Add create mode to open()

2011-10-31 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc 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 d7;Arc
Amaury Forgeot d'Arc 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 <

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

2011-11-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: And to be explicit, you can now write: def open_cloexex(filename, mode='r'): return open(filename, mode, opener=lambda path, mod: os.open(path, mod|os.O_CLOEXEC)) -- ___ Python

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

2011-11-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > So why not to add 'e' character You said it: because it can't be written consistently on all platforms. For example, python does not use CreateFile on Windows, see #12939. -- __

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

2011-11-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: An implementation of RawIO with the win32 API can be useful (and I'd be interested to compare the performance) But maybe not for all usages: some Python interfaces are defined in terms of file descriptors, imp.load_module(), and PyTokenizer_Fi

  1   2   3   4   5   6   7   8   9   10   >