Skip to content

Release! PR for 2026-05-05 23:36#64

Merged
disafronov merged 34 commits into
releasefrom
main
May 5, 2026
Merged

Release! PR for 2026-05-05 23:36#64
disafronov merged 34 commits into
releasefrom
main

Conversation

@disafronov
Copy link
Copy Markdown
Owner

@disafronov disafronov commented May 5, 2026

Changelog (#64)

IMPORTANT: There is 1 breaking change.

🐛 Bug Fixes

  • enforce non-empty strings for type and source fields

📚 Documentation

  • Update schema loader cache key and locking mechanism
  • tighten inline comments; document _CompiledSchema fields
  • restore os._exit(1) rationale in comment and README
  • Update type checking in README

♻️ Refactoring

  • Optimize schema applier and loader
  • schema applier to improve dict cleaning
  • error handling to use dictionaries instead of JSON strings
  • Remove unused _is_leaf_node function and tests
  • Remove inspect fallback for Python < 3.11
  • Remove future annotations from modules

🧪 Tests

  • Add test for cache hit on missing file in schema loader
  • Remove obsolete tests for Python 3.11 and earlier
  • Improve Test Isolation in Conftest

🏗️ Build System

  • Update Makefile to pin Python version
  • Refactor test command to include coverage by default
  • Update Makefile to remove formatting step from all target
  • Update coverage configuration
  • Bump python version to 3.11
  • Update pre-commit config to fix test exclusion
  • Add markdownlint ignore file for changelog

🤖 CI

  • rm unused
  • major
  • Update python versions in lint and test workflow
  • Update dependencies to latest versions
  • pr
  • fix auto-pr-description workflow

🧹 Chores

  • sync from template v2.1.0
  • Update pre-commit configuration
  • Update pre-commit config to exclude helpers.py
  • (release) 0.4.2-rc.1
  • (release) 0.4.2-rc.2
  • 💥 BREAKING CHANGE: (release) 1.0.0-rc.1

❓ Uncategorised!

  • feat!: promote to stable 1.0.0

🔄 Upgrade instructions

💥 (release) 1.0.0-rc.1

//github.com/disafronov/python-logging-objects-with-schema/compare/v0.4.2-rc.2...v1.0.0-rc.1) (2026-05-05)

⚠ BREAKING CHANGES

  • first stable release, no longer considered experimental

Signed-off-by: Dmitrii Safronov zimniy@cyberbrain.cc

Features

  • promote to stable 1.0.0 (1fdd2ec)

Signed-off-by: semantic-release-bot semantic-release-bot@martynus.net

disafronov and others added 30 commits April 28, 2026 11:07
Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Update the Makefile to pin the Python version via `.python-version` file used by uv and CI, and modify the install target to install dependencies with the specified Python version, ensuring consistent development environment and reproducibility.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Change test target in Makefile to run with coverage, removing need for separate test-coverage command, improving code quality and simplifying testing process

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Remove format from all target to prevent unnecessary reformatting of code, as it can introduce unwanted changes and make it harder to review test and dead-code check results. This change improves the efficiency of the all target by only running lint, test, and dead-code check.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Update pre-commit-config.yaml to add check-case-conflict and name-tests-test hooks and remove make-format hook to improve code quality and consistency.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Update pyproject.toml to include fail_under in coverage report to ensure 100% coverage is required for a successful test run, preventing partial coverage from being considered a pass.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Added a new test case to verify the behavior of the `check_cached_found_file_path` function when the cache contains a missing-file entry, ensuring it returns None as expected.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
The commit introduces several key improvements to the schema applier and loader.
It optimizes the schema applier by removing the use of defaultdict for grouping leaves by source field name,
instead using a compiled schema that stores this information.
The schema loader is also updated to include a compiled schema class that stores
the mapping of sources to leaves and the set of known sources.
These changes improve the efficiency and readability of the code.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Refactor _strip_empty function in schema_applier to correctly remove empty dicts and None values from nested structures, improving performance and readability by using an iterative approach instead of list comprehension.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
The error handling in the logging objects with schema module has been refactored to use dictionaries instead of JSON strings. This change was made to improve the efficiency and clarity of the error handling code. The new approach uses dictionaries to store error information, which can then be easily converted to JSON strings when needed. The refactor includes updates to the _DataProblem class and the _create_validation_error function, which now returns a dictionary instead of a JSON string. Additionally, the code has been updated to use the json.dumps function to convert the error dictionary to a JSON string when necessary. This change improves the overall structure and readability of the code, making it easier to maintain and extend in the future.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
* Removed _is_leaf_node function from schema_loader
* Removed import and usage of _is_leaf_node in test_schema_loader
* Removed tests related to _is_leaf_node in test_schema_loader

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Removed python 3.10 from test matrix to reflect current support and ensure compatibility with latest versions.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Update pyproject.toml and uv.lock to require python 3.11, and update dependencies to match the new python version, ensuring compatibility and resolving potential issues with outdated dependencies.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Remove unused test and imports, update logger to use findCaller for all Python versions, improving performance.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Updated bandit from 1.9.2 to 1.9.4, click from 8.3.1 to 8.3.3 and other packages to ensure compatibility and resolve potential security issues. Added resolution markers for python 3.15.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Update the pre-commit configuration to exclude tests/helpers.py instead of tests/runner.py to prevent unnecessary linting and improve performance. This change ensures that only relevant files are checked during the pre-commit stage.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Update .pre-commit-config.yaml to correctly exclude tests/helpers.py files from all directories, ensuring accurate test runs by modifying the exclude pattern to ^(.*/)?tests/helpers\.py$ to account for file paths that may or may not include a leading directory.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Introduce .markdownlintignore file to exclude CHANGELOG.md from markdown linting to prevent false positives and allow for a more flexible changelog formatting.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Update test_schema_logger to reflect changes in Python 3.11 logging
The removed tests, test_schema_logger_log_uses_inspect_stack_fallback_for_old_python and test_schema_logger_log_fallback_to_findcaller_when_stack_too_short, were specific to Python versions prior to 3.11 and are no longer relevant due to changes in logging behavior

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
* Removed unused import of __future__.annotations from multiple modules to improve code readability and remove unnecessary imports
* This change is intended to simplify code maintenance and adhere to Python's evolving type hinting standards, as the `__future__.annotations` import is not necessary in Python 3.7 and later versions where type hints are enabled by default.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
## [0.4.2-rc.1](v0.4.1...v0.4.2-rc.1) (2026-05-05)

Signed-off-by: semantic-release-bot <semantic-release-bot@martynus.net>
Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
fix: enhance clear_schema_cache fixture to clear all schema caches before and after each test, ensuring proper test isolation by removing any residual schema data from previous tests. This prevents potential test interference and ensures reliable test results.
Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Improve cache key to include forbidden keys and clarify RLock usage for thread safety.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Replace verbose obvious comments with concise "why" explanations.
Add Attributes section to _CompiledSchema docstring covering  source_to_leaves, known_sources, and is_empty.
Remove dangling <!--placeholder --> from README.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
Changed validation error messages in schema_loader.py to require non-empty strings for type and source fields. Updated test_schema_loader.py to reflect these changes. Now, type and source fields must be non-empty strings to pass validation.

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
fix(type checking): clarify type checks using type() instead of isinstance() to ensure strict type matching without implicit conversions

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
disafronov and others added 4 commits May 6, 2026 03:22
fix auto-pr-description.yml to exclude dependencies and only run on specific branch combinations

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
## [0.4.2-rc.2](v0.4.2-rc.1...v0.4.2-rc.2) (2026-05-05)

### Bug Fixes

* enforce non-empty strings for type and source fields ([21ba61d](21ba61d))

Signed-off-by: semantic-release-bot <semantic-release-bot@martynus.net>
BREAKING CHANGE: first stable release, no longer considered experimental

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>
## [1.0.0-rc.1](v0.4.2-rc.2...v1.0.0-rc.1) (2026-05-05)

### ⚠ BREAKING CHANGES

* first stable release, no longer considered experimental

Signed-off-by: Dmitrii Safronov <zimniy@cyberbrain.cc>

### Features

* promote to stable 1.0.0 ([1fdd2ec](1fdd2ec))

Signed-off-by: semantic-release-bot <semantic-release-bot@martynus.net>
@github-actions github-actions Bot changed the title new Release! PR for 2026-05-05 23:36 May 5, 2026
@disafronov disafronov merged commit c9abbd1 into release May 5, 2026
21 checks passed
@disafronov
Copy link
Copy Markdown
Owner Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants