Skip to content

Conversation

@Msameim181
Copy link
Owner

No description provided.

Msameim181 and others added 22 commits March 10, 2025 13:59
chore: bump version to 0.2.12 and update python-socketio dependencies
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updated `httpx` version constraint in `pyproject.toml` to `>=0.27.2`.
* Organized dependencies in `requirements.txt` for clarity.
* Removed redundant configuration from `setup.cfg`.
* Added `ruff` and `mypy` configurations for improved linting and type checking.
* Removed unused arguments in `SysLogFormatter`.
* Organized import statements across multiple files for consistency.
* Ensured all files end with a newline for better compatibility.
* Changed the value of `asyncio_default_fixture_loop_scope` in `pytest.ini` from a string to a bareword for consistency with pytest configuration.
fix: resolve issues in license and package versions
Copilot AI review requested due to automatic review settings November 26, 2025 07:21
* Bumped the project version in `pyproject.toml` to reflect the latest changes.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the chromatrace package structure to improve modularity and updates dependencies. However, there's a critical version mismatch between the PR title (0.2.12) and the actual code (0.2.13), and the changes include breaking API changes that should be reflected in the version number following semantic versioning.

Key Changes

  • API restructuring: Framework-specific middleware and utilities moved from main module to submodules (e.g., chromatrace.fastapi, chromatrace.socketio, chromatrace.uvicorn)
  • Dependency updates: Updated python-socketio from 5.11.4 to 5.12.1, removed unnecessary packages (asyncio, socketio), changed pinned versions to minimum versions with >=
  • License change: Switched from AGPL-3.0 to MIT license

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml Version bump to 0.2.13 (mismatch with PR title), dependency updates with version ranges, addition of optional dependencies for django and dev tools, migration of ruff/mypy config from setup.cfg
src/chromatrace/init.py Breaking change: Removed framework-specific exports, now only exports core logging functionality
requirements.txt Updated dependencies with minimum version constraints, removed unnecessary packages, organized with comments
test/logger_test.py Reorganized imports to follow PEP 8: separated third-party from local imports
src/examples/tests/chromatrace_test.py Import reorganization following PEP 8 conventions
src/examples/main.py Import reorganization following PEP 8 conventions
src/examples/injection.py Import reorganization following PEP 8 conventions
src/examples/frameworks/socket_app.py Updated imports to use new submodule structure for SocketIO and uvicorn utilities
src/examples/frameworks/api_app.py Updated imports following PEP 8 conventions
src/examples/adaptors/socket_client.py Import reorganization following PEP 8 conventions
src/chromatrace/logging_settings.py Fixed SysLogFormatter to remove incorrect *args parameter
src/chromatrace/fastapi.py Trailing whitespace cleanup
src/chromatrace/RabbitMQ.py Trailing whitespace cleanup
setup.cfg Removed ruff and mypy configurations (moved to pyproject.toml)
pytest.ini Fixed configuration value formatting (removed quotes)
README.md Updated documentation to reflect new import paths for middleware
LICENSE Changed from AGPL-3.0 to MIT license

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pyproject.toml Outdated
[project]
name = "chromatrace"
version = "0.2.11"
version = "0.2.14"
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

The PR title mentions version bump to 0.2.12, but the actual version in the code is 0.2.13. This inconsistency should be corrected - either update the PR title to reflect 0.2.13 or change the version number to 0.2.12.

Suggested change
version = "0.2.14"
version = "0.2.12"

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +17
from .logging_config import LoggingConfig
from .logging_settings import LoggingSettings
from .tracer import (
RequestIdContext,
get_trace_id,
trace_id_ctx,
tracer,
)
from .uvicorn import GetLoggingConfig, UvicornLoggingSettings # noqa: F401

__all__ = [
"LoggingConfig",
"LoggingSettings",
"RequestIdContext",
"get_trace_id",
"trace_id_ctx",
"tracer",
]
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

This is a breaking change in the public API. The middleware classes (FastAPIRequestIdMiddleware, DjangoRequestIdMiddleware, SocketRequestIdMiddleware) and uvicorn utilities (GetLoggingConfig, UvicornLoggingSettings) are no longer exported from the main chromatrace module. Users will need to update their imports to use chromatrace.fastapi, chromatrace.django, chromatrace.socketio, and chromatrace.uvicorn instead. This should be clearly documented in the release notes as a breaking change, and the version bump should ideally be a major version change (e.g., 0.3.0 instead of 0.2.13) to follow semantic versioning.

Copilot uses AI. Check for mistakes.
* Changed project license in `README.md` and `pyproject.toml`
* Updated version to `0.2.15`
chore: update license from GNU AGPL to MIT License
* Introduced `custom_handlers` field in `LoggingSettings` to allow users to specify custom logging handlers.
* Updated `_setup_custom_handlers` method in `LoggingConfig` to configure these handlers if provided.
* Incremented the version number in `pyproject.toml` to reflect the latest changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants