[issue4966] Improving Lib Doc Sequence Types Section

2012-01-23 Thread Georg Brandl
Georg Brandl added the comment: +1 for splitting. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue13838] In str.format "{0:#.5g}" for decimal.Decimal doesn't print trailing zeros

2012-01-23 Thread Mark Dickinson
Mark Dickinson added the comment: IMO, the behaviour is fine; it's the docs that are unclear. The rules for Decimal are different mainly because trailing zeros have meaning for the Decimal type. (Decimal('1.250') and Decimal('1.25') are two distinct Decimal objects, unlike float('1.250') a

[issue13838] In str.format "{0:#.5g}" for decimal.Decimal doesn't print trailing zeros

2012-01-23 Thread Mark Dickinson
Mark Dickinson added the comment: Ah no, I take it back. I think (2) is fine---this is the usual preservation of trailing zeros where possible. (1) needs to be fixed (and issue #7094 was left open waiting for this fix). -- ___ Python tracker

[issue6210] Exception Chaining missing method for suppressing context

2012-01-23 Thread Catalin Iacob
Changes by Catalin Iacob : -- nosy: +catalin.iacob ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for Nick's suggested breakout: 4.6 Sequence Types - list, tuple, range 4.7 Text Sequence Type - str 4.8 Binary Data Sequence Types - bytes, bytearray, memoryview -- nosy: +rhettinger ___ Python tracker

[issue13793] hasattr, delattr, getattr fail with unnormalized names

2012-01-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Benjamin on all counts. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bug

[issue13797] Allow objects implemented in pure Python to export PEP 3118 buffers

2012-01-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue9625] argparse: Problem with defaults for variable nargs

2012-01-23 Thread Michał M .
Michał M. added the comment: Of course I've made a mistake: "list for user provided or list for default" should be: "list for user provided or STRING for default" -- ___ Python tracker __

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I also found that under Python 2.x, even a low-level exit like > os._exit or multiprocessing.win32.ExitProcess, called from within a > user-level function in the child, caused flushing. The difference is the following: - Python 2.x uses C stdio (write() calls

[issue13840] create_string_buffer rejects str init_or_size parameter

2012-01-23 Thread Vincent Pelletier
Vincent Pelletier added the comment: Thanks for the quick reply. FWIW, in 2.7 doc ctype.create_string_buffer is said to accept unicode objects as parameter. I don't use this personally, so I don't mind 3.x only working on bytes - and already fixed my code accordingly. It's just that I noticed

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak added the comment: Georg, thanks for the tip. Is there any difference in reST between *i*\ th and *i*\th ? -- ___ Python tracker ___ _

[issue13816] Two typos in the docs

2012-01-23 Thread Ezio Melotti
Ezio Melotti added the comment: You can check on the devguide the section about building the doc and see it yourself on the generated HTML. While building you will also see all the warnings caused by invalid markup. -- ___ Python tracker

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Dave Malcolm wrote: > > Dave Malcolm added the comment: > > On Fri, 2012-01-06 at 12:52 +, Marc-Andre Lemburg wrote: >> Marc-Andre Lemburg added the comment: >> >> Demo patch implementing the collision limit idea for Python 2.7. >> >> -- >> A

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alex Gaynor wrote: > I'm able to put N pieces of data into the database on successive requests, > but then *rendering* that data puts it in a dictionary, which renders that > page unviewable by anyone. I think you're asking a bit much here :-) A broken app

[issue13703] Hash collision security issue

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Frank's example is an attack on the second possible way to > trigger the O(n^2) behavior. See msg150724 further above where I > listed the two possibilities: > > """ > An attack can be based on trying to find many objects with the same > hash value, or trying

[issue13703] Hash collision security issue

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > With an collision counting exception you'd get a clear notice that > something in your data and your application is wrong and needs > fixing. The rest of your web app will continue to work fine Except when it doesn't, because you've also broken batch processi

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak added the comment: I hope the patch is now good. What do you think? -- Added file: http://bugs.python.org/file24296/done deal.diff ___ Python tracker ___ _

[issue13793] hasattr, delattr, getattr fail with unnormalized names

2012-01-23 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak added the comment: Ah, darn it! My last patch is a total garbage. But then an interesting thing happened: I wanted to delete my last patch set, but I got a "ProgrammingError at /review/13816/patchset/4039/delete schema "datetime" does not exist" and got all the Django nitty-grit

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Changes by Boštjan Mejak : Removed file: http://bugs.python.org/file24296/done deal.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue8713] multiprocessing needs option to eschew fork() under Linux

2012-01-23 Thread sbt
sbt added the comment: Attached is an updated version of the mp_fork_exec.patch. This one is able to reliably clean up any unlinked semaphores if the program exits abnormally. -- Added file: http://bugs.python.org/file24297/mp_fork_exec.patch ___ P

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Changes by Boštjan Mejak : Removed file: http://bugs.python.org/file24293/fixed patch final.diff ___ Python tracker ___ ___ Python-bugs-list m

[issue8713] multiprocessing needs option to eschew fork() under Linux

2012-01-23 Thread sbt
sbt added the comment: mp_split_tests.patch splits up the test_multiprocessing.py: test_multiprocessing_misc.py miscellaneous tests which need not be run with multiple configurations mp_common.py testcases which should be run with multiple configurations test_multiprocessing_fork.py test_

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak added the comment: I wasn't able to remove the patch via "Delete Patch Set" but I did it by clicking on the Unlink button. So the "Delete Patch Set" option has a bug. -- ___ Python tracker _

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak added the comment: Georg, I object to your comment about *i*th needing to be *i*\ th because currently in the source code we have it written as *i*'th which, by your logic, would need to be written as *i*\ 'th which is not so and is compiled/displayed/whatever perfectly as is, s

[issue13838] In str.format "{0:#.5g}" for decimal.Decimal doesn't print trailing zeros

2012-01-23 Thread Eric V. Smith
Changes by Eric V. Smith : -- resolution: -> duplicate status: open -> closed superseder: -> Add alternate float formatting styles to new-style formatting. ___ Python tracker _

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak added the comment: This stupid HG is so cryptic. SVN was so easy, now I can't even create a patch. Can you just fix those two typos as "key function" and "*i*th" please? Thank you. -- ___ Python tracker

[issue13816] Two typos in the docs

2012-01-23 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue4686] Exceptions in ConfigParser don't set .args

2012-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e091e36fc80 by Łukasz Langa in branch '2.7': Fixes #4686. Reverts redundant picklability code from r74544. http://hg.python.org/cpython/rev/8e091e36fc80 -- nosy: +python-dev ___ Python tracker

[issue13760] ConfigParser exceptions are not pickleable

2012-01-23 Thread Łukasz Langa
Łukasz Langa added the comment: The reason why 3.2 and 3.3 work is that some time ago I fixed #4686 by explicitly settings .args in configparser exceptions. Unfortunately that patch was not backported at the time. I did that just now. You're right, that is specific to configparser and doesn't

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Here's a version of the collision counting patch that takes both hash and slot collisions into account. I've also added a test script which demonstrates both types of collisions using integer objects (since it's trivial to calculate their hashes). To see t

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: > I've also added a test script which demonstrates both types of > collisions using integer objects (since it's trivial to calculate > their hashes). I forgot to mention: the test script is for 64-bit platforms. It's easy to adapt it to 32-bit if needed. -

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2012-01-23 Thread Brian Curtin
Brian Curtin added the comment: Without a patch or a solution, the priority doesn't really matter (like Tarek said in msg127630). If anyone is actively working on this feel free to say otherwise, but I see no status to update. -- ___ Python tracker

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I propose applying the following patch. We could open a separate issue to suggest "exit = sys.exit" under Windows (it doesn't seem to break any tests). -- keywords: +patch nosy: +neologix stage: test needed -> patch review Added file: http://bugs.pytho

[issue13190] ConfigParser uses wrong newline on Windows

2012-01-23 Thread Łukasz Langa
Łukasz Langa added the comment: That is indeed the behaviour. Citing the tutorial: "Python on Windows makes a distinction between text and binary files; the end-of-line characters in text files are automatically altered slightly when data is read or written." When you're opening the file in b

[issue13816] Two typos in the docs

2012-01-23 Thread Justin Wehnes
Justin Wehnes added the comment: Fixed. -- Added file: http://bugs.python.org/file24302/issue13816.diff ___ Python tracker ___ ___ Py

[issue8713] multiprocessing needs option to eschew fork() under Linux

2012-01-23 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: -santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13829] exception error in _scproxy.so

2012-01-23 Thread Ned Deily
Ned Deily added the comment: The problem was originally discussed in these threads: http://mail.python.org/pipermail/pythonmac-sig/2011-December/023428.html http://mail.python.org/pipermail/pythonmac-sig/2011-December/023430.html Because _scproxy is used to get information about Internet proxi

[issue13760] ConfigParser exceptions are not pickleable

2012-01-23 Thread Faheem Mitha
Faheem Mitha added the comment: I see. Thanks for the pointer to the earlier (2008) bug report. I notice you fixed the bug differently for 2.7 (define __reduce__) and 3.2 (set args). Is there some reason for that? -- ___ Python tracker

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-23 Thread Jon Brandvein
Jon Brandvein added the comment: Regarding the patch: I'd also like to see sys.stdout.flush() and sys.stderr.flush() between "exitcode = self._boostrap()" and "exit(exitcode)" in /Lib/multiprocessing/forking.py :: main(). (The extra stderr flush would be for symmetry with Popen.__init__() for

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-23 Thread Jesse Noller
Jesse Noller added the comment: There's already a bug / pending patch for this behavior here: http://bugs.python.org/issue8713 No need to take it to -ideas. -- ___ Python tracker

[issue13841] multiprocessing should use sys.exit() where possible

2012-01-23 Thread Jon Brandvein
New submission from Jon Brandvein : Currently the multiprocessing library calls a hard exit function (os._exit under unix, ExitProcess under Windows) to terminate the child process. Under unix, this is necessary because the child is forked without exec-ing. Calling sys.exit() would make it pos

[issue13816] Two typos in the docs

2012-01-23 Thread Georg Brandl
Georg Brandl added the comment: 1. Please report issues with the tracker to the meta-tracker at http://psf.upfronthosting.co.za/roundup/meta/. 2. You may object all you want, *i*th is invalid reST and a very quick tryout with "rst2html" would have shown you that. 3. Lastly, it is usual to te

[issue13816] Two typos in the docs

2012-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset a72ca8b23cdf by Georg Brandl in branch '3.2': #13816: fix two minor style issues. Thanks to Justin Wehnes for the patch. http://hg.python.org/cpython/rev/a72ca8b23cdf New changeset f4f9ab2fd51b by Georg Brandl in branch '2.7': #13816: fix two minor

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-23 Thread James Sanders
New submission from James Sanders : At present, the built-in constants Ellipsis (...) and NotImplemented cannot be pickled. Perhaps there is a good reason for this, but the only discussion I can find is at msg<108957>, where it is stated that these values (along with their types, and type(Non

[issue10580] Installer sentence in bold

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak added the comment: Is this fixed or what? -- nosy: +jwehnes type: -> enhancement ___ Python tracker ___ ___ Python-bug

[issue10580] Installer sentence in bold

2012-01-23 Thread Brian Curtin
Brian Curtin added the comment: No. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-23 Thread Brian Curtin
Brian Curtin added the comment: Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue13737] bugs.python.org/review's Django settings file DEBUG=True

2012-01-23 Thread Ezio Melotti
Ezio Melotti added the comment: I now set DEBUG = False in gae2django/settings.py and rietveld/settings.py. -- nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think it's a reasonable feature request. Now someone has to write a patch for it. -- stage: -> needs patch ___ Python tracker ___ _

[issue13816] Two typos in the docs

2012-01-23 Thread Georg Brandl
Changes by Georg Brandl : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-23 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: We will need to bump the protocol number to add support for None, Ellipsis, and NotImplemented. Antoine, can you add this to PEP 3154? -- ___ Python tracker ___

[issue6721] Locks in python standard library should be sanitized on fork

2012-01-23 Thread sbt
sbt added the comment: Attached is a patch (without documentation) which creates an atfork module for Unix. Apart from the atfork() function modelled on pthread_atfork() there is also a get_fork_lock() function. This returns a recursive lock which is held whenever a child process is created

[issue6721] Locks in python standard library should be sanitized on fork

2012-01-23 Thread sbt
sbt added the comment: Is there any particular reason not to merge Charles-François's reinit_locks.diff? Reinitialising all locks to unlocked after a fork seems the only sane option. -- ___ Python tracker ___

[issue13703] Hash collision security issue

2012-01-23 Thread Dave Malcolm
Dave Malcolm added the comment: I'm attaching an attempt at backporting haypo's random-8.patch to 2.7 Changes relative to random-8.patch: * The randomization is off by default, and must be enabled by setting a new environment variable PYTHONHASHRANDOMIZATION to a non-empty string.

[issue13843] Python doesn't compile anymore on our Solaris buildbot: undefined libintl_* symbols

2012-01-23 Thread STINNER Victor
New submission from STINNER Victor : gcc-o python Modules/python.o libpython3.3dm.a -lsocket -lnsl -lintl -lrt -ldl -lsendfile -lm Undefined first referenced symbol in file libintl_bind_textdomain_codeset libpython3.3dm.a(_localemodu

[issue13843] Python doesn't compile anymore on our Solaris buildbot: undefined libintl_* symbols

2012-01-23 Thread STINNER Victor
STINNER Victor added the comment: The issue doesn't occur on Python 2.7. -- versions: +Python 3.2 ___ Python tracker ___ ___ Python-b

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: > To see the collision counting, enable the DEBUG_DICT_COLLISIONS > macro variable. Running (part of (*)) the test suite with debugging enabled on a 64-bit machine shows that slot collisions are much more frequent than hash collisions, which only account fo

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > We will need to bump the protocol number to add support for None, > Ellipsis, and NotImplemented. Antoine, can you add this to PEP 3154? I don't think this needs a protocol bump. These are global singletons, they can be pickled as such, and they will be unpic

[issue6721] Locks in python standard library should be sanitized on fork

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Is there any particular reason not to merge Charles-François's > reinit_locks.diff? > > Reinitialising all locks to unlocked after a fork seems the only sane option. I agree with this. I haven't looked at the patch very closely. I think perhaps each lock c

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2012-01-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: > If priority escalation is out of the question It's not out of the question - it's just that setting the priority on the issue is not a proper way to escalate. Instead, there are two forms of escalation available: 1. submit a patch that fixes the issue 2. pa

[issue13843] Python doesn't compile anymore on our Solaris buildbot: undefined libintl_* symbols

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: The buildbot is Martin's. -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue10580] Installer sentence in bold

2012-01-23 Thread Brian Curtin
Brian Curtin added the comment: Yes. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue10580] Installer sentence in bold

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak added the comment: Can you please fix this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue9625] argparse: Problem with defaults for variable nargs when using choices

2012-01-23 Thread Martin Pengelly-Phillips
Martin Pengelly-Phillips added the comment: The real issue is that the choices flag does not work with a default flag and * nargs. The following works as expected: >>> parser.add_argument('chosen', nargs='*', default=['a']) >>> print(parser.parse_args()) Namespace(chosen=['a']) >>> print(parse

[issue10278] add time.wallclock() method

2012-01-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset fb0f4fe8123e by Victor Stinner in branch 'default': Issue #10278: wallclock() cannot go backward, but two consecutive calls http://hg.python.org/cpython/rev/fb0f4fe8123e -- ___ Python tracker

[issue5305] imaplib should support international mailbox names

2012-01-23 Thread C Fraire
C Fraire added the comment: I've used the PloneMailList implementation in another project. It works well to add 'imap4-utf-7' as codec. The twisted imap implementation seems to have been updated to properly support non-printable ASCII, but the twisted imap API is problematic for imaplib beca

[issue13844] hg.python.org doesn't escape title attributes in annotate view

2012-01-23 Thread Robert Xiao
New submission from Robert Xiao : On hg.python.org, the "annotate" view doesn't properly escape the title attribute of the elements, resulting in breakage on the left column: http://hg.python.org/cpython/annotate/728cfc671d15/Modules/Setup.config.in -- components: None messages: 15186

[issue13844] hg.python.org doesn't escape title attributes in annotate view

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is more of a Mercurial issue than a Python issue, so I suggest you report it at http://mercurial.selenic.com/bts/ instead. Thanks! -- nosy: +georg.brandl, pitrou resolution: -> invalid status: open -> closed _

[issue13760] ConfigParser exceptions are not pickleable

2012-01-23 Thread Łukasz Langa
Łukasz Langa added the comment: Currently both branches use the same solution to the problem (e.g. setting `args` in `__init__()`). I simply forgot about the old ticket when I prepared a fix for this one. -- ___ Python tracker

[issue13844] hg.python.org doesn't escape title attributes in annotate view

2012-01-23 Thread Georg Brandl
Georg Brandl added the comment: Quickfixed it locally now. Let's hope hg itself fixes it more comprehensively. -- ___ Python tracker ___ ___

[issue13844] hg.python.org doesn't escape title attributes in annotate view

2012-01-23 Thread Robert Xiao
Robert Xiao added the comment: My testing suggests that this issue is already fixed in Mercurial itself, since using "hg serve" on a local copy gives the expected result. Thus, the problem is probably with hg.python.org's local installation. -- ___

[issue13844] hg.python.org doesn't escape title attributes in annotate view

2012-01-23 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-23 Thread STINNER Victor
New submission from STINNER Victor : Python implements time.time() using gettimeofday() which has only a resolution of 1 microsecond because it uses the timeval structure which is only able to store microseconds. Attached patch changes _PyTime_gettimeofday() to make it uses the timespec struc

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-23 Thread STINNER Victor
STINNER Victor added the comment: Oops, my first patch contains an unrelated change for Windows. New patch fixes this bug, and change time_clock() to reuse time_time() if time_clock() fails to get the CPU frequency (unlikely) because it has a better resolution than clock(). -- Added

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-23 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24305/timespec.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13703] Hash collision security issue

2012-01-23 Thread Paul McMillan
Paul McMillan added the comment: > I think you're asking a bit much here :-) A broken app is a broken > app, no matter how nice Python tries to work around it. If an > app puts too much trust into user data, it will be vulnerable > one way or another and regardless of how the user data enters >

[issue13846] Add time.monotonic() function

2012-01-23 Thread STINNER Victor
New submission from STINNER Victor : After time.wallclock() (issue #10278), let add a time.monotomic() function. It is similar to time.wallclock() (try to get the most accurate clock) but is not available if the system doesn't provide a monotonic clock. It may also fail at runtime if Python ca

[issue13703] Hash collision security issue

2012-01-23 Thread Jim Jewett
Jim Jewett added the comment: On Mon, Jan 23, 2012 at 4:39 PM, Marc-Andre Lemburg wrote: > Running (part of (*)) the test suite with debugging enabled on a 64-bit > machine shows that slot collisions are much more frequent than > hash collisions, which only account for less than 0.01% of all >

[issue13703] Hash collision security issue

2012-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: On Mon, Jan 23, 2012 at 1:32 PM, Dave Malcolm wrote: > > Dave Malcolm added the comment: > > I'm attaching an attempt at backporting haypo's random-8.patch to 2.7 > > Changes relative to random-8.patch: > >   * The randomization is off by default, and must b

[issue13847] Catch time(), ftime(), localtime() and clock() errors

2012-01-23 Thread STINNER Victor
New submission from STINNER Victor : Attach patch catchs errors on time(), ftime(), localtime() and clock(). It changes floattime() and _Py_gettimeofday() signature: result now indicates if an error occurred or not, and these function now directly raise an exception. Catching time() error is m

[issue11457] os.stat(): add new fields to get timestamps as Decimal objects with nanosecond resolution

2012-01-23 Thread STINNER Victor
STINNER Victor added the comment: Attached patch prepares time.wallclock() to be able to return the result as an integer (seconds, nanoseconds). -- keywords: +patch Added file: http://bugs.python.org/file24309/time_integer.patch ___ Python tracker

[issue11457] os.stat(): add new fields to get timestamps as Decimal objects with nanosecond resolution

2012-01-23 Thread STINNER Victor
STINNER Victor added the comment: With the new function time.wallclock() and time.clock_gettime() (issue #10278), and maybe time.monotonic() will maybe be also added (issue #13846), I now agree that it is important to support t2-t1 to compute a difference. Using a tuple, it's not easy to comp

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-23 Thread STINNER Victor
STINNER Victor added the comment: See also #11457 for discussion on nanosecond resolution and a potential new type to avoid loose of resolution of the Python float type (IEEE binary64). -- ___ Python tracker

[issue11235] Source files with date modifed in 2106 cause OverflowError

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixing this is much easier than Victor's suggestion, we just have to ignore the higher bits of the timestamp (that is, store it modulo 2**32). This is enough for the purposes of testing the freshness of a pyc file. And by avoiding modifying the pyc format, we

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-23 Thread Antoine Pitrou
New submission from Antoine Pitrou : >>> open("\x00abc") Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: '' Contrast with 2.x open(): >>> open("\x00abc") Traceback (most recent call last): File "", line 1, in TypeError: file()

[issue13849] Add tests for NUL checking in certain strs

2012-01-23 Thread Alex Gaynor
New submission from Alex Gaynor : ATM there's no tests (at least in 2.x, I haven't checked 3.x yet) for this behavior: >>> os.path.exists("/tmp\x00abcds") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.2/genericpath.py", line 18, in exists os.stat(path) T

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-23 Thread Alex Gaynor
Changes by Alex Gaynor : -- nosy: +alex ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue13849] Add tests for NUL checking in certain strs

2012-01-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: Why is that a bug? There is no feature in Python saying that the test suite covers the code fully (by some kind of measurement). New tests should only be added to 3.3, unless they test for a newly-fixed bug (and even then the test may not be backported to th

[issue13849] Add tests for NUL checking in certain strs

2012-01-23 Thread R. David Murray
R. David Murray added the comment: Adding tests helps the other VMs, which generally are trailing behind the CPython releases. -- nosy: +r.david.murray ___ Python tracker ___ _

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-23 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue13846] Add time.monotonic() function

2012-01-23 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue13850] Summary tables for argparse add_argument options

2012-01-23 Thread Nick Coghlan
New submission from Nick Coghlan : With the current argparse docs, it's very hard to get a quick reminder of how to spell the various parameters for add_argument, and just what they do. This issue suggests adding a "Quick Reference" section for add_argument, with the following elements: 1. Su

[issue13850] Summary tables for argparse add_argument options

2012-01-23 Thread Nick Coghlan
Nick Coghlan added the comment: Looking at the docs, a 4th table in the quick reference section would be useful: the parameters for ArgumentParser itself. Note that the ArgumentParser and add_arguments() parameters are already summarised in their respective entries, but there are currently no

[issue8713] multiprocessing needs option to eschew fork() under Linux

2012-01-23 Thread Charles-François Natali
Charles-François Natali added the comment: I don't know what the others think, but I'm still -1 on this patch. Not that I don't like the principle - it's actually the contrary: in a perfect world, I think this should be made the default -and only - behavior on POSIX. But since it may break exist