fix: release pipeline + correctness hotfixes (#77)#80
Merged
Conversation
added 2 commits
April 26, 2026 17:55
Four P0 issues from external review, shipped together. URLs (#77 §1) - pyproject.toml [project.urls]: align Homepage/Documentation/Repository/Issues with the actual GitHub repo (azure-functions-logging-python). The PyPI project name itself stays 'azure-functions-logging' as published. - README.md, README.ko.md, README.ja.md, README.zh-CN.md badge URLs updated for CI, Release, Security Scans, codecov, Docs links. - mkdocs.yml site_url, llms.txt and llms-full.txt doc URLs, docs/ git clone examples, .github/workflows/stale.yml repository guard updated to the real repo path. Version drift (#77 §2) - Bump __version__ from 0.5.0 to 0.5.2. - Update tests/test_public_api.py to assert the new version. - The phantom v0.5.1 GitHub release and tag (Publish to PyPI failed due to __version__/tag mismatch; PyPI was never updated) is being removed out-of-band so v0.5.0 is once again the latest published release until v0.5.2 ships. JsonFormatter loses logs on unserializable extra (#77 §3) - Add _json_default fallback that coerces unknown values to str(value), with a sentinel string when str() itself raises. - json.dumps now passes default=_json_default so datetime, Decimal, UUID, dataclasses, exceptions, and request objects no longer crash the formatter or drop the log line. - Regression tests for datetime/Decimal/UUID, dataclass, and a hostile __str__ class. FunctionLogger crashes on reserved LogRecord keys (#77 §4) - Add _sanitize_extra() that prefixes any key colliding with a reserved LogRecord attribute (name, msg, levelname, message, etc.) with 'extra_' before forwarding to logging.Logger.log. - Applies to both **kwargs forwarded into extra and the explicit extra= argument. - Regression tests against MagicMock and a real stdlib logger.
Six docs files still instructed users to 'cd azure-functions-logging' after cloning the renamed 'azure-functions-logging-python' repo, leaving the working directory at the parent path and breaking every subsequent command in the install/dev/contribute walkthroughs. Refs #77
This was referenced Apr 26, 2026
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.
Summary
Resolves #77 (P0). Bundles four hotfixes that unblock the release pipeline and remove two correctness footguns in the runtime.
azure-functions-logging-python. The PyPI distribution name (azure-functions-logging) is intentionally unchanged.__version__bumped0.5.0 → 0.5.2andtests/test_public_api.pyupdated to match. The phantomv0.5.1GitHub release/tag (which failedpublish-pypidue to the existing tag-vs-__version__guard) has been deleted.json.dumpsnow uses adefault=fallback (str(value), then<unserializable:Type>sentinel). Previously, a single non-JSON-serializable field inextra=would raiseTypeErrorand drop the entire log record._RESERVED_LOG_RECORD_KEYS+_sanitize_extra()which prefixes any colliding key withextra_. Previously, passing kwargs likemessage=,args=,levelname=, etc. would raiseKeyErrordeep inside stdliblogging.Logger._log.Note on AGENTS.md "Do NOT manually edit version strings"
This PR intentionally bumps
__version__by hand because the PR itself fixes the release pipeline. Runningmake release-patchwas not viable — the previous release attempt (v0.5.1) is exactly what this PR repairs. Subsequent releases should resume the standard Makefile flow.Verification
ruff format+ruff legacy: cleanmypy --strict(24 source files): cleanpytest: 133 passed, 3 skipped (e2e env unset), coverage 97.32% (fail_under=90)python -m build:azure_functions_logging-0.5.2-py3-none-any.whlbuilt successfullyNew regression tests (7)
test_json_formatter.py: datetime/Decimal/UUID coercion, dataclass coercion, hostile__str__→ sentineltest_logger.py: kwargs reserved-key sanitization, explicitextra=reserved-key sanitization, non-reserved keys unchanged, real stdlib end-to-endCloses #77