[issue31415] Add -X option to show import time

2017-09-24 Thread INADA Naoki
INADA Naoki added the comment: > Actually it is easy. You need just one global integer accumulator and a local > variable for keeping a temporary copy of it. You're right! I updated my pull request. See current output: https://gist.github.com/methane/185d75a3c8da762d85317dd95918a623

[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-09-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3714 ___ Python tracker ___

[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-09-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3715 ___ Python tracker ___

[issue31351] ensurepip discards pip's return code which leads to broken venvs

2017-09-24 Thread Igor Filatov
Changes by Igor Filatov : -- pull_requests: +3720 stage: backport needed -> patch review ___ Python tracker ___

[issue30085] Discourage operator.__dunder__ functions

2017-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset d38caf68bb417232fb0ccecb5558d7d0ca4a9507 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6': [3.6] bpo-30085: Improve documentation for operator (GH-1171) (#3736)

[issue31570] minor bug in documentataion relating to sending html email

2017-09-24 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset ce418bf8228c9a6a19702638e5f5c2fb66ad0588 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-31570: Update Email library documentation example (GH-3720) (GH-3721)

[issue31570] minor bug in documentataion relating to sending html email

2017-09-24 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: This is fixed now. Thanks Larry and Henk-Jaap! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

Re: Reference cycles

2017-09-24 Thread Peter Otten
Steve D'Aprano wrote: > Is there a way to log when the garbage collector finds and collects a > reference cycle? > > I don't care about objects claimed by the reference counter, I only care > about cycles. I don't know, and I don't think so. Would a structure like a --- b --- c | | | d

[issue31351] ensurepip discards pip's return code which leads to broken venvs

2017-09-24 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks :) Since Miss Islington couldn't backport this, I'll leave it to the patch author or the core dev who merged the PR ;) -- ___ Python tracker

[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-09-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3717 ___ Python tracker ___

[issue31415] Add -X option to show import time

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Guido, is this something you want? Historically, we've shown a lot of restraint when it comes to adding command-line options. Also, I'm not sure we want to induce people to start moving their imports inside function calls. Just because we sometimes

[issue31507] email.utils.parseaddr has no docstring

2017-09-24 Thread Rohit Balasubramanian
Changes by Rohit Balasubramanian <98bro...@gmail.com>: -- pull_requests: +3721 ___ Python tracker ___ ___

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-24 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: I think we can remove ``` As of Python 3.3 it is possible again to prefix ..." ``` and keep the other one where it says: ``` .. versionadded:: 3.3 Support for the unicode legacy literal ``` About the sentence about numeric literals that appears twice:

[issue27268] Incorrect error message on float('')

2017-09-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> versions: -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-24 Thread Anthony Sottile
Anthony Sottile added the comment: Shouldn't you wait for Raymond's arguments before outright closing the PR? -- ___ Python tracker ___

[issue27268] Incorrect error message on float('')

2017-09-24 Thread Henk-Jaap Wagenaar
Changes by Henk-Jaap Wagenaar : -- pull_requests: +3708 ___ Python tracker ___ ___

[issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same.

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nick, what do you think about this proposal? The problem being solved is that decorated tuples no longer work well for controlling ordering (because so many types are now non-comparable). This provides a wrapper to control which fields are used in

[issue30085] Discourage operator.__dunder__ functions

2017-09-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> terry.reedy ___ Python tracker ___

[issue18558] Iterable glossary entry needs clarification

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll follow David Murray's suggestion here. The glossary definition of iterable is already very good, it just needs to clarify that the __getitem__() method needs to implement sequence semantics. Anything further is beyond the scope of a glossary entry.

python console menu level looping

2017-09-24 Thread Daiyue Weng
Hi, I tried to make a menu using print statements in Python 3. The code is as follows, print('insert data into: ') data_insert_method = ['new collection', 'existing collection'] for index, elem in enumerate(data_insert_method): print(index, '-', elem) while 1: how_to_insert = input('Choose a

Re: python console menu level looping

2017-09-24 Thread Daiyue Weng
well, in my case, there is no GUI, and we do not intend to use it since this script is only for internal testing purposes. So I am just wondering how to loop menu in this context. On 24 September 2017 at 22:03, Stefan Ram wrote: > Daiyue Weng

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-24 Thread Guilherme Praciano Karst Caminha
Guilherme Praciano Karst Caminha added the comment: I believe that the sentence regarding the - operator also applies to Integer literals and Imaginary literals. But it only appears on the Floating point literals and Numeric literals sections. --

[issue27268] Incorrect error message on float('')

2017-09-24 Thread Henk-Jaap Wagenaar
Henk-Jaap Wagenaar added the comment: @Wolfgang I just created a PR, only to realise that Pedro already made one a while back: PR 2745 -- nosy: +Henk-Jaap Wagenaar ___ Python tracker

[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-09-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Initially hasattr() suppressed all raised exceptions. In issue2196 hasattr() was changed to suppress only Exception exceptions and propagate exceptions like SystemExit and KeyboardInterrupt. In issue9666 hasattr() was changed to suppress only

[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-09-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3713 ___ Python tracker ___

[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-09-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3712 ___ Python tracker ___

[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5d3e80021ab33360191eb0fbff34e0246c913884 by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31566: Fix an assertion failure in _warnings.warn() in case of a bad __name__ global. (#3717)

[issue30085] Discourage operator.__dunder__ functions

2017-09-24 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue30085] Discourage operator.__dunder__ functions

2017-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 5b9299d8c72aeadccadd77e4b8132094ba9a1f96 by Terry Jan Reedy (Sanket Dasgupta) in branch 'master': bpo-30085: Improve documentation for operator (#1171) https://github.com/python/cpython/commit/5b9299d8c72aeadccadd77e4b8132094ba9a1f96 --

[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3716 ___ Python tracker ___

[issue31507] email.utils.parseaddr has no docstring

2017-09-24 Thread Rohit Balasubramanian
Changes by Rohit Balasubramanian <98bro...@gmail.com>: -- pull_requests: +3719 ___ Python tracker ___ ___

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-24 Thread Guilherme Praciano Karst Caminha
Guilherme Praciano Karst Caminha added the comment: Also, "Numeric literals" is a more general section, so rules that apply for the three types of numeric literals should probably go there to avoid repetition. Maybe the Integer, Floating point and Imaginary literal sections should be one

Compiling Python for iOS 11

2017-09-24 Thread Patrick Stinson
Has anyone successfully compiled python for iOS 11? I tried with 3.5.2 and 3.6.2 and got the following errors: turin:Python-3.6.2 patrick$ make Makefile:9845: warning: overriding commands for target `.obj/_pickle.o' Makefile:8855: warning: ignoring old commands for target `.obj/_pickle.o'

[issue31423] Error while building PDF documentation

2017-09-24 Thread Ned Deily
Ned Deily added the comment: > Seems like people are seeing 404s when downloading docs today. Do you have specific URLs or web pages? Or a link to where this was discussed? I just did a quick look at some of the download pages and everything worked for me. --

[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-09-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch pull_requests: +3709 stage: -> patch review ___ Python tracker ___

[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-09-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3710 ___ Python tracker ___

[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 415cc1fa57710614ed3384d0cafc58ccf7adee8c by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31566: Fix an assertion failure in _warnings.warn() in case of a bad __name__ global. (GH-3717) (#3730)

[issue30085] Discourage operator.__dunder__ functions

2017-09-24 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3722 ___ Python tracker ___

[issue31570] minor bug in documentataion relating to sending html email

2017-09-24 Thread Henk-Jaap Wagenaar
Henk-Jaap Wagenaar added the comment: I have made a PR, not sure whether it needs backporting? -- nosy: +Henk-Jaap Wagenaar ___ Python tracker ___

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-24 Thread bartc
On 24/09/2017 15:49, Steve D'Aprano wrote: On Mon, 25 Sep 2017 12:35 am, Stefan Ram wrote: WRT to assertions about Python, I try to base them on the "The Python Language Reference, Release 3.6.0" (PRL). So, WRT to parameter passing, I would use this part of the PRL: »The

[issue31570] minor bug in documentataion relating to sending html email

2017-09-24 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3707 ___ Python tracker ___

[issue30995] Support logging.getLogger(style='{')

2017-09-24 Thread Steven Warwick
Steven Warwick added the comment: you probably have already considered this, but I just wanted to ask if it might be worth considering turning the problem "upside down" to make things easier. I'm interpreting the problem that there are variables we'd like to add to the output log that are

[issue30826] More details in reference 'Looping through a list in Python and modifying it'

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: After looking at this again, I think the entire example should be removed. We really don't want to encourage people to code like this (it would never make it through a code review). The example itself is silly (not fully, just weird and lacking

[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2017-09-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3711 ___ Python tracker ___

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 91fb0afe181986b48abfc6092dcca912b39de51d by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. (#3219)

[issue18558] Iterable glossary entry needs clarification

2017-09-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- keywords: +patch pull_requests: +3718 stage: needs patch -> patch review ___ Python tracker

[issue31561] difflib pathological behavior with mixed line endings

2017-09-24 Thread Mahmoud Al-Qudsi
Mahmoud Al-Qudsi added the comment: @tim.peters No, `icdiff` is not part of core and probably should be omitted from the remainder of this discussion. I just checked and it's actually not a mix of line endings in each file, it's just that one file is \n and the other is \r\n You can

[issue30995] Support logging.getLogger(style='{')

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Vinay Sajip] > I don't think the ways of doing this are bulletproof and > require too much cooperation between third-party libraries. I concur with all of Vinay's comments. If logging were being redesigned from scratch, it would likely use new-style

[issue30826] More details in reference 'Looping through a list in Python and modifying it'

2017-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that the tutorial For section needs be updated to include non-sequences. A dict example will help with that. I agree that the unrealistic insert mis-directs attention and like Raymond's replacement. ['users.copy()' should be 'users.copy().items']

[issue31415] Add -X option to show import time

2017-09-24 Thread Guido van Rossum
Guido van Rossum added the comment: @rhettinger > Guido, is this something you want? I think it is useful given how much debate there has been around startup time in various contexts (not just pure interpreter startup time but also startup time when using specific libraries, packages or

[issue31153] Update docstrings of itertools functions

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking this as closed. 1) is being fixed elsewhere, 2) don't want to make func=None an official part of the API (it was a convenience for letting func default to the equivalent of operator.add), 3) already fixed, and 4) already fixed. --

[issue31415] Add -X option to show import time

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Naoki, is it possible to separate out how much of this is I/O vs CPU time? If the I/O dominates, optimizations tend toward zipimports, faster drives, disk caching etc. If the CPU time is dominant, different techniques are used (lazy evaluation,

Re: _sitebuiltins?

2017-09-24 Thread Chris Angelico
On Mon, Sep 25, 2017 at 10:03 AM, Stefan Ram wrote: > What's the difference between »builtins« and »_sitebuiltins«? > > |>>> type.__module__ > |'builtins' > | > |>>> help.__module__ > |'_sitebuiltins' > > I mean the semantic difference. Why are some entities placed >

[issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same.

2017-09-24 Thread Nick Coghlan
Nick Coghlan added the comment: The main downside I see to that approach is that it would still require quite a few client code changes to restore compatibility for folks upgrading from 2.7, and even though six could add a "six.Prioritize" backport, it would still be difficult for automated

Re: _sitebuiltins?

2017-09-24 Thread Chris Angelico
On Mon, Sep 25, 2017 at 11:39 AM, Stefan Ram wrote: > Chris Angelico writes: >>But if anything got imported from somewhere else, you get the >>_original_ source, not the one you got it from: > from ssl import namedtuple > namedtuple.__module__

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Eric, did you want to write the PR yourself or would you like for Lisa to bring it to fruition? If you're going to do it yourself, Lisa will serve as the primary reviewer (with either Ezio or me doing the final sign-off). -- assignee: ->

[issue31568] Configure thinks it finds python3.5 but doesn't

2017-09-24 Thread STINNER Victor
STINNER Victor added the comment: The Travis CI error is: --- python3.5 ./Objects/typeslots.py \ < ./Include/typeslots.h \ ./Objects/typeslots.inc pyenv: python3.5: command not found pyenv: python3.5: command not found The `python3.5' command exists in these

[issue31351] ensurepip discards pip's return code which leads to broken venvs

2017-09-24 Thread Nick Coghlan
Nick Coghlan added the comment: And done - thanks for the report and PRs, Igor! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: Project Euler 20.

2017-09-24 Thread Paul Rubin
Ian Kelly writes: sum(int(c) for c in str(math.factorial(100))) Doh! Using int(c) didn't occur to me and I didn't know about math.factorial. Notice also that WJ hasn't yet dared posting his crap on comp.lang.haskell. --

Re: _sitebuiltins?

2017-09-24 Thread Steve D'Aprano
On Mon, 25 Sep 2017 10:03 am, Stefan Ram wrote: > What's the difference between »builtins« and »_sitebuiltins«? > > |>>> type.__module__ > |'builtins' > | > |>>> help.__module__ > |'_sitebuiltins' > > I mean the semantic difference. Why are some entities placed > into »builtins« and some

Re: [Tutor] beginning to code

2017-09-24 Thread Steve D'Aprano
On Sun, 24 Sep 2017 12:37 pm, Bill wrote: >> For example, if I made "Pass-By-Reference Python" where all argument passing >> was done by reference, my language would differ from real Python: >> >> >> function(x, y) # allowed >> function(namespace.x, module.y) # allowed >> function(x + 1, 2) #

[issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods"

2017-09-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- keywords: +patch pull_requests: +3725 stage: needs patch -> patch review ___ Python tracker

[issue31561] difflib pathological behavior with mixed line endings

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Of course I can understand if all this is out of the scope of difflib and not > an endeavor worth taking up. I agree with that sentiment. Data normalization for comparability belongs upstream from difflib (i.e. normalizing line-endings, unicode

[issue31561] difflib pathological behavior with mixed line endings

2017-09-24 Thread Tim Peters
Tim Peters added the comment: The text/binary distinction you have in mind doesn't particularly apply to difflib: it compares sequences of hashable objects. "Text files" are typically converted by front ends to lists of strings, but, e.g., the engine is just as happy comparing tuples of

[issue30995] Support logging.getLogger(style='{')

2017-09-24 Thread Steven Warwick
Steven Warwick added the comment: sorry, I meant the following: logger.info( " {:s} {:s} ".format(logger.name, logger.module ) ) or logger.info( f" {logger.name:s} {logger.module:s} " ) this could be supported with full backward compatibility with very little effort. Am I missing

Re: python console menu level looping

2017-09-24 Thread Cameron Simpson
On 24Sep2017 21:41, Daiyue Weng wrote: Hi, I tried to make a menu using print statements in Python 3. The code is as follows, One thing, please try to preserve the code indenting in messages. What you pasted is all hard against the left side of the screen. I've tried to

[issue31299] Add "ignore_modules" option to TracebackException.format()

2017-09-24 Thread Dmitry Kazakov
Dmitry Kazakov added the comment: Yes, a public built-in facility to modify a traceback would certainly be useful, although there should be a standard way to "hide" unwanted frames without mutating the traceback, too, and the traceback module seems a perfect place to add it. I have no

Re: Project Euler 20.

2017-09-24 Thread Ian Kelly
On Sun, Sep 24, 2017 at 4:35 PM, Paul Rubin wrote: > > "Robert L." writes: > >> Find the sum of the digits in the number 100! > > In Python? > > So you have come to plague us here too. > > >>> sum(ord(c)-ord('0') for c in str(reduce(lambda

[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

2017-09-24 Thread Larry Hastings
Larry Hastings added the comment: New changeset f2492bb6aae061aea47e21fc7e56b7ab9bfdf543 by larryhastings (Victor Stinner) in branch '3.5': [3.5][Security] bpo-30947, bpo-31170: Update expat from 2.2.1 to 2.2.4 (#3354)

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-24 Thread Larry Hastings
Larry Hastings added the comment: New changeset f2492bb6aae061aea47e21fc7e56b7ab9bfdf543 by larryhastings (Victor Stinner) in branch '3.5': [3.5][Security] bpo-30947, bpo-31170: Update expat from 2.2.1 to 2.2.4 (#3354)

[issue31356] Add context manager to temporarily disable GC

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Assigning this to Lisa for a C implementation, docs, and tests. -- assignee: -> lisroach nosy: +lisroach ___ Python tracker

Re: python console menu level looping

2017-09-24 Thread Daiyue Weng
Sry for the unclear formatting, this is the original code with correct format (copy from pycharm), print('insert data into: ') data_insert_method = ['new collection', 'existing collection'] for index, elem in enumerate(data_insert_method): print(index, '-', elem) while 1: how_to_insert =

[issue31568] Configure thinks it finds python3.5 but doesn't

2017-09-24 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch pull_requests: +3723 stage: needs patch -> patch review ___ Python tracker ___

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-24 Thread Steve D'Aprano
On Mon, 25 Sep 2017 01:56 am, bartc wrote: >> The point I am making is that we could describe just about any and all >> languages with functions "call by binding", whether they are call by value >> like C, call by reference like Fortran, call by need like Haskell, or call by >> sharing like

Re: _sitebuiltins?

2017-09-24 Thread Chris Angelico
On Mon, Sep 25, 2017 at 10:46 AM, Stefan Ram wrote: > Chris Angelico writes: >>On Mon, Sep 25, 2017 at 10:03 AM, Stefan Ram wrote: >>>What's the difference between »builtins« and »_sitebuiltins«? >>>|>>> type.__module__

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-24 Thread Steve D'Aprano
On Mon, 25 Sep 2017 08:39 am, Gregory Ewing wrote: > Dennis Lee Bieber wrote: >> "Binding" itself tends to be Python specific terminology -- in that it "Binding" is certainly not Python-specific: https://en.wikipedia.org/wiki/Name_binding and here's an example of the term in use:

[issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same.

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: We already have recommendations in the heapq documentation on how to do a work-around. I'm looking at the more general problem of how can we make it easy once again to decorate a value with a sort value (not just for heaps but for anyplace where

[issue31415] Add -X option to show import time

2017-09-24 Thread INADA Naoki
INADA Naoki added the comment: I don't have any good idea for it. I usually run `python -X importtime -c 'import functools'` several times to ensure pyc files are created and it is cached by OS. On Linux, `strace -c` and `time` command can be used. But I don't know cross platform way to do

[issue30995] Support logging.getLogger(style='{')

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: > logger.info( f" {logger.name:s} {logger.module:s} " ) > > this could be supported with full backward compatibility > with very little effort. > > Am I missing something? One issue is that some of that data isn't known until the logging.info() call is

[issue28754] Argument Clinic for bisect.bisect_left

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the itertools module has many functions that can have the ArgumentClinic applied without any fundamental problems (pretty much all of the functions will work except for repeat(), accumulate(), and islice()). --

[issue31131] asyncio.wait_for() TimeoutError doesn't provide full traceback

2017-09-24 Thread Surenkumar Nihalani
Surenkumar Nihalani added the comment: this'd be useful to me as well. I'd propose we pass the future in the exception object. Can write a write a tiny patch for this if someone would approve. -- nosy: +snihalani ___ Python tracker

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-24 Thread Larry Hastings
Larry Hastings added the comment: New changeset 86a713cb0c110b6798ca7f9e630fc511ee0a4028 by larryhastings (Victor Stinner) in branch '3.4': [3.4][Security] bpo-30947, bpo-31170: Update expat from 2.2.1 to 2.2.4 (#3353)

[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added the patch for PR 1568 against the current master just for history. -- Added file: https://bugs.python.org/file47167/groupby-invalid.diff ___ Python tracker

[issue31569] inconsistent case of PCbuild/ directory

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Wouldn't be easier to make changes in the opposite direction? Change PCbuild to PCBuild? The file systems on Windows are case-insensitive, so this hardly an error. -- nosy: +serhiy.storchaka ___ Python tracker

[issue31508] Running test_ttk_guionly logs "test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed" warnings

2017-09-24 Thread STINNER Victor
STINNER Victor added the comment: Thank you for the fix Serhiy! -- ___ Python tracker ___ ___

[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3701 stage: -> patch review ___ Python tracker ___

[issue31415] Add -X option to show import time

2017-09-24 Thread INADA Naoki
INADA Naoki added the comment: > If this proposition be accepted I would want to see not only cumulated times, > but also pure times, without time of nested imports. It can be calculated by script. I don't want to add more complexity to import.c. > I guess this feature doesn't work correctly

[issue31568] Configure thinks it finds python3.5 but doesn't

2017-09-24 Thread Larry Hastings
New submission from Larry Hastings: On Python 3.5, the makefile pseudotarget "regen-opcode" now fails if "python3.5" can't be found on the path. What's strange is that the configure script scans to see if it can find "python3.5", and it thinks it can, but then actually attempting to run it

[issue31568] Configure thinks it finds python3.5 but doesn't

2017-09-24 Thread Larry Hastings
Larry Hastings added the comment: Oh, and, Victor, I tagged you with this because git blame says you're the most person to touch PYTHON_FOR_REGEN in the makefile, checkin ab6b962ef24 . -- ___ Python tracker

[issue27319] Multiple item arguments for selection operations

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2fad10235460ac394cc8b869c41f47aba3d63594 by Serhiy Storchaka in branch 'master': bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (#3667) https://github.com/python/cpython/commit/2fad10235460ac394cc8b869c41f47aba3d63594

[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-09-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Go ahead with PR 1569 to exhaust the inner iterator when the outer iterator advances. Rationale: The OP expected the inner iterator to be exhausted. That is also what the PyPy team originally implemented and it is what I would have expected. Also, there

[issue31415] Add -X option to show import time

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Stack management is difficult than inc/dec integer in multi threading case. Actually it is easy. You need just one global integer accumulator and a local variable for keeping a temporary copy of it. -- ___

[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review and explanations Raymond. This makes sense to me. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it should. But let to hear Raymond's arguments. -- ___ Python tracker ___

[issue31571] Redundand information on Doc/reference/lexical_analysis.rst

2017-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The first pair was added in 50364b4a5c8f02ec05d33928e29a8780d9acf968 by Armin Ronacher. The duplicate of the other phrase was introduced in 60f2f0cf8e10c94693dfea8937b7feabeffe5744. -- nosy: +aronacher, gvanrossum, serhiy.storchaka

[issue31423] Error while building PDF documentation

2017-09-24 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Seems like people are seeing 404s when downloading docs today. By any chance this issue is related? -- nosy: +Mariatta ___ Python tracker

Reference cycles

2017-09-24 Thread Steve D'Aprano
Is there a way to log when the garbage collector finds and collects a reference cycle? I don't care about objects claimed by the reference counter, I only care about cycles. -- Steve “Cheer up,” they said, “things could be worse.” So I cheered up, and sure enough, things got worse. --

[issue31567] Inconsistent documentation around decorators

2017-09-24 Thread Daisuke Miyakawa
New submission from Daisuke Miyakawa: I can see inconsistency in library documentation around functions that are suitable for decorators. I'd like to clarify if it is based on my misunderstanding, or a real documentation problem. Examples: -

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-09-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

2017-09-24 Thread Larry Hastings
Larry Hastings added the comment: New changeset 86a713cb0c110b6798ca7f9e630fc511ee0a4028 by larryhastings (Victor Stinner) in branch '3.4': [3.4][Security] bpo-30947, bpo-31170: Update expat from 2.2.1 to 2.2.4 (#3353)

  1   2   >