From 1db171f326e286e2c19f1fdaf1d164d17dcb10ca Mon Sep 17 00:00:00 2001 From: Kevin Petremann Date: Tue, 1 Oct 2024 12:45:01 +0200 Subject: [PATCH 1/3] build: pin dependency version using uv --- requirements/netprobify.in | 11 ++++++ requirements/netprobify.txt | 71 ++++++++++++++++++++++++++++++++----- requirements/tests.in | 6 ++++ requirements/tests.txt | 60 +++++++++++++++++++++++++++---- 4 files changed, 133 insertions(+), 15 deletions(-) create mode 100644 requirements/netprobify.in create mode 100644 requirements/tests.in diff --git a/requirements/netprobify.in b/requirements/netprobify.in new file mode 100644 index 0000000..937b715 --- /dev/null +++ b/requirements/netprobify.in @@ -0,0 +1,11 @@ +ipam-client==0.6.2 +Flask +flask-httpauth +prometheus_client +pykwalify +PyYAML +requests +setuptools +scapy==2.5.0 +tornado +waitress diff --git a/requirements/netprobify.txt b/requirements/netprobify.txt index 937b715..e34511d 100644 --- a/requirements/netprobify.txt +++ b/requirements/netprobify.txt @@ -1,11 +1,64 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/netprobify.in -o requirements/netprobify.txt +blinker==1.8.2 + # via flask +certifi==2024.8.30 + # via requests +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via flask +docopt==0.6.2 + # via pykwalify +flask==3.0.3 + # via + # -r requirements/netprobify.in + # flask-httpauth +flask-httpauth==4.8.0 + # via -r requirements/netprobify.in +idna==3.10 + # via requests +ipaddress==1.0.23 + # via ipam-client ipam-client==0.6.2 -Flask -flask-httpauth -prometheus_client -pykwalify -PyYAML -requests -setuptools + # via -r requirements/netprobify.in +itsdangerous==2.2.0 + # via flask +jinja2==3.1.4 + # via flask +markupsafe==2.1.5 + # via + # jinja2 + # werkzeug +mysql-connector-python==8.0.33 + # via ipam-client +prometheus-client==0.21.0 + # via -r requirements/netprobify.in +protobuf==3.20.3 + # via mysql-connector-python +pykwalify==1.8.0 + # via -r requirements/netprobify.in +python-dateutil==2.9.0.post0 + # via pykwalify +pyyaml==6.0.2 + # via -r requirements/netprobify.in +requests==2.32.3 + # via -r requirements/netprobify.in +ruamel-yaml==0.18.6 + # via pykwalify +ruamel-yaml-clib==0.2.8 + # via ruamel-yaml scapy==2.5.0 -tornado -waitress + # via -r requirements/netprobify.in +setuptools==75.1.0 + # via -r requirements/netprobify.in +six==1.16.0 + # via python-dateutil +tornado==6.4.1 + # via -r requirements/netprobify.in +urllib3==2.2.3 + # via requests +waitress==3.0.0 + # via -r requirements/netprobify.in +werkzeug==3.0.4 + # via flask diff --git a/requirements/tests.in b/requirements/tests.in new file mode 100644 index 0000000..af84c64 --- /dev/null +++ b/requirements/tests.in @@ -0,0 +1,6 @@ +coverage +pykwalify +pylama +pytest +requests-mock +setuptools diff --git a/requirements/tests.txt b/requirements/tests.txt index af84c64..4ed39cf 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,6 +1,54 @@ -coverage -pykwalify -pylama -pytest -requests-mock -setuptools +# This file was autogenerated by uv via the following command: +# uv pip compile requirements/tests.in -o requirements/tests.txt +certifi==2024.8.30 + # via requests +charset-normalizer==3.3.2 + # via requests +coverage==7.6.1 + # via -r requirements/tests.in +docopt==0.6.2 + # via pykwalify +exceptiongroup==1.2.2 + # via pytest +idna==3.10 + # via requests +iniconfig==2.0.0 + # via pytest +mccabe==0.7.0 + # via pylama +packaging==24.1 + # via pytest +pluggy==1.5.0 + # via pytest +pycodestyle==2.12.1 + # via pylama +pydocstyle==6.3.0 + # via pylama +pyflakes==3.2.0 + # via pylama +pykwalify==1.8.0 + # via -r requirements/tests.in +pylama==8.4.1 + # via -r requirements/tests.in +pytest==8.3.3 + # via -r requirements/tests.in +python-dateutil==2.9.0.post0 + # via pykwalify +requests==2.32.3 + # via requests-mock +requests-mock==1.12.1 + # via -r requirements/tests.in +ruamel-yaml==0.18.6 + # via pykwalify +ruamel-yaml-clib==0.2.8 + # via ruamel-yaml +setuptools==75.1.0 + # via -r requirements/tests.in +six==1.16.0 + # via python-dateutil +snowballstemmer==2.2.0 + # via pydocstyle +tomli==2.0.1 + # via pytest +urllib3==2.2.3 + # via requests From f3e719e626924e761f49e9b4cb9c1b0a2f86f19c Mon Sep 17 00:00:00 2001 From: Kevin Petremann Date: Tue, 1 Oct 2024 12:45:26 +0200 Subject: [PATCH 2/3] chore: scapy 2.6.0 --- requirements/netprobify.in | 2 +- requirements/netprobify.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/netprobify.in b/requirements/netprobify.in index 937b715..15126d4 100644 --- a/requirements/netprobify.in +++ b/requirements/netprobify.in @@ -6,6 +6,6 @@ pykwalify PyYAML requests setuptools -scapy==2.5.0 +scapy==2.6.0 tornado waitress diff --git a/requirements/netprobify.txt b/requirements/netprobify.txt index e34511d..5c91a4a 100644 --- a/requirements/netprobify.txt +++ b/requirements/netprobify.txt @@ -48,7 +48,7 @@ ruamel-yaml==0.18.6 # via pykwalify ruamel-yaml-clib==0.2.8 # via ruamel-yaml -scapy==2.5.0 +scapy==2.6.0 # via -r requirements/netprobify.in setuptools==75.1.0 # via -r requirements/netprobify.in From 4b5954be3b907a4f996bec5fbfe37087970ad229 Mon Sep 17 00:00:00 2001 From: Kevin Petremann Date: Tue, 1 Oct 2024 12:55:45 +0200 Subject: [PATCH 3/3] style: apply new black formatting rules --- netprobify/common.py | 1 + netprobify/external.py | 1 + netprobify/protocol/common/protocols.py | 1 + netprobify/protocol/icmp_ping.py | 1 + netprobify/protocol/iperf.py | 1 + netprobify/protocol/tcpsyn.py | 1 + netprobify/protocol/udp_unreachable.py | 1 + 7 files changed, 7 insertions(+) diff --git a/netprobify/common.py b/netprobify/common.py index 4803158..d93ae7f 100644 --- a/netprobify/common.py +++ b/netprobify/common.py @@ -1,4 +1,5 @@ """Common functions.""" + import re from socket import getaddrinfo, AF_INET, AF_INET6, IPPROTO_TCP diff --git a/netprobify/external.py b/netprobify/external.py index 1447968..1cb01a9 100644 --- a/netprobify/external.py +++ b/netprobify/external.py @@ -1,4 +1,5 @@ """Module for all external functions.""" + import math diff --git a/netprobify/protocol/common/protocols.py b/netprobify/protocol/common/protocols.py index a4e364a..e5ed812 100644 --- a/netprobify/protocol/common/protocols.py +++ b/netprobify/protocol/common/protocols.py @@ -1,4 +1,5 @@ """Protocol related functions.""" + from ipaddress import ip_network from scapy.all import ICMP, IP, ICMPv6EchoRequest, IPv6 diff --git a/netprobify/protocol/icmp_ping.py b/netprobify/protocol/icmp_ping.py index 63d4bd3..8db839c 100644 --- a/netprobify/protocol/icmp_ping.py +++ b/netprobify/protocol/icmp_ping.py @@ -1,4 +1,5 @@ """Module for ICMP probing.""" + import logging from random import randint diff --git a/netprobify/protocol/iperf.py b/netprobify/protocol/iperf.py index edac5bb..ecd5641 100644 --- a/netprobify/protocol/iperf.py +++ b/netprobify/protocol/iperf.py @@ -1,4 +1,5 @@ """Module for Iperf bandwidth test.""" + import logging import subprocess diff --git a/netprobify/protocol/tcpsyn.py b/netprobify/protocol/tcpsyn.py index 38b83e5..1260dfc 100644 --- a/netprobify/protocol/tcpsyn.py +++ b/netprobify/protocol/tcpsyn.py @@ -1,4 +1,5 @@ """Module for TCP syn probing.""" + import logging from scapy.all import TCP, L3RawSocket, RandString, Raw, conf, send, sr diff --git a/netprobify/protocol/udp_unreachable.py b/netprobify/protocol/udp_unreachable.py index 727ca3c..707ff7e 100644 --- a/netprobify/protocol/udp_unreachable.py +++ b/netprobify/protocol/udp_unreachable.py @@ -1,4 +1,5 @@ """Module for UDP probing.""" + import logging from scapy.all import UDP, L3RawSocket, RandString, Raw, UDPerror, conf, sr