[issue11377] Deprecate (remove?) platform.popen()

2011-03-02 Thread STINNER Victor
STINNER Victor added the comment: os.popen() is deprecated since Python 2.6 ("Use the subprocess module.") and it is no more documented in Python 3. The following documentation explains how to replace os.popen() by subprocess: http://docs.python.org/py3k/library/subprocess.html#re

[issue10829] PyUnicode_FromFormatV() bugs with "%" and "%%" format strings

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: > Hi, haypo, would you mind modify your newly added parse_format_flags() > function so that it can diff the precision value of '%.0s' and > '%s'(Currently both of them return precision as 0)? You should update your patch attach

[issue10833] Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes is outdated

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: I am working with Python since 5 years (and on Python since 3 years): I never seen any garbage string in error messages. My concern is to not truncate strings in error messages anymore. I consider that it is more important than using a hack to workaround

[issue11377] Deprecate (remove?) platform.popen()

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: > Does subprocess work from inside Windows GUI applications? You mean: Python embedded in another program? I don't know. How can I test that? I never see any warning in subprocess documentation saying that subprocess doesn't work on Windows

[issue10833] Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes is outdated

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: History of PyErr_Format(): - r7580 (13 years ago): creation of PyErr_Format() using a buffer of 500 bytes (fixed size buffer, allocated on the stack) - r17159 (10 years ago): PyErr_Format() allocates a dynamic buffer on the heap - r22722 (9 years ago

[issue11377] Deprecate (remove?) platform.popen()

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: > Try to use platform from within IDLE ... I tried subprocess.call('calc.exec'): it works. I tried p=subprocess.Popen('echo hello', shell=True, stdout=subprocess.PIPE); p.communicate(): it works too (I get the output and there is n

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2011-03-03 Thread STINNER Victor
Changes by STINNER Victor : -- title: PyUnicode_FromFormat segfault -> PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A ___ Python tracker <http://bugs.python.org/iss

[issue11377] Deprecate (remove?) platform.popen()

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: New patch deprecating platform.popen() and removing _popen. Marc-Andre: Do you agree to deprecate platform.popen() in favour of subprocess? -- Added file: http://bugs.python.org/file20984/platform_popen-2.patch

[issue11384] Deprecate, remove or document (correctly) os.popen

2011-03-03 Thread STINNER Victor
New submission from STINNER Victor : os.popen() was deprecated in Python 2.6 but it does still exist in Python 3.3. The function is no more documented: there is an entry in os documentation, but the entry is not in the index, and it has a reference to the "file object creation" sec

[issue11384] Deprecate, remove or document (correctly) os.popen

2011-03-03 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/issue11384> ___ ___ Python-bugs-

[issue6490] os.popen documentation in 2.6 is probably wrong

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: r55334 removed popen2, popen3 and popen4 from the os module from Python 3 (before the 3.0 release), but not os.popen. Python 3.2 has now convenience functions in subprocess to get the output of a program: - check_output() - getstatusoutput() - getoutput

[issue6490] os.popen documentation in 2.6 is probably wrong

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: The following documentation should also be updated to use the new convenience functions: http://docs.python.org/py3k/library/subprocess.html#replacing-os-popen-os-popen2-os-popen3 -- ___ Python tracker <h

[issue11377] Deprecate (remove?) platform.popen()

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: Commited to 3.3 (r88721). -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue8513] subprocess: support bytes program name (POSIX)

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forget subprocess.call(b'ls'): command as a byte string => fixed in Python 3.3 (r88720). -- ___ Python tracker <http://bugs.pyth

[issue10197] subprocess.getoutput fails on win32

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: subprocess_getoutput.patch: patch subprocess.getstatusoutput() to use directly Popen, instead of os.popen, with stderr=subprocess.STDOUT instead of "2>&1" shell redirection. It strips also all trailing spaces and newlines, not just the last

[issue8972] subprocess.list2cmdline doesn't quote the & character

2011-03-03 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue8972> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9723] Add shlex.quote

2011-03-03 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue9723> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2011-03-03 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue7839> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10197] subprocess.getoutput fails on win32

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: > I tried to add a shell argument (to be able to disable the shell) and > to accept any Popen keyword, but I don't know how to implement > shell=False if the input is a list of arguments. list2cmdline() is > unsafe on UNIX (see #8972). Examp

[issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: I think that it is now too late to change getstatusoutput() output type (str->bytes). I prefer Unicode and I think that most users will have to decode bytes to Unicode anyway. So the right solution is to be able to configure encoding and errors used

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: A quick search gives me: - #1006238 - #1597850 - #3754 - #5404 - #3871 Are they the same patches from Buildroot? -- ___ Python tracker <http://bugs.python.org/issue11

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-03 Thread STINNER Victor
New submission from STINNER Victor : << Fault handler for SIGSEGV, SIGFPE, SIGBUS and SIGILL signals: display the Python backtrace and restore the previous handler. Allocate an alternate stack for this handler, if sigaltstack() is available, to be able to allocate memory on the stack, e

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-03 Thread STINNER Victor
STINNER Victor added the comment: I tested faulthandler on Linux, FreeBSD and Windows XP: it works well. I suppose that it works on any operating systems. You can also try it on know crashers: Lib/test/crashers/ (you have to modify the files to add: import faulthandler; faulthandler.enable

[issue11373] Fix 2 new typos in the docs

2011-03-03 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +easy ___ Python tracker <http://bugs.python.org/issue11373> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread STINNER Victor
STINNER Victor added the comment: Extract of issue #1602: << WriteConsoleW has one bug that I know of, which is that it http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1232";>fails when writing more than 26608 characters at once. That's easy to work around by limiting the am

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread STINNER Victor
STINNER Victor added the comment: Extract of the WriteConsole Function: << The storage for this buffer is allocated from a shared heap for the process that is 64 KB in size. The maximum size of the buffer will depend on heap usage. >> http://msdn.microsoft.com/en-us/library/ms

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread STINNER Victor
STINNER Victor added the comment: > This changed with r87824 Yes, I changed Python to open all files in binary mode. With Python < 3.2, you can open sys.std* streams in binary mode using -u command line option (u like unbuffered, not U

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread STINNER Victor
STINNER Victor added the comment: Anyway, use os.write() to write unicode into the Windows console is not the right thing to do. We should use WriteConsoleW(): #1602 is the correct fix for this issue. -- ___ Python tracker <http://bugs.python.

[issue11395] print(s) fails on Windows with long strings

2011-03-04 Thread STINNER Victor
STINNER Victor added the comment: > And WriteConsole has the same issue. print() (sys.stdout and sys.stderr) should use WriteConsoleW() and use small chunks (smaller than 64 KB, I don't know the safest size). -- ___ Python tracke

[issue3080] Full unicode import system

2011-03-04 Thread STINNER Victor
STINNER Victor added the comment: r88746: Add PyModule_NewObject() function r88747: Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject() -- ___ Python tracker <http://bugs.python.org/issue3

[issue11395] print(s) fails on Windows with long strings

2011-03-06 Thread STINNER Victor
STINNER Victor added the comment: I did some tests: os.write(1, b'X'*length) does always fail with length >= 63842. It does sometimes fail with length > 35000. The maximum looks completly random: as written in Microsoft documentation, "The maximum size of the buffer will

[issue11395] print(s) fails on Windows with long strings

2011-03-06 Thread STINNER Victor
STINNER Victor added the comment: Remarks about test_wconsole_binlarge.patch: - I don't know if isatty() is cheap or not. Is it a system call? If it might be slow, it should be only be called once in the constructor. On Windows, I don't think that isatty(fd) evoles. - I don't

[issue11395] print(s) fails on Windows with long strings

2011-03-06 Thread STINNER Victor
STINNER Victor added the comment: Other remarks about test_wconsole_binlarge.patch: - the patch doesn't apply on Python 3.3 - I would prefer 32767 instead of 32000 for the maximum length Suggestion for the comment in fileio.c: * Issue #11395: not enough space error (errno 12) on wr

[issue1559549] ImportError needs attributes for module and file name

2011-03-07 Thread STINNER Victor
STINNER Victor added the comment: The module name is a UTF-8 encoded string yes. It should be documented in PyModuleDef structure. I already documented the encoding in PyModule_New(). -- ___ Python tracker <http://bugs.python.org/issue1559

[issue11395] print(s) fails on Windows with long strings

2011-03-07 Thread STINNER Victor
STINNER Victor added the comment: I tried to commit io_write.patch, but I had problems with Mercurial :-) I will commit it later. -- Added file: http://bugs.python.org/file21030/io_write.patch ___ Python tracker <http://bugs.python.org/issue11

[issue11395] print(s) fails on Windows with long strings

2011-03-07 Thread STINNER Victor
STINNER Victor added the comment: > This last patch looks good, except that the comments "if stdout mode > is binary (python -u)" are incorrect: since r87824, all files are > opened in binary mode. I plan to commit the patch to 3.1 and then forward port to 3.2 and 3.3. Yes

[issue3080] Full unicode import system

2011-03-09 Thread STINNER Victor
STINNER Victor added the comment: I created the features/unicode_import repository with a "unicode_import" branch: http://hg.python.org/features/unicode_import/ It's my huge patch splitted into small and atomic commits. -- ___ Python

[issue3080] Full unicode import system

2011-03-10 Thread STINNER Victor
STINNER Victor added the comment: > Is there a specific place for comments? Yes, but my work is not done. I still have parts to commit. > _PyImport_GetDynLoadFunc still takes char* arguments. Oh. This one is not easy because this function has many implementations and all implement

[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2011-03-11 Thread STINNER Victor
STINNER Victor added the comment: I'm working on #3080 which changes the import machinery to use Unicode instead of byte strings, and so it will be possible to fix this issue correctly. -- ___ Python tracker <http://bugs.python.org/i

[issue3080] Full unicode import system

2011-03-11 Thread STINNER Victor
STINNER Victor added the comment: See also #9319: when this issue will be fixed, it will be easier to fix #9319. -- ___ Python tracker <http://bugs.python.org/issue3

[issue10665] Expand unicodedata module documentation

2011-03-11 Thread STINNER Victor
STINNER Victor added the comment: > The patch contains non-ascii chars that should be avoided (they break `make > pdf`). What is the error? Can't you fix the PDF generator instead? -- ___ Python tracker <http://bugs.python.

[issue3080] Full unicode import system

2011-03-14 Thread STINNER Victor
STINNER Victor added the comment: I finished to split the huge patch into smaller commits. You can now test the unicode_import Mercurial branch. Especially, it should be tested on Windows. I don't know if I should merge the branch as an unique commit or as multiple commits. Some of the

[issue10785] parser: store the filename as an unicode object

2011-03-14 Thread STINNER Victor
STINNER Victor added the comment: @Benjamin: You told me that you don't want two versions of pgen, but I don't remember why. As my work on #3080 is mostly done, I now plan to patch the Python parser to store the filename as Unicode. So could you please review the patch attached to

[issue11574] Unicode Fallback Encoding on Python 3.3

2011-03-17 Thread STINNER Victor
STINNER Victor added the comment: In my experience (PYTHONFSENCODING, sys.setfilesystemencoding()): Python should just use the same encoding than the locale encoding because *all* other programs on the system use the locale encoding. If none of LANG, LC_ALL or LC_CTYPE env var is set: Python

[issue11573] Improve Unicode Documentation with Known Caveats

2011-03-17 Thread STINNER Victor
STINNER Victor added the comment: Can you provide a patch? -- ___ Python tracker <http://bugs.python.org/issue11573> ___ ___ Python-bugs-list mailing list Unsub

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-03-18 Thread STINNER Victor
STINNER Victor added the comment: Instead of always calling clearerr(), we can only call it on EOF: diff -r 88fe1ac48460 Parser/myreadline.c --- a/Parser/myreadline.c Mon Mar 07 08:31:52 2011 +0100 +++ b/Parser/myreadline.c Fri Mar 18 10:57:23 2011 +0100 @@ -72,6 +72,7

[issue11574] Unicode Fallback Encoding on Python 3.3

2011-03-18 Thread STINNER Victor
STINNER Victor added the comment: After reading the related mail thread on python-dev, I realized that you are talking about TextIOWrapper choice (file content, not file name). My previous message is about file names. -- ___ Python tracker <h

[issue11574] Unicode Fallback Encoding on Python 3.3

2011-03-18 Thread STINNER Victor
STINNER Victor added the comment: TextIOWrapper is mostly based on locale.getpreferredencoding(), so msg131290 is still valid: if no env var is set, nl_langinfo() gives 'ASCII' (or something like that). But it is not easy to detect that env vars are not set. I would prefer a

[issue11563] test_urllibnet is triggering a ResourceWarning

2011-03-19 Thread STINNER Victor
STINNER Victor added the comment: @Senthil Kumaran: Because your patch touchs not only the test, can you document your change in Misc/NEWS? Sending a new HTTP header should be documented. Is there an issue to support persistent connections in AbstractHTTPHandler.do_open

[issue3080] Full unicode import system

2011-03-19 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file21296/issue3080.py ___ Python tracker <http://bugs.python.org/issue3080> ___ ___ Python-bugs-list mailin

[issue3080] Full unicode import system

2011-03-19 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg123994 ___ Python tracker <http://bugs.python.org/issue3080> ___ ___ Python-bugs-list m

[issue3080] Full unicode import system

2011-03-19 Thread STINNER Victor
STINNER Victor added the comment: > Replace open_exclusive() by fopen(name, "wb") on Windows: is it correct? I reverted this change in my Mercurial branch (unicode_import). > rename xxxobj => xxx to keep original names and have a short patch done > catch encoding err

[issue3080] Full unicode import system

2011-03-19 Thread STINNER Victor
STINNER Victor added the comment: > test_runpy fails on Windows on make_legacy_pyc() (of test.support), > I don't know why. Gotcha: I replaced mkdir() by CreateDirectoryW(), but the "directory already exists" error was not ignored.

[issue3080] Full unicode import system

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: http://www.python.org/dev/buildbot/all/builders/PPC%20Tiger%203.x/builds/1599/steps/test/logs/stdio == ERROR: testImpWrapper (test.test_importhooks.ImportHooksTestCase

[issue3080] Full unicode import system

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: > mod = imp.load_module(fullname, self.file, self.filename, self.stuff) > TypeError: 'NoneType' object is not iterable The problem is that imp.find_module() now returns None as the filename, but imp.load_module() does

[issue11614] import __hello__ is broken in Python 3

2011-03-20 Thread STINNER Victor
New submission from STINNER Victor : import __hello__ doesn't print any message!!! -- messages: 131499 nosy: benjamin.peterson, georg.brandl, haypo priority: release blocker severity: normal status: open title: import __hello__ is broken in Python 3 versions: Python 3.1, Pytho

[issue11586] Python/pythonrun.c: get_codec_name() typo

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: Fixed, thanks Ray. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue11395] print(s) fails on Windows with long strings

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: I realized that it was a little more difficult to port the fix on 3.1 because 3.1 doesn't have the fix for Windows 64 bits. So I only fixed Python 3.2 and 3.3, also because nobody reported failure for Python 3.1 on Windows with -u flag. I tested my fix

[issue11617] Sporadic failure in test_httpservers

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: Another example on x86 OpenIndiana 3.2: test test_httpservers failed -- Traceback (most recent call last): File "/export/home/buildbot/32bits/3.2.cea-indiana-x86/build/Lib/test/test_httpservers.py", line 210, in test_latin1_header self.a

[issue3080] Full unicode import system

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: Ok. Python 3.3 does now support non-ASCII characters in module paths and names on Windows, but only characters encodable to the ANSI code page. To support the full Unicode range, we should remove all calls to PyUnicode_EncodeFSDefault() on Windows: a

[issue3080] Full unicode import system

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: > c) _PyImport_LoadDynamicModule() encodes the filename for > _PyImport_GetDynLoadFunc(). The prototype should be changed, > but only on Windows, to accept a filename as a Unicode string. Hum, the difficult part is to use Unicode in _PyImport_GetDy

[issue11619] On Windows, don't encode filenames in the import machinery

2011-03-20 Thread STINNER Victor
New submission from STINNER Victor : With #3080, Python 3.3 does now manipulate module paths and names as Unicode in the import machinery. But in 3 remaining places, it does encode filenames (to the ANSI code page): a) _PyImport_LoadDynamicModule() It should pass directly the PyObject

[issue3080] Full unicode import system

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: Ok, I think that the most important part is now implemented in Python 3.3: use Unicode for module names and paths in the import machinery. Remaing parts are specific to Windows, and so I opened a new issue: #11619. Let's close this 3 years old

[issue10828] Python 3 doesn't support non-ASCII module names with a locale encoding different than UTF-8

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: I closed #3080: Python 3.3 is now able to handle non-ASCII characters in module names and paths. But it is only able to handle non-ASCII characters encodable to the ANSI code page. To support all characters, I opened the issue #11619 (see also #10785

[issue11188] test_time error on AIX

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: strftime_aix.patch is a little bit too strict: it looks like strftime() supports large year values (year > ). We may only raise an error if the year is smaller than 1. -- ___ Python tracker &l

[issue11235] Source files with date modifed in 2106 cause OverflowError

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: By the way, a simpler fix would be just to not fail if the .pyc file cannot be created (but emit a warning / write an error to stderr). -- ___ Python tracker <http://bugs.python.org/issue11

[issue11230] "Full unicode import system" not in 3.2

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: >> Victor asked "Which web page should updated/fixed?" > Answer: The Python 3.2 download page. Sorry, but I don't see which page tells that Python 3.2 has a full Unicode support for import. In http://www.python.org/download/r

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: > While it is unlikely that a purely numeric format such as "%Y-%m-%d > %H:%M:%S" will be locale dependent, it is possible that some pre-C99 > systems would format dates using exotic digits is some locales. Ok, I rewrote my patch to avoid st

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-03-20 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue5537> ___ ___ Python-bugs-list

[issue8651] "s#" and friends can silently truncate buffer length

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: Ok, I backported the fix to 3.1. Reopen the issue if you would like a port to 2.7 (I am too lazy to do it). -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue8650] zlibmodule.c isn't 64-bit clean

2011-03-20 Thread STINNER Victor
STINNER Victor added the comment: > This only addresses the compress() and decompress() functions, > but e.g. crc32() and adler32() are also touched by this issue. crc32() and adler32() were fixed by #10276. PyZlib_objcompress() and PyZlib_objdecompress() should be

[issue3080] Full unicode import system

2011-03-21 Thread STINNER Victor
STINNER Victor added the comment: > As I see Victor has dropped OS/2 support from Python/import.c > Perhaps file Python/dynload_os2.c should be removed also. > Not sure about other dynload_* files. 340f76a6a792 just removes few lines in import.c: they can easily be rewritten. And th

[issue11421] Subversion keywords missing on 2.5 checkout

2011-03-21 Thread STINNER Victor
STINNER Victor added the comment: f9763c363cc3 didn't close this issue whereas its message contains "Closes #11579. Closes #11421.". This commit closed #11579. -- nosy: +haypo ___ Python tracker <http://bugs.pyt

[issue11397] os.path.realpath() may produce incorrect results

2011-03-21 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11397> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11619] On Windows, don't encode filenames in the import machinery

2011-03-21 Thread STINNER Victor
STINNER Victor added the comment: open_exclusive() was created by: changeset: 14708:89b2aee43e0b branch: legacy-trunk user:Guido van Rossum date:Wed Sep 20 20:31:38 2000 + files: Python/import.c description: On Unix, use O_EXCL when creating the .pyc/.pyo

[issue11619] On Windows, don't encode filenames in the import machinery

2011-03-21 Thread STINNER Victor
STINNER Victor added the comment: dynload_win.patch: Fix part (a), _PyImport_LoadDynamicModule(). -- keywords: +patch Added file: http://bugs.python.org/file21321/dynload_win.patch ___ Python tracker <http://bugs.python.org/issue11

[issue10694] zipfile.py end of central directory detection not robust

2011-03-21 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10694> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2011-03-21 Thread STINNER Victor
STINNER Victor added the comment: Ray Allen: Your patch doesn't touch the documentation. At least, you should mention (using .. versionchanged:: 3.3) that PyUnicode_FromFormat() does now support width and precision. It is important to specify the unit of the sizes: number of bytes or n

[issue11082] ValueError: Content-Length should be specified

2011-03-21 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker <http://bugs.python.org/issue11082> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1602] windows console doesn't print or input Unicode

2011-03-21 Thread STINNER Victor
STINNER Victor added the comment: I did some tests with WriteConsoleW(): - with raster fonts, U+00E9 is displayed as é, U+0141 as L and U+042D as ? => good (work as expected) - with TrueType font (Lucida), U+00E9 is displayed as é, U+0141 as Ł and U+042D as Э => perfect! (all characte

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-21 Thread STINNER Victor
STINNER Victor added the comment: Le lundi 21 mars 2011 à 15:59 +, Dave Malcolm a écrit : > Various thoughts/nitpicking: > - is it possible to indicate with a coding convention (e.g. > comments) which parts of the code are intended to be called from a > signal handler? It

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-21 Thread STINNER Victor
STINNER Victor added the comment: > Ok, good idea, I will do that. I think that I will write it in the > function comment, something like: "This function is signal safe". Done in 6685691dfcbd3644feffcb197491bce3168ff5de (git SHA-1) While checking the usage of signal safe func

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-21 Thread STINNER Victor
STINNER Victor added the comment: I renamed some functions to conform to the PEP 8 (and have more readable function names). I prefer to do it today instead having to keep ugly names for years :-) Functions are now: * enable(file=sys.stderr, all_threads=False) * disable() * is_enabled

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-21 Thread STINNER Victor
STINNER Victor added the comment: > It would be nice if it were enabled by default for fatal errors > (and asserts perhaps?). That would mean that the module should be a builtin module, or that it is always loaded in memory. I am maybe ok to enable it by default for debug builds, but n

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-22 Thread STINNER Victor
STINNER Victor added the comment: Le mardi 22 mars 2011 à 09:01 +, Marc-Andre Lemburg a écrit : > Perhaps you could consider adding a similar approach (raising > an exception instead of writing a traceback) to the module. > We could then port our code to use your module, which

[issue11630] refleak in test_import

2011-03-22 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue11630> ___ ___ Python-bugs-list

[issue11633] regression: print buffers output when end=''

2011-03-22 Thread STINNER Victor
STINNER Victor added the comment: printtest2.py displays directly "Processing.. " on Windows, but not on Linux. It looks like stdout is not buffered on Windows, which looks like a bug to bug :-) I think that it is safer to always call sys.stdout.flush() to ensure that your

[issue11633] regression: print buffers output when end=''

2011-03-22 Thread STINNER Victor
STINNER Victor added the comment: > From my perspective it is a regression on Windows and a bug in Linux > version of Python 2.x, which unfortunately can not be fixed, > because of 2.x release process. Line buffering is used by default on most operating systems (ok, maybe not Windo

[issue11633] regression: print buffers output when end=''

2011-03-22 Thread STINNER Victor
STINNER Victor added the comment: > How about making print() user-friendly with flushing after every call, > and if you want explicitly want speed - use buffered > sys.stdout.write/flush()? This is exactly the -u option of Python 2: use it if you would like a completly unbuffered s

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-22 Thread STINNER Victor
STINNER Victor added the comment: Could you write a patch to fix this comment? -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11634> ___ ___

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-22 Thread STINNER Victor
STINNER Victor added the comment: PyObject * PyBytes_FromString(const char *str) { register size_t size; ... size = strlen(str); ... } PyBytes_FromString() does compute the input string size using strlen(). -- ___ Python tracker

[issue11633] regression: print buffers output when end=''

2011-03-23 Thread STINNER Victor
STINNER Victor added the comment: amaury> When python is run from a console, sys.stdout is line buffered. amaury> sys.stdout.write() flushes if there is a carriage return. amaury> No need to change anything here. Anatoly would like a flush after all calls to print(). > print(

[issue11650] CTRL-Z causes interpreter exit

2011-03-23 Thread STINNER Victor
STINNER Victor added the comment: I don't have this behaviour on Linux. Is it specific to Mac OS X? -- nosy: +haypo ___ Python tracker <http://bugs.python.org/is

[issue3080] Full unicode import system

2011-03-23 Thread STINNER Victor
STINNER Victor added the comment: test the fixed nosy list -- ___ Python tracker <http://bugs.python.org/issue3080> ___ ___ Python-bugs-list mailing list Unsub

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-23 Thread STINNER Victor
STINNER Victor added the comment: Sorry to ask that, but would it be possible to write an automated test for this issue? -- ___ Python tracker <http://bugs.python.org/issue11

[issue8754] ImportError: quote bad module name in message

2011-03-23 Thread STINNER Victor
STINNER Victor added the comment: I patched import.c to use repr() instead of str() (%R instead of %U) to format module names because they might contain surrogate characters. Surrogate characters are not encodable to any encoding, except UTF-16 and UTF-32. And so print an exception to stdout

[issue11658] complex sqrt error

2011-03-23 Thread STINNER Victor
STINNER Victor added the comment: (-1)**.5 is the same than complex(-1,0)**.5, but it is computed differently than cmath.sqrt(-1). -1.**0.5 computes: vabs = math.hypot(-1, 0) len = pow(vabs, 0.5) at = math.atan2(0, -1) phase = at * 0.5 return complex(len*math.cos(phase), len

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2011-03-24 Thread STINNER Victor
STINNER Victor added the comment: There are 4 patches "issue 7030" attached to this issue. Some of them have a version number in their name, some doesn't. You did the same on other issues. It is more easy to follow a patch if it has a version number, for example: issue_7330.d

[issue11661] test_collections.TestNamedTuple.test_source failing on many buildbots after f09f7ab40ce6

2011-03-24 Thread STINNER Victor
STINNER Victor added the comment: Link to the commit: f09f7ab40ce6 -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11661> ___ ___ Python-bug

[issue11455] issue a warning when populating a CPython type dict with non-string keys

2011-03-24 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11455> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    22   23   24   25   26   27   28   29   30   31   >