From ac3976539eed00f6684d9a5824688e3c6ce49411 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 4 Dec 2023 21:12:45 +0000 Subject: [PATCH 01/10] provide http_get via requests. --- gamutrf/mqtt_reporter.py | 8 ++-- gamutrf/sigfinder.py | 12 +---- gamutrf/utils.py | 14 ++++++ poetry.lock | 97 +--------------------------------------- 4 files changed, 22 insertions(+), 109 deletions(-) diff --git a/gamutrf/mqtt_reporter.py b/gamutrf/mqtt_reporter.py index 5cebc8a5..01c325e8 100644 --- a/gamutrf/mqtt_reporter.py +++ b/gamutrf/mqtt_reporter.py @@ -5,8 +5,8 @@ import time import gpsd -import httpx import paho.mqtt.client as mqtt +from gamutrf.utils import http_get class MQTTReporter: @@ -69,7 +69,7 @@ def get_heading(self): try: self.heading = float( json.loads( - httpx.get( + http_get( f"http://{self.external_gps_server}:{self.external_gps_server_port}/heading" ).text )["heading"] @@ -79,7 +79,7 @@ def get_heading(self): else: try: self.heading = str( - float(httpx.get(f"http://{self.gps_server}:8000/v1/heading").text) + float(http_get(f"http://{self.gps_server}:8000/v1/heading").text) ) except Exception as err: logging.error("could not update heading: %s", err) @@ -102,7 +102,7 @@ def add_gps(self, publish_args): if self.use_external_gps: try: self.external_gps_msg = json.loads( - httpx.get( + http_get( f"http://{self.external_gps_server}:{self.external_gps_server_port}/gps-data" ).text ) diff --git a/gamutrf/sigfinder.py b/gamutrf/sigfinder.py index c0a7d33d..6173a22f 100644 --- a/gamutrf/sigfinder.py +++ b/gamutrf/sigfinder.py @@ -11,7 +11,6 @@ import falcon import jinja2 import numpy as np -import requests import schedule from prometheus_client import Counter @@ -25,7 +24,7 @@ from gamutrf.sigwindows import parse_freq_excluded from gamutrf.sigwindows import find_sig_windows from gamutrf.sigwindows import ROLLING_FACTOR -from gamutrf.utils import rotate_file_n, SCAN_FRES +from gamutrf.utils import http_get, rotate_file_n, SCAN_FRES from gamutrf.zmqreceiver import ZmqReceiver, parse_scanners @@ -255,14 +254,7 @@ def process_scan(args, scan_configs, prom_vars, df, lastbins): def recorder_req(recorder, recorder_args, timeout): - url = f"{recorder}/v1/{recorder_args}" - try: - req = requests.get(url, timeout=timeout) - logging.debug(str(req)) - return req - except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as err: - logging.debug(str(err)) - return None + return http_get(f"{recorder}/v1/{recorder_args}", timeout=timeout) def get_freq_exclusions(args): diff --git a/gamutrf/utils.py b/gamutrf/utils.py index 28afc633..e772876c 100644 --- a/gamutrf/utils.py +++ b/gamutrf/utils.py @@ -1,10 +1,13 @@ #!/usr/bin/python3 +import logging import os import re +import requests import sys from pathlib import Path import numpy as np +import requests MTU = 8962 SCAN_FRES = 1e4 @@ -121,3 +124,14 @@ def get_nondot_files(filedir, glob="*.s*.*"): for path in Path(filedir).rglob(glob) if not os.path.basename(path).startswith(".") ] + + +def http_get(url, timeout=10): + try: + req = requests.get(url, timeout=timeout) + logging.debug(str(req)) + return req + except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as err: + logging.error(f"{url}: {str(err)}") + return None + diff --git a/poetry.lock b/poetry.lock index 78241f86..807ab785 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,27 +1,5 @@ # This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. -[[package]] -name = "anyio" -version = "4.0.0" -description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "main" -optional = false -python-versions = ">=3.8" -files = [ - {file = "anyio-4.0.0-py3-none-any.whl", hash = "sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f"}, - {file = "anyio-4.0.0.tar.gz", hash = "sha256:f7ed51751b2c2add651e5747c891b47e26d2a21be5d32d9311dfe9692f3e5d7a"}, -] - -[package.dependencies] -exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} -idna = ">=2.8" -sniffio = ">=1.1" - -[package.extras] -doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (>=0.22)"] - [[package]] name = "astroid" version = "3.0.1" @@ -577,7 +555,7 @@ ssh = ["paramiko (>=2.4.3)"] name = "exceptiongroup" version = "1.1.3" description = "Backport of PEP 654 (exception groups)" -category = "main" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -785,65 +763,6 @@ files = [ {file = "gpsd-py3-0.3.0.tar.gz", hash = "sha256:2908d3bd78dfb6720ecfe22f97e139b5a4a198f38df3a77215cf644a33513192"}, ] -[[package]] -name = "h11" -version = "0.14.0" -description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, -] - -[[package]] -name = "httpcore" -version = "1.0.2" -description = "A minimal low-level HTTP client." -category = "main" -optional = false -python-versions = ">=3.8" -files = [ - {file = "httpcore-1.0.2-py3-none-any.whl", hash = "sha256:096cc05bca73b8e459a1fc3dcf585148f63e534eae4339559c9b8a8d6399acc7"}, - {file = "httpcore-1.0.2.tar.gz", hash = "sha256:9fc092e4799b26174648e54b74ed5f683132a464e95643b226e00c2ed2fa6535"}, -] - -[package.dependencies] -certifi = "*" -h11 = ">=0.13,<0.15" - -[package.extras] -asyncio = ["anyio (>=4.0,<5.0)"] -http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] -trio = ["trio (>=0.22.0,<0.23.0)"] - -[[package]] -name = "httpx" -version = "0.25.2" -description = "The next generation HTTP client." -category = "main" -optional = false -python-versions = ">=3.8" -files = [ - {file = "httpx-0.25.2-py3-none-any.whl", hash = "sha256:a05d3d052d9b2dfce0e3896636467f8a5342fb2b902c819428e1ac65413ca118"}, - {file = "httpx-0.25.2.tar.gz", hash = "sha256:8b8fcaa0c8ea7b05edd69a094e63a2094c4efcb48129fb757361bc423c0ad9e8"}, -] - -[package.dependencies] -anyio = "*" -certifi = "*" -httpcore = ">=1.0.0,<2.0.0" -idna = "*" -sniffio = "*" - -[package.extras] -brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"] -http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] - [[package]] name = "idna" version = "3.4" @@ -2371,18 +2290,6 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] -[[package]] -name = "sniffio" -version = "1.3.0" -description = "Sniff out which async library your code is running under" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, - {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, -] - [[package]] name = "sysrsync" version = "1.1.1" @@ -2697,4 +2604,4 @@ cffi = ["cffi (>=1.11)"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.13" -content-hash = "b8f8c952f486c66f0672580aa1e232f4494d3ecd6abd2b4d76fed5a71645ace7" +content-hash = "f666531acf179531fa896ac1d3b576b7af463cd5a335f63af159d617e489d106" From 567bb264583600aa2154ae2ff90d40e1de6ac76f Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 4 Dec 2023 21:18:49 +0000 Subject: [PATCH 02/10] remove httpx. --- poetry.lock | 97 ++------------------------------------------------ pyproject.toml | 3 +- 2 files changed, 3 insertions(+), 97 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0eeb4666..abf9cf51 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,27 +1,5 @@ # This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. -[[package]] -name = "anyio" -version = "4.1.0" -description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "main" -optional = false -python-versions = ">=3.8" -files = [ - {file = "anyio-4.1.0-py3-none-any.whl", hash = "sha256:56a415fbc462291813a94528a779597226619c8e78af7de0507333f700011e5f"}, - {file = "anyio-4.1.0.tar.gz", hash = "sha256:5a0bec7085176715be77df87fc66d6c9d70626bd752fcc85f57cdbee5b3760da"}, -] - -[package.dependencies] -exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} -idna = ">=2.8" -sniffio = ">=1.1" - -[package.extras] -doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (>=0.23)"] - [[package]] name = "astroid" version = "3.0.1" @@ -566,7 +544,7 @@ ssh = ["paramiko (>=2.4.3)"] name = "exceptiongroup" version = "1.2.0" description = "Backport of PEP 654 (exception groups)" -category = "main" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -765,65 +743,6 @@ files = [ {file = "gpsd-py3-0.3.0.tar.gz", hash = "sha256:2908d3bd78dfb6720ecfe22f97e139b5a4a198f38df3a77215cf644a33513192"}, ] -[[package]] -name = "h11" -version = "0.14.0" -description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, -] - -[[package]] -name = "httpcore" -version = "1.0.2" -description = "A minimal low-level HTTP client." -category = "main" -optional = false -python-versions = ">=3.8" -files = [ - {file = "httpcore-1.0.2-py3-none-any.whl", hash = "sha256:096cc05bca73b8e459a1fc3dcf585148f63e534eae4339559c9b8a8d6399acc7"}, - {file = "httpcore-1.0.2.tar.gz", hash = "sha256:9fc092e4799b26174648e54b74ed5f683132a464e95643b226e00c2ed2fa6535"}, -] - -[package.dependencies] -certifi = "*" -h11 = ">=0.13,<0.15" - -[package.extras] -asyncio = ["anyio (>=4.0,<5.0)"] -http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] -trio = ["trio (>=0.22.0,<0.23.0)"] - -[[package]] -name = "httpx" -version = "0.25.2" -description = "The next generation HTTP client." -category = "main" -optional = false -python-versions = ">=3.8" -files = [ - {file = "httpx-0.25.2-py3-none-any.whl", hash = "sha256:a05d3d052d9b2dfce0e3896636467f8a5342fb2b902c819428e1ac65413ca118"}, - {file = "httpx-0.25.2.tar.gz", hash = "sha256:8b8fcaa0c8ea7b05edd69a094e63a2094c4efcb48129fb757361bc423c0ad9e8"}, -] - -[package.dependencies] -anyio = "*" -certifi = "*" -httpcore = ">=1.0.0,<2.0.0" -idna = "*" -sniffio = "*" - -[package.extras] -brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"] -http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] - [[package]] name = "idna" version = "3.6" @@ -2350,18 +2269,6 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] -[[package]] -name = "sniffio" -version = "1.3.0" -description = "Sniff out which async library your code is running under" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, - {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, -] - [[package]] name = "sysrsync" version = "1.1.1" @@ -2675,4 +2582,4 @@ cffi = ["cffi (>=1.11)"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.13" -content-hash = "647853411d1a6348b4ee9669fef28a1da9c631f87cd3b90039405e4bd9348b1e" +content-hash = "bebf182f080d128f12ab17b2d7a7a457aa51e97c387d4e29783fe1ca7f4a229d" diff --git a/pyproject.toml b/pyproject.toml index 93635cdf..a0b6d2e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,8 +16,7 @@ falcon = "3.1.2" falcon-cors = "1.1.7" findpeaks = "2.6.1" gpsd-py3 = "0.3.0" -httpx = "0.25.2" -Jinja2 = "3.1.2" +inja2 = "3.1.2" matplotlib = "3.8.2" numpy = "1.26.2" paho-mqtt = "1.6.1" From 6fe9f8a7b66f93d4479cf5b13de490a08fb08975 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 4 Dec 2023 21:26:18 +0000 Subject: [PATCH 03/10] Jinja. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a0b6d2e6..f65232b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ falcon = "3.1.2" falcon-cors = "1.1.7" findpeaks = "2.6.1" gpsd-py3 = "0.3.0" -inja2 = "3.1.2" +Jinja2 = "3.1.2" matplotlib = "3.8.2" numpy = "1.26.2" paho-mqtt = "1.6.1" From 5cf790a8886de20dea36eacc57504b3b19c7e037 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 4 Dec 2023 21:35:10 +0000 Subject: [PATCH 04/10] black. --- gamutrf/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/gamutrf/utils.py b/gamutrf/utils.py index e772876c..0810a707 100644 --- a/gamutrf/utils.py +++ b/gamutrf/utils.py @@ -134,4 +134,3 @@ def http_get(url, timeout=10): except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as err: logging.error(f"{url}: {str(err)}") return None - From 2220116d1199c3115e7c74bd91592d8203ca957e Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 4 Dec 2023 21:47:54 +0000 Subject: [PATCH 05/10] result. --- gamutrf/mqtt_reporter.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/gamutrf/mqtt_reporter.py b/gamutrf/mqtt_reporter.py index 01c325e8..630406ba 100644 --- a/gamutrf/mqtt_reporter.py +++ b/gamutrf/mqtt_reporter.py @@ -66,23 +66,19 @@ def connect(self): def get_heading(self): if self.use_external_heading: - try: - self.heading = float( - json.loads( - http_get( - f"http://{self.external_gps_server}:{self.external_gps_server_port}/heading" - ).text - )["heading"] - ) - except Exception as err: - logging.error("could not update external heading: %s", err) + heading_result = http_get( + f"http://{self.external_gps_server}:{self.external_gps_server_port}/heading" + ) + if heading_result is None: + logging.error("could not update external heading") + else: + self.heading = float(json.loads(heading_result.text)["heading"]) else: - try: - self.heading = str( - float(http_get(f"http://{self.gps_server}:8000/v1/heading").text) - ) - except Exception as err: - logging.error("could not update heading: %s", err) + heading_result = http_get(f"http://{self.gps_server}:8000/v1/heading") + if heading_result is None: + logging.error("could not update heading") + else: + self.heading = str(float(heading_result.text)) def add_gps(self, publish_args): if not self.gps_configured: From 9dc45e55ff6cf7e10c9d96fdb8172c78efd68fca Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 4 Dec 2023 23:16:26 +0000 Subject: [PATCH 06/10] http_get() --- gamutrf/mqtt_reporter.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/gamutrf/mqtt_reporter.py b/gamutrf/mqtt_reporter.py index 630406ba..b11295bf 100644 --- a/gamutrf/mqtt_reporter.py +++ b/gamutrf/mqtt_reporter.py @@ -96,13 +96,13 @@ def add_gps(self, publish_args): # Use external external GPS if self.use_external_gps: - try: - self.external_gps_msg = json.loads( - http_get( - f"http://{self.external_gps_server}:{self.external_gps_server_port}/gps-data" - ).text - ) - + external_gps_msg = http_get( + f"http://{self.external_gps_server}:{self.external_gps_server_port}/gps-data" + ) + if external_gps_msg is None: + logging.error("could not update with external GPS") + else: + self.external_gps_msg = json.loads(external_gps_msg.text) publish_args.update( { "position": ( @@ -117,9 +117,6 @@ def add_gps(self, publish_args): } ) - except Exception as err: - logging.error("could not update with external GPS: %s", err) - # Use internal GPIO GPS else: try: From 22e75c42982bc08f191feb40d21cf2425ac288a2 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 4 Dec 2023 23:50:37 +0000 Subject: [PATCH 07/10] poetry install. --- .github/workflows/ci-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 6adcce87..aa7e440b 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -50,6 +50,7 @@ jobs: sudo ldconfig -v && \ poetry config virtualenvs.create false && \ poetry install --no-interaction && \ + poetry install --no-interaction -C utils/mavlink-api && \ sudo dpkg -r --force-depends python3-numpy - name: test gamutrf-samples2raw env: From 7d30b19f6d5b48d0806d37e47187a91c212e5ef5 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 4 Dec 2023 23:56:53 +0000 Subject: [PATCH 08/10] dupe requests. --- gamutrf/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/gamutrf/utils.py b/gamutrf/utils.py index 0810a707..cd483193 100644 --- a/gamutrf/utils.py +++ b/gamutrf/utils.py @@ -2,7 +2,6 @@ import logging import os import re -import requests import sys from pathlib import Path From a618a34ff4c43133b3cf61f3802076203a25ea8e Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Tue, 5 Dec 2023 00:10:06 +0000 Subject: [PATCH 09/10] needs httpx. --- utils/mavlink-api/poetry.lock | 150 +++++++++++++++++++++++++++++++++- 1 file changed, 147 insertions(+), 3 deletions(-) diff --git a/utils/mavlink-api/poetry.lock b/utils/mavlink-api/poetry.lock index 281a60f6..17d686a3 100644 --- a/utils/mavlink-api/poetry.lock +++ b/utils/mavlink-api/poetry.lock @@ -1,9 +1,32 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. + +[[package]] +name = "anyio" +version = "4.1.0" +description = "High level compatibility layer for multiple asynchronous event loop implementations" +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "anyio-4.1.0-py3-none-any.whl", hash = "sha256:56a415fbc462291813a94528a779597226619c8e78af7de0507333f700011e5f"}, + {file = "anyio-4.1.0.tar.gz", hash = "sha256:5a0bec7085176715be77df87fc66d6c9d70626bd752fcc85f57cdbee5b3760da"}, +] + +[package.dependencies] +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} +idna = ">=2.8" +sniffio = ">=1.1" + +[package.extras] +doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (>=0.23)"] [[package]] name = "blinker" version = "1.6.2" description = "Fast, simple object-to-object and broadcast signaling" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -11,10 +34,23 @@ files = [ {file = "blinker-1.6.2.tar.gz", hash = "sha256:4afd3de66ef3a9f8067559fb7a1cbe555c17dcbe15971b05d1b625c3e7abe213"}, ] +[[package]] +name = "certifi" +version = "2023.11.17" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2023.11.17-py3-none-any.whl", hash = "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474"}, + {file = "certifi-2023.11.17.tar.gz", hash = "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1"}, +] + [[package]] name = "click" version = "8.1.7" description = "Composable command line interface toolkit" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -29,6 +65,7 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -36,10 +73,26 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "exceptiongroup" +version = "1.2.0" +description = "Backport of PEP 654 (exception groups)" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, + {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, +] + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "flask" version = "3.0.0" description = "A simple framework for building complex web applications." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -62,16 +115,89 @@ dotenv = ["python-dotenv"] name = "future" version = "0.18.3" description = "Clean single-source support for Python 3 and 2" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ {file = "future-0.18.3.tar.gz", hash = "sha256:34a17436ed1e96697a86f9de3d15a3b0be01d8bc8de9c1dffd59fb8234ed5307"}, ] +[[package]] +name = "h11" +version = "0.14.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, +] + +[[package]] +name = "httpcore" +version = "1.0.2" +description = "A minimal low-level HTTP client." +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "httpcore-1.0.2-py3-none-any.whl", hash = "sha256:096cc05bca73b8e459a1fc3dcf585148f63e534eae4339559c9b8a8d6399acc7"}, + {file = "httpcore-1.0.2.tar.gz", hash = "sha256:9fc092e4799b26174648e54b74ed5f683132a464e95643b226e00c2ed2fa6535"}, +] + +[package.dependencies] +certifi = "*" +h11 = ">=0.13,<0.15" + +[package.extras] +asyncio = ["anyio (>=4.0,<5.0)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (>=1.0.0,<2.0.0)"] +trio = ["trio (>=0.22.0,<0.23.0)"] + +[[package]] +name = "httpx" +version = "0.25.2" +description = "The next generation HTTP client." +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "httpx-0.25.2-py3-none-any.whl", hash = "sha256:a05d3d052d9b2dfce0e3896636467f8a5342fb2b902c819428e1ac65413ca118"}, + {file = "httpx-0.25.2.tar.gz", hash = "sha256:8b8fcaa0c8ea7b05edd69a094e63a2094c4efcb48129fb757361bc423c0ad9e8"}, +] + +[package.dependencies] +anyio = "*" +certifi = "*" +httpcore = ">=1.0.0,<2.0.0" +idna = "*" +sniffio = "*" + +[package.extras] +brotli = ["brotli", "brotlicffi"] +cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<14)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (>=1.0.0,<2.0.0)"] + +[[package]] +name = "idna" +version = "3.6" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, + {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, +] + [[package]] name = "itsdangerous" version = "2.1.2" description = "Safely pass data to untrusted environments and back." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -83,6 +209,7 @@ files = [ name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -100,6 +227,7 @@ i18n = ["Babel (>=2.7)"] name = "lxml" version = "4.9.3" description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" files = [ @@ -207,6 +335,7 @@ source = ["Cython (>=0.29.35)"] name = "markupsafe" version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -276,6 +405,7 @@ files = [ name = "pymavlink" version = "2.4.40" description = "Python MAVLink code" +category = "main" optional = false python-versions = "*" files = [ @@ -291,6 +421,7 @@ lxml = "*" name = "pyserial" version = "3.5" description = "Python Serial Port Extension" +category = "main" optional = false python-versions = "*" files = [ @@ -301,10 +432,23 @@ files = [ [package.extras] cp2110 = ["hidapi"] +[[package]] +name = "sniffio" +version = "1.3.0" +description = "Sniff out which async library your code is running under" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, + {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, +] + [[package]] name = "werkzeug" version = "3.0.1" description = "The comprehensive WSGI web application library." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -320,5 +464,5 @@ watchdog = ["watchdog (>=2.3)"] [metadata] lock-version = "2.0" -python-versions = "^3.11" -content-hash = "b247a7bcaee2251e28302f8de35188ab20368d79c0ad5f5b272ab06fa29cc4e2" +python-versions = ">=3.10,<3.13" +content-hash = "8b4f6ba34b5bf2245dcc96ca00b9ef0986a91d1942fe04f704f96f8b653b52f2" From 2767c5fbcc656dd8bdd15c06d296a3d45cbfdddd Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Tue, 5 Dec 2023 00:11:20 +0000 Subject: [PATCH 10/10] mavlink-api needs httpx. --- utils/mavlink-api/poetry.lock | 10 +++++----- utils/mavlink-api/pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/mavlink-api/poetry.lock b/utils/mavlink-api/poetry.lock index 17d686a3..a99158b2 100644 --- a/utils/mavlink-api/poetry.lock +++ b/utils/mavlink-api/poetry.lock @@ -24,14 +24,14 @@ trio = ["trio (>=0.23)"] [[package]] name = "blinker" -version = "1.6.2" +version = "1.7.0" description = "Fast, simple object-to-object and broadcast signaling" category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "blinker-1.6.2-py3-none-any.whl", hash = "sha256:c3d739772abb7bc2860abf5f2ec284223d9ad5c76da018234f6f50d6f31ab1f0"}, - {file = "blinker-1.6.2.tar.gz", hash = "sha256:4afd3de66ef3a9f8067559fb7a1cbe555c17dcbe15971b05d1b625c3e7abe213"}, + {file = "blinker-1.7.0-py3-none-any.whl", hash = "sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9"}, + {file = "blinker-1.7.0.tar.gz", hash = "sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182"}, ] [[package]] @@ -465,4 +465,4 @@ watchdog = ["watchdog (>=2.3)"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "8b4f6ba34b5bf2245dcc96ca00b9ef0986a91d1942fe04f704f96f8b653b52f2" +content-hash = "7de3a193f691151fba3095edd6e2fa73ceda46f8d86c2b607ef4ef7a4154aff8" diff --git a/utils/mavlink-api/pyproject.toml b/utils/mavlink-api/pyproject.toml index ae18edc0..d1ff2c07 100644 --- a/utils/mavlink-api/pyproject.toml +++ b/utils/mavlink-api/pyproject.toml @@ -10,7 +10,7 @@ python = ">=3.10,<3.13" Flask = "^3.0.0" pymavlink = "^2.4.40" pyserial = "^3.5" - +httpx = "0.25.2" [build-system] requires = ["poetry-core"]