[issue22178] _winreg.QueryInfoKey Last Modified Time Value Incorrect or Explanation Incorrect

2014-08-10 Thread sw
New submission from sw: The explanation of the 3rd index of the tuple returned from _winreg.QueryInfoKey(key) explains that it is a long representing 100s of nanoseconds since 1/1/1600. However, when I use this value and convert to the actual date using startDate = datetime(1600,1,1)

[issue19217] Calling assertEquals for moderately long list takes too long

2014-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is alternative patch. It outputs line diff even for large sequences/dicts/strings. With the attached patch, unittest_scse.py works fine, producing this output: FF == FAIL: test_compare

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-10 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: test_excinfo_no_python_sourcecode of py now passes. -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21591

[issue22174] property doc fixes

2014-08-10 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- Removed message: http://bugs.python.org/msg225123 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22174 ___

[issue18844] allow weights in random.choice

2014-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch. Synchronized with tip and added optimizations. -- Added file: http://bugs.python.org/file36331/weighted_choice_generator_2.patch ___ Python tracker rep...@bugs.python.org

[issue22176] update internal libffi copy to 3.1, introducing AArch64 and POWER ELF ABIv2

2014-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4331fa01398e by doko in branch '2.7': - Issue #22176: Update the ctypes module's libffi to v3.1. This release http://hg.python.org/cpython/rev/4331fa01398e -- ___ Python tracker rep...@bugs.python.org

[issue19217] Calling assertEquals for moderately long list takes too long

2014-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks for your comments Ezio. Yes, this patch is rather only a demo. Sorry, but I'm not very interesting in completing this patch (at least not right now). I only want to see more detailed error reports. There are some ideas about improving diffs

[issue22174] property doc fixes

2014-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Most of the patch looks to be an improvement. I've massaged it a little and attached a revised patch. -- Added file: http://bugs.python.org/file36332/property2.diff ___ Python tracker rep...@bugs.python.org

[issue19217] Calling assertEquals for moderately long list takes too long

2014-08-10 Thread Ezio Melotti
Ezio Melotti added the comment: I thought some more about this, and I think we can do better. Since _diffThreshold only affects strings, the goal of this issue is to extend the check to other types. Instead of doing this by adding more attributes and behaviors, I would like to keep things

[issue18844] allow weights in random.choice

2014-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm adverse to adding the generator magic and the level of complexity in this patch. Please aim for the approach I outlined above (one function to build cumulative weights and another function to choose the value). Since this isn't a new problem, please

[issue19217] Calling assertEquals for moderately long list takes too long

2014-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1) try to have a single threshold for all types, and use line-based counting for strings (so if the threshold is 32, this means 32 elements in a list, 32 items in a dict, 32 lines in a string); You forgot about strings with few but very long lines. We

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-10 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: Thanks, Benjamin, for reverting the run-time bits. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21591 ___

[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-08-10 Thread Chris Rebert
Chris Rebert added the comment: So, when might I expect to see this patch merged, since it's now been approved? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21514 ___

[issue18844] allow weights in random.choice

2014-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Other languages have no such handly feature as generators. NumPy provides the size parameter to all functions and generates a bunch of random numbers at time. This doesn't look pythonic (Python stdlib prefers iterators). I believe a generator is most

[issue22179] Focus stays on Search Dialog when text found in editor

2014-08-10 Thread Mark Lawrence
New submission from Mark Lawrence: As the title. Even using the Find Next button doesn't get the focus on the found text so you can't see it, the Search Dialog has to be closed. Windows 8.1 Python 3.4.1. -- components: IDLE messages: 225138 nosy: BreamoreBoy, terry.reedy priority:

[issue18004] test_list.test_overflow crashes Win64

2014-08-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18004 ___

[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions

2014-08-10 Thread Nick Coghlan
Nick Coghlan added the comment: Given that our test suite missed the regression originally, it would be nice to have a test case that directly built an AST that relies on the runtime check. -- ___ Python tracker rep...@bugs.python.org

[issue18844] allow weights in random.choice

2014-08-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Serhiy. There is nothing magic about generators in Python. Also, the concept of an infinite stream of random numbers (or random whatevers) is perfectly common (/dev/urandom being an obvious example); it is not a notion we are inventing. By

[issue22180] operator.setitem example no longer works in Python 3 due to lazy map

2014-08-10 Thread Michael Williamson
New submission from Michael Williamson: The Python docs for the operator module include an example using map and setitem to Build a dictionary that maps the ordinals from 0 to 255 to their character equivalents.: d = {} keys = range(256) vals = map(chr, keys)

[issue22180] operator.setitem example no longer works in Python 3 due to lazy map

2014-08-10 Thread R. David Murray
R. David Murray added the comment: Heh. There was a discussion in issue 22106 about valid examples for using 'pass'. This case is analogous to the one I came up with. for x in map(...): pass that avoids building a list. Not that any of it is idiomatic, as you say. -- nosy:

[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2014-08-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix stage: - patch review versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11271 ___

[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2014-08-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the update! This looks basically good, I'll wait a bit to see if other people have comments, otherwise I'll commit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11271

[issue22118] urljoin fails with messy relative URLs

2014-08-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Demian, thanks for the update! I'm not sure the rfc1808 flag is necessary. I would be fine with switching wholesale to the new semantics. Nick, since you've done work in the past on URIs, what do you think? -- ___

[issue22171] stack smash when using ctypes/libffi to access union

2014-08-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +doko ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22171 ___ ___ Python-bugs-list mailing list

[issue22176] update internal libffi copy to 3.1, introducing AArch64 and POWER ELF ABIv2

2014-08-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22176 ___ ___ Python-bugs-list

[issue22180] operator.setitem example no longer works in Python 3 due to lazy map

2014-08-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: The whole example is bad and should be removed or replace with something else: 1. Using map() is an anti-pattern here, since the function results are not used. 2. To build a dictionary that maps the ordinals from 0 to 255 to their character equivalents,

[issue22180] operator.setitem example no longer works in Python 3 due to lazy map

2014-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: The whole example is bad and should be removed or replace with something else: I'm not sure there are ANY examples of operator.setitem that couldn't be done a better way without it. How about we remove it and leave the examples for things that people

[issue22180] operator.setitem example no longer works in Python 3 due to lazy map

2014-08-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 10/08/2014 13:20, Raymond Hettinger a écrit : Raymond Hettinger added the comment: The whole example is bad and should be removed or replace with something else: I'm not sure there are ANY examples of operator.setitem that couldn't be done a better

[issue18844] allow weights in random.choice

2014-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: When I get a chance, I'll work up an approach that is consistent with the rest of the module in terms of implementation, restartability, and API. -- ___ Python tracker rep...@bugs.python.org

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2014-08-10 Thread Dan O'Reilly
Changes by Dan O'Reilly oreil...@gmail.com: -- title: concurrent.futures.ThreadPoolExecutor should accept an initializer argument - concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument ___ Python tracker

[issue22180] operator.setitem example no longer works in Python 3 due to lazy map

2014-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9c250f34bfa3 by Raymond Hettinger in branch '3.4': Issue #22180: Remove weak example http://hg.python.org/cpython/rev/9c250f34bfa3 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue22180] operator.setitem example no longer works in Python 3 due to lazy map

2014-08-10 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22180 ___

[issue22174] property doc fixes

2014-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset ebd6f7f7859f by Raymond Hettinger in branch '3.4': Issue #22174: Clean-up grammar and ambiguities in property() docs. http://hg.python.org/cpython/rev/ebd6f7f7859f -- nosy: +python-dev ___ Python

[issue22174] property doc fixes

2014-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 98a2e215ff01 by Raymond Hettinger in branch '2.7': Issue #22174: Clean-up grammar and ambiguities in property() docs. http://hg.python.org/cpython/rev/98a2e215ff01 -- ___ Python tracker

[issue22174] property doc fixes

2014-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Diana, thank you for the patch. Sorry for the bogus comment on whitespace. I was looking the the docstring at the same time as reviewing the patch. David, thanks for looking at it as well. -- resolution: - fixed stage: - resolved status: open -

[issue22175] improve test_faulthandler readability with dedent

2014-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 51472399ca09 by Victor Stinner in branch '3.4': Close #22175: Improve test_faulthandler readability with dedent. http://hg.python.org/cpython/rev/51472399ca09 New changeset 2929cc408fbb by Victor Stinner in branch 'default': (Merge 3.4) Close

[issue22175] improve test_faulthandler readability with dedent

2014-08-10 Thread STINNER Victor
STINNER Victor added the comment: I adapted the patch for Python 3.4 and applied to Python 3.4 and 3.5. Thanks for the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22175 ___

[issue21448] Email Parser use 100% CPU

2014-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which combines fixed Raymond's patch and FeedParser tests. These tests cover this issue, a bug in my patch, and (surprisingly) a bug in Raymond's patch. I didn't include Raymond's test because looks as it doesn't catch any bug. If there are

[issue22118] urljoin fails with messy relative URLs

2014-08-10 Thread Demian Brecht
Demian Brecht added the comment: FWIW, I think that it would be ever so slightly preferable to maintain support for the old behaviour but perhaps add a deprecation note in the docs. It's a little difficult to tell how much of an impact this change will have to existing code. Maintaining

[issue6858] This is a python file, apply syntax highlighting

2014-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll try this out in the next couple of weeks in a classroom setting. -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6858

[issue21448] Email Parser use 100% CPU

2014-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: The test_parser.diff file catches the bug in fix_email_parse.diff and it provides some assurance that push() functions as an incremental version of str.splitlines(). I would like to have this test included. It does some good and does no harm. --

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2014-08-10 Thread Dan O'Reilly
Dan O'Reilly added the comment: Here's an updated patch. Changes: * Fixed what appears to have been a find/replace typo I made prior to uploading the previous patch. * The tracebacks from the negative unit tests are now suppressed. * Fixed a race condition in the initializer failure

[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2014-08-10 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: +steve.dower, zach.ware -brian.curtin versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18199 ___

[issue20101] Determine correct behavior for time functions on Windows

2014-08-10 Thread Mark Lawrence
Mark Lawrence added the comment: Is there anything else that can be done or needs doing here? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20101 ___

[issue2200] find_executable fails to find .bat files on win32

2014-08-10 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- components: -Distutils2 nosy: +dstufft versions: +Python 3.4, Python 3.5 -3rd party, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2200

[issue20101] Determine correct behavior for time functions on Windows

2014-08-10 Thread STINNER Victor
STINNER Victor added the comment: time.sleep() and time.monotonic() don't use the same clock. Python cannot fix Windows clocks, it's not a bug. -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org

[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2014-08-10 Thread Mark Lawrence
Mark Lawrence added the comment: Is this actually fixable? I only ask as we seem to have a whole lot of fun with anything involving cmd.exe as epitomized on #1602. -- nosy: +BreamoreBoy, steve.dower, vinay.sajip, zach.ware -brian.curtin versions: +Python 2.7, Python 3.4, Python 3.5

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-10 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___

[issue1011113] Make “install” find the build_base directory

2014-08-10 Thread Sean McCully
Sean McCully added the comment: Please advise any changes that need to be made, this is technically my second patch submission to cpython. I also had trouble running the unittests when backporting to 2.7. Look at distutils, there wasn't a clear method for linking commands to share common

[issue1011113] Make “install” find the build_base directory

2014-08-10 Thread Sean McCully
Sean McCully added the comment: Attaching Python 2.7 patch. -- Added file: http://bugs.python.org/file36338/issue103-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue103 ___

[issue1011113] Make “install” find the build_base directory

2014-08-10 Thread Sean McCully
Sean McCully added the comment: Attachng Python 3.5/default branch patch. -- Added file: http://bugs.python.org/file36337/issue103-default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue103

[issue22138] patch.object doesn't restore function defaults

2014-08-10 Thread Sean McCully
Sean McCully added the comment: So the changes submitted, take into the attributes that are part of the standard Python Data Model/Descriptors and defined as editable per documentation. https://docs.python.org/3/reference/datamodel.html The thought is if a user is needing to support outside

[issue19743] test_gdb failures

2014-08-10 Thread Mark Lawrence
Mark Lawrence added the comment: Seems as if this can be closed. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19743 ___ ___

[issue20035] Clean up Tcl library discovery in Tkinter on Windows

2014-08-10 Thread Mark Lawrence
Mark Lawrence added the comment: Can we have (hopefully) a final review and get this committed as that would also allow us to close #10652. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20035

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-08-10 Thread Demian Brecht
Demian Brecht added the comment: If you can upload a patch (including tests) conforming to Rietveld's requirements, I'm sure it would help in getting a review done. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494

[issue22112] '_UnixSelectorEventLoop' object has no attribute 'create_task'

2014-08-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset d0ea92701b1e by Victor Stinner in branch '3.4': Issue #22112, asyncio doc: replace loop.create_task(coro) with http://hg.python.org/cpython/rev/d0ea92701b1e New changeset 18a311479e8b by Victor Stinner in branch 'default': (Merge 3.4) Issue #22112,

[issue22112] '_UnixSelectorEventLoop' object has no attribute 'create_task'

2014-08-10 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22112 ___

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-08-10 Thread STINNER Victor
New submission from STINNER Victor: The future Linux kernel 3.17 will have a new getrandom() syscall which avoids the need of a file descriptor: http://lwn.net/Articles/606141/ The file descriptor of os.urandom() causes perfomance issues and surprising bugs: #18756, #21207. I don't know when

[issue21305] PEP 466: update os.urandom

2014-08-10 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #22181: os.urandom() should use Linux 3.17 getrandom() syscall. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21305 ___

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-08-10 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22181 ___ ___ Python-bugs-list mailing

[issue22118] urljoin fails with messy relative URLs

2014-08-10 Thread Nick Coghlan
Nick Coghlan added the comment: Unfortunately, I haven't looked at the RFC compliance side of things in this space in years. At the time, we were considering a new module, leaving the old one alone. These days, I'd be more inclined to just fix it for 3.5, and suggest anyone really needing the

[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2014-08-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19500 ___ ___ Python-bugs-list

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-08-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22181 ___

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-08-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22181 ___ ___ Python-bugs-list mailing

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2014-08-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems the addition of the initargs argument doesn't tackle Mark's objection here: the initialiser and uninitialiser for the EnhancedThreadPoolExecutor accept no arguments. In retrospect, it would have been better to have them take the thread itself as a

[issue17923] test glob with trailing slash fail on AIX 6.1

2014-08-10 Thread David Edelsohn
David Edelsohn added the comment: 3.4 and default also. The failure occurs on all branches and default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17923 ___

[issue19743] test_gdb failures

2014-08-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19743 ___

[issue17923] test glob with trailing slash fail on AIX 6.1

2014-08-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17923 ___ ___

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2014-08-10 Thread Dan O'Reilly
Dan O'Reilly added the comment: It seems the addition of the initargs argument doesn't tackle Mark's objection here: the initialiser and uninitialiser for the EnhancedThreadPoolExecutor accept no arguments. In retrospect, it would have been better to have them take the thread itself

[issue22145] in parser spec but not lexer spec

2014-08-10 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22145 ___

[issue22145] in parser spec but not lexer spec

2014-08-10 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22145 ___ ___

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2014-08-10 Thread Dan O'Reilly
Dan O'Reilly added the comment: Another updated patch. This one changes ProcessPoolExecutor behavior so that RuntimeErrors are raised in any active Futures, and on subsequent calls to submit after the initializer fails. This makes its behavior consistent with ThreadPoolExecutor. --