Skip to content

Conversation

@Aokizy2
Copy link

@Aokizy2 Aokizy2 commented Dec 26, 2025

Rationale for this change

Message.__repr__ showed format placeholders ({self.type}) instead of actual values.

What changes are included in this PR?

Add missing f prefix to f-string in Message.__repr__ (pyarrow/lib.pxi).

Are these changes tested?

Yes: added test verifying string representation shows actual values.

Are there any user-facing changes?

Yes (bug fix): str(message) now shows values like type: RecordBatch instead of placeholders.
related to issue #48608

@github-actions
Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@rustyconover
Copy link

@Aokizy2 looks great to me, please rename this PR to follow the recommended naming convention.

@Aokizy2 Aokizy2 changed the title fix: interpolate actual values in Message.__repr__ f-string GH-48608: [Python] Fix interpolate actual values in Message.__repr__ f-string Jan 2, 2026
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

⚠️ GitHub issue #48608 has been automatically assigned in GitHub to PR creator.

@Aokizy2
Copy link
Author

Aokizy2 commented Jan 2, 2026

@rustyconover OK,I've renamed this PR.

Copy link

@rustyconover rustyconover left a comment

Choose a reason for hiding this comment

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

Looks great to me.

@rok
Copy link
Member

rok commented Jan 2, 2026

Thanks finding this @rustyconover and for opening a PR @Aokizy2!
This is pretty straight forward and odd that it got looked over when it was added!
Would it be possible to add a test for this to prevent any future regressions?

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jan 2, 2026
@rustyconover
Copy link

I think the diff has too many formatting changes in it, can you have it not change so much existing code?

@Aokizy2
Copy link
Author

Aokizy2 commented Jan 2, 2026

sure,I'll change it

@Aokizy2
Copy link
Author

Aokizy2 commented Jan 2, 2026

Is it ok now?

@rok
Copy link
Member

rok commented Jan 2, 2026

Thanks, that looks good @Aokizy2, will merge if CI passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants