15
0

Accepting request 1238027 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1238027
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-netutils?expand=0&rev=8
This commit is contained in:
2025-01-15 16:45:20 +00:00
committed by Git OBS Bridge
6 changed files with 32 additions and 102 deletions

View File

@@ -0,0 +1,11 @@
diff -Nru netutils-1.12.0.orig/pyproject.toml netutils-1.12.0/pyproject.toml
--- netutils-1.12.0.orig/pyproject.toml 2025-01-08 23:21:29.000000000 +0100
+++ netutils-1.12.0/pyproject.toml 2025-01-14 11:39:00.467478137 +0100
@@ -1,6 +1,6 @@
[tool.poetry]
name = "netutils"
-version = "1.11.0"
+version = "1.12.0"
description = "Common helper functions useful in network automation."
authors = ["Network to Code, LLC <opensource@networktocode.com>"]
license = "Apache-2.0"

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b7abccd3bf20fa70aeba656e311d620964d692eb1bfb5988b1dac116f07edd87
size 1464585

3
netutils-1.12.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4de6566f4efe5d608801607253e3c7d6ff2100dfeb2bc632d9c966300523b0d1
size 1475544

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue Jan 14 10:42:23 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 1.12.0
* Added Python 3.13 support.
* Removed Python 3.8 support.
- from version 1.11.0
* (no changes reported)
- Add fix-version-in-pyproject.patch to fix version in pyproject.toml
- Drop use-legacycrypt-if-required.patch, merged upstream
- Update BuildRequires from pyproject.toml
-------------------------------------------------------------------
Tue Dec 3 03:45:37 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-netutils
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,15 +17,16 @@
Name: python-netutils
Version: 1.10.0
Version: 1.12.0
Release: 0
Summary: Common helper functions useful in network automation
License: Apache-2.0
URL: https://netutils.readthedocs.io
Source: https://github.com/networktocode/netutils/archive/refs/tags/v%{version}.tar.gz#/netutils-%{version}.tar.gz
# PATCH-FIX-UPSTREAM gh#networktocode/netutils#601
Patch0: use-legacycrypt-if-required.patch
BuildRequires: %{python_module base >= 3.7}
# PATCH-FIX-UPSTREAM - Fix version in pyproject.toml
# see: https://github.com/networktocode/netutils/issues/613
Patch: fix-version-in-pyproject.patch
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module jinja2}
BuildRequires: %{python_module legacycrypt if %python-base >= 3.13}
BuildRequires: %{python_module pip}

View File

@@ -1,94 +0,0 @@
From 3517bfc545e529869d72e1ed0977674d42da7148 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Tue, 3 Dec 2024 14:42:06 +1100
Subject: [PATCH] Use legacycrypt where crypt isn't available
Since Python 3.13 has removed the crypt module, add legacycrypt to the
requirements if we're using that version of Python, importing it if the
crypt module isn't found.
Fixes #594
---
netutils/password.py | 6 ++++--
poetry.lock | 17 ++++++++++++++---
pyproject.toml | 1 +
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/netutils/password.py b/netutils/password.py
index 5a9026a7..02062e8d 100644
--- a/netutils/password.py
+++ b/netutils/password.py
@@ -1,7 +1,9 @@
"""Functions for working with Passwords."""
-# TODO: Swap out crypt prior to py3.13
-import crypt # pylint: disable=deprecated-module
+try:
+ import crypt # pylint: disable=deprecated-module
+except ModuleNotFoundError:
+ import legacycrypt as crypt
import random
import secrets
import string
diff --git a/poetry.lock b/poetry.lock
index 15109fb5..b75099e6 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# 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.8.4 and should not be changed by hand.
[[package]]
name = "astroid"
@@ -774,6 +774,17 @@ six = "*"
transitions = "*"
yamlordereddictloader = "*"
+[[package]]
+name = "legacycrypt"
+version = "0.3"
+description = "Wrapper to the POSIX crypt library call and associated functionality."
+optional = false
+python-versions = ">=3.5"
+files = [
+ {file = "legacycrypt-0.3-py3-none-any.whl", hash = "sha256:b5e373506ccb442f8d715e29fa75f53a11bbec3ca0d7b63445f4dbb656555218"},
+ {file = "legacycrypt-0.3.tar.gz", hash = "sha256:e76e7fd25666a451428b20d5afbbecf3654565b2e11511b53226be955c4d2292"},
+]
+
[[package]]
name = "lxml"
version = "5.2.1"
@@ -873,7 +884,6 @@ files = [
{file = "lxml-5.2.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:9e2addd2d1866fe112bc6f80117bcc6bc25191c5ed1bfbcf9f1386a884252ae8"},
{file = "lxml-5.2.1-cp37-cp37m-win32.whl", hash = "sha256:f51969bac61441fd31f028d7b3b45962f3ecebf691a510495e5d2cd8c8092dbd"},
{file = "lxml-5.2.1-cp37-cp37m-win_amd64.whl", hash = "sha256:b0b58fbfa1bf7367dde8a557994e3b1637294be6cf2169810375caf8571a085c"},
- {file = "lxml-5.2.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3e183c6e3298a2ed5af9d7a356ea823bccaab4ec2349dc9ed83999fd289d14d5"},
{file = "lxml-5.2.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:804f74efe22b6a227306dd890eecc4f8c59ff25ca35f1f14e7482bbce96ef10b"},
{file = "lxml-5.2.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:08802f0c56ed150cc6885ae0788a321b73505d2263ee56dad84d200cab11c07a"},
{file = "lxml-5.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f8c09ed18ecb4ebf23e02b8e7a22a05d6411911e6fabef3a36e4f371f4f2585"},
@@ -1789,6 +1799,7 @@ files = [
{file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"},
{file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"},
{file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"},
+ {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"},
{file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"},
{file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"},
{file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"},
@@ -2428,4 +2439,4 @@ optionals = ["jsonschema", "napalm"]
[metadata]
lock-version = "2.0"
python-versions = "^3.8"
-content-hash = "450d6722c6146d1680a5c710f1085d19f064d7392dc7a10f0b77fbda0b1dacc1"
+content-hash = "e87422d1f609f9d4fb697c6d5165c33269071e89d3780c003ee98689405871a2"
diff --git a/pyproject.toml b/pyproject.toml
index be2b2746..8daea416 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -29,6 +29,7 @@ include = [
python = "^3.8"
napalm = {version = "^4.0.0", optional = true}
jsonschema = {version = "^4.17.3", optional = true}
+legacycrypt = {markers = "python_version >= \"3.13\"", version = "^0.3"}
[tool.poetry.extras]
optionals = ["jsonschema", "napalm"]