forked from pool/python-py3dns
- update to 4.0.0:
* Bump major version due to incompatible change * Remove class DnsAsyncRequest, asyncore is removed from Python 3.12 and it would require a substial rewrite - If you need async DNS, use aiodns instead. (LP: #2003329) * Switch build system from setuptools with setup.py to flit * If /etc/resolv.conf, assume DNS server is '127.0.0.1', this changes the existing behavior - in previous releases there would be a FileNotFoundError. - drop python3-py3dns-handle-absent-resolv.patch, python3-py3dns-py3_friendly_warning.patch: solved upstream differently OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py3dns?expand=0&rev=7
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:1f07d4463e98d9859ce0280c3eaa57da670ad623f6d4d3285c67dca23d7045e4
|
|
||||||
size 30691
|
|
3
py3dns-4.0.0.tar.gz
Normal file
3
py3dns-4.0.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ddfdb691a6b7db3e706cd1e33ffeb5a4f45f28e0b8574ea4b8b74ef2c055330b
|
||||||
|
size 33734
|
@@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 9 21:30:53 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 4.0.0:
|
||||||
|
* Bump major version due to incompatible change
|
||||||
|
* Remove class DnsAsyncRequest, asyncore is removed from Python
|
||||||
|
3.12 and it would require a substial rewrite -
|
||||||
|
If you need async DNS, use aiodns instead. (LP: #2003329)
|
||||||
|
* Switch build system from setuptools with setup.py to flit
|
||||||
|
* If /etc/resolv.conf, assume DNS server is '127.0.0.1', this
|
||||||
|
changes the existing behavior - in previous releases there
|
||||||
|
would be a FileNotFoundError.
|
||||||
|
- drop python3-py3dns-handle-absent-resolv.patch,
|
||||||
|
python3-py3dns-py3_friendly_warning.patch: solved upstream
|
||||||
|
differently
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 10 12:56:30 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
Tue Sep 10 12:56:30 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-py3dns
|
# spec file for package python-py3dns
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,19 +16,17 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%define skip_python2 1
|
|
||||||
Name: python-py3dns
|
Name: python-py3dns
|
||||||
Version: 3.2.1
|
Version: 4.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python module for DNS (Domain Name Service)
|
Summary: Python module for DNS (Domain Name Service)
|
||||||
License: CNRI-Python
|
License: CNRI-Python
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://launchpad.net/py3dns
|
URL: https://launchpad.net/py3dns
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/py3dns/py3dns-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/py3dns/py3dns-%{version}.tar.gz
|
||||||
Patch0: python3-py3dns-handle-absent-resolv.patch
|
BuildRequires: %{python_module flit-core}
|
||||||
Patch1: python3-py3dns-py3_friendly_warning.patch
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@@ -40,14 +38,13 @@ This package contains a module (dnslib) that implements a DNS
|
|||||||
symbolic constants used by DNS (dnstype, dnsclass, dnsopcode).
|
symbolic constants used by DNS (dnstype, dnsclass, dnsopcode).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n py3dns-%{version}
|
%autosetup -p1 -n py3dns-%{version}
|
||||||
%autopatch -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -57,6 +54,7 @@ symbolic constants used by DNS (dnstype, dnsclass, dnsopcode).
|
|||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README* CHANGES
|
%doc README* CHANGES
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/DNS
|
||||||
|
%{python_sitelib}/py3dns-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@@ -1,37 +0,0 @@
|
|||||||
From c95cb269a6f0cb57c1204c29bec30d40e41eb2ef Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ralph Bean <rbean@redhat.com>
|
|
||||||
Date: Thu, 2 Feb 2017 12:19:00 -0500
|
|
||||||
Subject: [PATCH] Handle /etc/resolv.conf
|
|
||||||
|
|
||||||
---
|
|
||||||
DNS/Base.py | 10 +++++++---
|
|
||||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
Index: py3dns-3.2.1/DNS/Base.py
|
|
||||||
===================================================================
|
|
||||||
--- py3dns-3.2.1.orig/DNS/Base.py
|
|
||||||
+++ py3dns-3.2.1/DNS/Base.py
|
|
||||||
@@ -11,7 +11,7 @@ Changes for Python3 port © 2011-14 Scot
|
|
||||||
Base functionality. Request and Response classes, that sort of thing.
|
|
||||||
"""
|
|
||||||
|
|
||||||
-import socket, string, types, time, select
|
|
||||||
+import socket, string, types, time, select, warnings
|
|
||||||
import errno
|
|
||||||
from . import Type,Class,Opcode
|
|
||||||
import asyncore
|
|
||||||
@@ -50,8 +50,12 @@ defaults= { 'protocol':'udp', 'port':53,
|
|
||||||
|
|
||||||
def ParseResolvConf(resolv_path="/etc/resolv.conf"):
|
|
||||||
"parses the /etc/resolv.conf file and sets defaults for name servers"
|
|
||||||
- with open(resolv_path, 'r') as stream:
|
|
||||||
- return ParseResolvConfFromIterable(stream)
|
|
||||||
+ try:
|
|
||||||
+ with open(resolv_path, 'r') as stream:
|
|
||||||
+ return ParseResolvConfFromIterable(stream)
|
|
||||||
+ except FileNotFoundError as e:
|
|
||||||
+ warnings.warn(e)
|
|
||||||
+ return
|
|
||||||
|
|
||||||
def ParseResolvConfFromIterable(lines):
|
|
||||||
"parses a resolv.conf formatted stream and sets defaults for name servers"
|
|
@@ -1,11 +0,0 @@
|
|||||||
--- a/DNS/Base.py 2018-03-27 21:22:25.000000000 +0000
|
|
||||||
+++ b/DNS/Base.py 2018-03-27 21:21:57.000000000 +0000
|
|
||||||
@@ -53,7 +53,7 @@
|
|
||||||
with open(resolv_path, 'r') as stream:
|
|
||||||
return ParseResolvConfFromIterable(stream)
|
|
||||||
except FileNotFoundError as e:
|
|
||||||
- warnings.warn(e)
|
|
||||||
+ warnings.warn(str(e))
|
|
||||||
return
|
|
||||||
|
|
||||||
def ParseResolvConfFromIterable(lines):
|
|
Reference in New Issue
Block a user