[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-06-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And here is a patch, that replaces "symlinks" arguments in shutil by "follow_symlinks" (with keeping old name if it exists before 3.3). I very hope native speakers corrected me in docs. -- Added file: http://bugs.python.org/file26187/symlinks-to-follo

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Marc Abramowitz
Marc Abramowitz added the comment: Oops, last attachment included the source timestamp twice instead of timestamp + bytecode size. -- Added file: http://bugs.python.org/file26188/cpython-issue-15030.patch ___ Python tracker

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-27 Thread Marc Abramowitz
Marc Abramowitz added the comment: Oops. Refactor. :-) -- Added file: http://bugs.python.org/file26189/cpython-issue-15030.patch ___ Python tracker ___ _

[issue15206] uuid module falls back to unsuitable RNG

2012-06-27 Thread Christian Heimes
Christian Heimes added the comment: IMHO it's all about managing expectations. As libuuid is using a crypto RNG before it falls back to a less suitable RNG. We should follow this example. I couldn't find any information about the implementation details of Window's UuidCreate(). I agree that

[issue15209] Re-raising exceptions from an expression

2012-06-27 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15210] importlib.__init__ checks for the wrong exception when looking for _frozen_importlib

2012-06-27 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15209] Re-raising exceptions from an expression

2012-06-27 Thread Nick Coghlan
Nick Coghlan added the comment: The from clause is intended for replacing previous exceptions with *new* exceptions, not editing the attributes of existing ones which may already have a different __cause__ set. So - 1 from me, even for 3.4. A patch to the docs explaining that this is not support

[issue15209] Re-raising exceptions from an expression

2012-06-27 Thread Ethan Furman
Ethan Furman added the comment: Okay, I see your point. It's also not difficult to work around if you really want to toss the extra info: except NameError: try: fallback_module.getch() except Exception as exc: raise exc from None

[issue15206] uuid module falls back to unsuitable RNG

2012-06-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Are uuid's promised to be cryptographically secure? -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___

[issue15209] Re-raising exceptions from an expression

2012-06-27 Thread Ethan Furman
Ethan Furman added the comment: Patch attached. It basically says: 8< Note: Because using :keyword:`from` can throw away valuable debugging information, its use with a bare :keyword:`raise` is not supported. If you are tryi

[issue15209] Re-raising exceptions from an expression

2012-06-27 Thread Ethan Furman
Ethan Furman added the comment: Nick Coghlan wrote: > The from clause is intended for replacing previous exceptions with *new* > exceptions, not editing the attributes of existing ones which may already > have a different __cause__ set. Huh. While I agree with the doc patch solution, I think t

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-06-27 Thread pmoody
pmoody added the comment: Hynek, I don't see that error when I run the tests on a freshly built python. -- ___ Python tracker ___ ___

[issue15206] uuid module falls back to unsuitable RNG

2012-06-27 Thread Christian Heimes
Christian Heimes added the comment: Not, not by definition. However an uuid generator shall geenerate uuid in a way that make collisions highly improbable. IMHO this verdict implies that an uuid generator should use the cryptographic RNG if available. The behavior after fork() is clearly a bu

[issue15206] uuid module falls back to unsuitable RNG

2012-06-27 Thread STINNER Victor
STINNER Victor added the comment: > However a MT isn't suitable for cryptographic purposes. > The module should first try to use os.urandom() and > then perhaps use its own instance of random.Random, > similar to uuid_generate_* [1] os.urandom() is not suitable for cryptographic purposes :-) Py

[issue15206] uuid module falls back to unsuitable RNG

2012-06-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: >From the /dev/urandom Linux man page: If you are unsure about whether you should use /dev/random or /dev/urandom, then probably you want to use the latter. As a general rule, /dev/urandom should be used for everything exc

[issue15206] uuid module falls back to unsuitable RNG

2012-06-27 Thread Christian Heimes
Christian Heimes added the comment: Antoine beat me to it and he is totally right. Please don't derail this bug report. I agree with your analysis that the RNG core of random.Random subclass can't be replaced easily and that more implementations for different purposes would be great. You shou

[issue15209] Re-raising exceptions from an expression

2012-06-27 Thread Nick Coghlan
Nick Coghlan added the comment: The purpose of the from clause in general is to change the exception *type* (for example, from KeyError -> AttributeError or vice-versa), or to add additional information without losing access to any previous information (like the original traceback). This is c

[issue15212] Rename SC_GLOBAL_EXPLICT to SC_GLOBAL_EXPLICIT in compiler module

2012-06-27 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis : Revision 4809afa85a9b introduced a typo in compiler module: SC_GLOBAL_EXPLICT instead of SC_GLOBAL_EXPLICIT The attached patch fixes this typo. -- components: Library (Lib) files: compiler-SC_GLOBAL_EXPLICIT.patch keywords: easy

[issue15212] Rename SC_GLOBAL_EXPLICT to SC_GLOBAL_EXPLICIT in compiler module

2012-06-27 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +nascheme ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue6422] timeit called from within Python should allow autoranging

2012-06-27 Thread STINNER Victor
STINNER Victor added the comment: Hi, I wrote recently a similar function because timeit is not reliable by default. Results look random and require to run the same benchmark 3 times or more on the command line. https://bitbucket.org/haypo/misc/src/tip/python/benchmark.py By default, the ben

[issue6422] timeit called from within Python should allow autoranging

2012-06-27 Thread STINNER Victor
STINNER Victor added the comment: > The calibration function uses also the precision of the timer. Oh, I forgot to mention that it computes the precision in Python, it doesn't read the precision announced by the OS or the precision of the C structure. https://bitbucket.org/haypo/misc/src/bfacf

[issue15213] _PyOS_URandom documentation

2012-06-27 Thread Christian Heimes
New submission from Christian Heimes : The comment for Python/random.c:_PyOS_URandom() states > Fill buffer with size pseudo-random bytes, not suitable for cryptographic > use, from the operating random number generator (RNG). which is not correct as all paths use a RNG that is suitable for mo

[issue15214] list.startswith() and list.remove() fails to catch consecutive items in a list.

2012-06-27 Thread Isaac
New submission from Isaac : The simple repro below, shows that if a list of strings has two consecutive items that begin with the same letter, an iteration over the list to find and remove all strings that start with that letter fails. The second string that starts with the same letter to rem

[issue15214] list.startswith() and list.remove() fails to catch consecutive items in a list.

2012-06-27 Thread Petri Lehtinen
Petri Lehtinen added the comment: This happens because you modify the list while iterating over it, which makes the loop not work as you expect. Essentially, when you remove the item that's currently being pointed to, the loop skips over the next item. An idiomatic way to remove items from a

[issue15206] uuid module falls back to unsuitable RNG

2012-06-27 Thread Martin v . Löwis
Martin v. Löwis added the comment: > a) my patch handles the fork() issue correctly If the system has urandom, yes. > b) if it's a good idea to try SystemRandom first Certainly. > c) a backport to 2.6, 2.7, 3.1 and 3.2 is required > and perhaps Cannot backport to 2.6 and 3.1; it's not a sec

[issue15206] uuid module falls back to unsuitable RNG

2012-06-27 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue15213] _PyOS_URandom documentation

2012-06-27 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's not an official API, as the leading underscore specifies. Changing the comment sounds fine to me. -- nosy: +loewis ___ Python tracker __

<    1   2