[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2009-10-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti resolution: -> duplicate ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue7078] struct help in the interpreter does not explain about the fmt option

2009-10-07 Thread Gabriel Genellina
Gabriel Genellina added the comment: The module docstring (for _struct) already existed, but was not exposed as struct.__doc__ This patch fixes the problem; also, there was a missing format character ("?") -- keywords: +patch nosy: +gagenellina Added file: http://bugs.python.org/file1

[issue7071] distutils and IronPython compatibility

2009-10-07 Thread Dino Viehland
Changes by Dino Viehland : -- nosy: +DinoV ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue7079] file_close() ignores return value of close_the_file

2009-10-07 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue7058] Add some test execution environment protection to regrtest

2009-10-07 Thread Ezio Melotti
Ezio Melotti added the comment: The cwd should also be checked/restored to avoid problems like #7066. -- nosy: +ezio.melotti ___ Python tracker ___ __

[issue5915] PEP 383 implementation

2009-10-07 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: It would be useful to have the surrogateescape error handler backported to 2.7 to make it easier to start handling the kind of data it is needed for. -- nosy: +exarkun ___ Python tracker

[issue7058] Add some test execution environment protection to regrtest

2009-10-07 Thread R. David Murray
Changes by R. David Murray : Removed file: http://bugs.python.org/file15044/regrtest_guards.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue7058] Add some test execution environment protection to regrtest

2009-10-07 Thread R. David Murray
R. David Murray added the comment: Committed to trunk in r75255, py3k in r75279, and 3.1 in r75280. Leaving open until 2.6 is unfrozen and I can commit it there as well. -- assignee: -> r.david.murray resolution: -> accepted stage: patch review -> committed/rejected

[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2009-10-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: OK, but your patch certainly interferes with issue1326077. If format_exception_only changes, print_exception will display things differently. And the precise output is now part of the test suite (in test_traceback.py) -- resolution: duplicate -

[issue7080] locale.strxfrm raises MemoryError

2009-10-07 Thread egreen
New submission from egreen : The strxfrm function in the locale module can potentially raise a MemoryError. The failing malloc is in Modules/_localemodule.c, line 291. This is because the variable n0 of type Py_ssize_t is passed to PyArg_ParseTuple, which expects an int when PY_SSIZE_T_CLEAN is

[issue7071] distutils and IronPython compatibility

2009-10-07 Thread Michael Foord
Michael Foord added the comment: So there are two issues here - the terrible error message when an install fails with an access denied error and the fact that distutils attempts to compile bytecode under IronPython. -- ___ Python tracker

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Shawn Ligocki
Shawn Ligocki added the comment: A major pro for pseudo-random number generators is that they are deterministic, that is, you can save a load the state, start from the same seed and reproduce results, etc. At least in science (and probably other areas) this reproducibility can be vital in a rand

[issue3563] fix_idioms.py generates bad code

2009-10-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks very much for the patch; Committed in r75278. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue7077] SysLogHandler can't handle Unicode

2009-10-07 Thread Vinay Sajip
Vinay Sajip added the comment: To do this in a non-arbitrary way, it would make sense for the SysLogHandler (and perhaps the other socket-based handlers, too) to grow an optional encoding argument to their constructors, to be used to encode when converting from unicode to str (str -> bytes for P

[issue7079] file_close() ignores return value of close_the_file

2009-10-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file15077/crash.py ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue7079] file_close() ignores return value of close_the_file

2009-10-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : I noticed that file_close() calls close_the_file(), then frees the buffer for the file object. However, close_the_file() may fail and return NULL if the file object is currently in use by another thread, in which case freeing the buffer from underneath the

[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Stefan Krah
Stefan Krah added the comment: (1) is clearly true. I wonder about (2) and (3): The decimal data type is specified to be usable for integer arithmetic. With a high precision (and traps for Rounded/Inexact) I think it's reasonably convenient to use. -- _

[issue1625] bz2.BZ2File doesn't support multiple streams

2009-10-07 Thread David Bonner
David Bonner added the comment: I can remove the boilerplate from the code as long as I add the following to the submittal: VMware, Inc. is providing this bz2 module patch to you under the terms of the Apache License 2.0 with the understanding that you plan to re-license this under the terms an

[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: I was suggesting that it be deprecated on the grounds that: (1) It's not part of the Decimal standard. (2) It's not implemented for Python (binary) floats, so why implement it for decimal floats? (3) It's severely use-case challenged. It's a pure integer-b

[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2009-10-07 Thread thewtex
thewtex added the comment: Sorry about the lack of the attached file. I will try again and include it inline. That other patch does not fix the bug I am seeing, which is experienced while using traceback.format_exception_only directly. Thanks. --- /usr/lib/python2.6/traceback.py 2009-0

[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Stefan Krah
Stefan Krah added the comment: precision: 34 maxExponent: 9 minExponent: -9 -- integer overflow in 3.61 or earlier scbx164 scaleb 1E-9 -12 -> NaN Invalid_operation -- out of range scbx165 scaleb -1E-9 +12 -> NaN Invalid_operation I would s

[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Stefan Krah
Stefan Krah added the comment: Deprecate on the grounds that it is slow in decimal.py or the InvalidOperation issue? I think pure integer arithmetic with the decimal type always requires attention from the user, since in many functions one has to check for Rounded/Inexact in order to get meanin

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Christoph Gohlke wrote: > > Christoph Gohlke added the comment: > > The attached patch uses a regular expression. Much better, thanks. -- title: Do not embed manifest files in *.pyd when compiling with MSVC -> Do not embed manifest files in *.p

[issue7077] SysLogHandler can't handle Unicode

2009-10-07 Thread R. David Murray
Changes by R. David Murray : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: Applied the fix for logb in r75275 (trunk), r75276 (py3k) and r75277 (release31-maint). r75275 still needs to be merged to the release26-maint branch once it's unfrozen. -- ___ Python tracker

[issue6670] Printing the 'The Python Tutorial'

2009-10-07 Thread brimac
brimac added the comment: Hi Ezio Thanks again. Brimac 2009/10/7 Ezio Melotti > > Ezio Melotti added the comment: > > > I'm not sure what happens now. Will somebody fix it? > > Now that the problem and the solution are known, Georg will probably fix > it at some point. The "!important" cou

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-07 Thread Christoph Gohlke
Christoph Gohlke added the comment: The attached patch uses a regular expression. -- Added file: http://bugs.python.org/file15072/msvc9compiler_stripruntimes_regexp.diff ___ Python tracker

[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: Raymond, can I recommend deprecating and eventually removing three- argument pow support from Decimal? -- ___ Python tracker ___ ___

[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would like to look at this for a bit before it gets closed. -- assignee: mark.dickinson -> rhettinger nosy: +rhettinger ___ Python tracker

[issue7049] decimal.py: NaN result in pow(x, y, z) with prec 1

2009-10-07 Thread Stefan Krah
Stefan Krah added the comment: This whole thing is indeed a matter of taste, so I'd close the bug if no one else is interested. -- ___ Python tracker ___

[issue1488934] file.write + closed pipe = no error

2009-10-07 Thread Forest Bond
Changes by Forest Bond : -- nosy: +forest_atq versions: +Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue7078] struct help in the interpreter does not explain about the fmt option

2009-10-07 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl ___ Python tracker ___ ___ Py

[issue7078] struct help in the interpreter does not explain about the fmt option

2009-10-07 Thread Senthil Kumaran
New submission from Senthil Kumaran : >>> help(struct) mentions the functions which use fmt characters. The builtin help does not mention the fmt characters and their meaning. One should go online if he has to refer them. -- keywords: easy messages: 93709 nosy: orsenthil priority: low se

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Sorry, 2.6.4 will be solely to remove the brown paper bag of 2.6.3 from our heads. This can go in 2.6.5 though. -- ___ Python tracker ___

[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: The IEEE 754-2008 description of scaleB makes a lot more sense, IMO: scaleB(x, N) is simply x*10**N (assuming that B=10 and N is integral), rounded in the usual way. The restriction in the specification seems arbitrary and questionable. Presumably it's inten

[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: I don't understand the new scaleb testcases (from Mike). They look like this: precision: 34 maxExponent: 9 minExponent: -9 -- integer overflow in 3.61 or earlier scbx164 scaleb 1E-9 -12 -> NaN Invalid_operation -- out of r

[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: Patch to fix logb. -- Added file: http://bugs.python.org/file15071/logb.patch ___ Python tracker ___ ___

[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: Patch to update to the most recent official set of tests. With this patch, logb and scaleb fail. -- keywords: +patch Added file: http://bugs.python.org/file15070/decimal_testcases.patch ___ Python tracker

[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Mike's response makes sense to me. If the precision is 2, the result should round to that precision. The documents showing the theory behind the decimal spec indicate that in general mathematical operations are exact, only the results get rounded. Also II

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Just a note on the style of the msvc9compiler_stripruntimes_revised.diff patch: * please try to use lines with at most 80 chars only * it would be better to use regexps to do the search&replace and perhaps add wildcards to catch future SP-versions of VC9

[issue969718] BASECFLAGS are not passed to module build line

2009-10-07 Thread Chris Lambacher
Chris Lambacher added the comment: I am running into a problem related to this. I am attempting to cross compile extensions but Fedora includes -march in the OPT variable. Since there is no way to exclude the OPT values the build fails. It seems that forcing OPT to stay the same is a disservice

[issue6894] urllib2 doesn't respect "no_proxy" environment (python2.6.2)

2009-10-07 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue7075] Bug while put a set on a dict

2009-10-07 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> invalid ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-07 Thread Koen van de Sande
Koen van de Sande added the comment: Thanks Christoph, those are two important fixes to the patch. I'm +1 on having this in the next 2.6 maintenance release. -- ___ Python tracker _

[issue6894] urllib2 doesn't respect "no_proxy" environment (python2.6.2)

2009-10-07 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever, orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue7029] Improve pybench

2009-10-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Ok, thanks for the info. We are currently using the modified version in house for monitoring our builds and that's ok for my purposes. I have set the -C 0 and --timer systimes.processtime as default for us. I'll close this now and leave you to do the

[issue6670] Printing the 'The Python Tutorial'

2009-10-07 Thread Ezio Melotti
Ezio Melotti added the comment: > I'm not sure what happens now. Will somebody fix it? Now that the problem and the solution are known, Georg will probably fix it at some point. The "!important" could be used as a temporary workaround (e.g. for 2.6.4 and for the online doc), the css can be reor

[issue918368] urllib doesn't correct server returned urls

2009-10-07 Thread Adam Nelson
Adam Nelson added the comment: I can't think of too many specific scenarios. It just seems like a non- trivial behavior change (or rather, it is trivial but with possibly far reaching ramifications). One issue I see is that the ticket morphed from just dealing with space characters to many s

[issue6670] Printing the 'The Python Tutorial'

2009-10-07 Thread brimac
brimac added the comment: Hi Ezio Many thanks for all your effort with this problem. Thanks also for the full explanation and link. I'm not sure what happens now. Will somebody fix it? I think it's important for Python's image because it might be the first page a new user tries to print. brima

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: That's amusing. The moment I submitted the comment above I remember thinking 'Hmm. I could have explained that better.' I'll try to come up with a doc patch. Stealing the issue from Eric. -- assignee: eric.smith -> mark.dickinson _

[issue7077] SysLogHandler can't handle Unicode

2009-10-07 Thread Robert Szefler
New submission from Robert Szefler : Trying to .emit() a Unicode string causes an awkward exception to be thrown: Traceback (most recent call last): File "/usr/lib/python2.5/logging/handlers.py", line 672, in emit self.socket.sendto(msg, self.address) TypeError: sendto() takes exactly 3 ar

[issue6978] compiler.transformer dict key bug d[1,] = 1

2009-10-07 Thread Kees Bos
Kees Bos added the comment: Sorry. Renamed .bak to .orig ... Here's the patch compiler/transformer.py (against python 2.5) -- Added file: http://bugs.python.org/file15068/transformer.py.patch ___ Python tracker ___

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-07 Thread Eric Smith
Eric Smith added the comment: Mark's really the expert here, so I trust his description. Is his description layman-speak enough for the docs? -- ___ Python tracker ___ __

[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2009-10-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: You did not attach any patch. But anyway this has already been fixed by issue1326077. -- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> traceback.py formats SyntaxError differently _

[issue6978] compiler.transformer dict key bug d[1,] = 1

2009-10-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: your patch is no more a diff file (the 'previous' file is empty) -- nosy: +amaury.forgeotdarc ___ Python tracker ___ _

[issue6773] subprocess issue on Win 7 x64

2009-10-07 Thread Piotr Foltyn
Piotr Foltyn added the comment: I cannot reproduce it on Windows 7 x64 Ultimate either. sys.getwindowsversion() -> (6, 1, 7600, 2, '') Probably this bug was in Win7 RC and not in python. Thanks for your time. Closing. -- status: open -> closed ___

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread chuck
chuck added the comment: Depends on how verbose we want to be. It should say why one might want to use urandom() instead of random (if you decide you are interested you can still look up the documentation). I think it would be nice to say why random does not use urandom if urandom is better,

[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: Attaching additional testcases from Mike Cowlishaw. -- Added file: http://bugs.python.org/file15067/logb_additional.decTest ___ Python tracker _

[issue7048] decimal.py: logb: round the result if it is greater than prec

2009-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: (Stefan emailed Mike Cowlishaw about this: thanks, Stefan!) Mike's initial response suggests that we *should* be rounding the result here. That is, decNumber and decimal.py are both in error, and Stefan's interpretation is correct. -- assignee: -> m

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Shawn Ligocki
Shawn Ligocki added the comment: Ah, sorry for the misunderstanding. I agree, better not to mislead. Perhaps we should side with the urandom documentation and say that it is a cryptographically secure random number generator with no accessible state? -- __

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Jan Hosang
Jan Hosang added the comment: Maybe os.urandom is "more random" than the module random in the sense that it is harder to figure out what comes next, but still deterministic. The readings from the hardware are random and you usually don't know them, yet what comes out of urandom is determined

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Shawn Ligocki
Shawn Ligocki added the comment: Oh, urandom is almost always non-deterministic. It mixes completely random bits from hardware sources with its pseudo-random number state. The more random bits it gets from hardware, the less predictable its output is. However, as long as it's getting any random

[issue6773] subprocess issue on Win 7 x64

2009-10-07 Thread Ezio Melotti
Ezio Melotti added the comment: I cannot reproduce it on Win7 32bit (OS Name: Microsoft Windows 7 Enterprise; OS Version: 6.1.7600 N/A Build 7600) with Python 2.6.3rc1. Attached there's the file I used (a slightly different version of what you posted, your version worked too), this is the output