-
Notifications
You must be signed in to change notification settings - Fork 424
fix: Remove deprecated 'env=...' parameters in config.py #1237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Remove deprecated 'env=...' parameters in config.py #1237
Conversation
There was a problem hiding this 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 performs configuration cleanup and migrates the project to use uv for dependency management. The changes modernize the build system, remove deprecated Pydantic configurations, fix type hints, and improve CI workflows.
- Remove deprecated
env=...parameters from Pydantic Field definitions - Migrate pytest workflows and Makefile from pip to uv for better dependency management
- Fix type annotations for
keep_aliveparameter in translate.py functions - Reorganize pyproject.toml dependency structure and resolve conflicts
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/test_translate_echo.py | Modernized test code with proper type hints, improved assertions, and pytest fixture usage |
| pyproject.toml | Restructured dependencies from optional-dependencies to dependency-groups and removed conflicts |
| mcpgateway/translate.py | Fixed type hints for keep_alive parameters from int to float |
| mcpgateway/config.py | Removed deprecated env= parameters from Pydantic Field definitions |
| docs/docs/manage/observability/observability.md | Enhanced documentation with detailed backend comparison guide |
| Makefile | Updated to use uv/uvx for test execution and semgrep scanning |
| .github/workflows/pytest.yml | Migrated CI workflow from pip to uv for dependency management |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Pydantic automatically infers environment variable names from field names, making the explicit env= parameter unnecessary and deprecated. This change removes all env= parameters from Field definitions in config.py to align with current Pydantic best practices. Changes: - Remove env="PORT", env="JWT_SECRET_KEY", env="AUTH_ENCRYPTION_SECRET" - Remove env parameters from security and CORS settings - Remove env="LOG_LEVEL", env="ENVIRONMENT", env="APP_DOMAIN" - Remove env="FEDERATION_PEERS", env="SSO_ISSUERS" All environment variables continue to work as before through Pydantic's automatic inference based on field names. Signed-off-by: Jonathan Springer <[email protected]>
ab3a986 to
3624e7f
Compare
Pydantic automatically infers environment variable names from field names, making the explicit env= parameter unnecessary and deprecated. This change removes all env= parameters from Field definitions in config.py to align with current Pydantic best practices. Changes: - Remove env="PORT", env="JWT_SECRET_KEY", env="AUTH_ENCRYPTION_SECRET" - Remove env parameters from security and CORS settings - Remove env="LOG_LEVEL", env="ENVIRONMENT", env="APP_DOMAIN" - Remove env="FEDERATION_PEERS", env="SSO_ISSUERS" All environment variables continue to work as before through Pydantic's automatic inference based on field names. Signed-off-by: Jonathan Springer <[email protected]> Signed-off-by: p4yl04d3r <[email protected]>
Summary
Remove deprecated
env=...parameters from Pydantic Field definitions in config.py. Pydantic automatically infers environment variable names from field names, making the explicit env= parameter unnecessary and deprecated.Changes
env="PORT",env="JWT_SECRET_KEY",env="AUTH_ENCRYPTION_SECRET"env="LOG_LEVEL",env="ENVIRONMENT",env="APP_DOMAIN"env="FEDERATION_PEERS",env="SSO_ISSUERS"All environment variables continue to work as before through Pydantic's automatic inference based on field names.
Test plan
Generated with Claude Code