Skip to content

Remove a .utcnow() usage in a docstring - #1260

Merged
kurtmckee merged 1 commit into
mainfrom
rm-utcnow
Jul 16, 2025
Merged

Remove a .utcnow() usage in a docstring#1260
kurtmckee merged 1 commit into
mainfrom
rm-utcnow

Conversation

@kurtmckee

@kurtmckee kurtmckee commented Jul 16, 2025

Copy link
Copy Markdown
Member

I've been staring at this while working on another feature and decided to remove it in a separate PR.

This change still results in a timezone-unaware object, which matches what .utcnow() was producing.


📚 Documentation preview 📚: https://globus-sdk-python--1260.org.readthedocs.build/en/1260/

@kurtmckee kurtmckee self-assigned this Jul 16, 2025
@kurtmckee kurtmckee added the no-news-is-good-news This change does not require a news file label Jul 16, 2025

@sirosen sirosen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't know that we need to make sure it stays naive in the example, but it's easier to include the .replace() than it is to think about that. 😁

@kurtmckee

Copy link
Copy Markdown
Member Author

I chose naivete because knowing the timezone can affect string serialization...and you're right, it's easier to do the dumb switcheroo than to reason about the effects of code in a docstring. 😆

@kurtmckee
kurtmckee merged commit 038ed6d into main Jul 16, 2025
9 checks passed
@kurtmckee
kurtmckee deleted the rm-utcnow branch July 16, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-news-is-good-news This change does not require a news file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants