mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
testing/octoprint: fix with netaddr 0.10 and pydantic 2.0
This commit is contained in:
parent
2643f574e6
commit
08729dd576
@ -2,7 +2,7 @@
|
||||
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
|
||||
pkgname=octoprint
|
||||
pkgver=1.9.3
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Snappy web interface for your 3D printer"
|
||||
url="https://octoprint.org/"
|
||||
arch="noarch"
|
||||
@ -75,6 +75,8 @@ source="
|
||||
octoprint.initd
|
||||
|
||||
fix-tests.patch
|
||||
netaddr-0.10.patch
|
||||
pydantic-2.0.patch
|
||||
"
|
||||
builddir="$srcdir/OctoPrint-$pkgver"
|
||||
|
||||
@ -104,4 +106,6 @@ ec2cc8e73c3ff4855c3e389259d87d196aadf4a55f35ccef87b1ef59a0d832a29c52c4ab28db833b
|
||||
b56a37d1225d37caff1288b9c943ee86ed1f36653bbb311c835031e53e5f68e95be3ad9b53d333aad65508ba2a3ba786f80601bd74fef8efb1c3364a8fd85010 config.yaml
|
||||
3edd9971cc59fb66126f063ecac50a77792c5a3f5b718e03b7cbff74ff9f842c7784e7de2a56fb2e847a2bcb8e1c4fcfc52f8d236cdf3ecd511b230eea001162 octoprint.initd
|
||||
d678b87aaee4529b4d96f496862e5bec86df98491330328848ac06fec8d1f4571cfac995b2e9de26dcd2efc43b9dc24578d7f50cae1893fefc76470aee074f14 fix-tests.patch
|
||||
f99c752dccdee4821a88ac6e7ea98ac906002d734d2672bbd513b30d596b0c54b699071679581cdc46bfcd0eb98d6d032243a6d940f64620a69623a65db229bf netaddr-0.10.patch
|
||||
ed0bebc3632519b0adab58f6ef4666e0192ab72021f2c127146eec9c566551f04c49f05ace5a4056177f21605064146ac6259a88db15faaf88853fd3750abe88 pydantic-2.0.patch
|
||||
"
|
||||
|
33
testing/octoprint/netaddr-0.10.patch
Normal file
33
testing/octoprint/netaddr-0.10.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 519b66c312e903c8485470a2792bbfaa5dc5e10a Mon Sep 17 00:00:00 2001
|
||||
From: "lauren n. liberda" <lauren@selfisekai.rocks>
|
||||
Date: Thu, 15 Feb 2024 03:18:46 +0100
|
||||
Subject: [PATCH] upgrade netaddr to 0.10.x
|
||||
|
||||
---
|
||||
AUTHORS.md | 1 +
|
||||
setup.py | 2 +-
|
||||
src/octoprint/util/net.py | 7 ++++---
|
||||
3 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/octoprint/util/net.py b/src/octoprint/util/net.py
|
||||
index e3fc10d5f7..4207a212e7 100644
|
||||
--- a/src/octoprint/util/net.py
|
||||
+++ b/src/octoprint/util/net.py
|
||||
@@ -102,13 +102,14 @@ def to_ipnetwork(address):
|
||||
)
|
||||
)
|
||||
|
||||
- subnets += list(netaddr.ip.IPV4_PRIVATE) + [
|
||||
+ subnets += list(netaddr.ip.IPV4_PRIVATE_USE) + [
|
||||
netaddr.ip.IPV4_LOOPBACK,
|
||||
netaddr.ip.IPV4_LINK_LOCAL,
|
||||
]
|
||||
if HAS_V6:
|
||||
- subnets += list(netaddr.ip.IPV6_PRIVATE) + [
|
||||
- netaddr.IPNetwork(netaddr.ip.IPV6_LOOPBACK),
|
||||
+ subnets += [
|
||||
+ netaddr.ip.IPV6_UNIQUE_LOCAL,
|
||||
+ netaddr.ip.IPV6_LOOPBACK,
|
||||
netaddr.ip.IPV6_LINK_LOCAL,
|
||||
]
|
||||
|
28
testing/octoprint/pydantic-2.0.patch
Normal file
28
testing/octoprint/pydantic-2.0.patch
Normal file
@ -0,0 +1,28 @@
|
||||
--- ./src/octoprint/vendor/with_attrs_docs.py.orig
|
||||
+++ ./src/octoprint/vendor/with_attrs_docs.py
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
from typing import Type
|
||||
|
||||
-from class_doc import extract_docs_from_cls_obj
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
@@ -17,16 +16,7 @@
|
||||
:param model: any pydantic model
|
||||
:param override_existing: override existing descriptions
|
||||
"""
|
||||
- docs = extract_docs_from_cls_obj(model)
|
||||
-
|
||||
- for field in model.__fields__.values():
|
||||
- if field.field_info.description and not override_existing:
|
||||
- continue
|
||||
-
|
||||
- try:
|
||||
- field.field_info.description = '\n'.join(docs[field.name])
|
||||
- except KeyError:
|
||||
- pass
|
||||
+ pass
|
||||
|
||||
|
||||
def with_attrs_docs(
|
Loading…
Reference in New Issue
Block a user