Skip to content

Commit d1ac52e

Browse files
committed
[deps] Added support for Python 3.11, 3.12 & 3.13 #129
Closes #129
1 parent 3a7a0a5 commit d1ac52e

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
python-version:
22-
- "3.8"
2322
- "3.9"
2423
- "3.10"
24+
- "3.11"
25+
- "3.12"
26+
- "3.13"
2527

2628
steps:
2729
- uses: actions/checkout@v4

netdiff/parsers/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import json
2-
import telnetlib
32

43
import networkx
54
import requests
5+
from Exscript.protocols import telnetlib
66

77
from ..exceptions import ConversionException, TopologyRetrievalError
88
from ..utils import _netjson_networkgraph, diff

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ requests<3.0
22
libcnml<0.10.0
33
openvpn-status>=0.2,<0.3
44
networkx>=2.6,<3.5
5+
Exscript>=2.6.28

tests/test_base.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import telnetlib
32
import unittest
43

54
import responses
@@ -64,13 +63,13 @@ def request_callback(request):
6463
with self.assertRaises(TopologyRetrievalError):
6564
BaseParser(url='http://connectionerror.com')
6665

67-
@mock.patch('telnetlib.Telnet')
66+
@mock.patch('Exscript.protocols.telnetlib.Telnet')
6867
def test_telnet_retrieval_error(self, MockClass):
69-
telnetlib.Telnet.side_effect = ValueError('testing exception')
68+
MockClass.side_effect = ValueError('testing exception')
7069
with self.assertRaises(TopologyRetrievalError):
7170
BaseParser(url='telnet://wrong.com')
7271

73-
@mock.patch('telnetlib.Telnet')
72+
@mock.patch('Exscript.protocols.telnetlib.Telnet')
7473
def test_telnet_retrieval(self, MockClass):
7574
with self.assertRaises(ConversionException):
7675
BaseParser(url='telnet://127.0.0.1')

0 commit comments

Comments
 (0)