This is an automated email from the ASF dual-hosted git repository.
bharos pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino-mcp-gateway.git
The following commit(s) were added to refs/heads/main by this push:
new f3a3c6f [MINOR] build(deps): Update pylint to 4.1.3 (#15)
f3a3c6f is described below
commit f3a3c6f8ce1b2c0840afdc7ffd61636cfb5ae417
Author: Bharath Krishna <[email protected]>
AuthorDate: Thu Nov 19 09:09:19 2026 -0800
[MINOR] build(deps): Update pylint to 4.1.3 (#15)
Pylint before 4.0.9 runs code from a crafted stats cache in
PYLINT_HOME (CVE-2026-114608). Pylint only runs in development and CI,
not in the Docker image.
Pylint 4 checks a module-level name assigned once against the constant
naming style. Five lazily set singletons, which functions change through
global, and SQLAlchemy's SessionLocal keep their names with a disable on
their line. A test helper that holds a function is renamed to
snake_case.
---
mcp_gateway/database.py | 2 +-
mcp_gateway/gateway_keys.py | 4 ++--
mcp_gateway/oauth/token_encryption.py | 2 +-
mcp_gateway/routes/mcp_server.py | 2 +-
mcp_gateway/slack/app.py | 2 +-
pyproject.toml | 2 +-
tests/test_mcp_access.py | 4 ++--
uv.lock | 14 +++++++-------
8 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/mcp_gateway/database.py b/mcp_gateway/database.py
index 91b8f1c..f08c3de 100644
--- a/mcp_gateway/database.py
+++ b/mcp_gateway/database.py
@@ -85,7 +85,7 @@ else:
# Create session factory
# expire_on_commit=False keeps loaded attributes available after commit
# so fire-and-forget background tasks can safely read scalar values.
-SessionLocal = sessionmaker(
+SessionLocal = sessionmaker( # pylint: disable=invalid-name
autocommit=False, autoflush=False, expire_on_commit=False, bind=engine
)
diff --git a/mcp_gateway/gateway_keys.py b/mcp_gateway/gateway_keys.py
index 1176422..ed5eb5f 100644
--- a/mcp_gateway/gateway_keys.py
+++ b/mcp_gateway/gateway_keys.py
@@ -44,9 +44,9 @@ from .config import settings
logger = logging.getLogger(__name__)
# Module-level singletons (populated on first access)
-_private_key: Any = None
+_private_key: Any = None # pylint: disable=invalid-name
_public_jwk: Dict[str, Any] = {}
-_kid: str = ""
+_kid: str = "" # pylint: disable=invalid-name
def _base64url_encode(data: bytes) -> str:
diff --git a/mcp_gateway/oauth/token_encryption.py
b/mcp_gateway/oauth/token_encryption.py
index 373e42b..d4e7c6e 100644
--- a/mcp_gateway/oauth/token_encryption.py
+++ b/mcp_gateway/oauth/token_encryption.py
@@ -108,7 +108,7 @@ class TokenEncryption:
# Global encryption instance (initialized on first use)
-_token_encryption: Optional[TokenEncryption] = None
+_token_encryption: Optional[TokenEncryption] = None # pylint:
disable=invalid-name
def _configured_key() -> Optional[str]:
diff --git a/mcp_gateway/routes/mcp_server.py b/mcp_gateway/routes/mcp_server.py
index ad93f9e..f5be457 100644
--- a/mcp_gateway/routes/mcp_server.py
+++ b/mcp_gateway/routes/mcp_server.py
@@ -129,7 +129,7 @@ def _validate_session(session_id: str, service: str,
user_id: int) -> bool:
# Shared httpx client for proxying requests to backend MCPs.
# Created lazily on first use; reuses TCP connections across requests.
-_mcp_http_client: Optional[httpx.AsyncClient] = None
+_mcp_http_client: Optional[httpx.AsyncClient] = None # pylint:
disable=invalid-name
def _get_mcp_http_client() -> httpx.AsyncClient:
diff --git a/mcp_gateway/slack/app.py b/mcp_gateway/slack/app.py
index ebcc00c..2067cde 100644
--- a/mcp_gateway/slack/app.py
+++ b/mcp_gateway/slack/app.py
@@ -48,7 +48,7 @@ logger = logging.getLogger(__name__)
GATEWAY_URL = settings.GATEWAY_BASE_URL.rstrip("/")
_BACKGROUND_TASKS: set[asyncio.Task] = set()
-_session_factory: Optional[Callable[[], Session]] = None
+_session_factory: Optional[Callable[[], Session]] = None # pylint:
disable=invalid-name
async def handle_gateway_command(ack, command, client, respond) -> None: #
type: ignore[no-untyped-def]
diff --git a/pyproject.toml b/pyproject.toml
index a60cff3..0146f1d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -72,7 +72,7 @@ gravitino-mcp = "mcp_gateway_cli.cli:cli"
[dependency-groups]
dev = [
- "pylint==3.3.8",
+ "pylint==4.1.3",
"pytest>=8.4.1",
"pytest-asyncio>=0.23.0",
"pytest-cov>=4.1.0",
diff --git a/tests/test_mcp_access.py b/tests/test_mcp_access.py
index 753eec6..9714b2e 100644
--- a/tests/test_mcp_access.py
+++ b/tests/test_mcp_access.py
@@ -35,7 +35,7 @@ REVIEW = "/api/mcp-access/admin/review"
PERMISSIONS = "/api/mcp-access/admin/permissions"
# Captured before the autouse fixture below replaces the module attribute.
-_REAL_FIRE_AND_FORGET = mcp_access._fire_and_forget
+_real_fire_and_forget = mcp_access._fire_and_forget
@pytest.fixture(autouse=True, name="_no_background_slack")
@@ -403,7 +403,7 @@ async def
test_a_background_notification_is_held_until_it_finishes():
async def _work():
started.set()
- _REAL_FIRE_AND_FORGET(_work())
+ _real_fire_and_forget(_work())
assert len(mcp_access._background_tasks) == 1
await started.wait()
diff --git a/uv.lock b/uv.lock
index 0ce4415..ea70153 100644
--- a/uv.lock
+++ b/uv.lock
@@ -222,11 +222,11 @@ wheels = [
[[package]]
name = "astroid"
-version = "3.3.11"
+version = "4.3.4"
source = { registry = "https://pypi.org/simple" }
-sdist = { url =
"https://files.pythonhosted.org/packages/18/74/dfb75f9ccd592bbedb175d4a32fc643cf569d7c218508bfbd6ea7ef9c091/astroid-3.3.11.tar.gz",
hash =
"sha256:1e5a5011af2920c7c67a53f65d536d65bfa7116feeaf2354d8b94f29573bb0ce", size
= 400439, upload-time = "2025-07-13T18:04:23.177Z" }
+sdist = { url =
"https://files.pythonhosted.org/packages/2d/87/5732fa68bf100a095cfcbd108f919220d995db99e1a7502b8119a869fd62/astroid-4.3.4.tar.gz",
hash =
"sha256:d515a105722b72098bbe82d430d65e635f742b6cbac3bdfaf8b7c188b87c5e39", size
= 444627, upload-time = "2026-10-08T09:36:44.122Z" }
wheels = [
- { url =
"https://files.pythonhosted.org/packages/af/0f/3b8fdc946b4d9cc8cc1e8af42c4e409468c84441b933d037e101b3d72d86/astroid-3.3.11-py3-none-any.whl",
hash =
"sha256:54c760ae8322ece1abd213057c4b5bba7c49818853fc901ef09719a60dbf9dec", size
= 275612, upload-time = "2025-07-13T18:04:21.07Z" },
+ { url =
"https://files.pythonhosted.org/packages/16/d4/f23c0ac6e6de33ba5686cb21c672c95e0c2d3d4c9351f16d3b5fed818652/astroid-4.3.4-py3-none-any.whl",
hash =
"sha256:2bcd0d02648a443a4b818c952c3550091989daefac3c12d3b83b2289482e0818", size
= 288310, upload-time = "2026-10-08T09:36:42.284Z" },
]
[[package]]
@@ -1046,7 +1046,7 @@ provides-extras = ["aws", "azure", "gcp", "slack"]
[package.metadata.requires-dev]
dev = [
- { name = "pylint", specifier = "==3.3.8" },
+ { name = "pylint", specifier = "==4.1.3" },
{ name = "pytest", specifier = ">=8.4.1" },
{ name = "pytest-asyncio", specifier = ">=0.23.0" },
{ name = "pytest-cov", specifier = ">=4.1.0" },
@@ -2116,7 +2116,7 @@ crypto = [
[[package]]
name = "pylint"
-version = "3.3.8"
+version = "4.1.3"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "astroid" },
@@ -2127,9 +2127,9 @@ dependencies = [
{ name = "platformdirs" },
{ name = "tomlkit" },
]
-sdist = { url =
"https://files.pythonhosted.org/packages/9d/58/1f614a84d3295c542e9f6e2c764533eea3f318f4592dc1ea06c797114767/pylint-3.3.8.tar.gz",
hash =
"sha256:26698de19941363037e2937d3db9ed94fb3303fdadf7d98847875345a8bb6b05", size
= 1523947, upload-time = "2025-08-09T09:12:57.234Z" }
+sdist = { url =
"https://files.pythonhosted.org/packages/38/c9/0bde4152a05a7686b431ce216fe3f3698b0c0d94c20bfa256dd935b608f6/pylint-4.1.3.tar.gz",
hash =
"sha256:9928603068edfa0d1a3c167f174b099d4b97c3db75d32d0fcdd029770b4713a9", size
= 1756180, upload-time = "2026-10-11T07:49:10.69Z" }
wheels = [
- { url =
"https://files.pythonhosted.org/packages/2d/1a/711e93a7ab6c392e349428ea56e794a3902bb4e0284c1997cff2d7efdbc1/pylint-3.3.8-py3-none-any.whl",
hash =
"sha256:7ef94aa692a600e82fabdd17102b73fc226758218c97473c7ad67bd4cb905d83", size
= 523153, upload-time = "2025-08-09T09:12:54.836Z" },
+ { url =
"https://files.pythonhosted.org/packages/3f/ba/62b18e2e157d05f976bd490b349b55d8850c2a454a5c313c91af9d2e0baf/pylint-4.1.3-py3-none-any.whl",
hash =
"sha256:a85357cae24f33ad8d86c8f3daaa92c600ae4012b54a57299cee76000e9364cf", size
= 588959, upload-time = "2026-10-11T07:49:08.272Z" },
]
[[package]]