Skip to content

Commit e0abf78

Browse files
added support for python v3.12 and v3.13 (#764)
1 parent 528017f commit e0abf78

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

.github/workflows/unit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == true
88
strategy:
99
matrix:
10-
python-version: ['3.9', '3.10', '3.11']
10+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2

pyproject.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ version = "5.0.2"
1313
description = "Jupyter notebook extension to connect to graph databases"
1414
readme = "README.md"
1515
license = { file = "LICENSE" }
16-
requires-python = ">=3.9,<3.12"
16+
requires-python = ">=3.9,<3.14"
1717
authors = [
1818
{ name = "amazon-neptune", email = "[email protected]" },
1919
]
@@ -22,6 +22,8 @@ classifiers = [
2222
"Programming Language :: Python :: 3.9",
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
2527
"License :: OSI Approved :: Apache Software License"
2628
]
2729
keywords = ["jupyter", "neptune", "gremlin", "sparql", "opencypher"]
@@ -43,9 +45,9 @@ dependencies = [
4345

4446
# Data processing and visualization
4547
'itables>=2.0.0,<=2.1.0',
46-
'networkx==2.4',
47-
'numpy>=1.23.5,<1.24.0',
48-
'pandas>=2.1.0,<=2.2.2',
48+
'networkx>=3.0,<4.0',
49+
'numpy>=1.24.0',
50+
'pandas>=2.2.2',
4951

5052
# Graph databases and query languages
5153
'gremlinpython>=3.5.1,<=3.7.2',
@@ -63,8 +65,7 @@ dependencies = [
6365
'Jinja2>=3.0.3,<=3.1.4',
6466
'json-repair==0.29.2',
6567
'nest_asyncio>=1.5.5,<=1.6.0',
66-
'requests>=2.32.0,<=2.32.2',
67-
'numba==0.60.0'
68+
'requests>=2.32.0,<=2.32.2'
6869
]
6970

7071
[project.optional-dependencies]

requirements.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ nbclassic>=1.3.0
1515

1616
# Data processing and visualization
1717
itables>=2.0.0,<=2.1.0
18-
networkx==2.4
19-
numpy>=1.23.5,<1.24.0
20-
pandas>=2.1.0,<=2.2.2
18+
networkx>3.0,<4.0
19+
numpy>1.24.0
20+
pandas>2.2.2
2121

2222
# Graph databases and query languages
2323
gremlinpython>=3.5.1,<=3.7.2
@@ -35,5 +35,4 @@ jedi>=0.18.1,<=0.18.2
3535
Jinja2>=3.0.3,<=3.1.4
3636
json-repair==0.29.2
3737
nest_asyncio>=1.5.5,<=1.6.0
38-
requests>=2.32.0,<=2.32.2
39-
numba==0.60.0
38+
requests>=2.32.0,<=2.32.2

src/graph_notebook/network/Network.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,13 @@ def add_results(self, results):
9393
pass
9494

9595
def to_json(self) -> dict:
96-
return {
97-
'graph': json_graph.node_link_data(self.graph)
98-
}
96+
try:
97+
# NetworkX 2.6+
98+
graph_data = json_graph.node_link_data(self.graph, edges="links")
99+
except TypeError:
100+
# NetworkX < 2.6
101+
graph_data = json_graph.node_link_data(self.graph)
102+
return {'graph': graph_data}
99103

100104

101105
def network_to_json(network: Network) -> str:

src/graph_notebook/widgets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"npm-run-all": "4.1.5",
5151
"opencollective": "1.0.3",
5252
"prettier": "^3.0.0",
53-
"rimraf": "^3.0.2",
53+
"rimraf": "^4.4.1",
5454
"sinon": "9.0.2",
5555
"source-map-loader": "^1.0.2",
5656
"style-loader": "^3.3.3",

0 commit comments

Comments
 (0)