Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-dill for openSUSE:Factory checked in at 2024-09-01 19:21:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-dill (Old) and /work/SRC/openSUSE:Factory/.python-dill.new.2698 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-dill" Sun Sep 1 19:21:33 2024 rev:14 rq:1197807 version:0.3.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-dill/python-dill.changes 2023-11-26 19:37:22.366315977 +0100 +++ /work/SRC/openSUSE:Factory/.python-dill.new.2698/python-dill.changes 2024-09-01 19:21:49.356987558 +0200 @@ -1,0 +2,19 @@ +Thu Aug 29 14:56:31 UTC 2024 - Frantisek Simorda <[email protected]> + +- update to 0.3.8: + * test for qualname in get_typedef_type + * drop formal support for python 3.7 + * define html_theme as rtd workaround + * update install doc in tests by + * formal support for 3.12, initial support for 3.13 + * add build to rtfd config by + * add guard for math.log in Logger record size calculation by + * updated copyright for 2024 by + * Bump jinja2 from 3.1.1 to 3.1.3 in /docs by + * Import submodule properly when there is an attribute of the module with the same name + * update sphinx to 6.2.1 + * Bump readthedocs-sphinx-search from 0.3.1 to 0.3.2 in /docs by + * skip BufferedRandomType on pyodide + + +------------------------------------------------------------------- Old: ---- dill-0.3.7.tar.gz New: ---- dill-0.3.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-dill.spec ++++++ --- /var/tmp/diff_new_pack.tdK2WJ/_old 2024-09-01 19:21:50.889050284 +0200 +++ /var/tmp/diff_new_pack.tdK2WJ/_new 2024-09-01 19:21:50.905050939 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-dill # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,13 +18,13 @@ %{?sle15_python_module_pythons} Name: python-dill -Version: 0.3.7 +Version: 0.3.8 Release: 0 Summary: Module to serialize all of Python License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/uqfoundation/dill -Source: https://github.com/uqfoundation/dill/archive/dill-%{version}.tar.gz#/dill-%{version}.tar.gz +Source: https://github.com/uqfoundation/dill/archive/refs/tags/%{version}.tar.gz#/dill-%{version}.tar.gz BuildRequires: %{python_module dbm} BuildRequires: %{python_module devel >= 3.7} BuildRequires: %{python_module objgraph >= 1.7.2} @@ -33,7 +33,7 @@ BuildRequires: python-rpm-macros BuildRequires: unzip Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives Recommends: python-objgraph >= 1.7.2 BuildArch: noarch %python_subpackages @@ -50,7 +50,7 @@ session in a single command. %prep -%autosetup -p1 -n dill-dill-%{version} +%autosetup -p1 -n dill-%{version} find dill -name '*.py' -exec sed -i '1{\@^#!%{_bindir}/env python@d}' {} \; %build @@ -67,7 +67,7 @@ %check export PYTHONDONTWRITEBYTECODE=1 -export PYTHONPATH=%{_builddir}/dill-dill-%{version} +export PYTHONPATH=%{_builddir}/dill-%{version} # Creative; copied from tox.ini %python_exec dill/tests/__main__.py ++++++ dill-0.3.7.tar.gz -> dill-0.3.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/.readthedocs.yml new/dill-0.3.8/.readthedocs.yml --- old/dill-dill-0.3.7/.readthedocs.yml 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/.readthedocs.yml 2024-01-28 00:44:53.000000000 +0100 @@ -7,8 +7,13 @@ configuration: docs/source/conf.py # build +build: + os: ubuntu-22.04 + tools: + python: "3.10" + +# install python: - version: "3.8" install: - method: pip path: . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/.travis.yml new/dill-0.3.8/.travis.yml --- old/dill-dill-0.3.7/.travis.yml 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/.travis.yml 2024-01-28 00:44:53.000000000 +0100 @@ -3,9 +3,6 @@ matrix: include: - - python: '3.7' - env: - - python: '3.8' env: @@ -20,24 +17,24 @@ - python: '3.11' env: - - python: '3.12-dev' + - python: '3.12' env: - - python: 'pypy3.7-7.3.9' + - python: '3.13-dev' env: - python: 'pypy3.8-7.3.9' # at 7.3.11 env: - - python: 'pypy3.9-7.3.9' # at 7.3.12 + - python: 'pypy3.9-7.3.9' # at 7.3.15 env: - - python: 'pypy3.10-7.3.12' + - python: 'pypy3.10-7.3.15' env: allow_failures: - - python: '3.12-dev' - - python: 'pypy3.10-7.3.12' # CI missing + - python: '3.13-dev' + - python: 'pypy3.10-7.3.15' # CI missing fast_finish: true cache: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/LICENSE new/dill-0.3.8/LICENSE --- old/dill-dill-0.3.7/LICENSE 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/LICENSE 2024-01-28 00:44:53.000000000 +0100 @@ -1,5 +1,5 @@ Copyright (c) 2004-2016 California Institute of Technology. -Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. All rights reserved. This software is available subject to the conditions and terms laid diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/README.md new/dill-0.3.8/README.md --- old/dill-dill-0.3.7/README.md 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/README.md 2024-01-28 00:44:53.000000000 +0100 @@ -94,6 +94,10 @@ $ pip install dill[graph] +To optionally include the ``gprof2dot`` diagnostic tool in the install:: + + $ pip install dill[profile] + For windows users, to optionally install session history tools:: $ pip install dill[readline] @@ -103,12 +107,13 @@ ------------ ``dill`` requires: -* ``python`` (or ``pypy``), **>=3.7** +* ``python`` (or ``pypy``), **>=3.8** * ``setuptools``, **>=42** Optional requirements: * ``objgraph``, **>=1.7.2** +* ``gprof2dot``, **>=2022.7.29** * ``pyreadline``, **>=1.7.1** (on windows) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/__diff.py new/dill-0.3.8/dill/__diff.py --- old/dill-dill-0.3.7/dill/__diff.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/__diff.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/__init__.py new/dill-0.3.8/dill/__init__.py --- old/dill-dill-0.3.7/dill/__init__.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/__init__.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/_dill.py new/dill-0.3.8/dill/_dill.py --- old/dill-dill-0.3.7/dill/_dill.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/_dill.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2015 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ @@ -158,15 +158,17 @@ f.close() return t +IS_PYODIDE = sys.platform == 'emscripten' + FileType = get_file_type('rb', buffering=0) TextWrapperType = get_file_type('r', buffering=-1) -BufferedRandomType = get_file_type('r+b', buffering=-1) +BufferedRandomType = None if IS_PYODIDE else get_file_type('r+b', buffering=-1) BufferedReaderType = get_file_type('rb', buffering=-1) BufferedWriterType = get_file_type('wb', buffering=-1) try: from _pyio import open as _open PyTextWrapperType = get_file_type('r', buffering=-1, open=_open) - PyBufferedRandomType = get_file_type('r+b', buffering=-1, open=_open) + PyBufferedRandomType = None if IS_PYODIDE else get_file_type('r+b', buffering=-1, open=_open) PyBufferedReaderType = get_file_type('rb', buffering=-1, open=_open) PyBufferedWriterType = get_file_type('wb', buffering=-1, open=_open) except ImportError: @@ -1023,9 +1025,12 @@ items = import_name.split('.') module = '.'.join(items[:-1]) obj = items[-1] + submodule = getattr(__import__(module, None, None, [obj]), obj) + if isinstance(submodule, (ModuleType, type)): + return submodule + return __import__(import_name, None, None, [obj]) else: return __import__(import_name) - return getattr(__import__(module, None, None, [obj]), obj) except (ImportError, AttributeError, KeyError): if safe: return None @@ -1353,7 +1358,6 @@ @register(FileType) #XXX: in 3.x has buffer=0, needs different _create? -@register(BufferedRandomType) @register(BufferedReaderType) @register(BufferedWriterType) @register(TextWrapperType) @@ -1363,8 +1367,15 @@ logger.trace(pickler, "# Fi") return f +if BufferedRandomType: + @register(BufferedRandomType) + def save_file(pickler, obj): + logger.trace(pickler, "Fi: %s", obj) + f = _save_file(pickler, obj, open) + logger.trace(pickler, "# Fi") + return f + if PyTextWrapperType: - @register(PyBufferedRandomType) @register(PyBufferedReaderType) @register(PyBufferedWriterType) @register(PyTextWrapperType) @@ -1374,6 +1385,15 @@ logger.trace(pickler, "# Fi") return f + if PyBufferedRandomType: + @register(PyBufferedRandomType) + def save_file(pickler, obj): + logger.trace(pickler, "Fi: %s", obj) + f = _save_file(pickler, obj, _open) + logger.trace(pickler, "# Fi") + return f + + # The following two functions are based on 'saveCStringIoInput' # and 'saveCStringIoOutput' from spickle # Copyright (c) 2011 by science+computing ag @@ -1693,7 +1713,7 @@ for name, value in dict.items(clsdict): try: base_value = inherited_dict[name] - if value is base_value: + if value is base_value and hasattr(value, '__qualname__'): to_remove.append(name) except KeyError: pass @@ -2018,9 +2038,11 @@ _PyCapsule_SetName.argtypes = (ctypes.py_object, ctypes.c_char_p) _PyCapsule_SetPointer = ctypes.pythonapi.PyCapsule_SetPointer _PyCapsule_SetPointer.argtypes = (ctypes.py_object, ctypes.c_void_p) + #from _socket import CAPI as _testcapsule + _testcapsule_name = b'dill._dill._testcapsule' _testcapsule = _PyCapsule_New( ctypes.cast(_PyCapsule_New, ctypes.c_void_p), - ctypes.create_string_buffer(b'dill._dill._testcapsule'), + ctypes.c_char_p(_testcapsule_name), None ) PyCapsuleType = type(_testcapsule) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/_objects.py new/dill-0.3.8/dill/_objects.py --- old/dill-dill-0.3.7/dill/_objects.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/_objects.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ @@ -39,7 +39,6 @@ import gzip import zipfile import tarfile -import xdrlib import csv import hashlib import hmac @@ -110,7 +109,10 @@ pass _Struct._fields_ = [("_field", ctypes.c_int),("next", ctypes.POINTER(_Struct))] _filedescrip, _tempfile = tempfile.mkstemp('r') # deleted in cleanup -_tmpf = tempfile.TemporaryFile('w') +if sys.hexversion < 0x30d00a1: + _tmpf = tempfile.TemporaryFile('w') # emits OSError 9 in python 3.13 +else: + _tmpf = tempfile.NamedTemporaryFile('w').file # for > python 3.9 # objects used by dill for type declaration registered = d = {} @@ -313,7 +315,9 @@ a['TarFileType'] = tarfile.open(fileobj=_fileW,mode='w') # file formats (CH 13) x['DialectType'] = csv.get_dialect('excel') -a['PackerType'] = xdrlib.Packer() +if sys.hexversion < 0x30d00a1: + import xdrlib + a['PackerType'] = xdrlib.Packer() # optional operating system services (CH 16) a['LockType'] = threading.Lock() a['RLockType'] = threading.RLock() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/_shims.py new/dill-0.3.8/dill/_shims.py --- old/dill-dill-0.3.7/dill/_shims.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/_shims.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Author: Anirudh Vegesana ([email protected]) -# Copyright (c) 2021-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2021-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/detect.py new/dill-0.3.8/dill/detect.py --- old/dill-dill-0.3.7/dill/detect.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/detect.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ @@ -150,7 +150,7 @@ if '_GLOBAL' in line: name = line.split('(')[-1].split(')')[0] if CAN_NULL: - names.add(name.replace('NULL + ', '')) + names.add(name.replace('NULL + ', '').replace(' + NULL', '')) else: names.add(name) for co in getattr(func, 'co_consts', tuple()): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/logger.py new/dill-0.3.8/dill/logger.py --- old/dill-dill-0.3.7/dill/logger.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/logger.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Author: Leonardo Gama (@leogama) -# Copyright (c) 2022-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2022-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ @@ -200,8 +200,8 @@ if not self.is_utf8: prefix = prefix.translate(ASCII_MAP) + "-" fields['prefix'] = prefix + " " - if hasattr(record, 'size'): - # Show object size in human-redable form. + if hasattr(record, 'size') and record.size is not None and record.size >= 1: + # Show object size in human-readable form. power = int(math.log(record.size, 2)) // 10 size = record.size >> power*10 fields['suffix'] = " [%d %sB]" % (size, "KMGTP"[power] + "i" if power else "") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/objtypes.py new/dill-0.3.8/dill/objtypes.py --- old/dill-dill-0.3.7/dill/objtypes.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/objtypes.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/pointers.py new/dill-0.3.8/dill/pointers.py --- old/dill-dill-0.3.7/dill/pointers.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/pointers.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/session.py new/dill-0.3.8/dill/session.py --- old/dill-dill-0.3.7/dill/session.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/session.py 2024-01-28 00:44:53.000000000 +0100 @@ -3,7 +3,7 @@ # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Author: Leonardo Gama (@leogama) # Copyright (c) 2008-2015 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/settings.py new/dill-0.3.8/dill/settings.py --- old/dill-dill-0.3.7/dill/settings.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/settings.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/source.py new/dill-0.3.8/dill/source.py --- old/dill-dill-0.3.7/dill/source.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/source.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/temp.py new/dill-0.3.8/dill/temp.py --- old/dill-dill-0.3.7/dill/temp.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/temp.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/__init__.py new/dill-0.3.8/dill/tests/__init__.py --- old/dill-dill-0.3.7/dill/tests/__init__.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/__init__.py 2024-01-28 00:44:53.000000000 +0100 @@ -1,14 +1,13 @@ #!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2018-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2018-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ to run this test suite, first build and install `dill`. - $ python setup.py build - $ python setup.py install + $ python -m pip install ../.. then run the tests with: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/__main__.py new/dill-0.3.8/dill/tests/__main__.py --- old/dill-dill-0.3.7/dill/tests/__main__.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/__main__.py 2024-01-28 00:44:53.000000000 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2018-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2018-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_abc.py new/dill-0.3.8/dill/tests/test_abc.py --- old/dill-dill-0.3.7/dill/tests/test_abc.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_abc.py 2024-01-28 00:44:53.000000000 +0100 @@ -1,4 +1,9 @@ #!/usr/bin/env python +# +# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) +# Copyright (c) 2023-2024 The Uncertainty Quantification Foundation. +# License: 3-clause BSD. The full license text is available at: +# - https://github.com/uqfoundation/dill/blob/master/LICENSE """ test dill's ability to pickle abstract base class objects """ @@ -77,7 +82,8 @@ # Set a property that StockPickle can't preserve instance.bar = lambda x: x**2 depickled = dill.copy(instance) - assert type(depickled) is not type(instance) + assert type(depickled) is type(instance) #NOTE: issue #612, test_abc_local + #NOTE: dill.copy of local (or non-local) classes should (not) be the same? assert type(depickled.bar) is FunctionType assert depickled.bar(3) == 9 assert depickled.sfoo() == "Static Method SFOO" @@ -99,7 +105,7 @@ labc = dill.copy(LocalABC) assert labc is not LocalABC assert type(labc) is type(LocalABC) - # TODO should work like it does for non local classes + #NOTE: dill.copy of local (or non-local) classes should (not) be the same? # <class '__main__.LocalABC'> # <class '__main__.test_abc_local.<locals>.LocalABC'> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_check.py new/dill-0.3.8/dill/tests/test_check.py --- old/dill-dill-0.3.7/dill/tests/test_check.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_check.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_classdef.py new/dill-0.3.8/dill/tests/test_classdef.py --- old/dill-dill-0.3.7/dill/tests/test_classdef.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_classdef.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE @@ -276,6 +276,54 @@ assert dill.copy(HTTPStatus.OK) is HTTPStatus.OK assert dill.copy(enum.EnumMeta) is enum.EnumMeta +def test_inherit(): #NOTE: see issue #612 + class Foo: + w = 0 + x = 1 + y = 1.1 + a = () + b = (1,) + n = None + + class Bar(Foo): + w = 2 + x = 1 + y = 1.1 + z = 0.2 + a = () + b = (1,) + c = (2,) + n = None + + Baz = dill.copy(Bar) + + import platform + is_pypy = platform.python_implementation() == 'PyPy' + assert Bar.__dict__ == Baz.__dict__ + # ints + assert 'w' in Bar.__dict__ and 'w' in Baz.__dict__ + assert Bar.__dict__['w'] is Baz.__dict__['w'] + assert 'x' in Bar.__dict__ and 'x' in Baz.__dict__ + assert Bar.__dict__['x'] is Baz.__dict__['x'] + # floats + assert 'y' in Bar.__dict__ and 'y' in Baz.__dict__ + same = Bar.__dict__['y'] is Baz.__dict__['y'] + assert same if is_pypy else not same + assert 'z' in Bar.__dict__ and 'z' in Baz.__dict__ + same = Bar.__dict__['z'] is Baz.__dict__['z'] + assert same if is_pypy else not same + # tuples + assert 'a' in Bar.__dict__ and 'a' in Baz.__dict__ + assert Bar.__dict__['a'] is Baz.__dict__['a'] + assert 'b' in Bar.__dict__ and 'b' in Baz.__dict__ + assert Bar.__dict__['b'] is not Baz.__dict__['b'] + assert 'c' in Bar.__dict__ and 'c' in Baz.__dict__ + assert Bar.__dict__['c'] is not Baz.__dict__['c'] + # None + assert 'n' in Bar.__dict__ and 'n' in Baz.__dict__ + assert Bar.__dict__['n'] is Baz.__dict__['n'] + + if __name__ == '__main__': test_class_instances() test_class_objects() @@ -289,3 +337,4 @@ test_origbases() test_metaclass() test_enummeta() + test_inherit() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_dataclasses.py new/dill-0.3.8/dill/tests/test_dataclasses.py --- old/dill-dill-0.3.7/dill/tests/test_dataclasses.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_dataclasses.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Author: Anirudh Vegesana ([email protected]) -# Copyright (c) 2022-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2022-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_detect.py new/dill-0.3.8/dill/tests/test_detect.py --- old/dill-dill-0.3.7/dill/tests/test_detect.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_detect.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_dictviews.py new/dill-0.3.8/dill/tests/test_dictviews.py --- old/dill-dill-0.3.7/dill/tests/test_dictviews.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_dictviews.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Author: Anirudh Vegesana ([email protected]) -# Copyright (c) 2021-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2021-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_diff.py new/dill-0.3.8/dill/tests/test_diff.py --- old/dill-dill-0.3.7/dill/tests/test_diff.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_diff.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_extendpickle.py new/dill-0.3.8/dill/tests/test_extendpickle.py --- old/dill-dill-0.3.7/dill/tests/test_extendpickle.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_extendpickle.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_fglobals.py new/dill-0.3.8/dill/tests/test_fglobals.py --- old/dill-dill-0.3.7/dill/tests/test_fglobals.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_fglobals.py 2024-01-28 00:44:53.000000000 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2021-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2021-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_file.py new/dill-0.3.8/dill/tests/test_file.py --- old/dill-dill-0.3.7/dill/tests/test_file.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_file.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_functions.py new/dill-0.3.8/dill/tests/test_functions.py --- old/dill-dill-0.3.7/dill/tests/test_functions.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_functions.py 2024-01-28 00:44:53.000000000 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2019-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2019-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_functors.py new/dill-0.3.8/dill/tests/test_functors.py --- old/dill-dill-0.3.7/dill/tests/test_functors.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_functors.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_logger.py new/dill-0.3.8/dill/tests/test_logger.py --- old/dill-dill-0.3.7/dill/tests/test_logger.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_logger.py 2024-01-28 00:44:53.000000000 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/env python # Author: Leonardo Gama (@leogama) -# Copyright (c) 2022-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2022-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_mixins.py new/dill-0.3.8/dill/tests/test_mixins.py --- old/dill-dill-0.3.7/dill/tests/test_mixins.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_mixins.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_module.py new/dill-0.3.8/dill/tests/test_module.py --- old/dill-dill-0.3.7/dill/tests/test_module.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_module.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_moduledict.py new/dill-0.3.8/dill/tests/test_moduledict.py --- old/dill-dill-0.3.7/dill/tests/test_moduledict.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_moduledict.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_nested.py new/dill-0.3.8/dill/tests/test_nested.py --- old/dill-dill-0.3.7/dill/tests/test_nested.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_nested.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_objects.py new/dill-0.3.8/dill/tests/test_objects.py --- old/dill-dill-0.3.7/dill/tests/test_objects.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_objects.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ @@ -35,7 +35,7 @@ special['UnboundMethodType'] = _class._method objects.update(special) -def pickles(name, exact=False): +def pickles(name, exact=False, verbose=True): """quick check if object pickles with dill""" obj = objects[name] try: @@ -45,19 +45,19 @@ assert pik == obj except AssertionError: assert type(obj) == type(pik) - print ("weak: %s %s" % (name, type(obj))) + if verbose: print ("weak: %s %s" % (name, type(obj))) else: assert type(obj) == type(pik) except Exception: - print ("fails: %s %s" % (name, type(obj))) + if verbose: print ("fails: %s %s" % (name, type(obj))) -def test_objects(): +def test_objects(verbose=True): for member in objects.keys(): - #pickles(member, exact=True) - pickles(member, exact=False) + #pickles(member, exact=True, verbose=verbose) + pickles(member, exact=False, verbose=verbose) if __name__ == '__main__': import warnings warnings.simplefilter('ignore') - test_objects() + test_objects(verbose=False) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_properties.py new/dill-0.3.8/dill/tests/test_properties.py --- old/dill-dill-0.3.7/dill/tests/test_properties.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_properties.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_pycapsule.py new/dill-0.3.8/dill/tests/test_pycapsule.py --- old/dill-dill-0.3.7/dill/tests/test_pycapsule.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_pycapsule.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Author: Anirudh Vegesana ([email protected]) -# Copyright (c) 2022-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2022-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_recursive.py new/dill-0.3.8/dill/tests/test_recursive.py --- old/dill-dill-0.3.7/dill/tests/test_recursive.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_recursive.py 2024-01-28 00:44:53.000000000 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2019-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2019-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_registered.py new/dill-0.3.8/dill/tests/test_registered.py --- old/dill-dill-0.3.7/dill/tests/test_registered.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_registered.py 2024-01-28 00:44:53.000000000 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2022-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2022-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_restricted.py new/dill-0.3.8/dill/tests/test_restricted.py --- old/dill-dill-0.3.7/dill/tests/test_restricted.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_restricted.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Kirill Makhonin (@kirillmakhonin) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_selected.py new/dill-0.3.8/dill/tests/test_selected.py --- old/dill-dill-0.3.7/dill/tests/test_selected.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_selected.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_session.py new/dill-0.3.8/dill/tests/test_session.py --- old/dill-dill-0.3.7/dill/tests/test_session.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_session.py 2024-01-28 00:44:53.000000000 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/env python # Author: Leonardo Gama (@leogama) -# Copyright (c) 2022-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2022-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_source.py new/dill-0.3.8/dill/tests/test_source.py --- old/dill-dill-0.3.7/dill/tests/test_source.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_source.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_temp.py new/dill-0.3.8/dill/tests/test_temp.py --- old/dill-dill-0.3.7/dill/tests/test_temp.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_temp.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/dill/tests/test_weakref.py new/dill-0.3.8/dill/tests/test_weakref.py --- old/dill-dill-0.3.7/dill/tests/test_weakref.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/dill/tests/test_weakref.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/docs/requirements.txt new/dill-0.3.8/docs/requirements.txt --- old/dill-dill-0.3.7/docs/requirements.txt 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/docs/requirements.txt 2024-01-28 00:44:53.000000000 +0100 @@ -1,19 +1,40 @@ # Packages required to build docs # dependencies pinned as: -# https://github.com/readthedocs/readthedocs.org/blob/master/requirements/docs.txt +# https://github.com/readthedocs/readthedocs.org/blob/4dd655eaa5a36aa2cb9eed3e98961419536f99e8/requirements/docs.txt -alabaster==0.7.12 -babel==2.9.1 -docutils==0.16 -imagesize==1.3.0 -importlib-metadata==4.11.3 -jinja2==3.1.1 -markupsafe==2.1.1 -packaging==21.3 -pygments==2.15.0 -pyparsing==3.0.8 -readthedocs-sphinx-search==0.1.1 +alabaster==0.7.13 +babel==2.12.1 +certifi==2023.7.22 +charset-normalizer==3.2.0 +click==8.1.6 +colorama==0.4.6 +docutils==0.18.1 +idna==3.4 +imagesize==1.4.1 +jinja2==3.1.3 +livereload==2.6.3 +markdown-it-py==3.0.0 +markupsafe==2.1.3 +mdit-py-plugins==0.4.0 +mdurl==0.1.2 +myst-parser==2.0.0 +packaging==23.1 +pygments==2.16.1 +pyyaml==6.0.1 +readthedocs-sphinx-search==0.3.2 requests==2.31.0 -sphinx==4.5.0 -sphinx-notfound-page==0.8 -sphinx-rtd-theme==1.0.0 +six==1.16.0 +snowballstemmer==2.2.0 +sphinx==6.2.1 +sphinx-autobuild==2021.3.14 +sphinx-copybutton==0.5.2 +sphinx-design==0.5.0 +sphinx-hoverxref==1.3.0 +sphinx-intl==2.1.0 +sphinx-multiproject==1.0.0rc1 +sphinx-notfound-page==0.8.3 +sphinx-prompt==1.6.0 +sphinx-rtd-theme==1.2.2 +sphinx-tabs==3.4.1 +tornado==6.3.3 +urllib3==2.0.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/docs/source/conf.py new/dill-0.3.8/docs/source/conf.py --- old/dill-dill-0.3.7/docs/source/conf.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/docs/source/conf.py 2024-01-28 00:44:53.000000000 +0100 @@ -24,6 +24,7 @@ try: os.symlink(scripts+os.sep+'undill', scripts+os.sep+'_undill.py') os.symlink(scripts+os.sep+'get_objgraph', scripts+os.sep+'_get_objgraph.py') + os.symlink(scripts+os.sep+'get_gprof', scripts+os.sep+'_get_gprof.py') except: pass @@ -137,6 +138,8 @@ #import sphinx_rtd_theme #html_theme = 'sphinx_rtd_theme' #html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +else: + html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/docs/source/scripts.rst new/dill-0.3.8/docs/source/scripts.rst --- old/dill-dill-0.3.7/docs/source/scripts.rst 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/docs/source/scripts.rst 2024-01-28 00:44:53.000000000 +0100 @@ -7,8 +7,14 @@ .. automodule:: _get_objgraph .. :exclude-members: + +get_gprof script +------------------- + +.. automodule:: _get_gprof +.. :exclude-members: + + undill script --------------------- +------------------- .. automodule:: _undill .. :exclude-members: + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/scripts/get_gprof new/dill-0.3.8/scripts/get_gprof --- old/dill-dill-0.3.7/scripts/get_gprof 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/scripts/get_gprof 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE ''' @@ -27,36 +27,49 @@ edges below 1% threshold ''' -import sys -# grab args for gprof2dot -args = sys.argv[1:-1] -args = ' '.join(args) -# last arg builds the object -obj = sys.argv[-1] -obj = obj.split(';') -# multi-line prep for generating an instance -for line in obj[:-1]: - exec(line) -# one-line generation of an instance -obj = eval(obj[-1]) - -# get object 'name' -objtype = type(obj) -name = getattr(objtype, '__name__', getattr(objtype, '__class__', objtype)) - -# profile dumping an object -import dill -import os -import cProfile -#name = os.path.splitext(os.path.basename(__file__))[0] -cProfile.run("dill.dumps(obj)", filename="%s.prof" % name) -msg = "gprof2dot -f pstats %s %s.prof | dot -Tpng -o %s.call.png" % (args, name, name) -os.system(msg) - -# get stats -f_prof = "%s.prof" % name -import pstats -stats = pstats.Stats(f_prof, stream=sys.stdout) -stats.strip_dirs().sort_stats('cumtime') -stats.print_stats(20) #XXX: save to file instead of print top 20? -os.remove(f_prof) +if __name__ == "__main__": + import sys + if len(sys.argv) < 2: + print ("Please provide an object instance (e.g. 'import math; math.pi')") + sys.exit() + # grab args for gprof2dot + args = sys.argv[1:-1] + args = ' '.join(args) + # last arg builds the object + obj = sys.argv[-1] + obj = obj.split(';') + # multi-line prep for generating an instance + for line in obj[:-1]: + exec(line) + # one-line generation of an instance + try: + obj = eval(obj[-1]) + except Exception: + print ("Error processing object instance") + sys.exit() + + # get object 'name' + objtype = type(obj) + name = getattr(objtype, '__name__', getattr(objtype, '__class__', objtype)) + + # profile dumping an object + import dill + import os + import cProfile + #name = os.path.splitext(os.path.basename(__file__))[0] + cProfile.run("dill.dumps(obj)", filename="%s.prof" % name) + msg = "gprof2dot -f pstats %s %s.prof | dot -Tpng -o %s.call.png" % (args, name, name) + try: + res = os.system(msg) + except Exception: + print ("Please verify install of 'gprof2dot' to view profile graphs") + if res: + print ("Please verify install of 'gprof2dot' to view profile graphs") + + # get stats + f_prof = "%s.prof" % name + import pstats + stats = pstats.Stats(f_prof, stream=sys.stdout) + stats.strip_dirs().sort_stats('cumtime') + stats.print_stats(20) #XXX: save to file instead of print top 20? + os.remove(f_prof) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/scripts/get_objgraph new/dill-0.3.8/scripts/get_objgraph --- old/dill-dill-0.3.7/scripts/get_objgraph 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/scripts/get_objgraph 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/scripts/undill new/dill-0.3.8/scripts/undill --- old/dill-dill-0.3.7/scripts/undill 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/scripts/undill 2024-01-28 00:44:53.000000000 +0100 @@ -2,7 +2,7 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/setup.py new/dill-0.3.8/setup.py --- old/dill-dill-0.3.7/setup.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/setup.py 2024-01-28 00:44:53.000000000 +0100 @@ -2,15 +2,15 @@ # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE import os import sys # drop support for older python -if sys.version_info < (3, 7): - unsupported = 'Versions of Python before 3.7 are not supported' +if sys.version_info < (3, 8): + unsupported = 'Versions of Python before 3.8 are not supported' raise ValueError(unsupported) # get distribution meta info @@ -55,18 +55,18 @@ 'Source Code':'https://github.com/uqfoundation/dill', 'Bug Tracker':'https://github.com/uqfoundation/dill/issues', }, - python_requires = '>=3.7', + python_requires = '>=3.8', classifiers = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Scientific/Engineering', @@ -86,13 +86,14 @@ # define dependencies ctypes_version = 'ctypes>=1.0.1' objgraph_version = 'objgraph>=1.7.2' +gprof2dot_version = 'gprof2dot>=2022.7.29' pyreadline_version = 'pyreadline>=1.7.1' # add dependencies depend = [ctypes_version] if sys.platform[:3] == 'win': - extras = {'readline': [pyreadline_version], 'graph': [objgraph_version]} + extras = {'readline': [pyreadline_version], 'graph': [objgraph_version], 'profile': [gprof2dot_version]} else: - extras = {'readline': [], 'graph': [objgraph_version]} + extras = {'readline': [], 'graph': [objgraph_version], 'profile': [gprof2dot_version]} # update setup kwds if has_setuptools: setup_kwds.update( @@ -110,12 +111,14 @@ pass #import ctypes #import objgraph + #import gprof2dot #import readline except ImportError: print ("\n***********************************************************") print ("WARNING: One of the following dependencies is unresolved:") # print (" %s" % ctypes_version) print (" %s (optional)" % objgraph_version) + print (" %s (optional)" % gprof2dot_version) if sys.platform[:3] == 'win': print (" %s (optional)" % pyreadline_version) print ("***********************************************************\n") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/tox.ini new/dill-0.3.8/tox.ini --- old/dill-dill-0.3.7/tox.ini 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/tox.ini 2024-01-28 00:44:53.000000000 +0100 @@ -2,13 +2,12 @@ skip_missing_interpreters= True envlist = - py37 py38 py39 py310 py311 py312 - pypy37 + py313 pypy38 pypy39 pypy310 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dill-dill-0.3.7/version.py new/dill-0.3.8/version.py --- old/dill-dill-0.3.7/version.py 2023-07-23 00:21:08.000000000 +0200 +++ new/dill-0.3.8/version.py 2024-01-28 00:44:53.000000000 +0100 @@ -1,11 +1,11 @@ #!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2022-2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2022-2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE -__version__ = '0.3.7' +__version__ = '0.3.8'#.dev0' __author__ = 'Mike McKerns' __contact__ = '[email protected]' @@ -70,7 +70,7 @@ header = '''#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2023 The Uncertainty Quantification Foundation. +# Copyright (c) 2024 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/%s/blob/master/LICENSE ''' % modulename #XXX: author and email are hardwired in the header
