python3-jupyter_client: update to 8.5.0.
This commit is contained in:
parent
84a823c010
commit
3d1c330e07
2 changed files with 4 additions and 151 deletions
|
@ -1,149 +0,0 @@
|
||||||
Taken from https://github.com/jupyter/jupyter_client/pull/972/
|
|
||||||
|
|
||||||
From 493366dd9e11736c32d32b1d84f5fa56d9ee74ab Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
|
||||||
Date: Mon, 11 Sep 2023 06:37:16 +0200
|
|
||||||
Subject: [PATCH 1/4] Do not use datetime.utcnow() that is deprecated in Python
|
|
||||||
3.12
|
|
||||||
|
|
||||||
Import session.utcnow() into utils instead of reimplementing it
|
|
||||||
---
|
|
||||||
jupyter_client/session.py | 2 +-
|
|
||||||
jupyter_client/utils.py | 34 +---------------------------------
|
|
||||||
2 files changed, 2 insertions(+), 34 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/jupyter_client/session.py b/jupyter_client/session.py
|
|
||||||
index ca9d9bbe..ee172d53 100644
|
|
||||||
--- a/jupyter_client/session.py
|
|
||||||
+++ b/jupyter_client/session.py
|
|
||||||
@@ -197,7 +197,7 @@ def default_secure(cfg: t.Any) -> None: # pragma: no cover
|
|
||||||
|
|
||||||
def utcnow() -> datetime:
|
|
||||||
"""Return timezone-aware UTC timestamp"""
|
|
||||||
- return datetime.utcnow().replace(tzinfo=utc) # noqa
|
|
||||||
+ return datetime.now(utc) # noqa
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
diff --git a/jupyter_client/utils.py b/jupyter_client/utils.py
|
|
||||||
index ab1cbcaa..4e2943c0 100644
|
|
||||||
--- a/jupyter_client/utils.py
|
|
||||||
+++ b/jupyter_client/utils.py
|
|
||||||
@@ -4,10 +4,10 @@
|
|
||||||
- vendor functions from ipython_genutils that should be retired at some point.
|
|
||||||
"""
|
|
||||||
import os
|
|
||||||
-from datetime import datetime, timedelta, tzinfo
|
|
||||||
|
|
||||||
from jupyter_core.utils import ensure_async, run_sync # noqa: F401 # noqa: F401
|
|
||||||
|
|
||||||
+from .session import utcnow
|
|
||||||
|
|
||||||
def _filefind(filename, path_dirs=None):
|
|
||||||
"""Find a file by looking through a sequence of paths.
|
|
||||||
@@ -84,35 +84,3 @@ def _expand_path(s):
|
|
||||||
if os.name == "nt":
|
|
||||||
s = s.replace("IPYTHON_TEMP", "$\\")
|
|
||||||
return s
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-# constant for zero offset
|
|
||||||
-ZERO = timedelta(0)
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-class tzUTC(tzinfo): # noqa
|
|
||||||
- """tzinfo object for UTC (zero offset)"""
|
|
||||||
-
|
|
||||||
- def utcoffset(self, d):
|
|
||||||
- """Compute utcoffset."""
|
|
||||||
- return ZERO
|
|
||||||
-
|
|
||||||
- def dst(self, d):
|
|
||||||
- """Compute dst."""
|
|
||||||
- return ZERO
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-UTC = tzUTC() # type:ignore
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-def utc_aware(unaware):
|
|
||||||
- """decorator for adding UTC tzinfo to datetime's utcfoo methods"""
|
|
||||||
-
|
|
||||||
- def utc_method(*args, **kwargs):
|
|
||||||
- dt = unaware(*args, **kwargs)
|
|
||||||
- return dt.replace(tzinfo=UTC)
|
|
||||||
-
|
|
||||||
- return utc_method
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-utcnow = utc_aware(datetime.utcnow)
|
|
||||||
|
|
||||||
From 5468546499f5071171bcb8bccafe034837cc092d Mon Sep 17 00:00:00 2001
|
|
||||||
From: "pre-commit-ci[bot]"
|
|
||||||
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
||||||
Date: Mon, 11 Sep 2023 04:44:48 +0000
|
|
||||||
Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks
|
|
||||||
|
|
||||||
for more information, see https://pre-commit.ci
|
|
||||||
---
|
|
||||||
jupyter_client/utils.py | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/jupyter_client/utils.py b/jupyter_client/utils.py
|
|
||||||
index 4e2943c0..0186a001 100644
|
|
||||||
--- a/jupyter_client/utils.py
|
|
||||||
+++ b/jupyter_client/utils.py
|
|
||||||
@@ -9,6 +9,7 @@
|
|
||||||
|
|
||||||
from .session import utcnow
|
|
||||||
|
|
||||||
+
|
|
||||||
def _filefind(filename, path_dirs=None):
|
|
||||||
"""Find a file by looking through a sequence of paths.
|
|
||||||
|
|
||||||
|
|
||||||
From d78c153d819fb3da3dc80f916747291b5200a302 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Brochart <david.brochart@gmail.com>
|
|
||||||
Date: Mon, 11 Sep 2023 09:22:41 +0200
|
|
||||||
Subject: [PATCH 3/4] Remove unneeded noqa
|
|
||||||
|
|
||||||
---
|
|
||||||
jupyter_client/session.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/jupyter_client/session.py b/jupyter_client/session.py
|
|
||||||
index ee172d53..e22c9d44 100644
|
|
||||||
--- a/jupyter_client/session.py
|
|
||||||
+++ b/jupyter_client/session.py
|
|
||||||
@@ -197,7 +197,7 @@ def default_secure(cfg: t.Any) -> None: # pragma: no cover
|
|
||||||
|
|
||||||
def utcnow() -> datetime:
|
|
||||||
"""Return timezone-aware UTC timestamp"""
|
|
||||||
- return datetime.now(utc) # noqa
|
|
||||||
+ return datetime.now(utc)
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
From 7ba40db1c6fb505e95df4cf4c3f9176661f2f270 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Brochart <david.brochart@gmail.com>
|
|
||||||
Date: Mon, 11 Sep 2023 09:22:57 +0200
|
|
||||||
Subject: [PATCH 4/4] Add noqa
|
|
||||||
|
|
||||||
---
|
|
||||||
jupyter_client/utils.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/jupyter_client/utils.py b/jupyter_client/utils.py
|
|
||||||
index 0186a001..9f1c38e9 100644
|
|
||||||
--- a/jupyter_client/utils.py
|
|
||||||
+++ b/jupyter_client/utils.py
|
|
||||||
@@ -7,7 +7,7 @@
|
|
||||||
|
|
||||||
from jupyter_core.utils import ensure_async, run_sync # noqa: F401 # noqa: F401
|
|
||||||
|
|
||||||
-from .session import utcnow
|
|
||||||
+from .session import utcnow # noqa
|
|
||||||
|
|
||||||
|
|
||||||
def _filefind(filename, path_dirs=None):
|
|
|
@ -1,8 +1,10 @@
|
||||||
# Template file for 'python3-jupyter_client'
|
# Template file for 'python3-jupyter_client'
|
||||||
pkgname=python3-jupyter_client
|
pkgname=python3-jupyter_client
|
||||||
version=8.3.1
|
version=8.5.0
|
||||||
revision=1
|
revision=1
|
||||||
build_style=python3-pep517
|
build_style=python3-pep517
|
||||||
|
# tests fail otherwise with jupyter_core 5.5.0
|
||||||
|
make_check_args="-p no:unraisableexception"
|
||||||
hostmakedepends="hatchling"
|
hostmakedepends="hatchling"
|
||||||
depends="python3-dateutil python3-jupyter_core python3-pyzmq python3-tornado"
|
depends="python3-dateutil python3-jupyter_core python3-pyzmq python3-tornado"
|
||||||
checkdepends="$depends inetutils-ifconfig iproute2 openssh
|
checkdepends="$depends inetutils-ifconfig iproute2 openssh
|
||||||
|
@ -13,7 +15,7 @@ license="BSD-3-Clause"
|
||||||
homepage="https://github.com/jupyter/jupyter_client"
|
homepage="https://github.com/jupyter/jupyter_client"
|
||||||
changelog="https://raw.githubusercontent.com/jupyter/jupyter_client/main/CHANGELOG.md"
|
changelog="https://raw.githubusercontent.com/jupyter/jupyter_client/main/CHANGELOG.md"
|
||||||
distfiles="${PYPI_SITE}/j/jupyter_client/jupyter_client-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/j/jupyter_client/jupyter_client-${version}.tar.gz"
|
||||||
checksum=60294b2d5b869356c893f57b1a877ea6510d60d45cf4b38057f1672d85699ac9
|
checksum=e8754066510ce456358df363f97eae64b50860f30dc1fe8c6771440db3be9a63
|
||||||
conflicts="python-jupyter_client<=5.2.4_2"
|
conflicts="python-jupyter_client<=5.2.4_2"
|
||||||
make_check=extended # avoid a circular dependency
|
make_check=extended # avoid a circular dependency
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue