[issue8066] OS X installer: readline module breaks when targeting on 10.5 or 10.6

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: Committed in r78784 (trunk), r78785 (2.6) and r78786 (3.2) (BTW. I applied the patch to the trunk then used svnmerge to merge the patch into the other branches) -- stage: -> committed/rejected status: open -> closed

[issue8067] OS X Installer: build errors on 10.6 when targeting 10.4 and earlier

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: Committed in r78781 (2.6), r78782 (3.2) and r78783 (3.1) -- stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue8087] Unupdated source file in traceback

2010-03-07 Thread Diego Mascialino
Diego Mascialino added the comment: Martin, I am not talking about a loop checking source file changes. I think the check could be done only when the traceback is printed. The function PyErr_Display() calls PyTracBack_Print() and so on until _Py_DisplaySourceLine() is called. The latter reads

[issue7162] 2to3 does not convert __builtins__.file

2010-03-07 Thread Joe Amenta
Joe Amenta added the comment: Yes, the idea was that it doesn't seem outlandish for someone to do: def file(something): do_stuff() You can use lib2to3.fixer_util.is_probably_builtin for this... modified the patch and attached. -- Added file: http://bugs.python.org/file16490/issue7

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-07 Thread R. David Murray
R. David Murray added the comment: OK, patch (with comment tweaks to refer to this issue), and email minor version bump, applied to trunk in r78778. It turns out that bdecode was already deleted in email 5 in py3k. I did port the test in r78780. Thanks Joaquin Cuenca Abela, and you now have

[issue7300] Unicode arguments in str.format()

2010-03-07 Thread Pablo Mouzo
Changes by Pablo Mouzo : -- nosy: +pablomouzo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

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

2010-03-07 Thread STINNER Victor
STINNER Victor added the comment: > Did someone notice that on Windows, subprocess imports threading, > and use threads for the communicate() method? No, I didn't ran the tests on Windows. I can expect that someone build Python on Linux without threads, but is Python used in embedded systems

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

2010-03-07 Thread STINNER Victor
STINNER Victor added the comment: I found the following issue in Roundup tracker to restore a deleted message: http://psf.upfronthosting.co.za/roundup/meta/issue267 I tried to write the URL, but it doesn't work: http://bugs.python.org/issue80...@action=edit&@a...@messages=100432 I tried also u

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

2010-03-07 Thread STINNER Victor
STINNER Victor added the comment: > haypo, it seems you removed the initial message... I know... My mouse clicked on [remove] button, it wasn't me! I don't know how to restore it. The message: msg100432. -- ___ Python tracker

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

2010-03-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: haypo, it seems you removed the initial message... -- ___ Python tracker ___ ___ Python-bugs-l

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

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

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

2010-03-07 Thread STINNER Victor
Changes by STINNER Victor : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/op

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

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

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-07 Thread STINNER Victor
STINNER Victor added the comment: Using "valgrind --log-file=/tmp/trace ./python" to slow down Python, I found another bug in the interactive interpreter: if you press CTRL+c just after the initialization of the site module the exception will be ignored. When a signal is catched, it's stored

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

2010-03-07 Thread STINNER Victor
STINNER Victor added the comment: See also #3137. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-07 Thread STINNER Victor
STINNER Victor added the comment: I think initsite() should be atomic: if any kind of error occurs, Python should print it and exit directly (exit code 1 to notice the error). If initsite() fails, Python is not complelty initialized. site is responsible to initialiaze a lot of things: - Set

[issue8038] Provide unittest.TestCase.assertNotRegexpMatches

2010-03-07 Thread Michael Foord
Changes by Michael Foord : -- title: Not all the new assert* unittest.TestCase methods have negative (not) equivalents -> Provide unittest.TestCase.assertNotRegexpMatches ___ Python tracker

[issue8038] Not all the new assert* unittest.TestCase methods have negative (not) equivalents

2010-03-07 Thread Ryszard Szopa
Ryszard Szopa added the comment: Hi, I am the original reporter of the bug. Please forgive me if this is not the place for discussing the issue. I've thought about it, and stuff like assertDictNotEqual or assertSequenceNotEqual aren't really necessary - it is much easier (and shorter) to u

[issue8082] Misleading exception when raising an object

2010-03-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/3/7 Barry A. Warsaw : > > Barry A. Warsaw added the comment: > > Minor nit: it's questionable whether this should have gone in between 2.6.5 > rc1 and rc2.  It doesn't seem like a critical fix.  OTOH, it also seems > harmless enough so I'm gonna let i

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for adding me to the nosy list. Yep, this code is pretty old so it doesn't surprise me that its implementation isn't quite right. Of course, I hate get_payload(decode=True) anyway and hope that goes away in email 6. Having said that, I don't think t

[issue7300] Unicode arguments in str.format()

2010-03-07 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8044] Py_EnterRecursiveCall and Py_LeaveRecursiveCall are undocumented

2010-03-07 Thread Georg Brandl
Georg Brandl added the comment: Thanks! I've added documentation in r78773. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue7162] 2to3 does not convert __builtins__.file

2010-03-07 Thread Ryan Coyner
Ryan Coyner added the comment: I thought the whole point was that file[1] was removed in 3.0[2]? Or, are you saying that if somebody overloaded file with def file(...)? If that is the case would it be reasonable to check like this? >>> file in list(__builtins__.__dict__.values()) True >>> def

[issue8039] precedence rules for ternary operator

2010-03-07 Thread Georg Brandl
Georg Brandl added the comment: if-else actually was already documented, under "boolean expressions". It was merely missing from the precendence table. I've now given it its own section, to make it stand out a bit better. See r78772. -- resolution: -> fixed status: open -> closed

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

2010-03-07 Thread STINNER Victor
STINNER Victor added the comment: Ok, here is my patch "version 4", based on jerry's nothreads_3.patch. Changes between version 3 and 4: - test_support: threading_setup() returns (1,) instead of None; reap_threads() simply returns the function instead of a dummy decorator - regrtest.py: d

[issue8085] PyObject_GC_VarNew should be PyObject_GC_NewVar

2010-03-07 Thread Georg Brandl
Georg Brandl added the comment: Thanks, applied in r78771. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue8087] Unupdated source file in traceback

2010-03-07 Thread Martin v . Löwis
Martin v. Löwis added the comment: Displaying a warning whenever the code has changed on disk is clearly unacceptable - it is both expensive to check (and also, how frequent would you check?), and it would be annoying if you have long-running Python applications so this would just clutter the

[issue8082] Misleading exception when raising an object

2010-03-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Minor nit: it's questionable whether this should have gone in between 2.6.5 rc1 and rc2. It doesn't seem like a critical fix. OTOH, it also seems harmless enough so I'm gonna let it slide. -- nosy: +barry ___ Py

[issue8066] OS X installer: readline module breaks when targeting on 10.5 or 10.6

2010-03-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Ned, thanks again for another great OS X fix. Ronald, please apply this to release26-maint for 2.6.5 rc 2. -- resolution: -> accepted ___ Python tracker ___

[issue8067] OS X Installer: build errors on 10.6 when targeting 10.4 and earlier

2010-03-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Ned, thanks for the fix. Ronald, please apply it to release26-maint for 2.6.5 rc 2. -- resolution: -> accepted ___ Python tracker ___ __

[issue7670] _sqlite3: Block *all* operations on a closed Connection object

2010-03-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm going to let this one stay for 2.6.5 since we need another rc anyway. Thanks for the fix! -- status: open -> closed ___ Python tracker __

[issue7998] MacPython 2.7a3 posix_spawn error for build using --with-framework-name

2010-03-07 Thread Tom Loredo
Tom Loredo added the comment: > Ronald Oussoren added the comment: > > Fix in r78755 (2.7) and r78756 (3.2) Thanks for your attention to this, Ronald---and all the hard work on the OS X support. -Tom - This mail sent through IMP: http://horde.

[issue8059] @unittest.skip on a test method should prevent setUp from running

2010-03-07 Thread Michael Foord
Michael Foord added the comment: Fixed revision 78770. -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue8085] PyObject_GC_VarNew should be PyObject_GC_NewVar

2010-03-07 Thread Luciano Bello
Changes by Luciano Bello : -- nosy: +jjconti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue8085] PyObject_GC_VarNew should be PyObject_GC_NewVar

2010-03-07 Thread Luciano Bello
Luciano Bello added the comment: patch added -- keywords: +patch nosy: +Luciano.Bello Added file: http://bugs.python.org/file16486/PyObject_GC_VarNew_type.patch ___ Python tracker __

[issue8087] Unupdated source file in traceback

2010-03-07 Thread Diego Mascialino
New submission from Diego Mascialino : Example: mod.py def f(): a,b,c = 1,2 print b If i do: >>> import mod >>> mod.f() I get: Traceback (most recent call last): File "", line 1, in File "mod.py", line 2,

[issue8086] ssl.get_server_certificate new line missing

2010-03-07 Thread R. David Murray
Changes by R. David Murray : -- nosy: +janssen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue8086] ssl.get_server_certificate new line missing

2010-03-07 Thread R. David Murray
Changes by R. David Murray : -- versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue8086] ssl.get_server_certificate new line missing

2010-03-07 Thread R. David Murray
R. David Murray added the comment: I think that's because encodestring tacks a 'courtesy newline' on to the end of the output it returns. textwrap.fill does't, and I'm guessing that's the code path that your installation is taking. -- components: +Library (Lib) keywords: +easy nosy:

[issue7162] 2to3 does not convert __builtins__.file

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

[issue8086] ssl.get_server_certificate new line missing

2010-03-07 Thread Chris
Chris added the comment: Did some more research and found this as the culprit: in Lib/ssl.py # ... def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None): ... return DER_cert_to_PEM_cert(dercert) def DER_cert_to_PEM_cert(der_cert_bytes):

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-07 Thread Joaquin Cuenca Abela
Joaquin Cuenca Abela added the comment: Unfortunately the only way that I can see to reliably work around this is to bypass entirely get_payload, in this case fixing this bug will not affect people that do that negatively. Some people may have more control over their attachments and they are

[issue8086] ssl.get_server_certificate new line missing

2010-03-07 Thread Chris
New submission from Chris : I'm using ssl.get_server_certificate function. It returns a pem string. For each server I try, I get the string, but it is missing a newline "\n" before the -END CERTIFICATE- text. Any subsequent use of the string makes openssl throw up with a "bad end line"

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-07 Thread Mark Dickinson
Mark Dickinson added the comment: Comments and thoughts on the __index__ patch: (1) Thank you for a remarkably complete patch! (2) For 2.x, I'm a bit uncomfortable with introducing the extra Python layer on top of the C layer. Partly I'm worried about accidentally breaking something (it's n

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2010-03-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r78766. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pytho

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-07 Thread R. David Murray
R. David Murray added the comment: Your patch looks good, thank you. I just realized that Barry isn't nosy on this issue. I've checked, and the code in question dates back to email version 1.0...code of that long standing that exists specifically to implement the behavior we propose to chang

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-07 Thread Mark Dickinson
Mark Dickinson added the comment: Recent checkins messed up Meador Inge's __index__ patch; here's a regenerated version. -- Added file: http://bugs.python.org/file16485/issue-1530559__index__.patch ___ Python tracker

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-07 Thread Mark Dickinson
Mark Dickinson added the comment: Restored use of __int__ for all integer conversion codes in r78762. -- ___ Python tracker ___ ___

[issue8067] OS X Installer: build errors on 10.6 when targeting 10.4 and earlier

2010-03-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/3/7 Ronald Oussoren : > > Ronald Oussoren added the comment: > > Barry and Benjamin: IMHO this should be fixed before 2.6.5 and 3.1.2 are > released, the patch is safe and works (and is already in the trunk). Ok. Would you mind merging it? --

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the new word. (I checked with my local dictd but not on the Intertubes, should have). Having designated active maintainers for modules and areas is indeed great. Cheers -- ___ Python tracker

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread R. David Murray
R. David Murray added the comment: No, I meant demense (I even looked up the spelling). The word is related to domain, but has a somewhat more precise shading of meaning :) A lord's chief manor place, with that part of the lands belonging thereto which has not been granted out in te

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread Georg Brandl
Georg Brandl added the comment: > > rewrap lines when we change the text for some other reason. > Doesn’t that make harder to review the real changes when they are mixed > with rewrapping? That's true. I wouldn't do it in patches I mean someone else to review. But many times it's the other wa

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread Éric Araujo
Éric Araujo added the comment: > rewrap lines when we change the text for some other reason. Doesn’t that make harder to review the real changes when they are mixed with rewrapping? > PEP 8 really only applies to source files, the docs are (at least > currently) Georg's demesne. (domain?) I

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread Georg Brandl
Georg Brandl added the comment: David is correct, rewrapping while editing is intrusive enough. The docs should be wrapped at 79/80 characters. The reason that most files have longer lines is that the latex to rest converter tool had a flaw in the wrapping code that I didn't notice until aft

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread R. David Murray
R. David Murray added the comment: Georg can correct me if I'm wrong, but I believe we generally only rewrap lines when we change the text for some other reason. My observation was that Georg re-wraps doc text to 79 chars, so that's what I've been doing. PEP 8 really only applies to source

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: As Florent said, it is a rule of py3k to avoid implicit encoding/decoding. The fact that it could have made sense for 2.x as well is not relevant, since the change was only done in py3k (and for good reason: we normally try not to break compatibility without

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-07 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch, with slightly saner warnings checks. -- Added file: http://bugs.python.org/file16484/issue1530559__int__2.patch ___ Python tracker ___

[issue8085] PyObject_GC_VarNew should be PyObject_GC_NewVar

2010-03-07 Thread Florian Weimer
New submission from Florian Weimer : The manual mentions the wrong C function (Var and New are transposed). -- assignee: georg.brandl components: Documentation messages: 100580 nosy: fw, georg.brandl severity: normal status: open title: PyObject_GC_VarNew should be PyObject_GC_NewVar ver

[issue8002] on OSX the file creation date not available in os.stat

2010-03-07 Thread Floris van Manen
Floris van Manen added the comment: On Mar 7, 2010, at 13:08, Ronald Oussoren wrote: > IMO it adding this support is not worth the effort or the additional code > complexity. I do agree. We have to look forwards ... F -- ___ Python tracker

[issue8084] pep-0370 on osx duplicates existing functionality

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: The attached patch is untested an implements the proposed behavior for framework builds, unix builds would keep the unix-style behavior (and would lose access to ~/Library/Python). The patch is slightly complicated by adding support for --with-framework-name

[issue8084] pep-0370 on osx duplicates existing functionality

2010-03-07 Thread Ronald Oussoren
New submission from Ronald Oussoren : The implementation of pep-0370 treats OSX like any other unix platform. This is problemantic for two reasons: first of all OSX already had a per-user directory before pep-0370 was implement: ~/Library/Python/X.Y, which means there are now two per-user dir

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-07 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch to restore the old usage of __int__ to convert non-integer arguments; it also produces a DeprecationWarning whenever __int__ is used in this way. For consistency and simplicity, __int__ will be tried for *any* non-integer argument when packin

[issue7072] isspace(0xa0) is true on Mac OS X

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've attached a patch that fixes the issue and enables all test_locale tests on OSX 10.6. (I will test if the tests can also be enabled on 10.5 when applying the patch). -- keywords: +needs review, patch resolution: -> accepted Added file: http://b

[issue8002] on OSX the file creation date not available in os.stat

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've done some research: the st_birthtime field is available when the python executable is build using MACOSX_DEPLOYMENT_TARGET=10.5 (or later), not for 10.4. Adding support for st_birthtime for MACOSX_DEPLOYMENT_TARGET=10.4 is possible but requires signifi

[issue8083] urllib proxy interface is too limited

2010-03-07 Thread Ronald Oussoren
New submission from Ronald Oussoren : The proxy support code in urllib is imho too specific and cannot easily support dynamic proxy configuration using a proxy.pac file. That is, the code assumes that there is at most one proxy per protocol, while this is not quite true in practice. A proxy.p

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-07 Thread Stefan Behnel
Stefan Behnel added the comment: It has been brought up several times that ET is special in the stdlib in that it is an externally maintained package. Correct me if I'm wrong, but the rules seem to be: features come outside, adaptation to Py3 can happen inside. What we are talking about here

[issue5262] PythonLauncher considered harmfull

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: I propose to at least change the code in pythonlauncher to warn if it is the default association for python files, that is to reverse the test that it currently does. That way users can still set pythonlauncher as the launcher for a specific files, but woul

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've removed 2.5 and added 3.2 because there won't be further bugfix releases of 2.5 and the issue also affects 3.2. IMHO changing this behavior is not a bugfix and is therefore out of scope for 2.6.x, in particular because this change might break code that

[issue8066] OS X installer: readline module breaks when targeting on 10.5 or 10.6

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: Barry: this definitely needs to be applied before 2.6.5 is released, without the patch I cannot build the mac installers. The patch disables support for libedit when targetting 10.4, which is IMHO correct because as Ned notes libedit's readline emulation is

[issue8067] OS X Installer: build errors on 10.6 when targeting 10.4 and earlier

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: Barry and Benjamin: IMHO this should be fixed before 2.6.5 and 3.1.2 are released, the patch is safe and works (and is already in the trunk). -- nosy: +barry, benjamin.peterson priority: -> release blocker ___ Pyt

[issue7998] MacPython 2.7a3 posix_spawn error for build using --with-framework-name

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: Fix in r78755 (2.7) and r78756 (3.2) (the issue doesn't affect 2.6 or 3.1 because those have another implementation of the python/pythonw command) -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 _