Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ wheels/

# Virtual environments
.venv
.vscode
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"ijson>=3.5.0"
"attr>=0.3.2",
"attrs>=25.4.0",
Comment on lines +19 to +20
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether legacy attr namespace is used anywhere in the repo
echo "=== Searching for attr imports and usage ==="
rg -n -C2 --type=py '^\s*(import\s+attr\b|from\s+attr\s+import\b|\battr\.)'

echo ""
echo "=== Checking if attr is used in any context (broader search) ==="
rg -n --type=py '\battr\b' | grep -v 'attrs' | head -30

Repository: fhalde/jsontap

Length of output: 168


🏁 Script executed:

#!/bin/bash
echo "=== Reading pyproject.toml ==="
cat -n pyproject.toml | head -50

echo ""
echo "=== Checking if attr package info in comments or requirements ==="
rg -n 'attr' pyproject.toml

Repository: fhalde/jsontap

Length of output: 1296


🏁 Script executed:

#!/bin/bash
echo "=== Searching for attrs usage in Python code ==="
rg -n --type=py 'attrs' | head -20

echo ""
echo "=== Searching for imports of attrs or attr-related classes ==="
rg -n --type=py '(import attrs|from attrs|@attrs|@attr)' | head -20

echo ""
echo "=== Looking for any Python files to understand the project ==="
find . -name '*.py' -type f | head -10

Repository: fhalde/jsontap

Length of output: 529


🏁 Script executed:

#!/bin/bash
echo "=== Checking if there are any lock files or requirements ==="
find . -name 'requirements*.txt' -o -name 'uv.lock' -o -name 'poetry.lock' -o -name 'Pipfile*' 2>/dev/null

echo ""
echo "=== Checking the actual store.py file to confirm attrs usage ==="
cat -n src/jsontap/store.py | head -20

echo ""
echo "=== Searching for attr in all files (not just Python) ==="
rg -i 'attr' --type-list py txt toml | head -30

Repository: fhalde/jsontap

Length of output: 1255


🏁 Script executed:

#!/bin/bash
echo "=== Checking uv.lock for attr and attrs packages ==="
rg 'name = "(attr|attrs)"' uv.lock -A 5 | head -40

Repository: fhalde/jsontap

Length of output: 1752


Remove attr>=0.3.2 from dependencies—it is unused and conflicts with attrs.

The codebase only imports and uses attrs (specifically from attrs import define, field in src/jsontap/store.py). The attr package is never referenced anywhere in the project. Since attr is the legacy, unmaintained package (last updated July 2022) and attrs is the modern successor, keeping both creates unnecessary namespace collision risk and increases the supply-chain surface area without providing any value.

🔧 Proposed fix
 dependencies = [
-    "attr>=0.3.2",
     "attrs>=25.4.0",
     "ijson>=3.5.0",
 ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"attr>=0.3.2",
"attrs>=25.4.0",
dependencies = [
"attrs>=25.4.0",
"ijson>=3.5.0",
]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pyproject.toml` around lines 19 - 20, Remove the unused and conflicting
dependency "attr>=0.3.2" from pyproject.toml: keep only "attrs>=25.4.0", then
regenerate your lock/install (e.g., poetry lock && poetry install) and run
tests; verify imports like "from attrs import define, field" in
src/jsontap/store.py still resolve to the attrs package and there are no
remaining references to the legacy "attr" package.

"ijson>=3.5.0",
]

[build-system]
Expand Down
4 changes: 2 additions & 2 deletions src/jsontap/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .core import AsyncJsonFeed, AsyncJsonNode, jsontap
from .main import jsontap

__all__ = ["jsontap", "AsyncJsonNode", "AsyncJsonFeed"]
__all__ = ["jsontap"]
Loading