code-analysis-client 1.6.99__tar.gz → 1.6.100__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/PKG-INFO +1 -1
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/file_session.py +19 -7
- code_analysis_client-1.6.100/code_analysis_client/version.txt +1 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client.egg-info/PKG-INFO +1 -1
- code_analysis_client-1.6.99/code_analysis_client/version.txt +0 -1
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/README.md +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/__init__.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/client.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/commands_proxy.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/config.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/exceptions.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/py.typed +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/queue_wait.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/responses.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/schema_disk_cache.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/server_api.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/server_schema.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/universal_file.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/validation.py +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client.egg-info/SOURCES.txt +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client.egg-info/dependency_links.txt +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client.egg-info/requires.txt +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client.egg-info/top_level.txt +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/pyproject.toml +0 -0
- {code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-analysis-client
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.100
|
|
4
4
|
Summary: Async JSON-RPC client for the code-analysis MCP server (mcp-proxy-adapter JsonRpcClient)
|
|
5
5
|
Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
|
|
6
6
|
Requires-Python: >=3.10
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/file_session.py
RENAMED
|
@@ -25,6 +25,7 @@ email: vasilyvz@gmail.com
|
|
|
25
25
|
|
|
26
26
|
from __future__ import annotations
|
|
27
27
|
|
|
28
|
+
import tempfile
|
|
28
29
|
from pathlib import Path
|
|
29
30
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
|
|
30
31
|
|
|
@@ -505,18 +506,29 @@ class FileSessionClient:
|
|
|
505
506
|
filename: str,
|
|
506
507
|
compression: str = "identity",
|
|
507
508
|
) -> Any:
|
|
508
|
-
"""Upload raw bytes through the adapter buffer; returns upload receipt.
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
509
|
+
"""Upload raw bytes through the adapter buffer; returns upload receipt.
|
|
510
|
+
|
|
511
|
+
``filename`` is a NAME reported to the server, never a path this client
|
|
512
|
+
may write to. Bug c3fafbd4: this method used to stage the payload at
|
|
513
|
+
``Path(filename)`` -- relative, therefore inside the CALLER's working
|
|
514
|
+
directory -- and delete it in a ``finally``, so uploading a file named
|
|
515
|
+
``pyproject.toml`` overwrote and then deleted the caller's own
|
|
516
|
+
``pyproject.toml``. The live pipeline, which runs from the repository
|
|
517
|
+
root and seeds fixtures with exactly those names, destroyed developer
|
|
518
|
+
files on every sweep while reporting success. The payload is now staged
|
|
519
|
+
in a private temporary directory that is removed with its contents; the
|
|
520
|
+
caller's cwd is never read from or written to.
|
|
521
|
+
"""
|
|
522
|
+
with tempfile.TemporaryDirectory(prefix="ca_upload_") as staging_dir:
|
|
523
|
+
# Keep the basename so the transport still sees the intended name;
|
|
524
|
+
# any directory component in `filename` is not a path to honour here.
|
|
525
|
+
dest = Path(staging_dir) / (Path(filename).name or "upload.bin")
|
|
526
|
+
dest.write_bytes(payload)
|
|
512
527
|
return await self._client.rpc.upload_file(
|
|
513
528
|
str(dest),
|
|
514
529
|
filename=filename,
|
|
515
530
|
compression=compression,
|
|
516
531
|
)
|
|
517
|
-
finally:
|
|
518
|
-
if dest.is_file():
|
|
519
|
-
dest.unlink(missing_ok=True)
|
|
520
532
|
|
|
521
533
|
async def _commit_upload(
|
|
522
534
|
self,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.6.100
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-analysis-client
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.100
|
|
4
4
|
Summary: Async JSON-RPC client for the code-analysis MCP server (mcp-proxy-adapter JsonRpcClient)
|
|
5
5
|
Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.6.99
|
|
File without changes
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/commands_proxy.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/queue_wait.py
RENAMED
|
File without changes
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/responses.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/server_api.py
RENAMED
|
File without changes
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/server_schema.py
RENAMED
|
File without changes
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/universal_file.py
RENAMED
|
File without changes
|
{code_analysis_client-1.6.99 → code_analysis_client-1.6.100}/code_analysis_client/validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|