Codebase list python-param / e71353b
Fix setup.oy Andreas Tille 1 year, 2 months ago
6 changed file(s) with 23 addition(s) and 69 deletion(s). Raw diff Collapse all Expand all
1515 * Rules-Requires-Root: no (routine-update)
1616 * s/python3-nose/python3-pytest/
1717 Closes: #1018549
18 * Fix setup.py
19 Closes: #1026514
1820
1921 -- Andreas Tille <tille@debian.org> Fri, 03 Feb 2023 16:29:47 +0100
2022
+0
-44
debian/patches/2958f6327ad3a5222.patch less more
0 From 2958f6327ad3a5222eb773801e3e46f6130d9f65 Mon Sep 17 00:00:00 2001
1 From: "Benjamin A. Beasley" <code@musicinmybrain.net>
2 Date: Tue, 14 Jun 2022 11:27:05 -0400
3 Subject: [PATCH] Preserve existing Random seed behavior in Python 3.11
4
5 Fixes #602. See
6 https://github.com/holoviz/param/issues/602#issuecomment-1155147795 for
7 rationale and caveats.
8 ---
9 numbergen/__init__.py | 13 ++++++++++++-
10 1 file changed, 12 insertions(+), 1 deletion(-)
11
12 diff --git a/numbergen/__init__.py b/numbergen/__init__.py
13 index 2faf2bcb..d8ad7e1b 100644
14 --- a/numbergen/__init__.py
15 +++ b/numbergen/__init__.py
16 @@ -8,6 +8,7 @@
17 import struct
18 import fractions
19
20 +from ctypes import c_size_t
21 from math import e,pi
22
23 import param
24 @@ -306,8 +307,18 @@ class TimeAwareRandomState(TimeAware):
25 explicitly when you construct the RandomDistribution object.
26 """
27
28 + # Historically, the default random state was seeded with the tuple
29 + # (500, 500). The CPython implementation implicitly formed an unsigned
30 + # integer seed using the hash of the tuple as in the expression below. Note
31 + # that the resulting integer, and therefore the default initial random
32 + # state, varies across CPython versions (as the hash algorithm has changed)
33 + # and also between 32-bit and 64-bit interpreters.
34 + #
35 + # Seeding based on hashing is deprecated since Python 3.9 and removed in
36 + # Python 3.11; we explicitly continue the historical behavior for the time
37 + # being.
38 random_generator = param.Parameter(
39 - default=random.Random((500,500)), doc=
40 + default=random.Random(c_size_t(hash((500,500))).value), doc=
41 """
42 Random state used by the object. This may may be an instance
43 of random.Random from the Python standard library or an
+0
-23
debian/patches/356da9d49990f85a73d2f14a73fa77e18241e32c.patch less more
0 From 356da9d49990f85a73d2f14a73fa77e18241e32c Mon Sep 17 00:00:00 2001
1 From: "James A. Bednar" <jbednar@continuum.io>
2 Date: Fri, 10 Sep 2021 18:10:25 -0500
3 Subject: [PATCH] Fix deprecations: getfullargspec
4
5 ---
6 param/parameterized.py | 11 +++++++++--
7 1 file changed, 9 insertions(+), 2 deletions(-)
8
9 --- a/param/parameterized.py
10 +++ b/param/parameterized.py
11 @@ -53,6 +53,11 @@ try:
12 except:
13 pass
14
15 +try:
16 + from inspect import getfullargspec
17 +except:
18 + from inspect import getargspec as getfullargspec # python2
19 +
20 basestring = basestring if sys.version_info[0]==2 else str # noqa: it is defined
21
22 VERBOSE = INFO - 1
0 From: FC Stegerman <flx@obfusk.net>
1 Last-Update: Fri, 3 Feb 2023 18:45:56 +0100
2 Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026514#37
3 Bug-Debian: https://bugs.debian.org/1026514
4 Description: Fix setup.py
5
6 --- a/setup.py
7 +++ b/setup.py
8 @@ -7,6 +7,8 @@ from setuptools import setup
9
10 def get_setup_version(reponame):
11 """Use autover to get up to date version."""
12 + if version := os.environ.get("DEB_VERSION_UPSTREAM"):
13 + return version
14 # importing self into setup.py is unorthodox, but param has no
15 # required dependencies outside of python
16 from param.version import Version
0 #2958f6327ad3a5222.patch
1 356da9d49990f85a73d2f14a73fa77e18241e32c.patch
0 fix_setup.py
33 #export PYBUILD_DISABLE=test
44 # export PYBUILD_VERSIONS=3.8
55 # export PYBUILD_INTERPRETERS=python{version}
6
7 include /usr/share/dpkg/pkg-info.mk
8 export DEB_VERSION_UPSTREAM
69
710 %:
811 dh $@ --with python3 --buildsystem=pybuild