Compare commits

..
Author SHA1 Message Date
dependabot[bot] 25af3d5fff Bump watchdog from 6.0.0 to 7.1.0
Bumps [watchdog](https://github.com/gorakhargosh/watchdog) from 6.0.0 to 7.1.0.
- [Release notes](https://github.com/gorakhargosh/watchdog/releases)
- [Changelog](https://github.com/gorakhargosh/watchdog/blob/master/changelog.rst)
- [Commits](https://github.com/gorakhargosh/watchdog/compare/v6.0.0...v7.1.0)

---
updated-dependencies:
- dependency-name: watchdog
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-19 11:22:57 +00:00
5 changed files with 5 additions and 133 deletions

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@
# Core AI and Automation Framework
# Note: aiosqlite is in core requirements.txt
langchain>=1.5.0
langchain>=1.2.10
langchain-core>=1.7.3
langgraph>=1.2.19
langgraph-checkpoint>=4.0.0
@@ -42,7 +42,7 @@ python-dotenv>=1.2.4
# Authentication
PyJWT>=2.15.1
psycopg-pool>=3.3.3
psycopg-pool>=3.1.0
# Skills Repository Management
PyYAML>=6.0.3
+1 -1
View File
@@ -1,6 +1,6 @@
pytest==9.2.0
pytest-timeout==2.4.0
pytest-asyncio==1.5.0
pytest-asyncio==1.4.1
httpx==0.28.1
httpx_ws==0.9.0
pytest-random-order==1.2.0 # opt-in: --random-order --random-order-bucket=global (legacy suites are not shuffle-clean yet, see .claude/skills/gns3-api-test-writing)
-36
View File
@@ -2495,17 +2495,7 @@ class Project:
return new_node
def stats(self):
"""
Return the project statistics.
A closed project keeps no scene elements in memory: the counts come
from the topology file instead (issue #1836).
"""
if self._status == "closed":
stats = self._stats_from_topology_file()
if stats is not None:
return stats
return {
"nodes": len(self._nodes),
"links": len(self._links),
@@ -2514,32 +2504,6 @@ class Project:
"markers": sum(len(link.markers) for link in self._links.values()),
}
def _stats_from_topology_file(self):
"""
Count the scene elements from the .gns3 file. The snapshots are
already restored from the snapshot config, and the markers are
counted from the per-link markers persisted with each link. Return
None when the file cannot be read (e.g. a project never dumped), so
the caller falls back to the in-memory counts.
"""
try:
with open(self.topology_file, encoding="utf-8") as f:
topology = json.load(f)
except (OSError, UnicodeDecodeError, ValueError) as e:
log.warning(f"Could not read the topology file of project '{self._name}' for the statistics: {e}")
return None
scene = topology.get("topology") or {}
links = scene.get("links") or []
return {
"nodes": len(scene.get("nodes") or []),
"links": len(links),
"drawings": len(scene.get("drawings") or []),
"snapshots": len(self._snapshots),
"markers": sum(len(link.get("markers") or {}) for link in links),
}
def asdict(self):
return {
"name": self._name,
+2 -2
View File
@@ -17,13 +17,13 @@ alembic==1.20.1
bcrypt==5.0.0
joserfc==1.7.7
email-validator==2.3.0
watchdog==6.0.0 # upgrading to v7.0.0 creates issues
watchdog==7.1.0 # upgrading to v7.0.0 creates issues
zstandard==0.25.0
platformdirs>=4.14.2
truststore>=0.10.5
# Shared dependencies (also used by AI Copilot)
telnetlib3==5.0.2
telnetlib3==5.0.1,<6
asyncssh>=2.24.1,<3
typing-extensions>=4.16.0
requests>=2.34.2
-92
View File
@@ -1417,95 +1417,3 @@ async def test_restore_deferred_links(project):
assert link._deferred is False
assert link.create.called is True
async def _populate_scene(project):
"""
Add two nodes, a link between them and a drawing to a project.
"""
compute = MagicMock()
compute.id = "local"
response = MagicMock()
response.json = {"console": 2048}
compute.post = AsyncioMagicMock(return_value=response)
node1 = await project.add_node(compute, "n1", None, node_type="vpcs", properties={})
node2 = await project.add_node(compute, "n2", None, node_type="vpcs", properties={})
node1._ports = [EthernetPort("E0", 0, 0, 0)]
node2._ports = [EthernetPort("E0", 0, 1, 0)]
link = await project.add_link()
await link.add_node(node1, 0, 0)
with asyncio_patch("gns3server.controller.udp_link.UDPLink.create"):
await link.add_node(node2, 1, 0)
project.emit_notification = MagicMock()
await project.add_drawing(None, svg="<svg></svg>")
return link
@pytest.mark.asyncio
async def test_stats_closed_project_counts_from_topology_file(controller, project):
"""
A closed project has no scene elements in memory: the stats must come
from the .gns3 file (issue #1836).
"""
await _populate_scene(project)
project.dump()
# same net effect as close(): the in-memory collections are emptied
project.reset()
project._status = "closed"
stats = project.stats()
assert stats["nodes"] == 2
assert stats["links"] == 1
assert stats["drawings"] == 1
assert stats["snapshots"] == 0
assert stats["markers"] == 0
@pytest.mark.asyncio
async def test_stats_closed_project_counts_markers_from_topology_file(controller, project):
"""
The markers of a closed project are counted from the per-link markers
persisted in the .gns3 file.
"""
link = await _populate_scene(project)
link.markers["http"] = {"bpf": "tcp port 80", "tag": "HTTP"}
project.dump()
project.reset()
project._status = "closed"
assert project.stats()["markers"] == 1
@pytest.mark.asyncio
async def test_stats_closed_project_without_topology_file(controller, project):
"""
A project never dumped (no .gns3 file yet) falls back to the in-memory
counts instead of raising.
"""
project._status = "closed"
assert project.stats() == {"nodes": 0, "links": 0, "drawings": 0, "snapshots": 0, "markers": 0}
@pytest.mark.asyncio
async def test_stats_opened_project_counts_from_memory(controller, project):
"""
An opened project reports the live in-memory counts.
"""
await _populate_scene(project)
project._status = "opened"
stats = project.stats()
assert stats["nodes"] == 2
assert stats["links"] == 1
assert stats["drawings"] == 1