Skip to content

Conversation

@fangnx
Copy link
Member

@fangnx fangnx commented Nov 27, 2025

What

Minor fix to address the formatting issue of TopicPartiton: CFL_PRId32 macro expands to "I32d" on Windows (MSVC), which is not supported by Python's PyUnicode_FromFormat(). To fix it, we will replace CFL_PRId32 with %d. This is safe as partition is already declared as int in the struct

Checklist

  • Contains customer facing changes? Including API/behavior changes
  • Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

Issue: #1715
Jira: https://confluentinc.atlassian.net/browse/NONJAVACLI-4144

Test & Review

Open questions / Follow-ups

Copilot AI review requested due to automatic review settings November 27, 2025 20:54
@fangnx fangnx requested review from a team and MSeal as code owners November 27, 2025 20:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a Windows-specific formatting issue in the TopicPartition string representation. The CFL_PRId32 macro expands to "I32d" on Windows (MSVC), which is incompatible with Python's PyUnicode_FromFormat() function, causing formatting errors.

Key Changes:

  • Replaced the CFL_PRId32 format specifier with %d in the TopicPartition_str0 function, which is safe since the partition field is declared as int in the struct.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

@fangnx fangnx changed the title fix Fix formatting issue of TopicPartition that causes SystemError on Windows Nov 27, 2025
@sonarqube-confluent
Copy link

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.

2 participants