diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index fb10599d..be76441f 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -22,10 +22,10 @@ jobs: runs-on: ubuntu-latest needs: generate-stack-name steps: - - name: Set up Python 3.8 + - name: Set up Python 3.10 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.10 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -58,10 +58,10 @@ jobs: runs-on: ubuntu-latest needs: [generate-stack-name, create-stack] steps: - - name: Set up Python 3.7 + - name: Set up Python 3.10 uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.10 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index e09005f8..d77ffe4b 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -5,13 +5,16 @@ on: [push, pull_request] jobs: unit-tests: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == true + strategy: + matrix: + python-version: ['3.8', '3.10'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} - name: Set up Node.js 14.x uses: actions/setup-node@v3 with: diff --git a/ChangeLog.md b/ChangeLog.md index bdf277a6..f47559c1 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,6 +3,7 @@ Starting with v1.31.6, this file will contain a record of major features and updates made in each release of graph-notebook. ## Upcoming +- Added support for Python 3.10 ([Link to PR](https://github.com/aws/graph-notebook/pull/476)) - Fixed Dockerfile builds breaking with AL2023 ([Link to PR](https://github.com/aws/graph-notebook/pull/466)) - Fixed `--store-to` option for several magics ([Link to PR](https://github.com/aws/graph-notebook/pull/463)) - Fixed broken documentation links in Neptune ML notebooks ([PR #1](https://github.com/aws/graph-notebook/pull/467)) ([PR #2](https://github.com/aws/graph-notebook/pull/468)) diff --git a/README.md b/README.md index cf3e97ad..a0517c59 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ It is recommended to check the [ChangeLog.md](ChangeLog.md) file periodically to You will need: -* [Python](https://www.python.org/downloads/) 3.8.0-3.9.7 +* [Python](https://www.python.org/downloads/) 3.8.0-3.10.11 * A graph database that provides one or more of: * A SPARQL 1.1 endpoint * An Apache TinkerPop Gremlin Server compatible endpoint @@ -313,8 +313,8 @@ cd graph-notebook # 2) Create a new virtual environment # 2a) Option 1 - pyenv -pyenv install 3.9.7 # Only if not already installed; this can be any supported Python 3 version in Prerequisites -pyenv virtualenv 3.9.7 build-graph-notebook +pyenv install 3.10.11 # Only if not already installed; this can be any supported Python 3 version in Prerequisites +pyenv virtualenv 3.10.11 build-graph-notebook pyenv local build-graph-notebook # 2b) Option 2 - venv diff --git a/requirements.txt b/requirements.txt index 8b244482..2c9f5d3e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ SPARQLWrapper==1.8.4 networkx==2.4 -Jinja2==3.0.3 +Jinja2>=3.0.3,<=3.1.2 jupyter==1.0.0 notebook>=6.1.5,<6.5.0 ipywidgets==7.7.2 @@ -8,22 +8,23 @@ jupyterlab_widgets>=1.0.0,<3.0.0 nbclient<=0.7.0 jupyter-contrib-nbextensions<=0.7.0 widgetsnbextension<=3.6.1 -gremlinpython>=3.5.1,<=3.6.1 -requests==2.24.0 +gremlinpython>=3.5.1,<=3.6.2 +requests>=2.27.0,<=2.28.2 ipython==8.10.0 ipykernel==5.3.4 -neo4j==4.2.1 +neo4j>=4.4.9,<5.0.0 rdflib==5.0.0 setuptools>=65.5.1,<=66.0.0 nbconvert>=6.3.0,<=7.2.8 -jedi<0.18.0 +jedi>=0.18.1,<=0.18.2 markupsafe<2.1.0 -itables>=1.0.0,<=1.4.5,!=1.4.3,!=1.4.4 -pandas<=1.5.3 +itables>=1.0.0,<=1.5.2,!=1.4.3,!=1.4.4 +pandas>=1.4.0,<=1.5.3 numpy<1.24.0 +nest_asyncio==1.5.6 # requirements for testing -botocore~=1.18.18 -boto3~=1.15.15 -pytest==6.2.2 +botocore~=1.21.49 +boto3~=1.18.49 +pytest==6.2.5 parameterized==0.8.1 \ No newline at end of file diff --git a/setup.py b/setup.py index 497b6540..72482258 100644 --- a/setup.py +++ b/setup.py @@ -66,30 +66,30 @@ def get_version(): package_dir={'': 'src'}, include_package_data=True, install_requires=[ - 'gremlinpython>=3.5.1,<=3.6.1', + 'gremlinpython>=3.5.1,<=3.6.2', 'SPARQLWrapper==1.8.4', - 'requests<=2.28.2', + 'requests>=2.27.0,<=2.28.2', 'ipywidgets==7.7.2', 'jupyterlab_widgets>=1.0.0,<3.0.0', 'networkx==2.4', - 'Jinja2==3.0.3', + 'Jinja2>=3.0.3,<=3.1.2', 'notebook>=6.1.5,<6.5.0', - 'nbclient<=0.7.0', + 'nbclient<=0.7.3', 'jupyter-contrib-nbextensions<=0.7.0', 'widgetsnbextension<=3.6.1', 'jupyter==1.0.0', - 'botocore>=1.19.37,<=1.29.53', - 'boto3>=1.17.58,<=1.26.53', + 'botocore>=1.21.49,<=1.29.53', + 'boto3>=1.18.49,<=1.26.53', 'ipython==8.10.0', - 'neo4j==4.3.2', + 'neo4j>=4.4.9,<5.0.0', 'rdflib==5.0.0', 'ipykernel==5.3.4', 'nbconvert>=6.3.0,<=7.2.8', - 'jedi<0.18.0', - 'markupsafe<2.1.0', - 'itables>=1.0.0,<=1.4.5,!=1.4.3,!=1.4.4', - 'pandas<=1.5.3', - 'numpy<1.24.0' + 'jedi>=0.18.1,<=0.18.2', + 'itables>=1.0.0,<=1.5.2,!=1.4.3,!=1.4.4', + 'pandas>=1.4.0,<=1.5.3', + 'numpy<1.24.0', + 'nest_asyncio==1.5.6' ], package_data={ 'graph_notebook': ['graph_notebook/widgets/nbextensions/**', @@ -104,6 +104,6 @@ def get_version(): ], keywords='jupyter neptune gremlin sparql', tests_require=[ - 'pytest' + 'pytest==6.2.5' ] ) diff --git a/src/graph_notebook/network/EventfulNetwork.py b/src/graph_notebook/network/EventfulNetwork.py index d0be922e..d4b4bea6 100644 --- a/src/graph_notebook/network/EventfulNetwork.py +++ b/src/graph_notebook/network/EventfulNetwork.py @@ -3,7 +3,7 @@ SPDX-License-Identifier: Apache-2.0 """ -from collections import defaultdict +from collections import defaultdict, abc import collections import re import json @@ -126,7 +126,7 @@ def flatten(self, d: dict, parent_key='', sep='_') -> dict: items = [] for k, v in d.items(): new_key = parent_key + sep + k if parent_key else k - if isinstance(v, collections.MutableMapping): + if isinstance(v, collections.abc.MutableMapping): items.extend(self.flatten(v).items()) else: items.append((new_key, v))