[issue4855] Popen(..., shell=True, ...) should allow simple access to the command's PID

2009-01-06 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: This really belongs to python-list rather than the tracker. It is not correct that with shell=False Popen reuses the thread of control of the calling process. You seem to be confusing blocking and reusing the thread of

[issue3582] thread_nt.c update

2009-01-06 Thread Ulrich Eckhardt
Ulrich Eckhardt eckha...@satorlaser.com added the comment: I do have an issue with the patch's startup code. The prototype for the thread entry should be DWORD WINAPI function(PVOID);. The important distinction is the WINAPI part, which resolves to __stdcall but doesn't have to. I know that

[issue4856] Remove checks for win NT

2009-01-06 Thread Ulrich Eckhardt
New submission from Ulrich Eckhardt eckha...@satorlaser.com: There are several checks like GetVersion() 0x8000 that try to determine whether there is support for the WCHAR versions of the win32 API. Since all support for MS Windows 95, 98 and ME has been dropped, all supported systems

[issue3582] thread_nt.c update

2009-01-06 Thread Ulrich Eckhardt
Ulrich Eckhardt eckha...@satorlaser.com added the comment: You're right, Kristján, sorry for the noise. Shouldn't make claims before being fully awake ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3582

[issue4855] Popen(..., shell=True, ...) should allow simple access to the command's PID

2009-01-06 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: As Alexander says: a shell command can spawn any number of subprocesses, or none at all (if e.g. only shell builtins are called). -- nosy: +georg.brandl resolution: - wont fix status: open - closed

[issue4293] Thread Safe Py_AddPendingCall

2009-01-06 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Thanks. What do you mean by making the test a method of TestCAPI? I have found no such class. Are you talking about the python part or the c part? Also, atomicity in the callback is not required, as the callback is never

[issue2897] include structmember.h in Python.h

2009-01-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Martin, do you want to make the call on this one? -- assignee: - loewis nosy: +loewis, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2897

[issue2772] Add PendingDeprecationWarning for % formatting

2009-01-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Am closing this one. It is pointless and counter-productive unless there is a firm decision that % formatting is definitely going away (and migration tools have been developed). Right now, it looks like there is some chance

[issue2897] include structmember.h in Python.h

2009-01-06 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I agree with Alexander; the header shouldn't be included into Python.h as-is. I would propose to eliminate it eventually, with the following steps: 1. move PyMemberDef and the function declarations into object.h 2. (simultaneously) introduce

[issue3872] Python 2.6rc2: Tix ComboBox error

2009-01-06 Thread Dominique Wahli
Dominique Wahli dwa...@gmail.com added the comment: What happened ??? I'm pretty sure the fix was committed in 2.6.0 and, as saying by Amaury in comments, the test script running fine. In 2.6.1 test is broken. ___ Python tracker rep...@bugs.python.org

[issue4850] Change type and add _Py_ prefix to COUNT_ALLOCS variables

2009-01-06 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Making it static is fine. I don't recall what kind of customization I did when I introduced it. I'm skeptical about the entire issue, though. Why is it that these variables should be prefixed? I disagree that all names need to be prefixed:

[issue4805] Make python code compilable with a C++ compiler

2009-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2009-01-05 22:06, Alexander Belopolsky wrote: Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Given that you can build Python as library on Unix and as DLL on Windows, there doesn't appear to be any need to

[issue4850] Change type and add _Py_ prefix to COUNT_ALLOCS variables

2009-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2009-01-06 11:28, Martin v. Löwis wrote: Martin v. Löwis mar...@v.loewis.de added the comment: Making it static is fine. I don't recall what kind of customization I did when I introduced it. I'm skeptical about the entire issue,

[issue4856] Remove checks for win NT

2009-01-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: +1 -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4856 ___

[issue2121] complex constructor doesn't accept string with nan and inf

2009-01-06 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: [Mark] inputs with a special real or imaginary component. On balance, I'd support making complex('nan + nan*j') do the right thing. Having thought about this a bit more, I take this back. Some reasons are given below. [David] -

[issue2121] complex constructor doesn't accept string with nan and inf

2009-01-06 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Christian, any comments? Is it okay to close this as a 'won't fix'? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2121 ___

[issue4856] Remove checks for win NT

2009-01-06 Thread Ulrich Eckhardt
Ulrich Eckhardt eckha...@satorlaser.com added the comment: This patch removes all calls to win32's GetVersion() where they are used to detect NT. In posixmodule.c it was used by a wrapper function that cached the result, which then also became obsolete. -- keywords: +patch Added file:

[issue4850] Change type and add _Py_ prefix to COUNT_ALLOCS variables

2009-01-06 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: For completeness I don't think completeness is a useful thing to have here. and to make things easier for all developers, It is not easier, but more difficult. It now requires a change, whereas leaving things as-is requires no change.

[issue4850] Change type and add _Py_ prefix to COUNT_ALLOCS variables

2009-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2009-01-06 13:28, Martin v. Löwis wrote: Martin v. Löwis mar...@v.loewis.de added the comment: For completeness I don't think completeness is a useful thing to have here. and to make things easier for all developers, It is not

[issue4293] Thread Safe Py_AddPendingCall

2009-01-06 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Ok, I have addressed the issues raised about testcapi. A new file has been submitted. Added file: http://bugs.python.org/file12619/testcapi.patch ___ Python tracker rep...@bugs.python.org

[issue4857] syntax: no unpacking in augassign

2009-01-06 Thread jura
New submission from jura jur...@narod.ru: the following code produces syntax error: (x, y) += 1 While this is documented in http://docs.python.org/3.0/reference/simple_stmts.html#augmented-assignment-statements (An augmented assignment evaluates the target (which, unlike normal аssignment

[issue4857] syntax: no unpacking in augassign

2009-01-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Extract of the grammar: target ::= identifier | ... target_list ::= target (, target)* [,] assignment_stmt ::= (target_list =)+ ... augmented_assignment_stmt ::= target augop ... augop

[issue4850] Change type and add _Py_ prefix to COUNT_ALLOCS variables

2009-01-06 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I'm only referring to exported symbols. Static globals, of course, don't need such a prefix. Ok, the symbols in question are not exported from pythonxy.dll. ___ Python tracker rep...@bugs.python.org

[issue4857] syntax: no unpacking in augassign

2009-01-06 Thread jura
jura jur...@narod.ru added the comment: Yes, but target ::= identifier | ( target_list ) | ... so (x,y) seems to be a valid target. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4857 ___

[issue4857] syntax: no unpacking in augassign

2009-01-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh yes! I didn't see ( target_list ) | [ target_list ], sorry. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4857 ___

[issue4753] Faster opcode dispatch on gcc

2009-01-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: FWIW, I have made a quick attempt at removing the f-f_lasti assignment in the few places where it could be removed, but it didn't make a difference on my machine. The problem being that there are very few places where it is legitimate to remove

[issue4850] Change type and add _Py_ prefix to COUNT_ALLOCS variables

2009-01-06 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Tue, Jan 6, 2009 at 7:28 AM, Martin v. Löwis rep...@bugs.python.org wrote: .. It is not easier, but more difficult. It now requires a change, whereas leaving things as-is requires no change. I actually agree with

[issue2121] complex constructor doesn't accept string with nan and inf

2009-01-06 Thread Cournapeau David
Cournapeau David da...@ar.media.kyoto-u.ac.jp added the comment: @ Mark Concerning float('inf') * 1j: you're right, my rambling did not make any sense, sorry. I agree that adding complexity may be a good reason to warrant an arbitrary feature; actually, I did not manage to handle nan/inf at

[issue4293] Thread Safe Py_AddPendingCall

2009-01-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, the test patch is fine! Now looking at the main patch, some comments: - you removed volatile from pendingfirst and pendinglast, is it really safe? - what if pending_lock is not initialized when Py_AddPendingCall is called? I know it's

[issue4850] Change type and add _Py_ prefix to COUNT_ALLOCS variables

2009-01-06 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Tue, Jan 6, 2009 at 10:53 AM, Marc-Andre Lemburg rep...@bugs.python.org wrote: .. I don't follow you: those symbols are not meant for public use anyway, so we can easily change them without any costs. The same goes for

[issue2121] complex constructor doesn't accept string with nan and inf

2009-01-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Mark, I'm somewhat uncomfortable with your proposal also. It changes what the parser will accept and the potential benefits are almost nil. Also, putting NaNs and Infs in complex numbers is probably not something that should

[issue4751] Patch for better thread support in hashlib

2009-01-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch looks fine to me, apart from one point: the return value of PyThread_allocate_lock() should be checked for NULL, and the error either propagated or cleared. (I'd also suggest lowering HASHLIB_GIL_MINSIZE to 2048 or 4196) Gregory,

[issue4751] Patch for better thread support in hashlib

2009-01-06 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: hashlibopenssl_small_lock-4.diff looks good to me. I also agree that HASHLIB_GIL_MINSIZE should be lowered to 2048. Commit it, and please backport it to trunk before closing this bug. -- nosy: -gps versions: +Python 2.7, Python 3.1

[issue4794] garbage collector blocks and takes worst-case linear time wrt number of objects

2009-01-06 Thread darrenr
darrenr python-roun...@dranalli.com added the comment: Regardless of the type of algorithm used by the garbage collector that currently exists in Python, its worst-case performance is undesirable. I have some interest in implementing a garbage collector for Python with improved performance

[issue3976] pprint._safe_repr is not general enough in one instance

2009-01-06 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The proposed patch appears to give up sorting by key,value altogether if there are a few incomparable items. It would be better to group items by type and sort within each group. For example,

[issue1180193] broken pyc files

2009-01-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Committed to trunk and py3k, and backported to 2.6 and 3.0. Thanks! -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1180193

[issue4751] Patch for better thread support in hashlib

2009-01-06 Thread Lukas Lueg
Changes by Lukas Lueg knabberknusperh...@yahoo.de: Removed file: http://bugs.python.org/file12587/hashlibopenssl_small_lock-4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4751 ___

[issue4751] Patch for better thread support in hashlib

2009-01-06 Thread Lukas Lueg
Lukas Lueg knabberknusperh...@yahoo.de added the comment: PyThread_allocate_lock can fail without interference. object-lock will stay NULL and the GIL is simply not released. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4751

[issue4858] Deprecation of MD5

2009-01-06 Thread Lukas Lueg
New submission from Lukas Lueg knabberknusperh...@yahoo.de: MD5 is one of the most popular cryptographic hash-functions around, mainly for it's good performance and availability throughout applications and libraries. The MD5 algorithm is currently implemented in python as part of the

[issue4858] Deprecation of MD5

2009-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2009-01-06 21:06, Lukas Lueg wrote: MD5 is one of the most popular cryptographic hash-functions around, mainly for it's good performance and availability throughout applications and libraries. The MD5 algorithm is currently implemented

[issue4858] Deprecation of MD5

2009-01-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Because MD5 is used widely, Python needs to support it, if only to be able to verify MD5 signatures when offered. -- nosy: +rhettinger resolution: - rejected status: open - closed

[issue1708] improvements for linecache

2009-01-06 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Looking at the patch, the recorded seek points will probably be wrong if some newlines were translated (e.g. '\r\n' - '\n') when reading the file. I'm also not sure not what the use case for very big files is. linecache is primarily used for

[issue4858] Deprecation of MD5

2009-01-06 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: The hashlib docs already mention the problems with md5 et al via a bright red: Warning Some algorithms have known hash collision weaknesses, see the FAQ at the end. thanks for closing this. not gonna happen. -- nosy:

[issue4859] pwd, spwd, grp functions vulnerable to denial of service

2009-01-06 Thread David Watson
New submission from David Watson bai...@users.sourceforge.net: The pwd (and spwd and grp) modules deal with data from /etc/passwd (and/or other sources) that can be supplied by users on the system. Specifically, users can often change the data in their GECOS fields without the OS requiring that

[issue4859] pwd, spwd, grp functions vulnerable to denial of service

2009-01-06 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: Added file: http://bugs.python.org/file12622/minor.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4859 ___

[issue4859] pwd, spwd, grp functions vulnerable to denial of service

2009-01-06 Thread David Watson
Changes by David Watson bai...@users.sourceforge.net: Added file: http://bugs.python.org/file12623/latin1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4859 ___

[issue816929] term.h present but cannot be compiled

2009-01-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This was corrected a long time ago in r37372 -- nosy: +amaury.forgeotdarc resolution: - out of date status: open - closed superseder: - configure not able to find ncurses/curses in Solaris

[issue1708] improvements for linecache

2009-01-06 Thread umaxx
umaxx um...@oleco.net added the comment: Looking at the patch, the recorded seek points will probably be wrong if some newlines were translated (e.g. '\r\n' - '\n') when reading the file. ack, this could be a problem. I'm also not sure not what the use case for very big files is. this is

[issue4026] fcntl extension fails to build on AIX 6.1

2009-01-06 Thread Jeremy Olexa
Jeremy Olexa darks...@gentoo.org added the comment: This also happens with Python 2.5.2 (not the latest 2.5 series, I know) on AIX 6.1. -- nosy: +darkside ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4026

[issue4858] Deprecation of MD5

2009-01-06 Thread Lukas Lueg
Lukas Lueg knabberknusperh...@yahoo.de added the comment: As I already said to Raymond: At least we should update the documentation. The FAQ currently linked is from 2005. The CERT-Advisory from provides a clean and simple language: In 2008, researchers demonstrated the practical vulnerability

[issue4293] Thread Safe Py_AddPendingCall

2009-01-06 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: 1) volatile is not required when access is guarded by locks. 2) pendingcalls_to_do is initialized to 1, so the very first thing that the interpreter does (after executing one bytecode, I init _PyTicker to 0 now) is to initialize

[issue4860] js_output wrong for cookies with characters

2009-01-06 Thread Noufal
New submission from Noufal nou...@nibrahim.net.in: If a cookie is created with a character in the content, the js_output which is emitted is bad javascript. eg. import Cookie c=Cookie.Cookie('Customer=WILE_E_COYOTE; Version=1; Path=/acme') print c Set-Cookie: Customer=WILE_E_COYOTE;

[issue4858] Deprecation of MD5

2009-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2009-01-06 22:42, Lukas Lueg wrote: Lukas Lueg knabberknusperh...@yahoo.de added the comment: As I already said to Raymond: At least we should update the documentation. The FAQ currently linked is from 2005. The CERT-Advisory from

[issue4861] fix problems with ctypes.util.find_library

2009-01-06 Thread Matthias Klose
New submission from Matthias Klose d...@debian.org: there are some problems with ctypes.util.find_library(), which I would like to see fixed on active branches. - find_library is not robust, if either objdump or gcc are not installed. fixed by raising an exception if the tools are not

[issue4858] Deprecation of MD5

2009-01-06 Thread Lukas Lueg
Lukas Lueg knabberknusperh...@yahoo.de added the comment: It might be a good idea to remove the word secure from the hashlib documentation, since security of these algorithms is always limited to a certain period of time. I'm sorry, was that a boy attempted humor ? [Misuse quote from DH3:

[issue4858] Deprecation of MD5

2009-01-06 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Secure hash or cryptographic hash is the correct term and I think we should leave that in, if only to make the original intent clear and to make them easier to search for. I propose adding a sentence to the first paragraph

[issue4858] Deprecation of MD5

2009-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2009-01-06 23:10, Lukas Lueg wrote: Lukas Lueg knabberknusperh...@yahoo.de added the comment: It might be a good idea to remove the word secure from the hashlib documentation, since security of these algorithms is always limited to a

[issue4862] utf-16 BOM is not skipped after seek(0)

2009-01-06 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: First write a utf-16 file with its signature: f1 = open('utf16.txt', 'w', encoding='utf-16') f1.write('0123456789') f1.close() Then read it twice: f2 = open('utf16.txt', 'r', encoding='utf-16') print('read1', ascii(f2.read()))

[issue3823] ssl.wrap_socket() is incompatible with servers that drop privileges, due to keyfile requirement

2009-01-06 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' billiej...@users.sourceforge.net: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3823 ___

[issue4863] deprecate/delete distutils.mwerkscompiler...

2009-01-06 Thread Skip Montanaro
New submission from Skip Montanaro s...@pobox.com: I was just poking around the distutils documentation and came across the distutils.mwerkscompiler module. Surely that can't be useful anymore, can it? The doc reads, in its entirety: Contains MWerksCompiler, an implementation of the

[issue4864] test_msvc9compiler fails on VC6

2009-01-06 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Currently, test_msvc9compiler fails on VC6 with following message. // Traceback (most recent call last): File test_distutils.py, line 17, in module test_main() File

[issue4864] test_msvc9compiler fails on VC6

2009-01-06 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file12628/test_msvc9compiler.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4864 ___

[issue4864] test_msvc9compiler fails on VC6

2009-01-06 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Added file: http://bugs.python.org/file12629/test_msvc9compiler.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4864 ___

[issue4753] Faster opcode dispatch on gcc

2009-01-06 Thread Paolo 'Blaisorblade' Giarrusso
Paolo 'Blaisorblade' Giarrusso p.giarru...@gmail.com added the comment: @pitrou: ranting mode Argh, reference counting hinders even that? /ranting mode I just discovered another problem caused by refcounting. Various techniques allow to create binary code from the interpreter binary, by just