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

2007-08-26 Thread Amaury Forgeot d'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://bugs.python.org

[issue1031] py3k: compilation with VC2005

2007-08-26 Thread Amaury Forgeot d'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 versions

[issue1031] py3k: compilation with VC2005

2007-08-26 Thread Amaury Forgeot d'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 __ vc2005-2.diff

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

2007-08-26 Thread Amaury Forgeot d'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() currently returns '\r\n

[issue1031] py3k: compilation with VC2005

2007-08-26 Thread Amaury Forgeot d'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=133236SiteID=1 The problem is that the default

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

2007-08-28 Thread Amaury Forgeot d'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 buffer. Index: Lib/io.py

[issue1047] py3k: corrections for test_subprocess on windows

2007-08-28 Thread Amaury Forgeot d'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* pointer is set to NULL

[issue1047] py3k: corrections for test_subprocess on windows

2007-08-28 Thread Amaury Forgeot d'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 Description: Binary data

[issue1047] py3k: corrections for test_subprocess on windows

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

[issue1048] py3k: correction for test_float on Windows

2007-08-28 Thread Amaury Forgeot d'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: normal

[issue1050] py3k: correction for test_marshal on Windows

2007-08-28 Thread Amaury Forgeot d'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.org/issue1050

[issue1040] Unicode problem with TZ

2007-08-29 Thread Amaury Forgeot d'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 converting

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

2007-08-31 Thread Amaury Forgeot d'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 Unicode version

[issue10439] PyCodec C API is not documented in reST

2010-11-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Thanks for the patch, it looks good, I have 2 remarks though: - under the name name could be replaced by under the given name. - The *search_function*'s refcount is incremented by this function. This information is not useful

[issue10437] ThreadPoolExecutor should accept max_workers=None

2010-11-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: pypy does have a GIL! -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10437

[issue10478] Ctrl-C locks up the interpreter

2010-11-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I reproduce the problem, see the call stack below. The issue is in the io module: the function _bufferedwriter_flush_unlocked() runs with the file mutex already acquired, but it calls PyErr_CheckSignals() which may run any code

[issue10504] Trivial mingw compile fixes

2010-11-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I doubt this fix will be enough to fix compilation with mingw32. But IMO it goes in the right direction. With this patch, #ifdef MS_WINDOWS has the meaning of linked with some version of MSVCRT. Do we agree on this, or is another

[issue10504] Trivial mingw compile fixes

2010-11-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Since the patch does not completely fix the mingw32 build, I suggest to apply it only on 3.2, and continue to work on mingw32 support there. Only after we will be able to discuss whether all the changes can be backported to 2.7

[issue10504] Trivial mingw compile fixes

2010-11-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But a strict bugfix should fix something. Is there something that did not work before, and will work after this patch? IOW, how do you compile posixmodule.c with MinGW and does it produce a working module? Now, I *am* interested

[issue8879] Implement os.link on Windows

2010-11-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch uses the ANSI version, and converts the filename from unicode to bytes; this will fail for names that cannot be encoded with the mbcs codec. All other functions in the posix module first try the Wide version of the win32 API

[issue3063] memory leak in random number generation

2010-11-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: For the record, this was finally fixed with issue2862: gc.collect() now clears the free-lists during the collection of the highest generation. -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue10521] str methods don't accept non-BMP fillchar on a narrow Unicode build

2010-11-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: issue9200 already proposes a similar change to str.is* methods. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10521

[issue6715] xz compressor support

2010-11-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Careful: the ctypes module is much slower with pypy than with cpython. In any case, a C extension module is preferred because the (platform-dependent) details of the liblzma library are defined in a .h header file, not as a ctypes

[issue4214] no extension debug info with msvc9compiler.py

2010-11-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A .pdb is the program database that contain debug info, i.e. the mapping between assembler positions and source lines, the description of data structures, and other things that are necessary to debug a program

[issue10569] abc: `issubclass([], my_abstract_type)` raises exception

2010-11-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't agree. issubclass(1, list) has always raised an exception. -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue10569] abc: `issubclass([], my_abstract_type)` raises exception

2010-11-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: issubclass is for relationship between classes. Did you consider isinstance() instead? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10569

[issue8879] Implement os.link on Windows

2010-11-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Looks good, except that win32_error(link, NULL) should be called instead of posix_error(). errno is not guaranteed to be correctly set by the win32 api, and GetLastError() ususally gives more accurate errors

[issue10262] Add --disable-abi-flags option to `configure`

2010-11-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I agree with the intent: package maintainers, or people compiling python for their own need, should have the right to choose the suffix used by extension modules. I suggest another option though, one that directly sets the SOABI used

[issue10262] Add --disable-abi-flags option to `configure`

2010-11-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Note that the soabi name isn't fixed but changes with other configure options. The default value, yes. But my proposal of a --soabi option would not respect this. The caller is responsible for changing the --soabi value when he adds

[issue10262] Add --soabi option to `configure`

2010-11-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Here is a first patch that adds the --with-soabi option. --with-soabi=yes or --with-soabi sets SOABI to the computed value (cpython-32m when I tried it). This is the default behavior on Linux. --with-soabi=no or --without-soabi

[issue10262] Add --soabi option to `configure`

2010-11-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The value of get_config_var(SO) is the same as before, something like .cpython-32.so by default on Linux. (see, I just moved the line SO=.$SOABI$SO at the bottom of the patch). In the C file dynload_shlib.c, I chose the names SO_BASE

[issue10262] Add --soabi option to `configure`

2010-11-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Let's test Linux at least, then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10262

[issue10604] Allocating too much memory for pathes

2010-12-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Hmm, not sure. Try with set PYTHONPATH=.\a;.\b sys.path will contains the entries: current_dir\a current_dir\b a multiplication seems necessary. -- nosy: +amaury.forgeotdarc

[issue9333] Expose a way to enable os.symlink on Windows

2010-12-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: So the presence of os.symlink depends on some dynamic privilege? It seems to me that it's the first time in Python. For example, os.chroot() is always available on Unix, even when the user is not root. Of course the call will fail

[issue10614] ZipFile and CP932 encoding

2010-12-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The ZIP format specification mentions only cp437 and utf8: http://www.pkware.com/documents/casestudies/APPNOTE.TXT see Apeendix D. Do zip files created on Japanese Windows contain some information about the encoding they use? Or do

[issue10615] Trivial mingw compile fixes

2010-12-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: As a consequence, extensions built for the official binaries would crash in the MingW build, and vice versa IMO this is a use case for the new soabi tag... -- nosy: +amaury.forgeotdarc

[issue10615] Trivial mingw compile fixes

2010-12-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Sure - it actually builds a python.exe which is fully working for me. If you need a proof, please let me know, I have no problem uploading it somewhere... This is useless, of course. The build must be reproducible. Here is what I

[issue10615] Trivial mingw compile fixes

2010-12-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: IMO this is a use case for the new soabi tag... Unfortunately not: these tags are not supported on Windows. So it's a argument for adding (optional?) soabi tags on Windows! -- ___ Python

[issue10615] Trivial mingw compile fixes

2010-12-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Thanks for the explanations! These instructions should be turned into a patch. Some questions already: - Why is the generated pyconfig.h not good enough? Could we modify the ./configure script instead? - the empty.c should remain empty

[issue9558] build_ext fails on VS8.0

2010-12-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I happen to have the same change in my workspace. Please apply this patch, it fixes the test suite when compiled with VS8.0. -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue10651] chr(13) is added before chr(10) when issuing .write under windows

2010-12-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: On Windows, newlines in text files are always translated. Please read http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-files -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - closed

[issue1705520] API for excluding methods from unittest stack traces

2010-12-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Maybe a global registry... implemented with a WeakKeyDictionary? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1705520

[issue10262] Add --soabi option to `configure`

2010-12-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The soabi tag could be useful on Windows as well, for example if some package maintainer chooses another version of the compiler, or a custom version of MSVCRT. And FWIW, PyPy currently uses --soabi=pypy-1.4 on all platforms: import

[issue10715] uninformative error message

2010-12-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Normally the filename is part of the error message, as you can see below. It's possible that some operations omit it, though. Which function were you calling? open('foo') Traceback (most recent call last): File stdin, line 1

[issue1449496] Python should use 3GB Address Space on Windows

2010-12-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What is 64-bit safe should be 32-bit safe, not only 31-bit safe Not here. Python uses signed size_t for various lengths and sizes. On win32 this only gives you 31 bits... -- nosy: +amaury.forgeotdarc

[issue8753] Py_ReprEnter and Py_ReprLeave are undocumented

2010-12-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Err... in r87339 there is a typo in all occurrences of 'Py_ReprEntr': Py_ReprEnter of course! -- nosy: +amaury.forgeotdarc status: closed - open ___ Python tracker rep...@bugs.python.org

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Why was sys.setsegfaultenabled() omitted? It may be useful to disable the handler from a script -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue10296] ctypes catches BreakPoint error on windows 32

2010-12-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: With a release build of python, I have a similar behavior on both 2.5 and 2.7; the messages are different though: 2.5: WindowsError: [Error -2147483645] One or more arguments are invalid. 2.7: WindowsError: exception: breakpoint

[issue10764] sysconfig and alternative implementations

2010-12-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: PyPy has exactly the same issue. PyPy's workaround is to have a custom version of sysconfig.py, but this is really a hack. If these config_vars are really determined at compile time, IMO they should be built in the interpreter

[issue10783] struct.pack() and Unicode strings

2010-12-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: At this point a feature change seems unlikely, but it's not too late to emit a DeprecationWarning. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue9333] Expose a way to enable os.symlink on Windows

2010-12-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch looks good, I only have stylistic remarks: - We normally don't use windows-specific types in CPython code. Please use int instead of BOOL. And C variables are usually lowercase, even module globals. I suggest something like

[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But there are probably working usages with unicode strings out there. For example, I've seen code like struct.pack('6sHHBBB', 'GIF87a', ...) Do you suggest to make this 3.1 code stop working in 3.2? In any case, the 'c' format should

[issue10783] struct.pack() and Unicode strings

2010-12-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Since the Release Manager agrees with the change, I withdraw my objection. I have three remarks to the patch: - Some examples in the documentation should be fixed: http://docs.python.org/dev/py3k/library/struct.html#examples pack('ci

[issue10764] sysconfig and alternative implementations

2010-12-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Indeed -- resolution: - duplicate status: open - closed superseder: - Avoid parsing pyconfig.h and Makefile by autogenerating extension module ___ Python tracker rep...@bugs.python.org

[issue9333] Expose a way to enable os.symlink on Windows

2010-12-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Tests now fail on windows XP: http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/3874/steps/test/logs/stdio os.symlink() may raise NotImplementedError, and test.support.can_symlink() should catch

[issue10794] Infinite recursion while garbage collecting loops indefinitely

2010-12-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Normally you should never call __del__, OTOH the issue is the same with a class like:: class A: def close(self): self.close() def __del__(self): self.close() The problem is not with _infinite_ recursion, though

[issue10794] Infinite recursion while garbage collecting loops indefinitely

2010-12-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Precision: with new-styles classes (or py3k) the limit is PyTrash_UNWIND_LEVEL-2. This does not change anything to the problem. -- ___ Python tracker rep...@bugs.python.org http

[issue8278] os.utime doesn't allow a atime (Last Access) which is 27 years in the future.

2011-01-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Here is a renewed patch against py3k, with a test. -- Added file: http://bugs.python.org/file20237/timet_64-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8278

[issue8278] os.utime doesn't allow a atime (Last Access) which is 27 years in the future.

2011-01-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The only concern is that the test probably fails on FAT The patch does not show it, but I've put the test under a 'if get_file_system(support.TESTFN) == NTFS' -- ___ Python tracker rep

[issue8278] os.utime doesn't allow a atime (Last Access) which is 27 years in the future.

2011-01-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Committed r87666 (py3k), I'll backport to 3.1 and 2.7. -- resolution: accepted - fixed status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8278

[issue8278] os.utime doesn't allow a atime (Last Access) which is 27 years in the future.

2011-01-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Merged into release31-maint (r87668) and release27-maint (r87669) -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8278

[issue10814] assertion failed on Windows buildbots

2011-01-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Btw, I have a failed assertion in the test suite, with time.ctime(1e12): File: loctim64.c Line: 78 Expression: (*ptime = _MAX__TIME64_T) This is a recent py3k, compiled with VS2005

[issue9566] Compilation warnings under x64 Windows

2011-01-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: r87733 in pyexpat.c modified a call to PyErr_Format with a %zi format code. This format does not seem to be supported. %zd should be used instead. -- nosy: +amaury.forgeotdarc ___ Python

[issue1075356] exceeding obscure weakproxy bug

2011-01-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's not fixed. range() now uses the tp_index slot, in weakrefs this becomes: WRAP_UNARY(proxy_index, PyNumber_Index) and indeed PyNumber_Index does not accept strings. But try with time.sleep() instead; here the line WRAP_UNARY

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

2011-01-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: - unit tests are needed. - Py_LONG_LONG should be used instead of long long, and the cast removed. - The patch assumes that longlong == int64, but is it true on all platforms? -- nosy: +amaury.forgeotdarc

[issue6532] thread.get_ident() should return unsigned value

2011-01-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: no, DWORD is a 32-bit unsigned integer http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue10854] Output DLL name in error message of ImportError when DLL is missing

2011-01-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Is it even possible? Each time I tried, the only solutions involved an external program like Dependency Walker. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue10854] Output DLL name in error message of ImportError when DLL is missing

2011-01-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The code is in Python/dynload_win.c To load an extension module mymodule.pyd, Python calls LoadLibrary('/path/to/mymodule.pyd'); when it returns NULL, the code calls GetLastError() (which returns 126 in this case) then FormatMessage

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The script unicode2.py uses the console STD_OUTPUT_HANDLE iff sys.stdout.fileno()==1. But is it always the case? What about pythonw.exe? Also some applications may redirect fd=1: I'm sure that py.test does this http://pytest.org

[issue10880] do_mkvalue and 'boolean'

2011-01-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What makes you think it should be a boolean? in http://docs.python.org/py3k/c-api/arg.html#Py_BuildValue b means byte and is processed as a tiny integer. Now, that's true that Py_BuildValue could have a format for boolean values

[issue10880] do_mkvalue and 'boolean'

2011-01-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is the right place to ask... but it will be faster if someone provides a patch. -- keywords: +easy stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue1602] windows console doesn't print utf8 (Py30a2)

2011-01-10 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Even if python.exe starts normally, py.test for example uses os.dup2() to redirect the file descriptors 1 and 2 to temporary files. sys.stdout.fileno() is still 1, the STD_OUTPUT_HANDLE did not change, but normal print() now goes

[issue10892] segfault with del X.__abstractmethods__

2011-01-12 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: A short crasher:: class X(object): pass del X.__abstractmethods__ All versions since 2.6 are affected. The fix is probably simple: the setter function type_set_abstractmethods() in typeobject.c should check for a NULL value

[issue10905] zipfile: fix arcname with leading '///' or '..'

2011-01-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What happens when the archive contains both 'foo' and '../foo'? They seem to be extracted at the same place. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings

2011-01-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: r78942 is quite large unfortunately. But just patching _elementree.c::xmlparser_setevents() should be possible. This would at least fix the invalid event tuple error. -- ___ Python tracker

[issue10914] Python sub-interpreter test

2011-01-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: +1 for this kind of tests. But I would not have their source in the official Modules directory. I expect that there will be several tests of this kind, each one with different modules to import, functions to run, global settings

[issue10914] Python sub-interpreter test

2011-01-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In distutils.command.config, config().try_run(body) is probably what we need. Now, I don't know how to use it... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue10930] dict.setdefault: Bug: default argument is ALWAYS evaluated, i.e. no short-circuit eval

2011-01-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: setdefault() is a method, its arguments are evaluated then the function is called. This is not a bug, and this behavior cannot change. If you are trying to cache the computation of a function, you should try memoizing techniques, like

[issue10931] print() from pipe enclosed between {b'} and {'}-pair on python3

2011-01-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's a feature. Subprocess output is binary data, not text; and since python3, the string type is now what python2 called unicode! Please read http://docs.python.org/py3k/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit

[issue10923] Python 2.7 hangs on Unicode+threading

2011-01-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: import child_directory Then it's certainly an effect of the import lock: http://docs.python.org/library/threading.html#importing-in-threaded-code In your case, the first call to encode('utf8') indirectly imports utf8.py, while

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: can't we raise a RuntimeError on a deadlock? Deadlock detection is difficult, and probably impossible if the involved locks don't use the same underlying mechanism. (A lock can be a pthread object, a file opened with os.O_EXCL

[issue10958] stat.S_ISLNK() does not wok!

2011-01-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: os.stat() follows symbolic links. You probably want to use os.lstat() instead: http://docs.python.org/library/os.html#os.lstat -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - closed

[issue10955] Possible regression with stdlib in zipfile

2011-01-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: About the patch: Break out of this dependency by assuming that the path to the encodings module is ASCII-only. The 'path' here is the entry inside the zip file (and does not include the location of the zip file itself), so the comment

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: No, your change is in the read_directory() function, which reads the whole archive the first time it's used. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10955

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What about tools that builds one .zip file for all modules, like py2exe? A cp437 decoder is not so ugly to implement in C. It's just a charmap. -- ___ Python tracker rep...@bugs.python.org

[issue10968] Timer class inheritance issue

2011-01-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I can't reproduce the error. Do you have a script that shows the issue? What is the complete traceback? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue10968] Timer class inheritance issue

2011-01-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Ah, got it. It's about threading.Timer, which looks like a class, but is actually a function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10968

[issue10968] Timer class inheritance issue

2011-01-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It seems to be by design: from the documentation: http://docs.python.org/py3k/library/threading.html Timer is a subclass of Thread, and a Thread subclass should only override the __init__() and run() methods. What are you trying to do

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: We are only talking about bootstrap-time importing of encodings modules. Again, the whole zip central directory is loaded on first import. If the zip file contains non-ascii filenames, nothing can be imported

[issue10972] zipfile: add unicode option to the force the filename encoding to UTF-8

2011-01-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This looks similar to issue10614 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10972

[issue11007] stack tracebacks should give the relevant class name

2011-01-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: trace.py has a hack for this: it uses gc.get_referrers() to crawl back from the code object to the encloding class. I would not trust this gc.get_referrers() though; it is probably slow, and there are even some crashers related

[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2011-01-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: No, the issue can be fixed by better checking the arguments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8036

[issue11034] Build problem on Windows with MSVC++ Express 2008

2011-01-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Could this be some bizzarre bug in the quote parser of cmd.exe? Yes, this is even documented with cmd /?: [...]If you specify /c or /k, cmd processes the remainder of string and quotation marks are preserved only if all

[issue11035] Segmentation fault

2011-01-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't reproduce the issue. Could you run python under gdb and give us the C backtrace? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue11039] Use of 'L' specifier is inconsistent when printing long integers

2011-01-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Python objects can have two textual representations: see the difference between str() and repr(): http://docs.python.org/tutorial/inputoutput.html And indeed, Python3 chose to drop the 'L' suffix. -- nosy: +amaury.forgeotdarc

[issue9197] Crash when importing an extension after Py_Initialize, Py_Finalize and Py_Initialize

2011-01-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Here are the files I used to reproduce the crash. See build.sh for the build command, there may be better ways... -- Added file: http://bugs.python.org/file20631/simpletest.zip ___ Python

[issue11094] Runtime error

2011-02-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: For this kind of question you'd better ask on the comp.lang.python newsgroup. The bug tracker is not designed to get help. A remark though: to really debug the RuntimeError a C debugger is needed (and a debug build of Python). You'd

[issue11108] Intermittent AttributeError when using time.strptime in threads

2011-02-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's a duplicate of issue7980. One workaround is to call strptime() once in the main thread. -- nosy: +amaury.forgeotdarc resolution: - duplicate status: open - closed superseder: - time.strptime not thread safe

[issue11114] file.tell extremely slow

2011-02-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I found that adding infile._CHUNK_SIZE = 20 makes the test much faster - 'only' 5 times slower than 2.7. -- nosy: +amaury.forgeotdarc, pitrou ___ Python tracker rep...@bugs.python.org http

[issue11123] problem with packaged dependency extracter script, pdeps

2011-02-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This script is indeed unusable. Here is a proper patch file, tested by running it on a few files. -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file20681/pdeps.patch

  1   2   3   4   5   6   7   8   9   10   >