diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e61c05f4..8f42cbda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: - name: Install openwisp-network-topology run: | - pip install -e . + pip install -U -e . pip install ${{ matrix.django-version }} - name: QA checks diff --git a/openwisp_network_topology/integrations/device/base/models.py b/openwisp_network_topology/integrations/device/base/models.py index c3953723..99ff4b14 100644 --- a/openwisp_network_topology/integrations/device/base/models.py +++ b/openwisp_network_topology/integrations/device/base/models.py @@ -109,14 +109,7 @@ def auto_create_wireguard(cls, node): ip_addresses = [] for ip in allowed_ips: try: - network = ip_network(ip) - if network.prefixlen == network._max_prefixlen: - # In python 3.7, hosts method is not returning any ip - # if subnet mask is 32, resolved in future python releases - # https://bugs.python.org/issue28577 - ip_addresses.append(str(network.network_address)) - else: - ip_addresses.extend([str(host) for host in ip_network(ip).hosts()]) + ip_addresses.extend([str(host) for host in ip_network(ip).hosts()]) except ValueError: # invalid IP address continue diff --git a/requirements-test.txt b/requirements-test.txt index a6f894ff..60d86163 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,5 @@ -responses~=0.16.0 -pytest-asyncio~=0.14.0 +responses~=0.23.1 +pytest-asyncio~=0.21.0 pytest-django~=4.5.2 freezegun~=1.1.0 # Needed to test integrations diff --git a/requirements.txt b/requirements.txt index a54a475e..1ea3fbff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -django>=3.0,<4.1 openwisp-users @ https://github.com/openwisp/openwisp-users/tarball/master netdiff @ https://github.com/openwisp/netdiff/tarball/master jsonfield~=3.1.0