[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I think non-determinism is more then os.urandom can deliver. As far as I know the OS still does deterministic calculations, though they are maybe less obvious. Maybe call it safer, OS dependent? -- nosy: +chuck

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, the docs for os.urandom() state: Return a string of n random bytes suitable for cryptographic use. This function returns random bytes from an OS-specific randomness source. The returned data should be unpredictable

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: georg.brandl - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7076 ___

[issue6773] subprocess issue on Win 7 x64

2009-10-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Shawn Ligocki
Shawn Ligocki sligo...@gmail.com 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

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com 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

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Shawn Ligocki
Shawn Ligocki sligo...@gmail.com 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? --

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

2009-10-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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.

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

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

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread chuck
chuck jan.hos...@gmail.com 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

[issue6773] subprocess issue on Win 7 x64

2009-10-07 Thread Piotr Foltyn
Piotr Foltyn piotr.fol...@displaylink.com 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

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

2009-10-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: your patch is no more a diff file (the 'previous' file is empty) -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6978

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

2009-10-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com 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

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

2009-10-07 Thread Eric Smith
Eric Smith e...@trueblade.com 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 rep...@bugs.python.org http://bugs.python.org/issue7051

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

2009-10-07 Thread Kees Bos
Kees Bos k@zx.nl 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 rep...@bugs.python.org

[issue7077] SysLogHandler can't handle Unicode

2009-10-07 Thread Robert Szefler
New submission from Robert Szefler robert.szef...@redefine.pl: 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:

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

2009-10-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue6670] Printing the 'The Python Tutorial'

2009-10-07 Thread brimac
brimac bri...@bcs.org 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

[issue918368] urllib doesn't correct server returned urls

2009-10-07 Thread Adam Nelson
Adam Nelson a...@varud.com 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

[issue6670] Printing the 'The Python Tutorial'

2009-10-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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),

[issue7029] Improve pybench

2009-10-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com 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

[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 arfrever@gmail.com: -- nosy: +Arfrever, orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6894 ___

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

2009-10-07 Thread Koen van de Sande
Koen van de Sande k...@tibed.net 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 rep...@bugs.python.org

[issue7075] Bug while put a set on a dict

2009-10-07 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7075 ___ ___

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

2009-10-07 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: - orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6894 ___ ___

[issue969718] BASECFLAGS are not passed to module build line

2009-10-07 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net 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

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

2009-10-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com 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 searchreplace and perhaps add wildcards to catch future

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

2009-10-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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

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

2009-10-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

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

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

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

2009-10-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

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

2009-10-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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.

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-07 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org 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 rep...@bugs.python.org http://bugs.python.org/issue5949

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

2009-10-07 Thread Senthil Kumaran
New submission from Senthil Kumaran orsent...@gmail.com: 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

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

2009-10-07 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: - georg.brandl components: +Documentation nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7078 ___

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

2009-10-07 Thread Forest Bond
Changes by Forest Bond for...@alittletooquiet.net: -- nosy: +forest_atq versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1488934 ___

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

2009-10-07 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org 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 rep...@bugs.python.org http://bugs.python.org/issue7049

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

2009-10-07 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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 rep...@bugs.python.org

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

2009-10-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Raymond, can I recommend deprecating and eventually removing three- argument pow support from Decimal? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7049

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

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

[issue6670] Printing the 'The Python Tutorial'

2009-10-07 Thread brimac
brimac bri...@bcs.org added the comment: Hi Ezio Thanks again. Brimac 2009/10/7 Ezio Melotti rep...@bugs.python.org Ezio Melotti ezio.melo...@gmail.com 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

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

2009-10-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue7077] SysLogHandler can't handle Unicode

2009-10-07 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7077 ___ ___

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

2009-10-07 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Christoph Gohlke wrote: Christoph Gohlke cgoh...@uci.edu 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

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

2009-10-07 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org 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

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

2009-10-07 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org 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

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

2009-10-07 Thread thewtex
thewtex m...@mmmccormick.com 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. ---

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

2009-10-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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.

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

2009-10-07 Thread David Bonner
David Bonner dbon...@vmware.com 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

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

2009-10-07 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org 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. --

[issue7079] file_close() ignores return value of close_the_file

2009-10-07 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: 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

[issue7079] file_close() ignores return value of close_the_file

2009-10-07 Thread Daniel Stutzbach
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com: Added file: http://bugs.python.org/file15077/crash.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7079 ___

[issue7077] SysLogHandler can't handle Unicode

2009-10-07 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk 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

[issue3563] fix_idioms.py generates bad code

2009-10-07 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Thanks very much for the patch; Committed in r75278. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3563

[issue7076] Documentation add note about SystemRandom

2009-10-07 Thread Shawn Ligocki
Shawn Ligocki sligo...@gmail.com 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

[issue7071] distutils and IronPython compatibility

2009-10-07 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk 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. -- ___

[issue7080] locale.strxfrm raises MemoryError

2009-10-07 Thread egreen
New submission from egreen egr...@operamail.com: 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

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

2009-10-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com 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) --

[issue7058] Add some test execution environment protection to regrtest

2009-10-07 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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 -

[issue7058] Add some test execution environment protection to regrtest

2009-10-07 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: Removed file: http://bugs.python.org/file15044/regrtest_guards.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7058 ___

[issue5915] PEP 383 implementation

2009-10-07 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com 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 Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The cwd should also be checked/restored to avoid problems like #7066. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7058

[issue7079] file_close() ignores return value of close_the_file

2009-10-07 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7079 ___ ___

[issue7071] distutils and IronPython compatibility

2009-10-07 Thread Dino Viehland
Changes by Dino Viehland di...@microsoft.com: -- nosy: +DinoV ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7071 ___ ___ Python-bugs-list mailing

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

2009-10-07 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar 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: