[issue10447] zipfile: IOError for long directory paths on Windows

2010-11-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I think you did the right thing already. The choice of which errors to catch and which ones to let throw really depends on the usage (what about permission or lock errors? other limitations due to a USB stick? why is disk full

[issue3871] cross and native build of python for mingw32 with distutils

2010-11-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But different build system make new plaform! Maybe, but not a new sys.platform. VC6 and VS9.0 don't share any project file for the compilation; but they both build a sys.platform=='win32'. Distutils has to use another way to make

[issue3871] cross and native build of python for mingw32 with distutils

2010-11-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Luke, Please please! Don't make me say what I did not say. I just said I disagree, without any bad word. This may have been a bit terse, but I don't consider the issue tracker as a place to express one's feelings; hey, other core

[issue2405] Drop w9xpopen and all dependencies

2010-11-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It is still time to add to 3.2 a DeprecationWarning when w9xpopen is used, and remove the feature in 3.3. See attached patch -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file19608/deprecate

[issue10141] SocketCan support

2010-11-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch looks good at first glance, but is there a way to test the feature? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10141

[issue3871] cross and native build of python for mingw32 with distutils

2010-11-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: this is, after all, a new platform! it starts off with sys.platform == 'mingw32' I disagree; programs compiled with mingw32 run on Windows, and use the MSVC runtime. It's the same platform as the current win32 build. It's even

[issue10393] with statement isn't thread-safe

2010-11-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Agreed. There was a similar issue in python2.6 with list comprehensions. The issue is that both threads run the code with the same globals dictionary, and top-level code use the same dict for locals and globals. This is already fixed

[issue3871] cross and native build of python for mingw32 with distutils

2010-11-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I'm trying to read the patch. It contains many interesting things (and others I have no opinon about), but it is very large, and makes it difficult to comment or find why some change were made etc. I do believe that better supporting

[issue3871] cross and native build of python for mingw32 with distutils

2010-11-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: but the very very first thing that has to happen - before any of this work is begun - is for the distutils freeze to be lifted, or for someone to come up with a _sensible_ alternative solution. Tarek's approach looks right to me

[issue10383] test_os leaks under Windows

2010-11-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This leaks one reference every time: os.write(123456, bb) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10383

[issue10383] test_os leaks under Windows

2010-11-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This looks suspect (in function posix_write):: if (!PyArg_ParseTuple(args, iy*:write, fd, pbuf)) return NULL; if (!_PyVerify_fd(fd)) return posix_error(); I'd prefer a PyBuffer_Release(pbuf); before returning

[issue10142] Support for SEEK_HOLE/SEEK_DATA

2010-11-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: - The patch modifies the _io module but not _pyio, why? (try f=_pyio.open(XX,w+b) at the beginning of the script above) - One test was *removed*, but nothing was added to test this new feature. This is the most likely way to lose

[issue10391] obj2ast's error handling can lead to python crashing with a C-level assertion failure

2010-11-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: IMO a better patch would be to use the %R format specification: PyErr_Format( PyExc_TypeError, expected some sort of mod, but got %R, obj); And no need to use PyObject_Repr and the temporary variable! -- nosy

[issue10379] locale.format() input regression

2010-11-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This was changed by issue2522 on purpose; no suffix is allowed in locale.format(). -- nosy: +amaury.forgeotdarc, r.david.murray ___ Python tracker rep...@bugs.python.org http

[issue10356] decimal.py: hash of -1

2010-11-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's not about the hash value, but about consistency: help(Decimal.__hash__) says x.__hash__() == hash(x), but this is not true for x=Decimal(-1). -- nosy: +amaury.forgeotdarc ___ Python

[issue10362] AttributeError: addinfourl instance has no attribute 'tell'

2010-11-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: With a socket file you cannot rely on autodetection of the format. I suggest to try tarfile.open(fileobj=file_, mode='r:') or tarfile.open(fileobj=file_, mode='r:gz') -- nosy: +amaury.forgeotdarc

[issue10362] AttributeError: addinfourl instance has no attribute 'tell'

2010-11-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I'm sure the traceback changed then? mode='r:' uses a different code path. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10362

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2010-11-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Reproduced in a console window: C:\c:\python31\python.exe -m idlelib.idle Exception in Tkinter callback Traceback (most recent call last): File c:\python31\lib\tkinter\__init__.py, line 1399, in __call__ return self.func(*args

[issue10344] codecs.readline doesn't care buffering=0

2010-11-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Antoine, should codecs.open() be removed or simply aliased to open()? -- nosy: +amaury.forgeotdarc, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10344

[issue9015] f.write(s) for s 2GB hangs in win64 (and win32?)

2010-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's still an issue with 2.7, and even with 3.2a2, see issue9611. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9015

[issue9611] FileIO not 64-bit safe under Windows

2010-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Fortunately, the lower-level write() has no such bug, at least when used in binary mode as FileIO does: it's almost a direct call to WriteFile(). This issue is more considered because it's not a bug in the Microsoft CRT

[issue10311] Signal handlers must preserve errno

2010-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This issue is not really relevant on Windows: - signals are actually run in a new thread specially created. - errno is a thread-local variable; its value is thus local to the signal handler, same for WSAGetLastError(). -- nosy

[issue10311] Signal handlers must preserve errno

2010-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Nice. Then I suggest a config macro for whether this is needed. Either a test for windows, or an autoconf thing in case some Unixes are equally sensible. (Linux isn't, I checked.) I'm quite sure that all Unixes invoke signal

[issue9611] FileIO not 64-bit safe under Windows

2010-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: On a second thought... is there another example where a *blocking* stream does not write all the data without raising an exception? -- ___ Python tracker rep...@bugs.python.org http

[issue9611] FileIO not 64-bit safe under Windows

2010-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Why do you think this would be somehow an example for a blocking stream that does not write all data without raising an exception? Well, that's what clamping means, isn't it? -- ___ Python

[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2010-10-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The code in socketmodule.c currently compile with suspect warnings: socketmodule.c(3108) : warning C4047: 'function' : 'LPSTR' differs in levels of indirection from 'int' socketmodule.c(3108) : warning C4024: 'GetComputerNameA

[issue10219] BufferedReader.read1 does not check for closed file

2010-10-28 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: The following snippet should raise ValueError (twice :-) f = open('foo', 'rb') print(f.read1(1)) # OK f.close() print(f.read1(5)) # expected ValueError(I/O operation on closed file) print(f.peek()) # expected ValueError(I/O

[issue6715] xz compressor support

2010-10-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: As promised, here is a quick review of the module. https://code.launchpad.net/~proyvind/pyliblzma/py3k looks ready for a new entry in the PyPI, but for inclusion in core python it needs some cleanup: - I suppose that src/pyliblzma.c

[issue10180] File objects should not pickleable

2010-10-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch modifies _io.TextIOWrapper, but not _pyio.TextIOWrapper. Is there a reason? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10180

[issue10156] Initialization of globals in unicodeobject.c

2010-10-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: About the patch: why should _PyUnicode_Init() try to call _PyUnicode_InitGlobals() again? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10156

[issue10156] Memory leak (r70459)

2010-10-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The stack corresponds to the allocation of type(sys.float_info).__doc__. Why would only this object appear as a memory leak? It is certainly not deallocated, but all other types are in the same situation. For example, sys.int_info

[issue10158] BadInternalCall running test_multiprocessing

2010-10-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Does it happen when compiled in debug mode? There may be asserts that will give a better (or earlier) error message. Some thoughts: the '_PyTrash_delete_later' chain can only contain a limited set of objects: lists, frames... (which

[issue10137] Patch to IDLE for Python 2.7, at Guido's request

2010-10-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But this patch is a diff between a 2.7 and a 3.2 version of IDLE, isn't it? The tkinter-Tkinter renaming is not supposed to happen in the 2.7 branch. Could you instead show a diff between the present version of IDLE in 2.7

[issue10133] multiprocessing: conn_recv_string() broken error handling

2010-10-17 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- assignee: - jnoller nosy: +jnoller title: conn_recv_string() broken error handling - multiprocessing: conn_recv_string() broken error handling ___ Python tracker rep...@bugs.python.org http

[issue10100] fromfd is now available on all platforms

2010-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: You already changed the test in r84449! The doc still needs updating. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10100

[issue10089] Add support for arbitrary -X options

2010-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Why wouldn't they? A standard way to extend the command line options seems useful in all environments. Now the interpretation of these options are subject to variations of course... -- nosy: +amaury.forgeotdarc

[issue10098] intermittent failure in test_os

2010-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: _kill_with_event() does not wait for the subprocess to be ready. It seems to me that the following test is wrong: if m[0] == 0: It should be if m[0] == 1, since we want to check that the subprocess updated the shared memory

[issue10089] Add support for arbitrary -X options

2010-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Well, the syntax allows to pass either a string value (because it's a substring of the command line), or nothing. When no value is passed, True seems better than None, because this allows the usage of the get() method:: x

[issue10093] Warn when files are not explicitly closed

2010-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Please add a similar warning in PC/_subprocess.c::sp_handle_dealloc() I just got caught by this in PyPy because some pipe handle relies on reference counting to be closed. This ad-hoc fix would suppress the warning: http

[issue5355] Expat parser error constants are string descriptions

2010-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Please, add a tiny unit test for the presence of this feature. This is the only way for vm implementers to follow CPython development. -- nosy: +amaury.forgeotdarc stage: - unit test needed status: closed - open

[issue10080] Py_Initialize crashes when stdout has been redirected with freopen

2010-10-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It looks very similar to issue6501. Can you check if setting the environment variable PYTHONIOENCODING=cp1252 solves the problem? -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue10068] global objects created in some module are not destroyed when last reference to that module is released

2010-10-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This also reproduces in 2.7. 2.6 and 2.7 have a different behaviour. -- nosy: +amaury.forgeotdarc versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue10017] pprint.pprint raises TypeError on dictionaries with user-defined types as keys

2010-10-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A simpler change would to replace: rv = self.obj.__lt__(other.obj) with rv = type(self.obj).__lt__(self.obj, other.obj) -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue10044] small int optimization

2010-10-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Arithmetic with void* pointers is not allowed by the Microsoft compilers. char* should be used instead. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue5870] subprocess.DEVNULL

2010-10-07 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5870 ___ ___ Python

[issue9017] doctest option flag to enable/disable some chunk of doctests?

2010-10-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I'm not a great doctest user, but did you try to disable the SKIP directive at the end? something like doctest: -SKIP -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue9017] doctest option flag to enable/disable some chunk of doctests?

2010-10-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: harobed, the -SKIP solution does not work. Doctest directives only apply to a single line. After a quick search, I found two workarounds there: http://stackoverflow.com/questions/1809037/python-doctest-skip-entire-block - Replace

[issue10026] xml.dom.pulldom strange behavior

2010-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Please read http://docs.python.org/library/xml.etree.elementtree.html?highlight=elementtree#xml.etree.ElementTree.iterparse At START_ELEMENT, the element is not guaranteed to be fully populated; you should handle the END_ELEMENT event

[issue10026] xml.dom.pulldom strange behavior

2010-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, sax parsers may split CHARACTER events. See also the discussion: http://www.mail-archive.com/xml-...@python.org/msg00234.html Again, the END_ELEMENT event is guaranteed to return the complete node

[issue4872] Python will not co-exist with MFC (memory leak)

2010-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: - The memory leaks are reported in the IDE output window when the process exits; this lists all non deallocated blocks of memory. This feature is not enabled by default. Creating a CString probably initializes this feature

[issue9060] Python/dup2.c doesn't compile on (at least) newlib

2010-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: but Python 2.x doesn't appear to actually bother to compile dup2.c even if the system lacks dup2 Is it sure? The file configure.in has the same command in both versions: AC_REPLACE_FUNCS(dup2 getcwd strdup) Added the #include

[issue9017] doctest option flag to enable/disable some chunk of doctests?

2010-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: There is already doctest.SKIP. Isn't it already what you want? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9017

[issue2892] improve cElementTree iterparse error handling

2010-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: If it's a regression, it should be fixed in some 2.7.x release Is there a patch somewhere? -- nosy: +amaury.forgeotdarc stage: - needs patch ___ Python tracker rep...@bugs.python.org http

[issue4487] Add utf8 alias for email charsets

2010-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: David, can this issue be closed? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4487

[issue2982] more tests for pyexpat

2010-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Adapted patch for py3k and applied in r85239. Maciek, if you have another tests for error handling, please open a new issue. -- nosy: +amaury.forgeotdarc resolution: - fixed status: open - closed

[issue10019] json.dumps with indent = 0 not adding newlines

2010-10-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The C encoder should not be used when indent=0. Here is a patch+test for 2.7. Note that json.dump (into a file object) already correctly emit newlines. -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http

[issue6612] 'import site' fails when called from an unlinked directory

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A unit test is needed. Not to check the code, but to ensure that we don't break it in the future. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue1767933] Badly formed XML using etree and utf-16

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Python 3.1 improves the situation, the file looks more like utf-16, except that the BOM (\xff\xfe) is repeated all the time, probably on every internal call to file.write(). Here is a test script that should work on both 2.7 and 3.1

[issue8792] Support Apache extensions to XML-RPC in xmlrpclib

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's easy enough to subclass the Transport type and add custom types to the dispatcher object, see the script below. Attila, Bhargav, is this solution acceptable to you? from xmlrpclib import Transport, ServerProxy class MyTransport

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Martin, what do you think about this kind of changes? Are there possible regressions or incompatibilities? -- nosy: +amaury.forgeotdarc, loewis ___ Python tracker rep...@bugs.python.org http

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Thanks for the confirmation! -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369

[issue10009] Automated MSI installation does not work

2010-10-01 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: From an old post on python-dev: 2010/08/04 Paul Kippes: For the most part, the information at http://www.python.org/download/releases/2.4/msi/ assisted me with automating a 2.7 installation on Windows XP.  The following initial

[issue1195571] simple callback system for Py_FatalError

2010-10-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Here is a new patch; I lifted the pre-Py_Initialize() restriction, because it seems to me that a wxPython application, for example, could use it. A wxPython application is not embedded, but it already often redirects stdout and even

[issue1195571] simple callback system for Py_FatalError

2010-10-01 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: Added file: http://bugs.python.org/file19096/fatalhook-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1195571

[issue1195571] simple callback system for Py_FatalError

2010-10-01 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: Removed file: http://bugs.python.org/file19096/fatalhook-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1195571

[issue1195571] simple callback system for Py_FatalError

2010-10-01 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: Added file: http://bugs.python.org/file19098/fatalhook-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1195571

[issue6691] Support for nested classes and function for pyclbr

2010-10-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Too late for version 2. I updated patch for 3.2, and tried to improve the documentation a little bit. -- nosy: +amaury.forgeotdarc versions: -Python 2.7, Python 3.1 Added file: http://bugs.python.org/file19100

[issue10000] mark more tests as CPython specific

2010-09-30 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: When porting pypy to 2.7, we found that many tests actually exercise features specific to CPython, either the garbage collector, or the precise memory layout (__sizeof__). They should be marked as such, and skipped when run with pypy

[issue9979] Create PyUnicode_AsWideCharString() function

2010-09-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: +1 from me as well. But shouldn't PyUnicode_AsWideCharString() merge surrogate pairs when it can? The implementation doesn't do this. -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue9518] PyModuleDef_HEAD_INIT does not explicitly initialize all fields of m_base

2010-09-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: the patch looks OK, but out of curiosity: do you really declare all the fields of a PyTypeObject? This structure is really designed so that newer members are left at the end; most types don't need to initialize them, C standard ensures

[issue7346] Redirected stdout fires [Errno 9]

2010-09-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, mingw uses a different C runtime (msvcrt.dll) than Python (msvcr90.dll), so file descriptors are completely different and this causes the error. I can see two solutions: - Use the same compiler as python26; I've also heard about

[issue7938] makesetup interprets macros -DA=B as a Make variable definition

2010-09-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: man sh does not list [[:alpha:]]* as an accepted pattern. This is a glob pattern, not a regular expression. While the proposed patch may work for some environments, we should find a more compatible way. Maybe a new case

[issue9958] (c)elementTree missing children

2010-09-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The given script yields an item on a start event; but the element may not be fully populated at this point. please read http://docs.python.org/library/xml.etree.elementtree.html#xml.etree.ElementTree.iterparse You should use the end

[issue1634774] locale 1251 does not convert to upper case properly

2010-09-27 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: the OP is right: str.upper is supposed to be locale-dependent http://docs.python.org/library/stdtypes.html#str.upper But the implementation uses _toupper() which is a macro with Visual Studio, and obviously not locale-dependent

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The _multiprocessing module already have similar objects. _multiprocessing.Connection is based on file descriptors (and initialized with the result of os.pipe()) _multiprocessing.PipeConnection uses Windows named pipes. -- nosy

[issue9940] Strange error reporting with with statement

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Of course, you get the same error with: f = open('foo', 'wb') x, y = f Traceback (most recent call last): File stdin, line 1, in module IOError: File not open for reading i.e. the tuple assignment iterates over the file, and calls

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: With CPython, even objects that don't change see their reference counter modified quite frequently, just by looking at them. What kind of memory would you mark this way? -- nosy: +amaury.forgeotdarc

[issue9915] speeding up sorting with a key

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: the random data you run in interpreter 1 won't be the same data you run in interpreter 2 what about adding a simple random.seed(12345) -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Which SDK Example are you referring to? I could not find any example. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9784

[issue9808] Implement os.getlogin on Windows

2010-09-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9808

[issue9890] Visual C++ Runtime Library Error is there a fix?

2010-09-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Can you try to open a Command Prompt and type (with the quotes): C:\Program Files\Python\python.exe C:\Program Files\Python\Lib\idle\idle.py Do you see error messages? -- nosy: +amaury.forgeotdarc

[issue9905] subprocess.Popen fails with stdout=PIPE, stderr=PIPE if standard descriptors (0, 1, 2) are closed.

2010-09-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: issue6610 looks very similar. issue9074 may also be related. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9905

[issue9919] gdbinit lineno result is one line in excess

2010-09-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Can you show an example which shows an incorrect lineno? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9919

[issue9919] gdbinit lineno result is one line in excess

2010-09-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: OK, I reproduce the issue. It is now clear to me as well that r39492 was slightly wrong: the replacement of break should avoid to execute the end of the loop. The following patch fixes the issue for me, can someone with better gdb

[issue1257] atexit errors should result in nonzero exit code

2010-09-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: exit code = 128 + # of failed atexits I don't agree with the feature. Do we need something so complex? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http

[issue9862] PIPE_BUF is invalid on AIX

2010-09-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Removing select.PIPE_BUF does not seem a good idea to me because this breaks compatibility. I suggest to simply set it to 512 on AIX. (An ideal solution would be to really determine the actual buffer size in ./configure

[issue9912] Fail when vsvarsall.bat produces stderr

2010-09-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A non-empty stderr does not mean that a command failed. For example, the Microsoft compiler cl.exe prints the version string to stderr. -- nosy: +amaury.forgeotdarc ___ Python tracker rep

[issue1962] ctypes feature request: Automatic type conversion of input arguments to C functions

2010-09-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't think this should happen by default. but what the user wants is already possible, by using the from_param() method. For example, the AutoStrParam type converts everything to a string (and a char*): from ctypes import * class

[issue9912] Fail when vsvarsall.bat produces stderr

2010-09-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: yes, displaying the stderr content is a good idea. -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9912

[issue1962] ctypes feature request: Automatic type conversion of input arguments to C functions

2010-09-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: Removed file: http://bugs.python.org/file18958/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1962

[issue1962] ctypes feature request: Automatic type conversion of input arguments to C functions

2010-09-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- nosy: -BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1962 ___ ___ Python-bugs

[issue1962] ctypes feature request: Automatic type conversion of input arguments to C functions

2010-09-21 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- Removed message: http://bugs.python.org/msg117111 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1962

[issue9898] cProfile.runctx doesn't allow sort argument

2010-09-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This has already been done as part of issue9428 in r83524. -- nosy: +amaury.forgeotdarc resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue9901] GIL destruction can fail

2010-09-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: looks similar to issue1856 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9901

[issue1838] Ctypes C-level infinite recursion

2010-09-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This function is called quite often. Building a set each time will be expensive. What about a simpler recursion check with Py_EnterRecursiveCall()? -- nosy: +amaury.forgeotdarc ___ Python

[issue2016] Crash when modifying the **kwargs passed to a function.

2010-09-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The fix was applied to trunk before the creation of the 2.7 branch. There is nothing to backport -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue2091] file accepts 'rU+' as a mode

2010-09-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Of course, the implementation is now in the io module: Modules/_io/_iomodule.c *and* Lib/_pyio.py -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue9898] cProfile.runctx doesn't allow sort argument

2010-09-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: yes, as you can see in the diffs, it's already in 3.2alpha2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9898

[issue1953] Compact int and float freelists

2010-09-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The remarks above haven't been addressed. The feature is OK, but the patch is not yet perfect. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue9880] Python 2.7 Won't Build: SystemError: unknown opcode

2010-09-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: For some reason your file os.pyc is corrupted: I loaded it with a working python2.7: import marshal, dis pyc = open('bados.pyc', 'rb').read() code = marshal.loads(pyc[8:]) dis.dis(code) And it appears that all the jump instructions

<    4   5   6   7   8   9   10   11   12   13   >