Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove expr_text from ast node FormattedValue #81231

Closed
ericvsmith opened this issue May 25, 2019 · 2 comments
Closed

Remove expr_text from ast node FormattedValue #81231

ericvsmith opened this issue May 25, 2019 · 2 comments
Assignees
Labels
3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@ericvsmith
Copy link
Member

BPO 37050
Nosy @ericvsmith, @ambv, @Carreau
PRs
  • bpo-37050: Remove expr_text from FormattedValue ast node, use Constant node instead #13597
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/ericvsmith'
    closed_at = <Date 2019-05-27.19:32:39.986>
    created_at = <Date 2019-05-25.20:57:14.839>
    labels = ['interpreter-core', 'type-bug', '3.8']
    title = 'Remove expr_text from ast node FormattedValue'
    updated_at = <Date 2019-05-27.19:32:39.986>
    user = 'https://github.com/ericvsmith'

    bugs.python.org fields:

    activity = <Date 2019-05-27.19:32:39.986>
    actor = 'eric.smith'
    assignee = 'eric.smith'
    closed = True
    closed_date = <Date 2019-05-27.19:32:39.986>
    closer = 'eric.smith'
    components = ['Interpreter Core']
    creation = <Date 2019-05-25.20:57:14.839>
    creator = 'eric.smith'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37050
    keywords = ['patch']
    message_count = 2.0
    messages = ['343511', '343677']
    nosy_count = 3.0
    nosy_names = ['eric.smith', 'lukasz.langa', 'mbussonn']
    pr_nums = ['13597']
    priority = None
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue37050'
    versions = ['Python 3.8']

    @ericvsmith
    Copy link
    Member Author

    I added the expr_text optional field to the FormattedValue node in order to implement the '=' feature of f-strings (see bpo-36817).

    However, the expr_text field isn't strictly needed. Instead, the same feature could be added with another Constant string node child of the JoinedStr node.

    I'm going to remove expr_text and use another Constant in order to remove this change to the 3.8 ast nodes. I have a patch mostly worked out, I'll have it ready in the next day or two. I want to get this in to 3.8 beta 1, because otherwise we're stuck with the expr_text implementation.

    @ericvsmith ericvsmith added release-blocker 3.8 only security fixes labels May 25, 2019
    @ericvsmith ericvsmith self-assigned this May 25, 2019
    @ericvsmith ericvsmith added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label May 25, 2019
    @ericvsmith
    Copy link
    Member Author

    New changeset 6f6ff8a by Eric V. Smith in branch 'master':
    bpo-37050: Remove expr_text from FormattedValue ast node, use Constant node instead (GH-13597)
    6f6ff8a

    @ericvsmith ericvsmith added type-bug An unexpected behavior, bug, or error and removed release-blocker labels May 27, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant