mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-15 13:46:58 +02:00
python3-ipyparallel: fix utcnow deprecation and one more test.
This commit is contained in:
parent
3e54d57619
commit
a98fd37bf0
3 changed files with 37 additions and 1 deletions
|
@ -0,0 +1,21 @@
|
|||
https://github.com/ipython/ipyparallel/pull/818
|
||||
|
||||
commit 47aba76d77b1ae83463badcd1a9002c74cc454cc
|
||||
Author: Miro Hrončok <miro@hroncok.cz>
|
||||
Date: Mon Jul 3 20:52:18 2023 +0200
|
||||
|
||||
Fix unittest.mock usage on Python 3.12
|
||||
|
||||
diff --git a/ipyparallel/tests/test_util.py b/ipyparallel/tests/test_util.py
|
||||
index f4e0c953..eb1e11dc 100644
|
||||
--- a/ipyparallel/tests/test_util.py
|
||||
+++ b/ipyparallel/tests/test_util.py
|
||||
@@ -14,7 +14,7 @@ def test_disambiguate_ip(warn_mock):
|
||||
assert util.disambiguate_ip_address('0.0.0.0', socket.gethostname()) == localhost()
|
||||
wontresolve = 'this.wontresolve.dns'
|
||||
assert util.disambiguate_ip_address('0.0.0.0', wontresolve) == wontresolve
|
||||
- assert warn_mock.called_once_with(
|
||||
+ warn_mock.assert_called_once_with(
|
||||
'IPython could not determine IPs for {}: '
|
||||
'[Errno -2] Name or service not known'.format(wontresolve),
|
||||
RuntimeWarning,
|
|
@ -0,0 +1,15 @@
|
|||
https://github.com/ipython/ipyparallel/pull/859
|
||||
|
||||
diff --git a/ipyparallel/util.py b/ipyparallel/util.py
|
||||
index 130d8cef..f1ba8b2e 100644
|
||||
--- a/ipyparallel/util.py
|
||||
+++ b/ipyparallel/util.py
|
||||
@@ -591,7 +589,7 @@ def compare_datetimes(a, b):
|
||||
|
||||
def utcnow():
|
||||
"""Timezone-aware UTC timestamp"""
|
||||
- return datetime.utcnow().replace(tzinfo=utc)
|
||||
+ return datetime.now(utc)
|
||||
|
||||
|
||||
def _v(version_s):
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'python3-ipyparallel'
|
||||
pkgname=python3-ipyparallel
|
||||
version=8.6.1
|
||||
revision=2
|
||||
revision=3
|
||||
build_style=python3-pep517
|
||||
hostmakedepends="hatchling"
|
||||
depends="python3-entrypoints python3-decorator python3-pyzmq python3-traitlets
|
||||
|
|
Loading…
Add table
Reference in a new issue