[issue2238] TypeError instead of SyntaxError for syntactically invalid gen exp
Amaury Forgeot d'Arc added the comment: Interestingly, in debug mode, the message XXX undetected error is printed to stderr. And this gives the solution: in ast.c, some calls did not check the return status. Committed revision 61240, will backport to 2.5. Thanks for the report! Thanks for the report! -- nosy: +amaury.forgeotdarc resolution: - fixed status: open - pending __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2238 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2241] Additional Flag For Unit-Test Module: There Can Be Only One (Error)
Amaury Forgeot d'Arc added the comment: Actually, py.test and nose both have the -x option for this purpose. I use it very often during development, mostly during a refactoring phase: failures are easy to correct, and I don't want to wait for the complete suite to complete and display tons of tracebacks. Even while developing on core python, this option would have helped me a couple of times. Please, reopen this item! -- nosy: +amaury.forgeotdarc __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2241 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2179] with should be as fast as try/finally
Amaury Forgeot d'Arc added the comment: What's strange is that calling __enter__ and __exit__ in a try/finally block brings the speed back to the faster 'with' speed, even though they call the same C functions Looking carefully at the code, there are two reasons for this: - LockType has no methods! try dir(thread.LockType). Instead, LockType defines a tp_getattr which does a *linear* search in a PyMethodDef array. First items are served faster... - After converting this to use the usual tp_methods slot, there is still a performance difference, due to the fact that release() is a METH_NOARGS method, while __exit__() uses METH_VARARGS. Phew. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2179 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2179] with should be as fast as try/finally
Amaury Forgeot d'Arc added the comment: Hm, my tests do not see any speedup with this patch. I used VS2005 on win2K, and VS2008 on winXP. Timings are very similar before and after this patch. Maybe the optimization is only useful with gcc? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2179 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2267] datetime.datetime operator methods are not subclass-friendly
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Recently, the similar issue1562 Decimal can't be subclassed useful was rejected. In the discussion I found a reference to a former post, which precisely deals with datetime and timedelta: http://mail.python.org/pipermail/python-list/2005-January/300791.html The main argument is that the base class has no idea what requirements may exist for invoking a subclass's constructor All python types behave this way: int, float, lists. -- nosy: +amaury.forgeotdarc resolution: - wont fix status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2267 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2286] Stack overflow exception caused by test_marshal on Windows x64
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The situation was the same on win32 with the VC2005 debug build, some months ago. I think this is because of the extra stack checks added with recent versions of Visual Studio, together with the fact that local variables are not shared when optimizations are disabled. Can you try to raise the stack size on x64 builds? If 2Mb is enough for 32bit, 4Mb should be good in your case. -- nosy: +amaury.forgeotdarc __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2286 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2295] cPickle corner case - docs or bug?
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The following Works for me: import imp, cPickle mymod = imp.load_module('mymod', *imp.find_module('codecs')) cPickle.dumps(mymod.Codec(), cPickle.HIGHEST_PROTOCOL) '\x80\x02(cmymod\nCodec\nq\x01o}q\x02b.' Do you have a short test case to reproduce your problem? Does your code tweak sys.modules? -- nosy: +amaury.forgeotdarc __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2295 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1477] UnicodeDecodeError that cannot be caught in narrow unicode builds
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The error is not uncatchable; but it is generated while compiling, like a SyntaxError. No bytecode is generated for the input, and the except opcode is not run at all. OTOH, there is a bug in PyUnicode_DecodeRawUnicodeEscape(): it should accept code points 0x. It has another problem: ur'\U0001' u'\x00' I join a patch to make raw-unicode-escape similar to unicode-escape: characters outside the Basic Plane are encoded into a utf-16 surrogate pair; on decoding, utf-16 surrogates are decoded into \U00xx. -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file9714/raw-unicode-escape.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1477 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1943] improved allocation of PyUnicode objects
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Marc-Andre: don't all your objections also apply to the 8bit string type, which is already a variable-size structure? Is extending unicode more common than extending str? With python 3.0, all strings are unicode. Shouldn't this type be optimized for the same use cases of the previous str type? -- nosy: +amaury.forgeotdarc __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1943 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2435] pybench does not run anymore
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Corrected in r61680. Thanks for the report! -- nosy: +amaury.forgeotdarc resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2435 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1477] UnicodeDecodeError that cannot be caught in narrow unicode builds
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The strange code is a copy of PyUnicode_DecodeUnicodeEscape. I find it easier to read. And the duplicate lines are likely to be optimized by the compiler. Here is a new version of the patch which: - correctly forbid illegal code points - compute the byte positions; this is important for error handlers in python2.5, the end position was completely bogus: try: '\U'.decode(raw-unicode-escape) ... except Exception, e: print repr(e) UnicodeDecodeError('rawunicodeescape', '\\U', 0, 504955452, '\\U out of range') Added file: http://bugs.python.org/file9798/raw-unicode-escape2.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1477 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1477] UnicodeDecodeError that cannot be caught in narrow unicode builds
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Committed r61793. Will backport. -- resolution: - fixed status: open - pending __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1477 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2469] Fix build error in unicodeobject.c UCS4
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Oops, I made this error while correcting #2469. Thanks for catching it! committed as r61853. There is no buildbot configured with UCS4... -- nosy: +amaury.forgeotdarc resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2469 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1477] UnicodeDecodeError that cannot be caught in narrow unicode builds
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: backported to 2.5 branch as r61854 -- status: pending - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1477 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2491] io.open() handles errors differently on different platforms
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: With python3.0, os.fdopen() is a simple call to io.open(), which has these missing options. Maybe os.fdopen should be deprecated or removed, and replaced by io.open. Moreover, the comment in os.py is wrong: subprocess does not use fdopen any more, but io.open instead. -- nosy: +amaury.forgeotdarc __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2491 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1561] py3k: test_mailbox fails on Windows
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Three months later, one obvious correction: open all (text) files with the newline='\n' option. - This makes files identical between Unix and Windows version - no more os.linesep A compatibility problem: mailboxes created with python2.6 cannot be opened with 3.0 -- keywords: +patch Added file: http://bugs.python.org/file9865/mailbox.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1561 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1561] py3k: test_mailbox fails on Windows
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Another patch, which uses newline='' instead. Tests pass. The patch is much smaller, and old files are more likely to be compatible. OTOH, messages are unicode strings with \r\n. Which one do you prefer? Added file: http://bugs.python.org/file9866/mailbox2.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1561 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2495] tokenize doesn't handle __future__.unicode_literals correctly
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Actually, the problem is that untokenize does not put spaces between two consecutive string literals: '' '' = Corrected with r61979. Will backport -- nosy: +amaury.forgeotdarc resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2495 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2503] Replace == None/True/False with is
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: You are right of course, but just out of curiosity, do you really have objects that compare equal to None? -- nosy: +amaury.forgeotdarc __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2503 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2502] Add enum() example for named tuples
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Raymond, is this kind of recipes worth adding to the 'collections' module? Maybe with the following form: def enum(*valuenames): return namedtuple('Enum', valuenames)(*range(len(valuenames))) -- nosy: +amaury.forgeotdarc, rhettinger __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2502 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2503] Replace == None/True/False with is
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Yes, PEP8 says:: Comparisons to singletons like None should always be done with 'is' or 'is not', never the equality operators. Reading the patch: - a change modifies x == False into not x, another moves some lines. I checked that they are OK (x is already the result of a comparison). - some occurrences of x != None are not replaced. Why? (ex. in test_ast.py) __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2503 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: since the prompt is written to stderr, why is sys.stdout.encoding used instead of sys.stderr.encoding? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8737] ssl.RAND_add() should only accept bytes (not str)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This function is here to add entropy to the random numbers generator. the kind of data is not important, and no matter which encoding is used, this will not change the quality of the entropy. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8737 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8734] msvcrt get_osfhandle crash on bad FD
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The second patch looks good to me. -- resolution: - accepted stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8776] Bytes version of sys.argv
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: sys.argv is decoded with the file system encoding IIRC this is not exact. Py_Main signature is Py_Main(int argc, wchar_t **argv) then PyUnicode_FromWideChar is used, and there is no conversion (except from UCS4 to UCS2). The wchar_t strings themselves are built with mbstowcs(), the file system encoding is not used. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8760] Python 2.6.5 fails to build on AIX 5.3
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: There is a message:: 'import site' failed; use -v for traceback what do you get when you run ./python -v? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8760 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4388] test_cmd_line fails on MacOS X
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What if os.system(), os.execvp() and friends used wcstombs (or locale.preferredencoding) to convert arguments from unicode to bytes? this would at least guarantee round-trip when spawning another python interpreter. An interesting test is to compare the effects of os.unlink(filename) and os.system('rm %s' % filename), where filename is non-ascii. Does it work today? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4388 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8760] Python 2.6.5 fails to build on AIX 5.3
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: no, the input is not the same, there is ImportError: No module named site. I have tree more questions: - Do you have a file named: /sw_install/python-2.6.5/Lib/site.py - what it the output when you type import sys; print sys.path - is there a file named cStringIO.so somewhere in the build tree? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8760 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8760] Python 2.6.5 fails to build on AIX 5.3
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Do you have set the PYTHONHOME environment variable? this does not work from a build directory. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8760 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8760] Python 2.6.5 fails to build on AIX 5.3
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Closing as Invalid. PYTHONHOME should not be set when building Python. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8760 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8787] warnings inside PyRun_SimpleString() display argv[1]
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, the warnings module tries to display the file name. Inside PyRun_SimpleString(), globals()['__name__'] == '__main__', and the warnings module supposes that argv[1] is the name of the script. I wonder whether __file__ would be more accurate: it is filled when running a script, but not when running a string. And sys.argv would not be used any more. -- assignee: - brett.cannon nosy: +amaury.forgeotdarc, brett.cannon title: PySys_Get - warnings inside PyRun_SimpleString() display argv[1] ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8787 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8765] Tests unwillingly writing unicocde to raw streams
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The 3.1 version does it correctly since issue7785, but this was not backported to 2.x. Python 3.x uses the y* format code to accept bytes and not unicode; this code does not exist in 2.x, and was replaced with s*, which accepts unicode. But since the io module is designed up front to forbid default conversion between bytes and unicode, I think it's safe to change the code as suggested. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8765 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6715] xz compressor support
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I will happily review any implementation, and I can help with inclusion into python trunk. ...the LGPL liblzma... Can you check which licences cover the different parts of the module? I think that you will have to contribute your code under the Python Contributor Agreement; and I just grabbed some copy of the xz-utils source package, and it states that liblzma is in the public domain. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6715 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4810] timeit needs official '--' flag
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This -- trick is implemented by the getopt module. OTOH on my system, 'grep' also recognizes this, and I could not find any documentation about it, neither with grep --help nor man grep. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4810 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__()
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't like the import errno while printing an exception... It would be much more robust to store errorcode_dict in a static variable when python starts, and reuse it directly. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2920 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8793] IDLE crashes on opening invalid file
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: When running IDLE in a console, I get the error: Exception in Tkinter callback Traceback (most recent call last): File c:\prod\python\lib\lib-tk\Tkinter.py, line 1410, in __call__ return self.func(*args) File c:\prod\python\lib\idlelib\MultiCall.py, line 150, in handler r = l[i](event) File c:\prod\python\lib\idlelib\ScriptBinding.py, line 140, in run_module_event code = self.checksyntax(filename) File c:\prod\python\lib\idlelib\ScriptBinding.py, line 99, in checksyntax return compile(source, filename, exec) ValueError: invalid \x escape The crash in Bug#2 is certainly because pythonw.exe has no console, so sys.stdout blocks on the first flush(), after 4096 bytes of output. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8793 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8869] execfile does not work with UNC paths
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Reproduced on WinXP. execfile() does not work because it calls the system function stat(); this function does accept UNC paths (like \\machine\share\file), but not paths which contain a wildcard character ('?' or '*') I suggest to remove the leading '?\\'. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8869 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6470] Tkinter import fails when running Python.exe from a network share
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: to reproduce: on Vista, start \\%COMPUTERNAME%\c$\python26\python.exe -c import Tkinter; print Tkinter In this case, the path returned by GetFinalPathNameByHandle starts with \\?\UNC\. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6470 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7989] Add pure Python implementation of datetime module to CPython
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Even from pypy perspective, a pure python implementation is not ideal because it makes it difficult to implement the C API. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3173] external strftime for Python?
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: PyPy also calls the platform's strftime(). -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3173 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6543] traceback presented in wrong encoding
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In issue3343, we chose to mark this function as private. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7989] Add pure Python implementation of datetime module to CPython
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: One, we should not blindly pull in the PyPy code without some core PyPy developer being in on this You can count me among the PyPy developers. I concur. Much of PyPy code is written for a restricted subset of Python instead of clean, idiomatic modern Python. Not this part. The module datetime.py is meant to be imported by the interpreter, and has no limitation (we call it application-level code, opposed to interpreter-level code which is translated to C and which indeed has serious constraints) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7989] Add pure Python implementation of datetime module to CPython
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: If both implementations can exist in the same interpreter, how will they cooperate? For example, Time instances created with datetime.py won't pass PyTime_Check(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8988] import + coding = failure (3.1.2/win32)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: now tell me how the hell can file system encoding be related to file content encoding?! Why do you say so? I can reproduce your issue, but changing the first line of a.py: # coding: cp1252 to: # coding: utf-8 did not change anything. In the meantime, you should refrain from creating directories with characters not representable in the terminal window. @haypo: The problem still exists with py3k at r82150. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9055] test_issue_8959_b fails when run from a service
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: To test windows callbacks, I suggest to use EnumResourceTypes() instead, which is more likely to work in any condition: def test(): from ctypes.wintypes import BOOL, HMODULE, LONG, LPARAM import ctypes EnumResourceTypes = ctypes.windll.kernel32.EnumResourceTypesA EnumResTypeProc = ctypes.WINFUNCTYPE( BOOL, HMODULE, LONG, LPARAM) resource_types = [] def callback(hModule, typeid, lParam): resource_types.append(typeid) return True # keep enumerating hModule = None # Main executable RT_MANIFEST = 24 # from winuser.h EnumResourceTypes(hModule, EnumResTypeProc(callback), None) assert RT_MANIFEST in resource_types -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9055 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9059] Backwards compatibility
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: as stated in http://www.python.org/download/releases/3.1.2/ python 3 is designed to be backwards incompatible. I suggest you to follow the link Conversion tool for Python 2.x code. -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9059 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9064] pdb enhancement up/down traversals
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is a good idea, but tab characters are disallowed in core python code; please replace them with spaces. Then, please provide an unified diff patch (with diff -u), and name it with the .patch extension, this will make it easier to read. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9064 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9064] pdb enhancement up/down traversals
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Two remarks: - when int(arg) fails, an error message should be printed, like with the function do_commmands(). - the for loop seems unnecessary, something like self.curindex -= nup should be enough -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9064 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4804] Python on Windows disables all C runtime library assertions
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Why is this issue still open? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4804 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8988] import + coding = failure (3.1.2/win32)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: File F:\1home\С\u201e\a.py, line 1, in module And what the hell is this u201e? That should have been a letter! It's probably this symbol: http://www.eki.ee/letter/chardata.cgi?ucode=201e but it has no representation in the console windows you are using; try import sys; print(sys.stderr.encoding) to print the code page used by your console. In error messages, Python replaces unpritable characters with their escaped form: \u where is the character number. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8988] import + coding = failure (3.1.2/win32)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But the case has begun from cyrillic letters in the NTFS path, which I do not use, but the users of my soft do. So putting the program into such directory makes the former unuseable; until the sources are in utf anyway. I agree that cyrillic letters in the path makes the program unusable. This is the bug to fix, and the zip file you attached is a good test case. But I still don't see how the sources are in utf can influence this. Please show me! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9098] MSYS build fails with `S_IXGRP' undeclared
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't think MSYS (or mingw32) is supported at all. I'm even surprised that the build went so far. -- assignee: - loewis nosy: +amaury.forgeotdarc, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9098 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9107] PyModule_Create not working properly
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The issue tracker is not here to get help. Please ask your question on the comp.lang.python newgroup, or the python-list mailing list. There, I think you will have to show part of your code; there will certainly be several people willing to help you. -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9107 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4925] Improve error message of subprocess when cannot open
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: in PC/_subprocess.c, it should be enough to use PyErr_SetFromWindowsErrWithFilename() instead of PyErr_SetFromWindowsErr() -- keywords: +easy nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4925 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: And what about this? x.update(self=5) -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7989] Add pure Python implementation of datetime module to CPython
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: assert daysecondswhole == int(daysecondswhole) # can't overflow Since int is long in 3.x, this assert does not check anything Even with 2.5 int(x) cannot overflow, and returns a long when needed! This assert probably checks that the number has no fractional part. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8988] import + coding = failure (3.1.2/win32)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Here is what I did, on a machine running Windows XP, with python 3.1.1: - I used 7-zip to extract the attached zip file, in the c:\temp directory. - Then I opened a command prompt, here is an exact copy of the session: C:cd \temp\█ C:\temp\█dir Le volume dans le lecteur C s'appelle Disque dur Le numéro de série du volume est D4BA-260C Répertoire de C:\temp\█ 03/07/2010 11:10REP . 03/07/2010 11:10REP .. 08/06/2010 09:1344 a.py 08/06/2010 14:2111 b.py 2 fichier(s) 55 octets 2 Rép(s) 58 733 801 472 octets libres C:\temp\█c:\Python31\python.exe a.py Traceback (most recent call last): File a.py, line 3, in module import b; ImportError: No module named b C:\temp\█notepad a.py [Replaced encoding with utf-8, then save and quit] C:\temp\█c:\Python31\python.exe a.py Traceback (most recent call last): File a.py, line 2, in module import b; ImportError: No module named b -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9148] os.execve puts process to background on windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: on Windows, exec() does not really replace the current process. It creates a new process (with a new pid), and exits the current one. Hence the calling program only sees that the script has terminated. I don't see any easy solution on Windows, except than using subprocess.Popen(), and exit the script when the subprocess terminates. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9170] zipfile cannot read AES encrypted files
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: zipfile only supports the Traditional PKWARE Encryption method. Support for other encryption methods would be useful. -- nosy: +amaury.forgeotdarc stage: - needs patch title: zipfile.extractall raises runtime error on correct password - zipfile cannot read AES encrypted files type: behavior - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- assignee: - amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Now I wonder whether it's reasonable to consider this character U+1 (LINEAR B SYLLABLE B008 A) as printable with repr(). Yes, its category is Lo, but is there a font which can display it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9198] Should repr() print unicode characters outside the BMP?
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: On wide unicode builds, '\U0001'.isprintable() returns True, and repr() returns the character unmodified. Is it a good behavior, given that very few fonts have can display this character? Marc-Andre Lemburg wrote: The printable property is a Python invention, not a Unicode property, so we do have some freedom is deciding what is printable and what is not. The current implementation considers printable all the characters except those characters defined in the Unicode character database as following categories are considered printable. * Cc (Other, Control) * Cf (Other, Format) * Cs (Other, Surrogate) * Co (Other, Private Use) * Cn (Other, Not Assigned) * Zl Separator, Line ('\u2028', LINE SEPARATOR) * Zp Separator, Paragraph ('\u2029', PARAGRAPH SEPARATOR) * Zs (Separator, Space) other than ASCII space('\x20'). We could also arbitrarily exclude all the non-BMP chars. -- components: Unicode messages: 109520 nosy: amaury.forgeotdarc, ezio.melotti, lemburg priority: normal severity: normal status: open title: Should repr() print unicode characters outside the BMP? type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I suggest to go ahead and apply this patch, at least it correctly selects printable characters, whatever this means. I filed issue9198 to decide whether chr(0x1) should be printable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: consider replacing the tab characters before the comments with spaces It's actually already the case in my working copy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9198] Should repr() print unicode characters outside the BMP?
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A more accurate approach would be to actually try to encode the string and escape only the chars that can't be encoded This is already the case with sys.stderr, it uses the backslashreplace error handler. Do you suggest the same for sys.stdout? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9198] Should repr() print unicode characters outside the BMP?
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, repr() should not depend on the user's terminal. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9198] Should repr() print unicode characters outside the BMP?
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The chapter Rationale in PEP3138 explains why sys.stdout uses strict encoding, when sys.stderr uses backslashreplace. It would be possible to use backslashreplace for stdout as well for interactive sessions, but the PEP also rejected this because it '''may add confusion of the kind it works in interactive mode but not when redirecting to a file.''' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9197] subprocess module causing crash
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I reproduce the problem on Linux (./configure --enable-shared), after I modified the source code a bit to directly use Python.h and to link with libpython3.2.so (no call to dlopen). In gdb the stack trace has exactly the same symbols as the attached crash log, so the issue is not specific to Mac frameworks. The crash is inside _PyImport_LoadDynamicModule(_pickle), when _PyImport_FixupExtension() calls Py_DECREF(def-m_base.m_copy), this certainly frees objects allocated in a previous incarnation of the interpreter, and segfaults in type_dealloc(): _PyObject_GC_UNTRACK(type). In import.c::_PyImport_FixupExtension(), the Py_DECREF is preceded by a comment: /* Somebody already imported the module, likely under a different name. XXX this should really not happen. */ Py_DECREF(def-m_base.m_copy); I removed this statement, and the program now runs correctly. I don't know about memory leaks though... -- nosy: +amaury.forgeotdarc, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9197 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9197] subprocess module causing crash
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: We definitely need unit tests about embedded python interpreter, I think there are none. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9197 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9200] str.isprintable() is always False for large code points
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: On narrow unicode builds: unicodedata.category(chr(0x1)) == 'Lo' # correct Py_UNICODE_ISPRINTABLE(0x1)== 1 # correct str.isprintable(chr(0x1)) == False # inconsistent On narrow unicode builds, large code points are stored with a surrogate pair. But str.isprintable() simply loops over the Py_UNICODE array, and test the surrogates separately. There should be a way to walk a unicode string in C, character by character, and the str methods (str.is*, str.to*) should use it. -- components: Unicode messages: 109542 nosy: amaury.forgeotdarc, ezio.melotti, lemburg priority: normal severity: normal status: open title: str.isprintable() is always False for large code points versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9200 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A new patch, generated on top of r82662 -- Added file: http://bugs.python.org/file17909/unicodectype_ucs4_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A new patch that doesn't remove an important check, avoids a crash when the C macro is called with a huge number. thanks Ezio. -- Added file: http://bugs.python.org/file17911/unicodectype_ucs4_5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Could you explain what this bit is about ? -#if defined(HAVE_USABLE_WCHAR_T) defined(WANT_WCTYPE_FUNCTIONS) +#if defined(Py_UNICODE_WIDE) defined(WANT_WCTYPE_FUNCTIONS) On Windows at least, HAVE_USABLE_WCHAR_T is True, this means that Py_Unicode can be converted to wchar_t. But now that Py_UNICODE_ISSPACE() takes Py_UCS4, it cannot be converted to wchar_t anymore. Now that the unicode database functions claim to use Py_UCS4, the functions of wctypes.h are usable only if they also support Py_UCS4. OTOH the symbol WANT_WCTYPE_FUNCTIONS is defined only if ./configure is called with --with-wctype-functions, I don't expect it to be common. BTW, the comment says that This reduces the interpreter's code size. I don't really agree, these functions are two-liners. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: str.isprintable() co are not changed by this patch, because they enumerate Py_UNICODE units and do not join surrogates. See issue9200 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9210] remove --with-wctype-functions configure option
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: Quoting Marc-Andre Lemburg: The support for the wctype functions should have been remove long ago, since they cause subtle incompatibilities between Python builds. I should have probably never added it in the first place... people were worried about the size of the type record tables at the time, which is why I thought it would be a good idea to try to optionally use the C lib functions. The comment was true before the Python type tables were changed into a type record database: the switch used to remove the Python tables required for those functions. With the type records database, this is no longer the case, since the records are also being used for properties that are not exposed via wctype functions. -- components: Unicode messages: 109696 nosy: amaury.forgeotdarc, ezio.melotti, lemburg priority: normal severity: normal status: open title: remove --with-wctype-functions configure option versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9210 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9210] remove --with-wctype-functions configure option
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file17919/kill-wctype.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9210 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1578269] Add os.symlink() and os.path.islink() support for Windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Also, GetFinalPathNameByHandle() is called 5 times with VOLUME_NAME_DOS, and once with VOLUME_NAME_NT. This one looks suspect to me. [I noticed this because these symbols are not defined with the SDK shipped with VS8.0. I'll propose another patch for this] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1578269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1578269] Add os.symlink() and os.path.islink() support for Windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Hm, the patch could be more pythonic. Something like: symlink_exception = (AttributeError,) try: symlink_exception += (NotImplementedError, WindowsError) except NameError: pass try: ... except symlink_exception: ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1578269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, py3k r82745 still shows the problem -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1147646] Windows deadlock with PyEval_ReleaseLock
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This issue looks invalid to me: PyEval_ReleaseLock manipulates the interpreter lock, but not the thread state. Both have to be released/reset before another thread can install its own thread state and run. In other words, PyEval_SaveThread() should be used instead (and PyEval_RestoreThread() at the end, but the example code does not care to finalize the interpreter) -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1147646 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The issue is that when close() calls flush(), errors are silently discarded. I'm sure a similar issue was already filed, but could not find it. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5321 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9200] str.isprintable() is always False for large code points
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A proof of concept patch, which shows the macros used to walk a unicode string and uses them in unicode_repr() (should not change behaviour) and in unicode_isprintable() (should fix the issue). Other functions should be changed the same way, of course. -- keywords: +patch Added file: http://bugs.python.org/file17922/join-surrogates.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9200 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5556] interactive interpreter, source encoding
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I fail to see the issue. runsource() takes a (unicode) string because a Python script is a text; you cannot pass a bytes object, it must be decoded before. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5556 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In this 6th patch, the wctype part was changed as suggested. there is one more condition, Py_UNICODE_WIDE: -#if defined(HAVE_USABLE_WCHAR_T) defined(WANT_WCTYPE_FUNCTIONS) +#if defined(WANT_WCTYPE_FUNCTIONS) defined(HAVE_USABLE_WCHAR_T) defined(Py_UNICODE_WIDE) -- Added file: http://bugs.python.org/file17924/unicodectype_ucs4_6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1147646] Windows deadlock with PyEval_ReleaseLock
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is actually the same issue as issue1720250 -- resolution: - duplicate status: open - closed superseder: - PyGILState_Ensure does not acquires GIL ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1147646 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1720250] PyGILState_Ensure does not acquires GIL
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is still the case: the documentation should mention that PyEval_ReleaseLock() is not the correct function to release the GIL, both the interpreter lock *and* the current thread state have to be released. -- assignee: - d...@python components: -Interpreter Core nosy: +amaury.forgeotdarc, d...@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1720250 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2528] Change os.access to check ACLs under Windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But what are the benefits of this change? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8988] import + coding = failure (3.1.2/win32)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Just fine! It's either another bug in python or 3.1.1 specifics. What do you mean? what is 'it'? The error I in the session above shows the bug we described first (strange letters in the path makes the program unusable), and shows that the file's encoding doesn't change this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1076790] test test_codecs failed
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The OP compiled python with --with-wctype-functions, and the libc wctype functions work differently depending on the locale. I suggest closing this issue as won't fix, and favor the removal of the --with-wctype-functions option proposed in issue9210. -- nosy: +amaury.forgeotdarc resolution: - wont fix status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1076790 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9241] SAXParseError on unicode (Japanese) file
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Your file contains the byte \x1a == EOF. You should not open it in text mode, but in binary mode, otherwise it's truncated. import xml.sax xml.sax.parse(open(ff1a.xml, 'rb'), xml.sax.ContentHandler()) works on all versions I tried. -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7645] test_distutils fails on Windows XP
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's just a data file missing from the .msi installer. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7645 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9271] Python throws `IOError: [Errno 27] File too large' on long file names
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The file name is only 106 characters long, it's not too long. [Errno 27] File too large probably refers to a big file larger than 2Gb. Does your OS support large files? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8988] import + coding = failure (3.1.2/win32)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Then please tell us how to reproduce the SyntaxError case -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1428655] Use PyOS_snprintf for static buffers
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Most usages of sprintf here cannot cause buffer overruns: the output is bounded in size (%d, %8.8x, %.200s), and the buffer is large enough. Moreover, some of them were already replaced by functions of the _FromFormat() family, which can handle unicode for example. IMO the change is not worth it. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1428655 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It seems that this has been fixed in the py3k branch (r78942). Now both bytes and unicode are accepted. Can someone check? -- nosy: +amaury.forgeotdarc stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Py_TPFLAGS_INT_SUBCLASS is an implementation detail, and extension modules should not have to be aware of it. Does Numpy correctly call PyType_Ready()? -- nosy: +amaury.forgeotdarc status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: multiple inheritance should not be a problem: there can be only one dominant base, which is 'int' in this case. someone with a debugger should step into this call to PyType_Ready() and see why it does not set the flag correctly (at the end of inherit_special()) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A unit test (or even a sample script) showing the desired feature is needed. -- nosy: +amaury.forgeotdarc stage: - unit test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6686 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8192] SQLite3 PRAGMA table_info doesn't respect database on Win32
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: python2.7 includes a newer version of sqlite. Does the problem still reproduces there? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8192 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9314] inconsistent result when concatenating list with iterators
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This actually works for any iterator: l = [] l += 'abc' l ['a', 'b', 'c'] -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9314 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com