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
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
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: georg.brandl - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7076
___
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
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
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
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?
--
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.
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
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
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
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
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
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
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
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:
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
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
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
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),
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
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever, orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6894
___
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
Changes by Benjamin Peterson benja...@python.org:
--
resolution: - invalid
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7075
___
___
Changes by Senthil Kumaran orsent...@gmail.com:
--
assignee: - orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6894
___
___
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
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
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
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
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
___
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
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.
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
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
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
___
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
___
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
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
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
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
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
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
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7077
___
___
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
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
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
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.
---
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.
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
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.
--
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
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
___
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
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
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
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.
--
___
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
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)
--
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 -
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
___
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
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
Changes by Benjamin Peterson benja...@python.org:
--
nosy: +gregory.p.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7079
___
___
Changes by Dino Viehland di...@microsoft.com:
--
nosy: +DinoV
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7071
___
___
Python-bugs-list mailing
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:
65 matches
Mail list logo