fix(SU2_PY): replace Python 2 string.join() with str.join() in polarSweepLib.py#2760
Open
riddhi1228 wants to merge 2 commits intosu2code:developfrom
Open
fix(SU2_PY): replace Python 2 string.join() with str.join() in polarSweepLib.py#2760riddhi1228 wants to merge 2 commits intosu2code:developfrom
riddhi1228 wants to merge 2 commits intosu2code:developfrom
Conversation
…weepLib.py string.join() was removed in Python 3. Replace with the equivalent ''.join() syntax. Also removes the now-unused 'import string' statement. Fixes AttributeError: module 'string' has no attribute 'join' when running polar sweep analysis on Python 3.
pcarruscag
approved these changes
Mar 19, 2026
6 tasks
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
string.join()was removed in Python 3, causing an immediateAttributeError: module 'string' has no attribute 'join'when running polar sweep analysis on any modern Python installation. Replacesstring.join(x.split(), "")with"".join(x.split())— identical behavior, Python 3 compatible. Also removes the now-unusedimport stringstatement.Related Work
Part of the Python 3 modernization of SU2_PY scripts (see PR #2758).
PR Checklist