Conversation
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.
Changes proposed in this pull request:
minimum_unitrequests milliseconds or microseconds, using the existing_date_and_delta(..., precise=...)path.futurebehavior unchanged.Reproduction
On
mainat392aef707c0e74341ab4a51420984e9ea6b566c5:naturaltimepreviously rounded numeric inputs to whole seconds before passing them tonaturaldelta, even when finer resolution was explicitly requested. No matching open issue or PR was found; the reproduction is included here instead of opening a separate issue.Validation
Executed locally on Windows, CPython 3.14.0, in a virtual environment:
python -m pytest tests/test_time.py -q: 414 passed.python -m pytest -q --benchmark-disable --doctest-modules --cov=humanize -ra tests src/humanize: 891 passed, 2 skipped;humanize.timecoverage 100%.python -m ruff check --no-fix .,python -m black --check .,python -m mypy ., andpython -m mkdocs build --strict: passed.prek run --all-files --show-diff-on-failure --skip actionlint --skip yamlfmt: passed. The full run could not install Go due to a TLS/download failure, so those two Go-based hooks were not run. No workflow/YAML files are changed.The two pytest skips need GNU gettext's
xgettext/msgmerge/msgfmt, which are unavailable locally. The existing 36 translation catalogs were compiled locally usingpolibso translation-reading tests could run; no generated catalogs are included in this PR. Other OS/Python matrix jobs have not been run locally.Black's project configuration includes Python 3.15, which produces an AST-check warning under 3.14. A separate check with all supported targets from 3.10 through 3.14 also passed with AST checking enabled.
AI assistance disclosure
This patch and its tests were prepared, reviewed, and executed by an AI coding agent (OpenAI Codex) at the account owner's request. No human review or manual verification is claimed.