Skip to content

Update swift-rpathize.py to work with Python 3.8 and Python 2.7 #34332

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

Merged
merged 2 commits into from
Oct 20, 2020

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented Oct 16, 2020

Just need to explicitly convert the bytes blob into a real string before trying to pattern-match.

(In Python 2, str() and bytes are basically the same, so it's a lot more forgiving of such mixups.)

In Python 2, str() is also a kind of bytes blob
In Python 3, str() is a Unicode string that's unrelated
@tbkka tbkka requested a review from rjmccall October 16, 2020 19:26
@tbkka
Copy link
Contributor Author

tbkka commented Oct 16, 2020

@swift-ci Python lint

@tbkka
Copy link
Contributor Author

tbkka commented Oct 16, 2020

@swift-ci Please test

Copy link
Contributor

@rjmccall rjmccall left a comment

Choose a reason for hiding this comment

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

Thanks. This seems reasonable to me.

Python-lint correctly warns about single-character variables that can be confused with numbers
@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - a0d1e4e

@tbkka
Copy link
Contributor Author

tbkka commented Oct 16, 2020

macOS CI seems to be having problems apparently unrelated to this PR. I'll resubmit.

@tbkka
Copy link
Contributor Author

tbkka commented Oct 16, 2020

@swift-ci Please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - a0d1e4e

@tbkka
Copy link
Contributor Author

tbkka commented Oct 17, 2020

@swift-ci Please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - a0d1e4e

@tbkka
Copy link
Contributor Author

tbkka commented Oct 19, 2020

@swift-ci Please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - a0d1e4e

@tbkka
Copy link
Contributor Author

tbkka commented Oct 19, 2020

@swift-ci Please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - a0d1e4e

@tbkka
Copy link
Contributor Author

tbkka commented Oct 19, 2020

@swift-ci Please clean test macOS

@tbkka tbkka merged commit c5176c0 into swiftlang:main Oct 20, 2020
@tbkka tbkka deleted the tbkka/rpathize-python3 branch October 20, 2020 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants