[issue38870] Expose ast.unparse in the ast module

2020-10-23 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-10-23 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Well, I'm happy to say that 3.9.0 is finally released with the ast.unparse interface. After tens of PRs, I think it is time for us to move on. For all future bugs, please create a new issue and nosy me. Thanks everyone who has participated this journey!

[issue38870] Expose ast.unparse in the ast module

2020-06-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 6e3a246a019a356e1befcdfd3d54a52cb7b5 by Pablo Galindo in branch '3.9': [3.9] bpo-38870: Extend subject of ast.unparse warnings (GH-21053) (GH-21191) https://github.com/python/cpython/commit/6e3a246a019a356e1befcdfd3d54a52cb7b5

[issue38870] Expose ast.unparse in the ast module

2020-06-27 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +20345 pull_request: https://github.com/python/cpython/pull/21191 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-06-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 8df1016e2ef8c0a9f4d15bf7894c284295c99d9f by Batuhan Taskaya in branch 'master': bpo-38870: Extend subject of ast.unparse warnings (GH-21053) https://github.com/python/cpython/commit/8df1016e2ef8c0a9f4d15bf7894c284295c99d9f --

[issue38870] Expose ast.unparse in the ast module

2020-06-22 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +20224 pull_request: https://github.com/python/cpython/pull/21053 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-05-20 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread miss-islington
miss-islington added the comment: New changeset 059279d8706074489144f6ba8ccc8723e0b85007 by Miss Islington (bot) in branch '3.9': bpo-38870: invalid escape sequence (GH-20240) https://github.com/python/cpython/commit/059279d8706074489144f6ba8ccc8723e0b85007 --

[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread miss-islington
miss-islington added the comment: New changeset dd74b6fde31aff9aa46c4fc2a830c569764e1b63 by Batuhan Taskaya in branch 'master': bpo-38870: invalid escape sequence (GH-20240) https://github.com/python/cpython/commit/dd74b6fde31aff9aa46c4fc2a830c569764e1b63 --

[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +19532 pull_request: https://github.com/python/cpython/pull/20244 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +19528 pull_request: https://github.com/python/cpython/pull/20240 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-05-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset c102a148256b00b7d48c51a1a97df19042e603de by Batuhan Taskaya in branch 'master': bpo-38870: Don't omit parenthesis when unparsing a slice in ast.unparse https://github.com/python/cpython/commit/c102a148256b00b7d48c51a1a97df19042e603de

[issue38870] Expose ast.unparse in the ast module

2020-05-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset d71a6492dbd5434dfa6a0ad95e3ad98aa690887a by CyberSaxosTiGER in branch 'master': bpo-38870: correctly escape unprintable characters on ast.unparse (GH-20166)

[issue38870] Expose ast.unparse in the ast module

2020-05-17 Thread 1v3m
Change by 1v3m : -- nosy: +1v3m nosy_count: 7.0 -> 8.0 pull_requests: +19465 pull_request: https://github.com/python/cpython/pull/20166 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-05-17 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +19455 pull_request: https://github.com/python/cpython/pull/20152 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-05-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 6341fc7257d89d798675ad6e425f7eb0b6f2b4bb by Pablo Galindo in branch 'master': bpo-38870: Use subTest in test_unparse for better error reporting (GH-20141) https://github.com/python/cpython/commit/6341fc7257d89d798675ad6e425f7eb0b6f2b4bb

[issue38870] Expose ast.unparse in the ast module

2020-05-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +19446 pull_request: https://github.com/python/cpython/pull/20141 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-05-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset dff92bb31f7db1a80ac431811f8108bd0ef9be43 by Batuhan Taskaya in branch 'master': bpo-38870: Implement round tripping support for typed AST in ast.unparse (GH-17797)

[issue38870] Expose ast.unparse in the ast module

2020-05-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset e966af7cff78e14e1d289db587433504b4b53533 by Batuhan Taskaya in branch 'master': bpo-38870: Correctly handle empty docstrings in ast.unparse (GH-18768) https://github.com/python/cpython/commit/e966af7cff78e14e1d289db587433504b4b53533

[issue38870] Expose ast.unparse in the ast module

2020-05-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 25160cdc4775a1ddb4e37c8bf5a6e31ad9c146ed by Batuhan Taskaya in branch 'master': bpo-38870: Don't put unnecessary parentheses on class declarations in ast.parse (GH-20134)

[issue38870] Expose ast.unparse in the ast module

2020-05-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset ce4a753dcb3eef3d68e892a6515490b1aa219651 by Batuhan Taskaya in branch 'master': bpo-38870: Do not separate factor prefixes in ast.unparse (GH-20133) https://github.com/python/cpython/commit/ce4a753dcb3eef3d68e892a6515490b1aa219651

[issue38870] Expose ast.unparse in the ast module

2020-05-16 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +19439 pull_request: https://github.com/python/cpython/pull/20134 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-05-16 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +19438 pull_request: https://github.com/python/cpython/pull/20133 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-05-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 493bf1cc316b0b5bd90779ecd1132878c881669e by Batuhan Taskaya in branch 'master': bpo-38870: Don't start generated output with newlines in ast.unparse (GH-19636)

[issue38870] Expose ast.unparse in the ast module

2020-04-21 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +18961 pull_request: https://github.com/python/cpython/pull/19636 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-03-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 5b66ec166b81c8a77286da2c0d17be3579c3069a by Batuhan Taşkaya in branch 'master': bpo-38870: Implement support for ast.FunctionType in ast.unparse (GH-19016) https://github.com/python/cpython/commit/5b66ec166b81c8a77286da2c0d17be3579c3069a

[issue38870] Expose ast.unparse in the ast module

2020-03-15 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +18365 pull_request: https://github.com/python/cpython/pull/19016 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-03-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset e7cab7f780ac253999512ee86374fc3454342811 by Batuhan Taşkaya in branch 'master': bpo-38870: Simplify sequence interleaves in ast.unparse (GH-17892) https://github.com/python/cpython/commit/e7cab7f780ac253999512ee86374fc3454342811

[issue38870] Expose ast.unparse in the ast module

2020-03-03 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +18126 pull_request: https://github.com/python/cpython/pull/18768 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2020-03-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 89aa4694fc8c6d190325ef8ed6ce6a6b8efb3e50 by Batuhan Taşkaya in branch 'master': bpo-38870: Add docstring support to ast.unparse (GH-17760) https://github.com/python/cpython/commit/89aa4694fc8c6d190325ef8ed6ce6a6b8efb3e50 --

[issue38870] Expose ast.unparse in the ast module

2020-03-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 397b96f6d7a89f778ebc0591e32216a8183fe667 by Batuhan Taşkaya in branch 'master': bpo-38870: Implement a precedence algorithm in ast.unparse (GH-17377) https://github.com/python/cpython/commit/397b96f6d7a89f778ebc0591e32216a8183fe667

[issue38870] Expose ast.unparse in the ast module

2020-01-07 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38870] Expose ast.unparse in the ast module

2020-01-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > We might need to tweak the documentation @pablogsal, Maybe we can say that is 'as close as possible' if you pass an arbitrary AST object (if only happens with Constants we could documment exactly that). Let me think about this and I will make PR

[issue38870] Expose ast.unparse in the ast module

2020-01-07 Thread Batuhan
Batuhan added the comment: We might need to tweak the documentation @pablogsal, > Unparse an ast.AST object and generate a string with code that would produce > an equivalent ast.AST object if parsed back with ast.parse(). If I interpret `equivalent` correctly, this explanation is false

[issue38870] Expose ast.unparse in the ast module

2020-01-07 Thread Batuhan
Change by Batuhan : -- pull_requests: +17302 pull_request: https://github.com/python/cpython/pull/17892 ___ Python tracker ___ ___

[issue38870] Expose ast.unparse in the ast module

2020-01-07 Thread Batuhan
Batuhan added the comment: ExtSlice nodes without second value doesn't roundtrip properly source: x[1:2,] Expr( value=Subscript( value=Name(id='x', ctx=Load()), -slice=ExtSlice( -dims=[ -Slice(

[issue38870] Expose ast.unparse in the ast module

2020-01-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 7b35bef9787cd80ed1e12124f759b4be03c849db by Pablo Galindo (Batuhan Taşkaya) in branch 'master': bpo-38870: Throw ValueError on invalid yield from usage (GH-17798)

[issue38870] Expose ast.unparse in the ast module

2020-01-02 Thread Batuhan
Change by Batuhan : -- pull_requests: +17233 pull_request: https://github.com/python/cpython/pull/17798 ___ Python tracker ___ ___

[issue38870] Expose ast.unparse in the ast module

2020-01-02 Thread Batuhan
Change by Batuhan : -- pull_requests: +17232 pull_request: https://github.com/python/cpython/pull/17797 ___ Python tracker ___ ___

[issue38870] Expose ast.unparse in the ast module

2019-12-30 Thread Batuhan
Change by Batuhan : -- pull_requests: +17196 pull_request: https://github.com/python/cpython/pull/17760 ___ Python tracker ___ ___

[issue38870] Expose ast.unparse in the ast module

2019-12-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +17182 pull_request: https://github.com/python/cpython/pull/17739 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2019-12-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 23a226bf3ae7b462084e899d007d12d9fe398ac5 by Pablo Galindo in branch 'master': bpo-38870: Run always tests that heavily use grammar features in test_unparse (GH-17738)

[issue38870] Expose ast.unparse in the ast module

2019-12-29 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +17181 pull_request: https://github.com/python/cpython/pull/17738 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2019-12-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset d69cbeb99d5fd0d5464e937202cca6a2024d1bcf by Pablo Galindo in branch 'master': Revert "bpo-38870: Remove dependency on contextlib to avoid performance regression on import (GH-17376)" (GH-17687)

[issue38870] Expose ast.unparse in the ast module

2019-12-23 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38870] Expose ast.unparse in the ast module

2019-12-23 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +17143 pull_request: https://github.com/python/cpython/pull/17687 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2019-12-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 4b3b1226e86df6cd45e921c8f2ad23c3639c43b2 by Pablo Galindo (Batuhan Taşkaya) in branch 'master': bpo-38870: Refactor delimiting with context managers in ast.unparse (GH-17612)

[issue38870] Expose ast.unparse in the ast module

2019-12-16 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-39069: "Move ast.unparse() function to a different module". -- nosy: +vstinner ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2019-12-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset a322f50c369e2e4138266c88e32ef83af95b2da6 by Pablo Galindo (Batuhan Taşkaya) in branch 'master': bpo-38870: Remove dead code related with argument unparsing (GH-17613)

[issue38870] Expose ast.unparse in the ast module

2019-12-15 Thread Batuhan
Change by Batuhan : -- pull_requests: +17085 pull_request: https://github.com/python/cpython/pull/17613 ___ Python tracker ___ ___

[issue38870] Expose ast.unparse in the ast module

2019-12-15 Thread Batuhan
Change by Batuhan : -- pull_requests: +17084 pull_request: https://github.com/python/cpython/pull/17612 ___ Python tracker ___ ___

[issue38870] Expose ast.unparse in the ast module

2019-11-25 Thread Batuhan
Change by Batuhan : -- pull_requests: +16859 pull_request: https://github.com/python/cpython/pull/17377 ___ Python tracker ___ ___

[issue38870] Expose ast.unparse in the ast module

2019-11-25 Thread miss-islington
miss-islington added the comment: New changeset dedfbc33011dd39b7b1c86a5adfacc4943f3 by Miss Islington (bot) (Pablo Galindo) in branch 'master': bpo-38870: Remove dependency on contextlib to avoid performance regression on import (GH-17376)

[issue38870] Expose ast.unparse in the ast module

2019-11-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +16858 pull_request: https://github.com/python/cpython/pull/17376 ___ Python tracker ___

[issue38870] Expose ast.unparse in the ast module

2019-11-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 27fc3b6f3fc49a36d3f962caac5c5495696d12ed by Pablo Galindo in branch 'master': bpo-38870: Expose a function to unparse an ast object in the ast module (GH-17302)

[issue38870] Expose ast.unparse in the ast module

2019-11-22 Thread Guido van Rossum
Guido van Rossum added the comment: > @gvanrossum are you OK with adding type comments support? Current version > loses type comment information so if typed_ast parses this, they wont be the > same in AST representation. Good catch, definitely do that! --

[issue38870] Expose ast.unparse in the ast module

2019-11-21 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38870] Expose ast.unparse in the ast module

2019-11-21 Thread Batuhan
Batuhan added the comment: @gvanrossum are you OK with adding type comments support? Current version loses type comment information so if typed_ast parses this, they wont be the same in AST representation. -- nosy: +gvanrossum ___ Python tracker

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: After PR 17302 is accepted, I'll work on refactorings including a precedence algorithm to find when to parentheses. -- nosy: +Batuhan Taskaya ___ Python tracker

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: After PR17302 is merged we need to fix the following cosmetic issues indicated by Victor: (*) unparse adds many useless parentheses. The algorithm seems naive. For example, it adds "()" to "class _AddedDllDirectory():". It also adds parenthesis around

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +16794 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17302 ___ Python tracker

[issue38870] Expose ast.unparse in the ast module

2019-11-20 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : As discussed in https://mail.python.org/archives/list/python-...@python.org/thread/JAQDBMC23HW2PQ27HQNJ7G244T423IDD/ I propose to expose the unparse.py tool as part of the standard library in the ast module. The exposed function will have the