Skip to content

Conversation

F0RRZZ
Copy link
Contributor

@F0RRZZ F0RRZZ commented Sep 18, 2025

Previously, using non-zero-padded directives (e.g., %-d) in strftime caused test failures on Windows and Android (x86_64), while other platforms worked as expected.
This has been fixed by manually handling such specifiers on these platforms.
Corresponding tests have been added to strftime tests.

On Windows using non-zero-padded directives raised ValueError.

On Android (x86_64) dicrectives were not replaced:
Screenshot 2025-09-18 at 03 45 28

@F0RRZZ F0RRZZ changed the title gh-137165: Add non-zero-padded Windows support for datetime.strftime gh-137165: Standardized non-zero-padded date formatting for datetime.strftime Sep 18, 2025
@mhsmith
Copy link
Member

mhsmith commented Sep 18, 2025

!buildbot iOS

@bedevere-bot

This comment was marked as outdated.

@mhsmith
Copy link
Member

mhsmith commented Sep 18, 2025

The implementation looks reasonable, but this should also be covered in the documentation, along with the fact that the - flag apparently has no effect on %y on Apple platforms.

@F0RRZZ
Copy link
Contributor Author

F0RRZZ commented Sep 18, 2025

@mhsmith I adapted the tests for iOS and added documentation in the strftime notes.

@F0RRZZ F0RRZZ requested a review from mhsmith September 18, 2025 14:39
@F0RRZZ
Copy link
Contributor Author

F0RRZZ commented Sep 18, 2025

@StanFromIreland Made all changes

@mhsmith

This comment was marked as resolved.

@bedevere-bot

This comment was marked as outdated.

@F0RRZZ
Copy link
Contributor Author

F0RRZZ commented Sep 19, 2025

@mhsmith All done, but TSan seems to be stuck

@F0RRZZ F0RRZZ requested a review from mhsmith September 19, 2025 05:46
@StanFromIreland
Copy link
Member

StanFromIreland commented Sep 24, 2025

!buildbot Windows11.Refleaks

Third time lucky!

@bedevere-bot

This comment was marked as outdated.

@python python deleted a comment from bedevere-bot Sep 24, 2025
@python python deleted a comment from bedevere-bot Sep 24, 2025
@mhsmith mhsmith added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 25, 2025
@bedevere-bot

This comment was marked as outdated.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 25, 2025
@F0RRZZ
Copy link
Contributor Author

F0RRZZ commented Sep 25, 2025

@mhsmith Fixed, lets test

@F0RRZZ F0RRZZ requested a review from mhsmith September 25, 2025 19:33
@mhsmith mhsmith added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Sep 26, 2025
@bedevere-bot

This comment was marked as outdated.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Sep 26, 2025
Copy link
Member

@mhsmith mhsmith left a comment

Choose a reason for hiding this comment

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

I've started the refleaks tests, but I suggest you work out how to run them on your own machine rather than requiring a team member to rerun them on every commit. I don't know exactly how to do this, but it looks like it involves the -R option of python -m test. See the buildbot configuration for more details.

@F0RRZZ
Copy link
Contributor Author

F0RRZZ commented Sep 26, 2025

@mhsmith Thanks! I'm running them on my machine, I just thought they needed to be run here as well to make sure everything works

@F0RRZZ F0RRZZ requested a review from mhsmith September 27, 2025 21:29
Copy link
Member

@mhsmith mhsmith 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 looks much better. Just a few stylistic comments:

@F0RRZZ
Copy link
Contributor Author

F0RRZZ commented Oct 1, 2025

@mhsmith All done

@F0RRZZ F0RRZZ requested a review from mhsmith October 1, 2025 21:05
@mhsmith mhsmith added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 1, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @mhsmith for commit 9212a5a 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F139088%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 1, 2025
Copy link
Member

@mhsmith mhsmith left a comment

Choose a reason for hiding this comment

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

@pganssle: I think this is ready for final review.

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

Successfully merging this pull request may close these issues.

Enhancement Proposal: Standardized Support for Non-Zero-Padded Day and Month Formatting in datetime.strftime
4 participants