[issue4966] Improving Lib Doc Sequence Types Section

2012-01-23 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: +1 for splitting. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4966 ___ ___ Python-bugs-list

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

2012-01-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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,

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

2012-01-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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). -- ___

[issue6210] Exception Chaining missing method for suppressing context

2012-01-23 Thread Catalin Iacob
Changes by Catalin Iacob iacobcata...@gmail.com: -- nosy: +catalin.iacob ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6210 ___ ___

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-23 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com 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

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

2012-01-23 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I concur with Benjamin on all counts. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13793 ___

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

2012-01-23 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13797 ___ ___

[issue9625] argparse: Problem with defaults for variable nargs

2012-01-23 Thread Michał M .
Michał M. pyt...@michalski.im 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 rep...@bugs.python.org

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

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue13840] create_string_buffer rejects str init_or_size parameter

2012-01-23 Thread Vincent Pelletier
Vincent Pelletier plr.vinc...@gmail.com 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.

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: Georg, thanks for the tip. Is there any difference in reST between *i*\ th and *i*\th ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13816

[issue13816] Two typos in the docs

2012-01-23 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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. -- ___

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Dave Malcolm wrote: Dave Malcolm dmalc...@redhat.com added the comment: On Fri, 2012-01-06 at 12:52 +, Marc-Andre Lemburg wrote: Marc-Andre Lemburg m...@egenix.com added the comment: Demo patch implementing the collision limit

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com 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 :-)

[issue13703] Hash collision security issue

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue13703] Hash collision security issue

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue13816

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

2012-01-23 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13793 ___

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com 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

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Changes by Boštjan Mejak bostjan.me...@gmail.com: Removed file: http://bugs.python.org/file24296/done deal.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13816 ___

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

2012-01-23 Thread sbt
sbt shibt...@gmail.com 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

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Changes by Boštjan Mejak bostjan.me...@gmail.com: Removed file: http://bugs.python.org/file24293/fixed patch final.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13816 ___

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

2012-01-23 Thread sbt
sbt shibt...@gmail.com 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

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com 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 rep...@bugs.python.org

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com 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

[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 e...@trueblade.com: -- resolution: - duplicate status: open - closed superseder: - Add alternate float formatting styles to new-style formatting. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13838

[issue13816] Two typos in the docs

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com 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 stefan-use...@bytereef.org: -- nosy: -skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13816 ___ ___ Python-bugs-list

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

2012-01-23 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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

[issue13760] ConfigParser exceptions are not pickleable

2012-01-23 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl 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

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com 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

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com 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

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

2012-01-23 Thread Brian Curtin
Brian Curtin br...@python.org 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. --

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

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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:

[issue13190] ConfigParser uses wrong newline on Windows

2012-01-23 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl 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

[issue13816] Two typos in the docs

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

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

2012-01-23 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: -santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713 ___ ___

[issue13829] exception error in _scproxy.so

2012-01-23 Thread Ned Deily
Ned Deily n...@acm.org 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

[issue13760] ConfigParser exceptions are not pickleable

2012-01-23 Thread Faheem Mitha
Faheem Mitha fah...@faheem.info 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

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

2012-01-23 Thread Jon Brandvein
Jon Brandvein jon.brandv...@gmail.com 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

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

2012-01-23 Thread Jesse Noller
Jesse Noller jnol...@gmail.com 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 rep...@bugs.python.org

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

2012-01-23 Thread Jon Brandvein
New submission from Jon Brandvein jon.brandv...@gmail.com: 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

[issue13816] Two typos in the docs

2012-01-23 Thread Georg Brandl
Georg Brandl ge...@python.org 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

[issue13816] Two typos in the docs

2012-01-23 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-23 Thread James Sanders
New submission from James Sanders bistromath...@gmail.com: 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 msg108957, where it is stated that these values (along with

[issue10580] Installer sentence in bold

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: Is this fixed or what? -- nosy: +jwehnes type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10580 ___

[issue10580] Installer sentence in bold

2012-01-23 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: No. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10580 ___ ___ Python-bugs-list mailing list

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

2012-01-23 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list

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

2012-01-23 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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 pit...@free.fr 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 rep...@bugs.python.org http://bugs.python.org/issue13842

[issue13816] Two typos in the docs

2012-01-23 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13816 ___

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-23 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com 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 rep...@bugs.python.org

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

2012-01-23 Thread sbt
sbt shibt...@gmail.com 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

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

2012-01-23 Thread sbt
sbt shibt...@gmail.com 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 rep...@bugs.python.org

[issue13703] Hash collision security issue

2012-01-23 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com 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

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

2012-01-23 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: 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

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

2012-01-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The issue doesn't occur on Python 2.7. -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13843 ___

[issue13703] Hash collision security issue

2012-01-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com 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

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2012-01-23 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de 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

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

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The buildbot is Martin's. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13843 ___

[issue10580] Installer sentence in bold

2012-01-23 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: Yes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10580 ___ ___ Python-bugs-list mailing list

[issue10580] Installer sentence in bold

2012-01-23 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: Can you please fix this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10580 ___ ___

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

2012-01-23 Thread Martin Pengelly-Phillips
Martin Pengelly-Phillips d...@thesociable.net 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'])

[issue10278] add time.wallclock() method

2012-01-23 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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 --

[issue5305] imaplib should support international mailbox names

2012-01-23 Thread C Fraire
C Fraire cfra...@yahoo.com 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

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

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

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

2012-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 luk...@langa.pl 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 ge...@python.org added the comment: Quickfixed it locally now. Let's hope hg itself fixes it more comprehensively. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13844 ___

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

2012-01-23 Thread Robert Xiao
Robert Xiao nneon...@gmail.com 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 ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13844 ___

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

2012-01-23 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: 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

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

2012-01-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2012-01-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file24305/timespec.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13845 ___

[issue13703] Hash collision security issue

2012-01-23 Thread Paul McMillan
Paul McMillan p...@mcmillan.ws 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

[issue13846] Add time.monotonic() function

2012-01-23 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: 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

[issue13703] Hash collision security issue

2012-01-23 Thread Jim Jewett
Jim Jewett jimjjew...@gmail.com added the comment: On Mon, Jan 23, 2012 at 4:39 PM, Marc-Andre Lemburg rep...@bugs.python.org 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

[issue13703] Hash collision security issue

2012-01-23 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: On Mon, Jan 23, 2012 at 1:32 PM, Dave Malcolm rep...@bugs.python.org wrote: Dave Malcolm dmalc...@redhat.com added the comment: I'm attaching an attempt at backporting haypo's random-8.patch to 2.7 Changes relative to random-8.patch:  

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

2012-01-23 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: 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

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

2012-01-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2012-01-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2012-01-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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 pit...@free.fr 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

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

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

[issue13849] Add tests for NUL checking in certain strs

2012-01-23 Thread Alex Gaynor
New submission from Alex Gaynor alex.gay...@gmail.com: 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 stdin, line 1, in module File /usr/lib/python3.2/genericpath.py, line 18, in

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

2012-01-23 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13848 ___ ___ Python-bugs-list mailing

[issue13849] Add tests for NUL checking in certain strs

2012-01-23 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de 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

[issue13849] Add tests for NUL checking in certain strs

2012-01-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Adding tests helps the other VMs, which generally are trailing behind the CPython releases. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13849

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

2012-01-23 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13845 ___ ___

[issue13846] Add time.monotonic() function

2012-01-23 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13846 ___ ___

[issue13850] Summary tables for argparse add_argument options

2012-01-23 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: 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

[issue13850] Summary tables for argparse add_argument options

2012-01-23 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com 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

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

2012-01-23 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr 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