Repository navigation
docs: replace removed dst_rule timezone examples - #1053
Open
Hugohong258 wants to merge 1 commit into
Open
Hugohong258 wants to merge 1 commit into
Hugohong258 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The timezone guide still calls
dst_ruleand transition constants removed in Pendulum 3, so those examples raiseAttributeErrororTypeError. Replace them withfoldandraise_on_unknown_times, including both normalization and directTimezone.convert()usage. Keep the original naive datetime when demonstrating the two fold choices, and note the Pendulum 2-to-3 API change.Related to #789. Runtime behavior and the rest of the documentation migration are unchanged.
Validation
Executed 13 statements from the exact edited examples and 18 timezone behavior controls against the current source under Python 3.12.3 with
PENDULUM_EXTENSIONS=0. The existing timezone/construction tests pass: 56 passed, 2 skipped. The Rust extension and complete test matrix were not built or run.MkDocs strict builds pass using an external configuration that resolves the existing source/theme/include paths, and the updated examples are present in both the combined index and timezone page. The repository's unchanged configuration also exits successfully but prints include-path warnings; it still labels the docs as 2.1. This PR does not update that configuration or claim that the live website has been migrated.
git diff --checkpasses.Pull Request Check List
Documentation-only change; the examples were executed against the existing implementation.