GeezerVison is showing github.com — sprintf deprecation warning on macOS for datetimemodule · Issue #103733 · python/cpython
sprintf deprecation warning on macOS for datetimemodule #103733
Description
How to reproduce
./configure --with-address-sanitizer && make
Deprecation warning
./Modules/_datetimemodule.c:1566:9: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
sprintf(freplacement, "%06d", 0);
Activity
corona10 commented on Apr 24, 2023
corona10 commented on Apr 24, 2023
I expect that the solution will not be hard, so I label the issue as easy
pganssle commented on Apr 24, 2023
Seems like a good sprint issue? Assuming we can detect this in the tests easily or otherwise verify the fix.
Reacted by Donghee Na
Reacted by Donghee Na
arhadthedev commented on Apr 24, 2023
Can PyOS_snprintf() be a drop-in replacement here? (edit: just asking, I will not take this issue).
corona10 commented on Apr 24, 2023
Seems like a good sprint issue? Assuming we can detect this in the tests easily or otherwise verify the fix.
I will be happy if it can be used for the sprint issue. But I leave tomorrow, so some of the core dev can do it on the sprint.
arhadthedev commented on Apr 24, 2023
sobolevn commented on Apr 24, 2023
Thanks a lot, @arhadthedev!
I will highly appreciate a review of #101729 :)
It seems ready to me.
Metadata
Metadata
Development
No branches or pull requestsIssue actions