[issue22178] _winreg.QueryInfoKey Last Modified Time Value Incorrect or Explanation Incorrect
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) lastModified = QueryInfoKey(key)[2] print %s % startDate + timedelta(seconds=lastModified*(10**-9)*100) The date is about right except for the year value, it's off by one. I suspect the documentation should say the value in the tuple is the time since 1/1/1601 instead of 1/1/1600. This would corroborate Microsoft's documentation that makes references to 1/1/1601 (i.e. http://technet.microsoft.com/en-ca/aa393040(v=vs.90).aspx) -- messages: 225125 nosy: slw07g priority: normal severity: normal status: open title: _winreg.QueryInfoKey Last Modified Time Value Incorrect or Explanation Incorrect type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22178 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19217] Calling assertEquals for moderately long list takes too long
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 (__main__.SCSE) -- Traceback (most recent call last): File unittest_scse.py, line 14, in test_compare self.assertEqual(arr1, arr2) AssertionError: Lists differ: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,[29953 chars]1, 1] != [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,[29953 chars]2, 2] First differing element 0: 1 2 - [1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, + [2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 2, ... *** Diff is truncated. Set self.maxDiffItems to None to see it all. == FAIL: test_compare_2 (__main__.SCSE) -- Traceback (most recent call last): File unittest_scse.py, line 24, in test_compare_2 self.assertEqual(arr1, arr2) AssertionError: Lists differ: [1, 1[29932 chars] 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] != [1, 1[29932 chars] 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] First differing element : 1 2 - 1] + 2] -- Ran 2 tests in 1.813s FAILED (failures=2) -- stage: commit review - patch review versions: +Python 3.5 -Python 3.3 Added file: http://bugs.python.org/file36330/issue19217-alt.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19217 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22174] property doc fixes
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18844] allow weights in random.choice
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 http://bugs.python.org/issue18844 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22176] update internal libffi copy to 3.1, introducing AArch64 and POWER ELF ABIv2
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 http://bugs.python.org/issue22176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19217] Calling assertEquals for moderately long list takes too long
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 reporting. First, we can iterative decrease slices size until diff size become less maxDiff. And output truncated diff instead of omitting it at all. Second, we can extend difflib by functions which allow to limit a number of reported differences. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19217 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22174] property doc fixes
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 http://bugs.python.org/issue22174 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19217] Calling assertEquals for moderately long list takes too long
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 as simple and consistent as possible (since they are already quite complicated), and possibly making them even simpler. I'll try to summarize the current situation and propose some possible solutions to achieve this goal. Currently we have: * _diffThreshold (used to avoid computing the diff, only affects strings); * maxDiff (used to hide diffs that are too big, after they have been computed); These two attributes deal with two different but related problems: * _diffThreshold tries to avoid /calculating/ expensive diffs; * maxDiff tries to avoid /printing/ big and unreadable diffs; These are different because one acts before and the other after, but they are also related because the threshold directly affects the size of the diff. By picking some ideas from Serhiy comments and patch, I think we should: 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); 2) make this threshold public, so that users can control this behavior (even though we should be careful about what we add -- we can always keep it private and expose it later); 3) factor out the diff computation/truncation function (like Serhiy did), and use it consistently, so that we can get rid of _truncateMessage and simplify the formatting. 4) if possible, try to unify the threshold and the maxDiff -- if the threshold is low the diff will be small, if it's high/None the diff will be big; Now, doing 1) shouldn't be an issue, 2) is also doable if we agree on it, and 3) is also not a problem since these are internal functions. If we decide to go for 4) as well there are at least two options: a) repurpose maxDiff to indicate the number of items/lines; b) introduce a new attribute (e.g. maxDiffItems) and deprecate maxDiff; Option a) might be doable, and even if it introduces a change in behavior it might be acceptable since it affects the output of the messages in case of failure, and I don't think anyone is relying on an exact output (also because tests shouldn't be failing). Moreover, the most common usage of maxDiff is setting it to None, and having the threshold to None means that the full diff will be computed and printed, leaving the behavior unchanged. Thoughts? Second, we can extend difflib by functions which allow to limit a number of reported differences. I was thinking about having a lazy, generator-based diffing, so we could generate as many diff lines we need and stop once we reach the threshold. I'm not sure if difflib already has something similar but anyway this is a separate issue. Also, if we unify maxDiff and the threshold we won't need this, since all that is computer is also printed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19217 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18844] allow weights in random.choice
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 take a look at how other languages and packages have solved the problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18844 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19217] Calling assertEquals for moderately long list takes too long
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 should hide or truncate too long lines, and this is not trivial issue. Actually we should more control on difflib's machinery and use something like _common_shorten_repr to appropriate truncate similar lines. Option a) might be doable, and even if it introduces a change in behavior it might be acceptable since it affects the output of the messages in case of failure, and I don't think anyone is relying on an exact output (also because tests shouldn't be failing). Moreover, the most common usage of maxDiff is setting it to None, and having the threshold to None means that the full diff will be computed and printed, leaving the behavior unchanged. This is too much for bug fix. We should fix this issue (do not calculate diffs between too long sequences) and preserve as much details as possible. Omitting the diff at all when it is outputted with current code (but very slowly) is a regression. It would be better to output truncated diff. Then we can refactor and improve diffs reporting in other issues. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19217 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions
Dirkjan Ochtman added the comment: Thanks, Benjamin, for reverting the run-time bits. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21591 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21514] update json module docs in light of RFC 7159 ECMA-404
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18844] allow weights in random.choice
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 Pythonic and most handly solution of this issue on Python. And it is efficient enough. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18844 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22179] Focus stays on Search Dialog when text found in editor
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: normal severity: normal status: open title: Focus stays on Search Dialog when text found in editor type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22179 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18004] test_list.test_overflow crashes Win64
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21591] exec(a, b, c) not the same as exec a in b, c in nested functions
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 http://bugs.python.org/issue21591 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18844] allow weights in random.choice
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 contrast, the two-function approach only makes things clumsier for people since they have to remember to combine them. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18844 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22180] operator.setitem example no longer works in Python 3 due to lazy map
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) map(operator.setitem, [d]*len(keys), keys, vals) Since map is lazy since Python 3, the dictionary d is never actually changed in this example. I'm not entirely sure what the idiomatic way to fix the example is since it strikes me as being fairly unidiomatic to begin with, but the simplest would be to call list on the result of map to force evaluation (patch attached). -- assignee: docs@python components: Documentation files: doc-operator-example.patch keywords: patch messages: 225141 nosy: docs@python, mwilliamson priority: normal severity: normal status: open title: operator.setitem example no longer works in Python 3 due to lazy map versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file36333/doc-operator-example.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22180 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22180] operator.setitem example no longer works in Python 3 due to lazy map
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: +r.david.murray versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22180 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22118] urljoin fails with messy relative URLs
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? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22171] stack smash when using ctypes/libffi to access union
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 Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22176] update internal libffi copy to 3.1, introducing AArch64 and POWER ELF ABIv2
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22180] operator.setitem example no longer works in Python 3 due to lazy map
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, modern Python code should use a dict comprehension and avoid operator.setitem() entirely. -- nosy: +pitrou, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22180 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22180] operator.setitem example no longer works in Python 3 due to lazy map
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 ought to be doing. -- assignee: docs@python - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22180 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22180] operator.setitem example no longer works in Python 3 due to lazy map
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 way without it. How about we remove it and leave the examples for things that people ought to be doing. Agreed. operator.setitem() isn't really ever used in my experience. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22180 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18844] allow weights in random.choice
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 http://bugs.python.org/issue18844 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument
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 rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22180] operator.setitem example no longer works in Python 3 due to lazy map
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 http://bugs.python.org/issue22180 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22180] operator.setitem example no longer works in Python 3 due to lazy map
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22174] property doc fixes
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 tracker rep...@bugs.python.org http://bugs.python.org/issue22174 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22174] property doc fixes
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 rep...@bugs.python.org http://bugs.python.org/issue22174 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22174] property doc fixes
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 - closed versions: +Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22174 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22175] improve test_faulthandler readability with dedent
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 #22175: Improve test_faulthandler readability with dedent. http://hg.python.org/cpython/rev/2929cc408fbb -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22175 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22175] improve test_faulthandler readability with dedent
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21448] Email Parser use 100% CPU
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 no objections, I'll commit this patch. -- Added file: http://bugs.python.org/file36334/email_parser_long_lines_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21448 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22118] urljoin fails with messy relative URLs
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 support for the old behaviour for 3.5 would make the change a little more easy to deal with. That said, it's nothing that I'd argue heatedly over. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6858] This is a python file, apply syntax highlighting
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21448] Email Parser use 100% CPU
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21448 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument
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 handling for ThreadPoolExecutor. Futures that were submitted before the initializer actually failed will now raise a RuntimeError indicating that initializer failed. * Suppressed an occasional queue.Full exception that would pop up while shutting down a ProcessPoolExecutor that was broken due to an initializer fail. As best as I can tell the exception is harmless, so suppressing it should be ok. *Updated the docs. -- nosy: +pitrou Added file: http://bugs.python.org/file36335/init_patch_updated.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20101] Determine correct behavior for time functions on Windows
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2200] find_executable fails to find .bat files on win32
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20101] Determine correct behavior for time functions on Windows
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 http://bugs.python.org/issue20101 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names
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 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20042 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1011113] Make “install” find the build_base directory
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 options. This led to the solution provided which searches command options provided (via command line or configuration) for any shared options between command being ran and commands specified. Patch for Python 3.4 attached. -- keywords: +patch nosy: +seanmccully Added file: http://bugs.python.org/file36336/issue103-py34.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1011113] Make “install” find the build_base directory
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1011113] Make “install” find the build_base directory
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22138] patch.object doesn't restore function defaults
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 of Proxy Object (currently supported) and default descriptor attributes then mock should be special cased by user/developer. Please advise on current solution. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22138 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19743] test_gdb failures
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20035] Clean up Tcl library discovery in Tkinter on Windows
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22112] '_UnixSelectorEventLoop' object has no attribute 'create_task'
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, asyncio doc: replace loop.create_task(coro) with http://hg.python.org/cpython/rev/18a311479e8b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22112 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22112] '_UnixSelectorEventLoop' object has no attribute 'create_task'
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22112 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall
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 the function will land in the libc. OpenBSD 5.6 (not released yet) will also have a new getentropy() syscall. For Python 2.7, see also the PEP 466 and the issue #21305. -- messages: 225171 nosy: haypo priority: normal severity: normal status: open title: os.urandom() should use Linux 3.17 getrandom() syscall versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22181 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21305] PEP 466: update os.urandom
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall
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 list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22118] urljoin fails with messy relative URLs
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 old behaviour fork an older version of the module. Extracting the test case inputs from that old uriparse rewrite might still be a good idea, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22118 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming
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 mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall
Changes by Antoine Pitrou pit...@free.fr: -- stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22181 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22181 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument
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 single argument. Regardless, I'm going to review the patch soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17923] test glob with trailing slash fail on AIX 6.1
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19743] test_gdb failures
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19743 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17923] test glob with trailing slash fail on AIX 6.1
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument
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 as a single argument. This would be inconsistent with multiprocessing.Pool's initializer/initargs behavior. I'm not sure if consistency is important there or not, but its worth pointing out. I'm also not sure how useful it would be for ProcessPoolExecutor to receive an instance of itself. With multiprocessing.Pool, initializer is a commonly used to pass objects that can only be inherited to workers (Queues, Locks, etc.). The same pattern would be useful for ProcessPoolExecutor, which means initializer needs to be able to take an arbitrary number of arguments, rather than just an instance to the Process object itself. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22145] in parser spec but not lexer spec
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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22145] in parser spec but not lexer spec
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22145 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument
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. -- Added file: http://bugs.python.org/file36339/init_patch_updated2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com