[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Before starting to code, it is necessary to solve the problem of interface. With the majority of the functions all is good, but the `link` and `rename` have two `dirfd` parameters (even with different names). So I suggest two more alternatives. One is the

[issue14618] remove modules_reloading from the interpreter state

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

[issue2377] Replace __import__ w/ importlib.__import__

2012-04-19 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue14381] Intern certain integral floats for memory savings and performance

2012-04-19 Thread Mark Dickinson
Mark Dickinson added the comment: > Because "pfval" in this example doesn't exist but is merely a temporary, > > there is no aliasing. Maybe aliasing wasn't the right word to use, then. The exact rule being violated is C99 6.5, para. 7 (or C11 6.5 para. 7 if you prefer): """ An object shall

[issue14617] confusing docs with regard to __hash__

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

[issue14428] Implementation of the PEP 418

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

[issue14614] PyTuple_SET_ITEM could check bounds in debug mode

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

[issue14579] Vulnerability in the utf-16 decoder after error handling

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

[issue14625] Faster utf-32 decoder

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

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you, Larry. I was going to do it, but got stuck with other things. The main objective of this proposal is to get rid of litter os module by dozen rarely popular and non-portable functions (introduced by issue4761). Moreover, the descriptions are given

[issue14624] Faster utf-16 decoder

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

[issue13994] incomplete revert in 2.7 Distutils left two copies of customize_compiler

2012-04-19 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue13994] incomplete revert in 2.7 Distutils left two copies of customize_compiler

2012-04-19 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever status: pending -> open ___ Python tracker ___ ___ Python-bugs-lis

[issue14629] discrepency between tokenize.detect_encoding() and PyTokenizer_FindEncodingFilename()

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

[issue14628] Clarify import statement documentation regarding what gets bound

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

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-19 Thread Joe Peterson
Joe Peterson added the comment: OK, fixed patch to apply cleanly to current code. BTW, this is only for python3. Is it still appropriate to patch python2? And if so, what is the correct code repo to check out for that? -- versions: +Python 3.4 Added file: http://bugs.python.org/fil

[issue14629] discrepency between tokenize.detect_encoding() and PyTokenizer_FindEncodingFilename()

2012-04-19 Thread Eric Snow
Changes by Eric Snow : Added file: http://bugs.python.org/file25284/setup.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue14629] discrepency between tokenize.detect_encoding() and PyTokenizer_FindEncodingFilename()

2012-04-19 Thread Eric Snow
New submission from Eric Snow : (see http://mail.python.org/pipermail/python-dev/2012-April/118889.html) The behavior of tokenize.detect_encoding() and PyTokenizer_FindEncodingFilename() is unexpectedly different and this has bearing on the current work on imports. When a file has no encoding

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-04-19 Thread Larry Hastings
Larry Hastings added the comment: r.david.murray said: > No, Guido's boolean keyword dislike is not about things > being unclear at the call site. I wasn't referring to Guido specifically, just general code smell complaints about boolean parameters. > That is (I believe) he prefers lstat/stat

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-04-19 Thread R. David Murray
R. David Murray added the comment: No, Guido's boolean keyword dislike is not about things being unclear at the call site. It's about boolean parameters instead of separate functions. That is (I believe) he prefers lstat/stat to having stat take a boolean keyword, keyword-only or not. Did

[issue14627] Fatal Python Error when Python startup is interrupted by CTRL+c

2012-04-19 Thread R. David Murray
R. David Murray added the comment: I think Victor's point was that you get the "can't initialize standard streams" in addition to the KeyboardInterrupt (but I'm just guessing). (See issue 14228 for examples of what normally happens on a startup KeyboardInterrupt.) -- nosy: +r.david.m

[issue14628] Clarify import statement documentation regarding what gets bound

2012-04-19 Thread Eric Snow
New submission from Eric Snow : (see #14609 and #14582) http://docs.python.org/dev/reference/simple_stmts.html#the-import-statement The specification for the import statement says the following: "The first form of import statement binds the module name in the local namespace to the module obj

[issue14588] PEP 3115 compliant dynamic class creation

2012-04-19 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue14588] PEP 3115 compliant dynamic class creation

2012-04-19 Thread Nick Coghlan
Nick Coghlan added the comment: It occurs to me that, for naming consistency, the callback arg should be documented as "exec_body" rather than "eval_body". I'll try to get to a proper patch review this weekend. -- ___ Python tracker

[issue14627] Fatal Python Error when Python startup is interrupted by CTRL+c

2012-04-19 Thread Brett Cannon
Brett Cannon added the comment: OK, so what's your point? =) I mean you stopped the interpreter while in the middle of starting up. Do you want to trigger a fatal error if the exception raised was KeyboardInterrupt? -- ___ Python tracker

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

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

[issue14627] Fatal Python Error when Python startup is interrupted by CTRL+c

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

[issue14621] Hash function is not randomized properly

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

[issue14621] Hash function is not randomized properly

2012-04-19 Thread STINNER Victor
STINNER Victor added the comment: hash.py: Python implementation of the 32-bit version of hash(bytes). Ok, I now see that only the lower 8 bits are really mixed with the input string. -- Added file: http://bugs.python.org/file25282/hash.py ___ Pytho

[issue8885] markupbase declaration errors aren't recoverable

2012-04-19 Thread Ezio Melotti
Ezio Melotti added the comment: s/non-strict/strict/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-04-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think it most (all?) of these cases, it's better to mirror the os level APIs, since many people already know them. Such fanciness is better left to high level wrappers (like path objects). -- nosy: +benjamin.peterson

[issue755660] allow HTMLParser to continue after a parse error

2012-04-19 Thread Ezio Melotti
Ezio Melotti added the comment: HTMLParser should now be able to parse invalid HTML too, so this patch is not necessary anymore. -- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed versions: +Pyt

[issue8885] markupbase declaration errors aren't recoverable

2012-04-19 Thread Ezio Melotti
Ezio Melotti added the comment: HTMLParser shouldn't raise errors anymore, so the "error" method (and probably the HTMLParseError exception too) should be deprecated along with the non-strict mode on 3.3. -- assignee: -> ezio.melotti nosy: +ezio.melotti type: behavior -> enhancement

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Vlado Boza
Vlado Boza added the comment: >I tried this script on Linux 32 bits and Linux 64 bits: I didn't see any >>collision. What is your operating system and the version of your >operating >system please? uname -a Linux 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64 x86_64 x86_6

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Michal Petrucha
Michal Petrucha added the comment: @dmalcolm: As for the gdb example, you need to add --eval-command="set _Py_HashSecret_Initialized=1", otherwise _Py_HashSecret will get overwritten immediately after it is set by gdb, either to 0 if run without the -R switch, or to a random value. With the

[issue14621] Hash function is not randomized properly

2012-04-19 Thread STINNER Victor
STINNER Victor added the comment: > For example take this script (on 32bit): (...) > It gives collison too many times (around 9 out of 2500). I tried this script on Linux 32 bits and Linux 64 bits: I didn't see any collision. What is your operating system and the version of your operating sys

[issue14627] Fatal Python Error when Python startup is interrupted by CTRL+c

2012-04-19 Thread STINNER Victor
New submission from STINNER Victor : If you press CTRL+c while Python is starting, you may get such error: ^CFatal Python error: Py_Initialize: can't initialize sys standard streams Traceback (most recent call last): File "", line 990, in _find_and_load File "", line 571, in load_module Fi

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Dave Malcolm
Dave Malcolm added the comment: $ gdb --eval-command="break _PyRandom_Init" --eval-command="run" --eval-command="print _Py_HashSecret" --eval-command="set _Py_HashSecret.prefix=0xcdcdcd00" --eval-command="print _Py_HashSecret" --eval-command="continue" -eval-command="continue" --args python -

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Vlado Boza
Vlado Boza added the comment: For example take this script (on 32bit): ha = hash("\x00\xcf\x0b\x96\x19") hb = hash("\x00\x6d\x29\x45\x18") if ha == hb: print "collision" And run following: for i in `seq 0 25`; do echo $i; for j in `seq 0 100`; do ./python -R x.py; done; done; It gives colli

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-04-19 Thread Larry Hastings
Larry Hastings added the comment: storchaka: sorry for the long delay, somehow I missed your reply in python-ideas.) You said you envision this as a big patch. Could I convince you to try and make a series of smaller patches? It should be easy to break up into small pieces--do one patch ad

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-04-19 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: +storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Vlado Boza
Vlado Boza added the comment: My bad (I checked only function in C++, not result in python). This should work on 32bit: Prefix: anything ending on 0x00 Suffix: anything Strings: "\x00\xcf\x0b\x96\x19", "\x00\x6d\x29\x45\x18" -- ___ Python tracker

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-04-19 Thread Larry Hastings
New submission from Larry Hastings : There are some functions in the os module that do much the same thing but differ only in minor ways, like * whether or not they follow symbolic links (stat vs lstat) * taking an extra "dir_fd" parameter (chmod vs fchmodat(3.3)) It would be better if we cons

[issue14386] Expose dict_proxy internal type as types.MappingProxyType

2012-04-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 34af3e74292d by Victor Stinner in branch 'default': Close #14386: Register types.MappingProxyType as a Mapping http://hg.python.org/cpython/rev/34af3e74292d -- resolution: -> fixed stage: -> committed/rejected status: open -> closed

[issue14613] time.time can return NaN

2012-04-19 Thread STINNER Victor
STINNER Victor added the comment: > So NaN is a possible result from time.time()? Oops. I don't know if it is possible. I just know that it cannot return None :-) _PyTime_gettimeofday() fills a structure having two integer fields (tv_sec, tv_usec), and floattime() uses these fields to compute

[issue13994] incomplete revert in 2.7 Distutils left two copies of customize_compiler

2012-04-19 Thread Ned Deily
Ned Deily added the comment: And to recap the history here, there was a change in direction for Distutils during the 2.7 development cycle, as decided at the 2010 language summit, in particular to revert feature changes in Distutils for 2.7 to its 2.6.x state and, going forward, "Distutils in

[issue14621] Hash function is not randomized properly

2012-04-19 Thread STINNER Victor
STINNER Victor added the comment: I don't understand this issue: can you write a short script to test a collision? "E.g this strings collide for every prefix ending on 0xcd" Do you mean that prefix & 0xff == 0xcd? "0x27fd5a18, 0x26fe78fa" Is it a byte string or an Unicode string? b'\x27\xf

[issue14624] Faster utf-16 decoder

2012-04-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: Serhiy: can you please submit a contributor form? -- nosy: +loewis ___ Python tracker ___ ___ Pyth

[issue14127] add st_*time_ns fields to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds

2012-04-19 Thread Larry Hastings
Larry Hastings added the comment: Sorry about the delay; laptop died, finally dealt with reviving the data off it. Also: fixed spelling error in title. -- title: add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds -> add

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +PaulMcMillan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue13994] incomplete revert in 2.7 Distutils left two copies of customize_compiler

2012-04-19 Thread Ned Deily
Ned Deily added the comment: That's unfortunate. But the documented location for customize_compiler is and, AFAIK, had always been in distutils.sysconfig. It was an inadvertent consequence of the bad revert during the 2.7 development cycle that a second copy was made available in distutils.

[issue13994] incomplete revert in 2.7 Distutils left two copies of customize_compiler

2012-04-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Éric Araujo wrote: > > Sorry for not thinking about this. I’ll be more careful. No need to be sorry; these things can happen. What I don't understand is this line in the news section: "Complete the revert back to only having one in distutils.sysconfig a

[issue13994] incomplete revert in 2.7 Distutils left two copies of customize_compiler

2012-04-19 Thread Éric Araujo
Éric Araujo added the comment: Sorry for not thinking about this. I’ll be more careful. -- stage: committed/rejected -> ___ Python tracker ___

[issue13994] incomplete revert in 2.7 Distutils left two copies of customize_compiler

2012-04-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Here's the quote from mxSetup.py: # distutils changed a lot in Python 2.7 due to many # distutils.sysconfig APIs having been moved to the new # (top-level) sysconfig module. from sysconfig import \ get_config_h_filename, parse_confi

[issue13994] incomplete revert in 2.7 Distutils left two copies of customize_compiler

2012-04-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The patch broke egenix-mx-base, since it relies on the customize_compiler() being available in distutils.ccompiler: https://www.egenix.com/mailman-archives/egenix-users/2012-April/114838.html If you make such changes to dot releases, please make absolutel

[issue14127] add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds

2012-04-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset f554043badec by Larry Hastings in branch 'default': Issue #14127: Add st_{cma}time_ns fields to os.stat() result object. http://hg.python.org/cpython/rev/f554043badec -- ___ Python tracker

[issue14308] '_DummyThread' object has no attribute '_Thread__block'

2012-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Wouldn't a _DummyThread._Thread__stop() method override Thread.__stop()? Probably, but that would be quite ugly IMHO. I've now committed the patch as-is in 2.7. In 3.2 it turned out easier: __stop is now spelt _stop, so can be overriden without any hacks. -

[issue14308] '_DummyThread' object has no attribute '_Thread__block'

2012-04-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I don't think _DummyThread can override __stop(), because of the name > mangling of __private methods. However, the hasattr() approach would > probably work. Wouldn't a _DummyThread._Thread__stop() method override Thread.__stop()? Like >>> class A(object):

[issue14308] '_DummyThread' object has no attribute '_Thread__block'

2012-04-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset ab9d6c4907e7 by Antoine Pitrou in branch '2.7': Issue #14308: Fix an exception when a "dummy" thread is in the threading module's active list after a fork(). http://hg.python.org/cpython/rev/ab9d6c4907e7 New changeset 41c64c700e1e by Antoine Pitro

[issue14308] '_DummyThread' object has no attribute '_Thread__block'

2012-04-19 Thread Charles-François Natali
Charles-François Natali added the comment: > New patch with the hasattr() approach. LGTM. -- ___ Python tracker ___ ___ Python-bugs-

[issue14579] Vulnerability in the utf-16 decoder after error handling

2012-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The proposed patch will fix only the first of these bugs. The patch in issue #14624 fixes all bugs for Python 3.3. For Python 3.2 soon I will make a patch. -- ___ Python tracker

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Dave Malcolm
Dave Malcolm added the comment: Thanks for filing this bug report. I'm not seeing the equal hashes you describe. I'm using this recipe to hardcode a specific prefix and print the hashes using it: $ gdb --eval-command="break _PyRandom_Init" --eval-command="run" --eval-command="print _Py_HashS

[issue14579] Vulnerability in the utf-16 decoder after error handling

2012-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is the bugs in the utf-16 decoder: 1. `aligned_end` is not updated after calling error handler. 2. Possible silent reading of one byte over the bytes array limit when decoding of a surrogate pair. b'\xD8\x00\xDC'.decode('utf-16be') 3. Error handlers r

[issue14613] time.time can return NaN

2012-04-19 Thread STINNER Victor
Changes by STINNER Victor : -- title: time.time can return None or NaN -> time.time can return NaN ___ Python tracker ___ ___ Python-b

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue14308] '_DummyThread' object has no attribute '_Thread__block'

2012-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch with the hasattr() approach. -- Added file: http://bugs.python.org/file25280/dummythreadafterfork2.patch ___ Python tracker ___ _

[issue14308] '_DummyThread' object has no attribute '_Thread__block'

2012-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le jeudi 19 avril 2012 à 21:11 +, Charles-François Natali a écrit : > IMO it should be _DummyThread's stop() method that does the right > thing, either by overriding Thread's stop() method in _DummyThread or > by puting the check inside Thread.stop(), like w

[issue14623] Shutdown exception in daemon thread

2012-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Would it be correct to terminate daemon threads prior to wiping the > globals, since the threads won't be able to accomplish much anyway? Daemon threads are not actually "terminated" by the Python interpreter, they just keep running in the background until t

[issue14308] '_DummyThread' object has no attribute '_Thread__block'

2012-04-19 Thread Charles-François Natali
Charles-François Natali added the comment: > Here is a complete patch + tests for 2.7. I like the test. However there's something I find strange with the patch: """ diff --git a/Lib/threading.py b/Lib/threading.py --- a/Lib/threading.py +++ b/Lib/threading.py @@ -887,7 +887,7 @@ def _after_for

[issue14624] Faster utf-16 decoder

2012-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue #14579 for utf-16 decoder bugs. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Michal Petrucha
Changes by Michal Petrucha : -- nosy: +konk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue14381] Intern certain integral floats for memory savings and performance

2012-04-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: return *(PY_LONG_LONG*)&fval == 0; There is no aliasing, because there are no pointer variables in existence. If we did this: double *pfval = &fval; PY_LONG_LONG *pl = (PY_LONG_LONG*)pfval return *pfval == 0 Then we would have aliasing. Because "pfval

[issue14624] Faster utf-16 decoder

2012-04-19 Thread STINNER Victor
STINNER Victor added the comment: See also #14625 for UTF-32 decoder. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue14625] Faster utf-32 decoder

2012-04-19 Thread STINNER Victor
STINNER Victor added the comment: See also #14624 for UTF-16 decoder. -- nosy: +haypo, pitrou ___ Python tracker ___ ___ Python-bugs-

[issue14624] Faster utf-16 decoder

2012-04-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue14624] Faster utf-16 decoder

2012-04-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14625] Faster utf-32 decoder

2012-04-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file25279/decode_utf32_b.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue14625] Faster utf-32 decoder

2012-04-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : I suggest two variants of patch, accelerating the utf-32 decoder. With PEP 393 utf-32 decoder slowed down up to 2x, these patches returns a performance at the level of Python 3.2 and even much higher (2-3x over 3.2). The variant A is simpler, but the vari

[issue14624] Faster utf-16 decoder

2012-04-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : I propose a patch, which accelerates the utf-16 decoder. With PEP 393 utf-16 decoder slowed down a few times (3-4x), this patch returns the performance at the level of Python 3.2 and even higher (+10-30% over 3.2). In addition, it fixes a few bugs in the

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-19 Thread Jon Oberheide
Jon Oberheide added the comment: I have used the name "secure_compare" in the past for such a function. That said, I don't have strong feelings either way about the naming, so I'll yield to the others. -- ___ Python tracker

[issue14623] Shutdown exception in daemon thread

2012-04-19 Thread Mike Hobbs
New submission from Mike Hobbs : This issue is very similar to the issue original reported in issue1722344, except that it occurs in daemon threads. Here's a sample exception: Exception in thread Thread-1 (most likely raised during interpreter shutdown): Traceback (most recent call last): Fil

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-19 Thread Charles-François Natali
Charles-François Natali added the comment: > v3 patch, based on feedback from the review here: > http://bugs.python.org/review/14532/show Looks good to me. One last thing (sorry for not bringing this up earlier): I don't like bikeshedding, but at least to me, `time_independent_equals` is a bit

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +dmalcolm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Vlado Boza
Vlado Boza added the comment: E.g this strings collide for every prefix ending on 0xcd: 0x27fd5a18, 0x26fe78fa -- ___ Python tracker ___

[issue14579] Possible vulnerability in the utf-16 decoder after error handling

2012-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is the crasher and leaker. When Python is not crashing, there is garbage (i.e. leakage of data) at the end of the decoded string. Indeed, I see an English text in some versions of Python. There are many other errors in utf-16 decoder (see, for example

[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Perhaps because your system's memory allocator is extremely good (or buf is > always very small), but b''.join() is far more robust. > Another alternative is accumulating in a bytearray, since it uses > overallocation for linear time appending. I thought,

[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > What's the status of your contrib form? Oops. I put this off for a detailed study and forgotten. I will send the form, as only get to the printer and the scanner. -- ___ Python tracker

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-04-19 Thread Yuval Greenfield
Yuval Greenfield added the comment: I agree with Antoine on this. Though the suggested patch is wrong. I believe we should leave address_string alone. Simply stop the log_message method from using it. Either way we'd be changing the log format but if we don't have to then we shouldn't comple

[issue14622] Python http.server is dead slow using gethostbyaddr/getfqdn for each request

2012-04-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Probably a duplicate of issue 6085. -- nosy: +pitrou resolution: -> duplicate status: open -> closed superseder: -> Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag ___ Python tracker

[issue14622] Python http.server is dead slow using gethostbyaddr/getfqdn for each request

2012-04-19 Thread Yuval Greenfield
Changes by Yuval Greenfield : -- type: -> performance ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue14622] Python http.server is dead slow using gethostbyaddr/getfqdn for each request

2012-04-19 Thread Yuval Greenfield
New submission from Yuval Greenfield : This is the line in question: http://hg.python.org/cpython/file/293180d199f2/Lib/http/server.py#l527 I was trying to test out a few html files using "python -m http.server" and it took 4 seconds for each request, it was completely unusable. I had to do hu

[issue14621] Hash function is not randomized properly

2012-04-19 Thread Vlado Boza
New submission from Vlado Boza : Fix of this http://bugs.python.org/issue13703 is broken. tl;dr: There only 256 different hash functions (compare it to size of _Py_HashSecret prefix and suffix). And whether keys collide or not depends only on the last 8 bits of prefix. Problem with current r

[issue10769] ast: provide more useful range information

2012-04-19 Thread Michael
Michael added the comment: Hi, Attached is the updated patch by Sven Brauch from the original mailing list thread bringing column offset reporting for attributes in line with everything else. The offsets for bar before the patch: foo[bar] = 4 foo(bar) = 4 foo.bar = 0 After: foo[bar] = 4 fo

[issue14588] PEP 3115 compliant dynamic class creation

2012-04-19 Thread Daniel Urban
Daniel Urban added the comment: Fair enough. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue13684] httplib tunnel infinite loop

2012-04-19 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Joe, Your changes to the test suit don't apply cleanly anymore. I can probably fix the conflicts, but if you could post an updated patch it will help. Thanks. -- nosy: -Alexander.Belopolsky ___ Python trac

[issue12947] Examples in library/doctest.html lack the flags

2012-04-19 Thread Stefano Taschini
Stefano Taschini added the comment: As far as I can see, Sphinx has a global setting for trim_doctest_flags but lacks the possibility of locally disabling the trimming. A quick workaround would be to have the following sphinx extension added: class ProxyLexer(object): def __init__(self,

[issue14614] PyTuple_SET_ITEM could check bounds in debug mode

2012-04-19 Thread Brett Cannon
Brett Cannon added the comment: Should we limit ourselves to bound errors? Couldn't we make the macros aliases for their full-fledged function equivalents (e.g. PyTuple_SetItem()) which trigger Py_FatalError() on error so we also get argument type checking? -- nosy: +brett.cannon ___

[issue14098] provide public C-API for reading/setting sys.exc_info()

2012-04-19 Thread Ronald Oussoren
Ronald Oussoren added the comment: The documentation does not explain how this new API is different from PyErr_Fetch/PyErr_Restore. In particular the documentation doesn't mention that PyErr_Fetch and PyErr_GetExcInfo access different bits of the error state (curexc_* vs. exc_* in the thread

[issue8536] Support new features of ZLIB 1.2.6

2012-04-19 Thread Jason Killen
Jason Killen added the comment: Given I'm new I wouldn't say I "evaluated" the usefulness of the new functions but I have given them a look and didn't see anything obvious. If thats good enough great, if not then hopefully someone with a little more experience will take a look. --

  1   2   >