FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-23894: Make rb'' strings work in lib2to3 by ambv · Pull Request #1724 · python/cpython · GitHub

/ cpython Public

bpo-23894: Make rb'' strings work in lib2to3 - #1724

Merged
ambv merged 1 commit into
python:masterfrom
ambv:bpo-23894-rb
May 22, 2017
Merged

bpo-23894: Make rb'' strings work in lib2to3#1724
ambv merged 1 commit into
python:masterfrom
ambv:bpo-23894-rb

Conversation

ambv commented May 22, 2017

Copy link
Copy Markdown
Contributor

This partially solves bpo-23894. A separate PR coming later to support f-strings.

ambv added type-bug An unexpected behavior, bug, or error needs backport to 3.6 labels May 22, 2017
ambv requested a review from ned-deily May 22, 2017 18:46
ambv changed the title Make rb'' strings work in lib2to3 bpo-23894: Make rb'' strings work in lib2to3 May 22, 2017
ambv force-pushed the bpo-23894-rb branch 2 times, most recently from 76b0e9d to d330004 Compare May 22, 2017 19:04
Comment thread Lib/lib2to3/pgen2/tokenize.py Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

"String" didn't previously include b but this is suspicious to me. Why wouldn't it? That way b'' literals were only PseudoTokens (via ContStr), not actual Tokens (via String).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LG

ned-deily left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for adding the test: LGTM. As far as the tokenizer changes, I'm not familiar enough with lib2to3 to provide a useful review. Assuming other reviewers have no objections, I'm fine for this going into 3.6.2rc.

ambv commented May 22, 2017
edited
Loading

Copy link
Copy Markdown
Contributor Author

Tests are failing because I used an f-string in the test and lib2to3 is parsing that test file as part of fixers. f-strings are not supported yet in lib2to3. Switching to using a classic str.format fixes it. I'm updating the PR now.

UPDATE: as expected, tests pass now.

This partially solves bpo-23894.
ambv requested review from gvanrossum and vstinner May 22, 2017 19:42
ambv merged commit 0c4aca5 into python:master May 22, 2017
ambv added a commit to ambv/cpython that referenced this pull request May 22, 2017
This partially solves bpo-23894.
(cherry picked from commit 0c4aca5)
ambv added a commit that referenced this pull request May 22, 2017
This partially solves bpo-23894.
(cherry picked from commit 0c4aca5)

Copy link
Copy Markdown
Member

I was requested for a review, but after I completed my review, I see that the change was already merged :-D It's fine, don't worry. I just want to give my post-commit LGTM! Nice change. Thanks @ambv for taking care of 2to3 ;-)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL