[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: yes, except that TCHAR* depends on compilation settings (it resolves to wchar_t when UNICODE is #defined); simply use char*. -- ___ Python tracker <http://bugs.python.org/i

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: PEP 277 explicitly states that unicode strings should be passed to wide-character functions, whereas byte strings use "standard" functions. This is done in posixmodule.c, for example. The "current local

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It does not work on Windows: >>> ctypes.CDLL(b'kernel32') Traceback (most recent call last): File "", line 1, in File "D:\afa\python\py3k-1\lib\ctypes\__init__.py", line 350, in __init__ self._handl

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It does not work on Windows: >>> subprocess.Popen("c:/windows/notepad.exe", cwd=b'c:/temp') Traceback (most recent call last): File "", line 1, in File "D:\afa\python\py3k-1\lib\subproce

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-14 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: PyUnicode_FSConverter returns bytes and bytearray objects unchanged; otherwise it always return bytes. Your patch should handle the case when name2 is a bytearray. -- nosy: +amaury.forgeotdarc ___ P

[issue8384] Distutils C extension build with MinGW on Windows fails

2010-04-14 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- keywords: +easy ___ Python tracker <http://bugs.python.org/issue8384> ___ ___ Python-bugs-list mailing list Unsubsc

[issue8386] test_pickle failing

2010-04-13 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- assignee: -> haypo nosy: +haypo ___ Python tracker <http://bugs.python.org/issue8386> ___ ___ Python-bugs-lis

[issue8384] Distutils C extension build with MinGW on Windows fails

2010-04-13 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Can you run the following command: ld -v and paste the result? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/i

[issue7509] AttributeError: MSVCCompiler instance has no attribute '_MSVCCompiler__root'

2010-04-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: "This is for version 2.6". But how? the traceback shows C:\Python25 on almost every line. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.py

[issue8026] strftime bug when timedelta is negative

2010-04-12 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue8026> ___ ___

[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Yes, I think what I wrote above applies here: the string is stored in the "args" variable. When the exception is raised, the traceback contains the *live* frame objects, with position in the bytecode and all local variables. This all

[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Indeed, every function of the API is consistent in this aspect, success or failure should not make a difference in reference counts. Do you have an evidence of the contrary? Note that it's possible that because of the failure, some argument

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

2010-04-02 Thread Amaury Forgeot d7;Arc
Changes by Amaury Forgeot d'Arc : -- assignee: -> amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/issue8278> ___ ___ Python-bugs-lis

[issue8277] ElementTree won't parse comments

2010-04-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: yes, my code uses the newer version of ElementTree which will be included with 2.7 and 3.2 -- ___ Python tracker <http://bugs.python.org/i

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

2010-04-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: On Windows, time_t is 64bit, but various functions convert it to a 32bit long. Attached patch uses time_t instead of long in various places, this fixes the proposed test. Martin, do you think it's a viable approach? If so, I'll go and

[issue8277] ElementTree won't parse comments

2010-04-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: ElementTree does parse comments, it just omit them in the tree. A quick search lead me to this page: http://effbot.org/zone/element-pi.htm which can be further simplified: from xml.etree import ElementTree class MyTreeBuilder(ElementTree.TreeBu

[issue8228] pprint, single/multiple items per line parameter

2010-04-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Please generate patches with "context diff", or better "unified diff", with the "diff -u" command. I've done it, before the source code changes and the patch becomes impossible to apply. Note that the new

[issue8193] test_zlib fails with zlib 1.2.4

2010-03-31 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Note that the exact version which changed the behavior is 1.2.3.5, see http://www.zlib.net/ChangeLog.txt - Use zlib header window size if windowBits is 0 in inflateInit2() -- ___ Python tracker

[issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result

2010-03-31 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Updated patch. [I also tried to avoid reading the underlying file if len(self.bytebuffer)>=size, but it does not work with multibytes chars when size=1] -- Added file: http://bugs.python.org/file16706/codecs_read

[issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result

2010-03-31 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Buffering applies when writing, not when reading a file. There is indeed a problem in codecs.py: after a readline(), read() will return the content of the internal buffer, and not more. The "size" parameter is a hint, and should not be

[issue7643] What is a Unicode line break character?

2010-03-30 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Which functions are affected by this change? Py_UNICODE_ISLINEBREAK()? unicode.splitlines()? -- assignee: -> flox nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.or

[issue8193] test_zlib fails with zlib 1.2.4

2010-03-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: According to http://www.zlib.net/ChangeLog.txt, since zlib 1.2.3.5:: - Use zlib header window size if windowBits is 0 in inflateInit2() The failing test should be changed, for example:: self.assertRaises(ValueError, zlib.decompressob

[issue6543] traceback presented in wrong encoding

2010-03-25 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Storing unicode in c_filename would not solve the problem: "surrogateescape" characters are not printable. There is no need to support non-decodable filenames in the import mechanism. -- ___

[issue7936] sys.argv contains only scriptname

2010-03-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I've read on a random forum somewhere that % need to be doubled on Windows 7. Tom, can you try changing the association by typing FTYPE Python.File="C:\Python31\py31.exe" "%%1" %%* --

[issue8024] upgrade to Unicode 5.2

2010-03-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > Looking closer at the patch, you also changed the unicodetype mappings > and since this removes a lot of entries, it looks like the Unicode > consortium either moved some mappings out of the UCD file into a > separate file or made som

[issue8110] subprocess.py doesn't correctly detect Windows machines

2010-03-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: What does the patch achieve? -- ___ Python tracker <http://bugs.python.org/issue8110> ___ ___ Python-bugs-list m

[issue8120] Py_Initialize: Can't initialize system standard streams

2010-03-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: cp720.py was added a few months ago, and will be available with 3.2. for the impatient, it's here: http://svn.python.org/view/python/branches/py3k/Lib/encodings/cp720.py?view=markup -- resolution: -> out of date status: o

[issue8120] Py_Initialize: Can't initialize system standard streams

2010-03-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: two questions: - where did you obtain cp720.py, are you sure it was a python3 version? - I've never seen a "3.2 RC2" version. Did you mean the py3k branch? -- nosy: +amaury.forgeotdarc __

[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I think this change is worth a sentence in the documentation. "Improved algorithm" is a bit terse. -- nosy: +amaury.forgeotdarc status: closed -> open ___ Python tracker <http://bugs

[issue8110] subprocess.py doesn't correctly detect Windows machines

2010-03-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: it's not about platform detection; does IronPython have the equivalent of msvcrt.open_osfhandle()? -- ___ Python tracker <http://bugs.python.

[issue8074] Fail-fast behavior for unittest

2010-03-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: fwiw, the similar issue2241 was rejected two years ago. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/i

[issue8110] subprocess.py doesn't correctly detect Windows machines

2010-03-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: but, does it work even with your fix? it seems to me that "from _subprocess import *" will fail miserably. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.py

[issue8103] threading.start() : unable to restart thread

2010-03-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: By design, a thread object can be started only once: http://docs.python.org/library/threading.html#threading.Thread.start You should create another threading.Thread object. -- nosy: +amaury.forgeotdarc resolution: -> invalid stat

[issue8094] Multiprocessing infinite loop

2010-03-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The restriction that imposes the "__name__= '__main__'" idiom also applies when multiprocessing is not used in the main module. Actually the main module is always reloaded in the subprocess. The docs should

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

2010-03-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: 2.6 and 3.0.1 used to disable the Microsoft CRT argument error handler: they return EINVAL, but newer versions don't, and should check their arguments before calling _spawnv. FWIW, the checks are:: pathname != NULL *pathname != &#x

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

2010-03-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Because this is a global setting for the whole process. This was discussed with issue4804. -- ___ Python tracker <http://bugs.python.org/i

[issue8063] Call _PyGILState_Init() earlier in Py_InitializeEx()

2010-03-07 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: haypo, it seems you removed the initial message... -- ___ Python tracker <http://bugs.python.org/issue8063> ___ ___

[issue7449] A number tests "crash" if python is compiled --without-threads

2010-03-07 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Did someone notice that on Windows, subprocess imports threading, and use threads for the communicate() method? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/i

[issue8063] Call _PyGILState_Init() earlier in Py_InitializeEx()

2010-03-07 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I would keep the call to PyThreadState_Swap() next to PyThreadState_New(): create the thread state and install it. _PyGILState_Init() may come after. -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue7162] 2to3 does not convert __builtins__.file

2010-03-07 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Unfortunately this patch would also replace legitimate uses of a "file" function. -- assignee: -> benjamin.peterson nosy: +amaury.forgeotdarc, benjamin.peterson stage: -> patch review _

[issue8025] TypeError: string argument expected, got 'str'

2010-02-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > TypeError: can't write str to text stream > > Is it better? There is the same ambiguity in http://docs.python.org/library/io.html "text" is not defined. And "string" is often used incorrectly

[issue6538] MatchObject is not a hyperlink in the 're' module documentation

2010-02-25 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It would be simpler to add a ".. class:: MatchObject" directive. Also, RegexpObject should be handled as well. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.py

[issue8020] Crash in Py_ADDRESS_IN_RANGE macro

2010-02-25 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: No, the description above says it: only the first thread calls Py_ADDRESS_IN_RANGE. The other thread happens to modify the memory at the beginning of the page, just at the address (POOL)->arenaindex. Could we use an "inline" function

[issue7150] datetime operations spanning MINYEAR give bad results

2010-02-25 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: No, because normally distributions do not use debug builds. but that's the reason why tests are needed: they must pass with asserts enabled. -- ___ Python tracker <http://bugs.python.

[issue8019] struct.unpack() expects wrong number of bytes

2010-02-25 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It's not about byte ordering. '@' and '=' also change the alignment! The documentation says it well: - '@' (or no marker) uses the 'native' alignment, which (on every platform I know) aligns 4-bytes int

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-02-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Marc-André's remark was that if char<0x80 (the vast majority), it's not necessary to call any decode function: just copy the byte. Other cases (error, or non-default encoding) may

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-02-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > > But why is it necessary to check for chars above 0x7f? > The Python default encoding has to be ASCII compatible, Yes, but it is not necessarily as strict. for example, after I manage to set the default encoding to latin-1, u"%s&qu

[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-02-24 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > Could you please check for chars above 0x7f first and then use > PyUnicode_Decode() instead of the PyUnicode_FromStringAndSize() API I concur: PyUnicode_FromStringAndSize() decodes with utf-8 whereas the expected conversion char->unic

[issue1669349] make install fails if no previous Python installation

2010-02-23 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Interesting. What is the content of sys.path when you start ./python from the build tree? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/issu

[issue1722344] Thread shutdown exception in Thread.notify()

2010-02-21 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I have seen somewhere (ask google), that python 2.6.5 would be released mid-march. But except for a few platforms, python.org does not provide compiled binaries. -- ___ Python tracker <http://bugs.py

[issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules

2010-02-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Please use patches to show where the code changed. (I generated one; it looks good to me) I would like this kind of patches applied to CPython. Looking at the Pypy test suite, the following test files seem easy to update: test_bz2 test_du

[issue7931] Interpreter does not terminate if daemonized while running multithreaded

2010-02-16 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: libc.daemon() calls forks(), which duplicates only the main thread. The other thread does not exists in the forked process, and the interpreter blocks while trying to wait for it... Please use os.fork() instead, it has code to forget the threads cr

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2010-02-15 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Is it normal that even after the call to next(), the generator frame contains a reference to the RuntimeError? Long explanation: - When the function exits, there is a cycle [parent frame]-> ['it' variable]-> [generator frame]->

[issue7909] os.path.abspath(os.devnull) returns \\\\nul should be nul?

2010-02-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: nul is a special "dos device" _getfullpathname() correctly returns \\.\nul, but normpath() then simplifies it to \\nul I suggest that normpath() be changed to consider \\.\ as a special prefix, and keep it intact when it appears at t

[issue7916] zipfile.ZipExtFile passes long to fileobj.read()

2010-02-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This was fixed with issue7249 and will be available with 2.6.5 -- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed ___ Python tracker <http://bugs.python

[issue7582] [patch] diff.py to use iso timestamp

2010-02-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > I'd like to propose to change default diff format to unicode as well What kind of "unicode" format is it? -- ___ Python tracker <http:/

[issue7216] low performance of zipfile readline()

2010-02-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Already fixed with issue7610. -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> Cannot use both read and readline method in same ZipExtFile object

[issue7887] errno 107 socket.recv issure

2010-02-09 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The issue tracker is not to a place to find problems in your code (network programming is difficult, even with python). Please ask your questions on the comp.lang.python newsgroup, where many people will be ready to help you. --

[issue4978] allow unicode keyword args

2010-02-04 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Why backport? Isn't this a new feature? -- ___ Python tracker <http://bugs.python.org/issue4978> ___ ___

[issue1943] improved allocation of PyUnicode objects

2010-02-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > Note that Python is free to change the meaning of Py_UNICODE > (e.g. to use UCS4 on all platforms) Python-UCS4 has never worked on Windows. Most developers on Windows, taking example on core python source code, implicitly a

[issue1943] improved allocation of PyUnicode objects

2010-02-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Then there are many places to change, in core python as well as in third-party code. And PyArg_ParseTuple("u") would not work any more. -- ___ Python tracker <http://bugs.py

[issue1943] improved allocation of PyUnicode objects

2010-02-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Again, on Windows there are many many usages of PyUnicode_AS_UNICODE() that pass the result to various Windows API functions, expecting a nul-terminated array of WCHARs. Please don't c

[issue7819] sys.call_tracing(): check arguments type

2010-01-31 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This very fix was already done in py3k with issue3661. Unfortunately it was decided at the time that 2.6 is not affected... Patch is OK, please apply. -- nosy: +amaury.forgeotdarc stage: -> commi

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Here is my review of issue7092_syntax_imports_v3.diff: - test_itertools.py: please replace [tuple([arg[i] if i < len(arg) else None for arg in args]) for i in range(max(map(len, args)))] by something more readable (nested for l

[issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py"

2010-01-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This is slightly incorrect: if PyFile_FromFile fails for another reason (PyString_FromString(name) runs out of memory), the fp is not closed and the caller is right to call fclose(). IMO PyFile_FromFile() should be changed to consistently leave t

[issue7796] No way to find out if an object is an instance of a namedtuple

2010-01-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It seems a perfect case for "duck typing" style of programming: All namedtuple classes: - inherit from tuple - have a "_fields" class attribute These two properties could be the "duck test" for namedtuples, regar

[issue1225769] Proposal to implement comment rows in csv module

2010-01-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > Shouldn't the comment char definition belong in a dialect class? The proposed patch does this correctly; then csv.reader automatically accepts the dialect parameters to override the selected dialect. I'm still -1 on the feature - n

[issue1225769] Proposal to implement comment rows in csv module

2010-01-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Comment lines in csv data may be common in some areas, but they are not part of any standard, and they are not the only possible extension to csv files (for example: ignore empty lines, or a terminal \ for line continuation...) Currently all membe

[issue7793] regrtest fails with "RuntimeError: maximum recursion depth exceeded" in some cases

2010-01-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The module is probably reloaded, which causes code like: _ord = ord def ord(c): ... _ord(c) ... to form a recursion loop. Attached patch removes the need for a special ord(). All this should be simply removed in py3k branch: ord() an

[issue7615] unicode_escape codec does not escape quotes

2010-01-25 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I feel uneasy to change the default unicode-escape encoding. I think that we mix two features here; to transfer a unicode string between two points, programs must agree on where the data ends, and how characters are represented as bytes. All c

[issue7138] elementtree segfaults on invalid xml declaration

2010-01-22 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This was merged into 2.6 with r74432, into 2.5 with r77666, into 3.1 with r74436. -- assignee: -> jyasskin nosy: +jyasskin resolution: -> fixed status: open -> closed ___ Python

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2010-01-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: IMO we could just catch the WindowsError, and skip the test if its winerror attribute is 1314 (=ERROR_PRIVILEGE_NOT_HELD). -- ___ Python tracker <http://bugs.python.org/issu

[issue7680] pythonw crash while attempting to start() a thread object

2010-01-12 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: pythonw.exe has an invalid stdout. Does the problem reproduce when you call print function directly, without a thread? -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/i

[issue7544] Fatal error on thread creation in low memory condition

2010-01-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The patch looks good; the line tstate->thread_id = PyThread_get_thread_ident(); is needed because the tstate is created in the main thread, but used in another thread. -- nosy: +amaury.for

[issue1943] improved allocation of PyUnicode objects

2010-01-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > Base type Unicode buffers end with a null-Py_UNICODE termination, > but this is not used anywhere, AFAIK On Windows, code like CreateDirectoryW(PyUnicode_AS_UNICODE(po), NULL) is very common, at least in po

[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c

2010-01-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: > I don't see the point in changing the various conversion APIs in the > unicode database to return Py_UCS4 when there are no conversions that > map code points between BMP and non-BMP. For consistency: if Py_UNICODE_ISPRINTABLE

[issue7640] buffered io seek() buggy

2010-01-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The problem seems to be fixed in trunk (the future 2.7). BufferedRandom.seek() contains a block labelled "# Undo read ahead." which does not exists in 2.6. I reproduce the problem with a file opened with mode "rb+" from io

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2009-12-31 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: I don't understand. How is the subprocess stdout related to the main program output? Stream-specific encoding could be useful for subprocesses that expect latin-1 from stdin but write utf-8 to stdout. I'm not sure we shou

[issue7601] Installation - 2 tests failed: test_cmd_line test_xmlrpc

2009-12-30 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: It's certainly because python is installed in a directory with non-ascii characters. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.

[issue7579] Patch to add docstrings to msvcrt

2009-12-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Committed r77126 in trunk. I reflowed the text for getch(), so that help(msvcrt) displays nicely in a 80-chars-wide console (this was my "test") I was about to merge it into py3k, when I realized that the documentation should be updat

[issue7413] datetime.datetime.isoformat truncation problem

2009-12-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Fixed with r77122 (trunk) and r77125 (release26-maint). py3k uses PyUnicode_FromFormat directly and does not have this problem. I merged the test there nonetheless. -- resolution: -> fixed status: open -

[issue7548] If a generator raises TypeError when being unpacked, an unrelated error message is shown

2009-12-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This is a duplicate of issue4806. -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> Function calls taking a generator as star argument can mask TypeErrors in

[issue7539] unicode exceptions terminate pdb.pm() loop

2009-12-29 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Here is a patch, along with the test that I modified a little bit: - it uses _saferepr (and repr.Repr) to render the exception object - it also fixes exception raised by the "p" action. - The test uses a raw docstring, to avoid chr(255

[issue7587] Python 3.1.1 source build issues

2009-12-28 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: To the poster's defense, the paragraph mentioning "external.bat" is below the list of the external projects. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bu

[issue7579] Patch to add docstrings to msvcrt

2009-12-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This is a good idea. I have some comments though: - the second docstring says "heapmin" when it should describe "locking". - there are strange characters around "pushed back". Please use only ascii characters. - The bod

[issue7578] Behavior of operations on a closed file object is not documented correctly

2009-12-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Should all these ValueErrors be turned into IOErrors? -- nosy: +amaury.forgeotdarc, pitrou ___ Python tracker <http://bugs.python.org/i

[issue7581] incomplete doc of zlib

2009-12-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Closing as duplicate of issue7191 -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> Odd behaviour with zlib.decompressobj optional parameter "wbits" __

[issue7582] [patch] diff.py to use iso timestamp

2009-12-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Using ISO format certainly makes sense, but it seems to me that after dt=datetime.fromtimestamp(mtime), dt.tzinfo is always None, so the test is not necessary. -- nosy: +amaury.forgeotdarc ___ Python tr

[issue2019] API to clear most free lists

2009-12-27 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Indeed, r60797 and r64753 removed sys._compact_freelists, in favor of an automatic call to all PyXxx_ClearFreelist() during the collection of the highest generation. -- nosy: +amaury.forgeotdarc resolution: -> out of date stat

[issue5116] expose _CrtSetReportMode via the msvcrt module

2009-12-26 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: _CrtSetReportMode() is exposed without the leading underscore. IMO the _CRT_WARN and other constants should be renamed the same way. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.py

[issue7504] Same name cookies

2009-12-19 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: For this kind of report you should provide more information. Is this an enhancement to the Cookie object? Why is it needed? Do you really propose that users directly use the _multi attribute directly (the leading _ suggest an internal attribute)?

[issue7513] many source files contaminated with form feed (\f) characters

2009-12-15 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This is also allowed by PEP8. -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/issue7513> ___ ___

[issue7464] circular reference in HTTPResponse by urllib2

2009-12-10 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The WeakMethod idea is not new: http://code.activestate.com/recipes/81253/ http://mindtrove.info/articles/python-weak-references/#toc-extending-weak- references -- nosy: +amaury.forgeotdarc ___ P

[issue7461] os.popen() objects don't support the context manager protocol

2009-12-08 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Here is a patch+test -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file15504/with_popen.patch ___ Python tracker <http://bugs.python.org/i

[issue7446] http.cookies.BaseCookie (and SimpleCookie) can't be load from dict

2009-12-05 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: This was already corrected with issue5275. Thanks however for the report. -- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed superseder: -> BaseCookie.load doesn't create Morsel o

[issue7333] Add initgroups to the posix/os modules

2009-12-02 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: The documentation is os.rst is too laconic (coming from the Windows world, I could not understand what the function is about). The docstring is much better (at least I understand it's related to the Unix security model), I suggest to use

[issue7413] datetime.datetime.isoformat truncation problem

2009-12-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Here is a new patch against a fresh trunk, and with the suggested changes: they indeed make the code more consistent with other parts. -- keywords: +needs review Added file: http://bugs.python.org/file15433/isoformat-2.

[issue7419] Crash in _locale.setlocale on windows

2009-12-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Fixed with r76625 (trunk), r76626 (py3k) and r76627 (relase31-maint) -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python

[issue7317] Display full tracebacks when an error occurs asynchronously

2009-12-01 Thread Amaury Forgeot d7;Arc
Amaury Forgeot d'Arc added the comment: Seconded. But such messages are also printed when the interpreter exits, when poorly written __del__ methods access already disposed modules. Raising a full traceback could cause users to think that the error is more severe than it is. Is the

[issue7419] Crash in _locale.setlocale on windows

2009-12-01 Thread Amaury Forgeot d7;Arc
New submission from Amaury Forgeot d'Arc : import _locale _locale.setlocale(12345) Crashes on Windows with exit code 0xc417, a.k.a STATUS_INVALID_CRUNTIME_PARAMETER. 2.6 and 3.0 are not affected. setlocale should check the category before passing it to the C runtime: LC_MIN <=

<    7   8   9   10   11   12   13   14   15   16   >