[issue36817] Add = to f-strings for easier debugging.

2019-05-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Anecdotally, this happened as well when in the implementation of PEP572 -- ___ Python tracker ___

[issue36817] Add = to f-strings for easier debugging.

2019-05-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The reason the main CI did not catch this is that test_tools is only executed on a (random) subset of all the files if I remember correctly because when executed on all files it massively increases the time of the CI. --

[issue36817] Add = to f-strings for easier debugging.

2019-05-21 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: I'm not quite sure I completely understand how this is implemented and all the possibilities; – so I would appreciate reviews on the issue (and patch) to handle this in ast-unparse. See https://bugs.python.org/issue37003 Thanks, -- nosy:

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 26f55c29f2316648939ad12a9d3730a2118da2ea by Pablo Galindo in branch 'master': bpo-36817: Do not decrement reference for expr_text on fstring = parsing failure (GH-13256)

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +13168 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 5833e94d8615ea18b14e4830ecdb868aec81b378 by Pablo Galindo in branch 'master': bpo-36817: Fix reference leak for expr_text in f-string = parsing (GH-13249) https://github.com/python/cpython/commit/5833e94d8615ea18b14e4830ecdb868aec81b378

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Opened PR13249 to fix the leak -- stage: patch review -> resolved ___ Python tracker ___

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +13160 stage: resolved -> patch review ___ Python tracker ___ ___

[issue36817] Add = to f-strings for easier debugging.

2019-05-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Commit 9a4135e939bc223f592045a38e0f927ba170da32 introduced a reference leak: https://buildbot.python.org/all/#/builders/80/builds/587/steps/3/logs/stdio Bisect results for test_future: 0:00:00 load avg: 10.04 [1/1] test_future beginning 9

[issue36817] Add = to f-strings for easier debugging.

2019-05-08 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36817] Add = to f-strings for easier debugging.

2019-05-08 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 9a4135e939bc223f592045a38e0f927ba170da32 by Eric V. Smith in branch 'master': bpo-36817: Add f-string debugging using '='. (GH-13123) https://github.com/python/cpython/commit/9a4135e939bc223f592045a38e0f927ba170da32 --

[issue36817] Add = to f-strings for easier debugging.

2019-05-07 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: +13079 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36817] Add = to f-strings for easier debugging.

2019-05-07 Thread Eric V. Smith
Eric V. Smith added the comment: The most recent version of the PR 0ec4daead4d5b3c42613bd210a51da60932035f3 has the behavior without !f and auto-selecting what used to be !f. It's ready for a final review before I commit it. -- ___ Python tracker

[issue36817] Add = to f-strings for easier debugging.

2019-05-07 Thread Eric V. Smith
Eric V. Smith added the comment: After discussing this with Guido and Larry, we're going to go with the "implicit format mode", as outlined by Serhiy, and drop the !f feature. So the rules are: {x=} -> "x="+repr(x) {x=:.2f} -> "x="+format(x, ".2f") {x=:} -> "x="+format(x, "") {x=:!s:20} ->

[issue36817] Add = to f-strings for easier debugging.

2019-05-07 Thread Larry Hastings
Larry Hastings added the comment: > I think that !f is not needed. You can use repr by default only when > no format spec is specified, and add explicit !r if you want to use > repr with the format spec. Actually that's how !d worked. We changed the behavior because it was too "magical".

[issue36817] Add = to f-strings for easier debugging.

2019-05-07 Thread Eric V. Smith
Eric V. Smith added the comment: > In you example the format spec is applied to both the value and the literal > representation of the expression. Is it an error? I do not think this is an > expected behavior. No, you're misreading it. I admit that my example wasn't great. Try this one:

[issue36817] Add = to f-strings for easier debugging.

2019-05-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can use f'*{n=!r:30}*' if you want to format the result of the repr. In you example the format spec is applied to both the value and the literal representation of the expression. Is it an error? I do not think this is an expected behavior. If you want

[issue36817] Add = to f-strings for easier debugging.

2019-05-07 Thread Eric V. Smith
Eric V. Smith added the comment: > Except that I think that !f is not needed. You can use repr by default only > when no format spec is specified, and add explicit !r if you want to use repr > with the format spec. If you want to format the value without repr and the > format spec --

[issue36817] Add = to f-strings for easier debugging.

2019-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I like this! Except that I think that !f is not needed. You can use repr by default only when no format spec is specified, and add explicit !r if you want to use repr with the format spec. If you want to format the value without repr and the format spec

[issue36817] Add = to f-strings for easier debugging.

2019-05-06 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: +1 from me (as a big fan of print-debugging). -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue36817] Add = to f-strings for easier debugging.

2019-05-06 Thread Eric V. Smith
Change by Eric V. Smith : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36817] Add = to f-strings for easier debugging.

2019-05-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'll assume you can resolve any weird corner cases, in which case +1 -- type: enhancement -> ___ Python tracker ___

[issue36817] Add = to f-strings for easier debugging.

2019-05-06 Thread Eric V. Smith
New submission from Eric V. Smith : This is an alternative proposal to issue36774. We (Eric V. Smith and Larry Hastings) propose a minor language change. This level of change doesn't require a PEP, so in this post-BDFL world what we need is "a consensus among core developers". So please vote!

[issue36817] Add = to f-strings for easier debugging.

2019-05-06 Thread Eric V. Smith
Change by Eric V. Smith : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36817] Add = to f-strings for easier debugging.

2019-05-06 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36817] Add = to f-strings for easier debugging.

2019-05-06 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +13035 ___ Python tracker ___ ___ Python-bugs-list mailing list