Mock Version: 2.16 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-gf3.spec'], chrootPath='/var/lib/mock/centos-stream+epel-9-x86_64-1649174405.004284/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1000gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '52cb0e80b2e149858d31bf8453d17f0b', '-D', '/var/lib/mock/centos-stream+epel-9-x86_64-1649174405.004284/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python-gf3.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1649030400 Wrote: /builddir/build/SRPMS/python-gf3-0.2.4-1.el9.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --target x86_64 --nodeps /builddir/build/SPECS/python-gf3.spec'], chrootPath='/var/lib/mock/centos-stream+epel-9-x86_64-1649174405.004284/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1000gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueraiseExc=FalseprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '29f998d8f67c4b4c800261fd3cd8f534', '-D', '/var/lib/mock/centos-stream+epel-9-x86_64-1649174405.004284/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --target x86_64 --nodeps /builddir/build/SPECS/python-gf3.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1649030400 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.88nWwU + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf gf3-0.2.4 + /usr/bin/gzip -dc /builddir/build/SOURCES/gf3-0.2.4.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd gf3-0.2.4 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.q4XMR6 + umask 022 + cd /builddir/build/BUILD + cd gf3-0.2.4 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py39 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 53.0.0) Handling wheel from default build backend Requirement not satisfied: wheel Exiting dependency generation pass: build backend + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-gf3-0.2.4-1.el9.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --target x86_64 --nodeps /builddir/build/SPECS/python-gf3.spec'], chrootPath='/var/lib/mock/centos-stream+epel-9-x86_64-1649174405.004284/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1000gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueraiseExc=FalseprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '7dc5e380bbc14757b82eebda16822720', '-D', '/var/lib/mock/centos-stream+epel-9-x86_64-1649174405.004284/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --target x86_64 --nodeps /builddir/build/SPECS/python-gf3.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1649030400 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.DSASsY + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf gf3-0.2.4 + /usr/bin/gzip -dc /builddir/build/SOURCES/gf3-0.2.4.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd gf3-0.2.4 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.i9Ituo + umask 022 + cd /builddir/build/BUILD + cd gf3-0.2.4 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py39 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 53.0.0) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.36.2) HOOK STDOUT: 001 ============================================= HOOK STDOUT: 002 GF3: Lisp-Like Generic Functions For Python 3 HOOK STDOUT: 003 ============================================= HOOK STDOUT: 004 HOOK STDOUT: 005 Overview HOOK STDOUT: 006 ======== HOOK STDOUT: 007 HOOK STDOUT: 008 `gf` lets you write generic functions HOOK STDOUT: 009 `generic functions `_ HOOK STDOUT: 010 with multi-methods, that dispatch on all their arguments. HOOK STDOUT: 011 HOOK STDOUT: 012 Simple Example HOOK STDOUT: 013 -------------- HOOK STDOUT: 014 HOOK STDOUT: 015 >>> from gf import generic, method HOOK STDOUT: 016 >>> add = generic() HOOK STDOUT: 017 >>> type(add) HOOK STDOUT: 018 HOOK STDOUT: 019 HOOK STDOUT: 020 Lets define `add` for two integers: HOOK STDOUT: 021 HOOK STDOUT: 022 >>> @method() HOOK STDOUT: 023 ... def add(n0: int, n1: int): HOOK STDOUT: 024 ... return n0 + n1 HOOK STDOUT: 025 HOOK STDOUT: 026 Lets test it: HOOK STDOUT: 027 HOOK STDOUT: 028 >>> add(1, 2) HOOK STDOUT: 029 3 HOOK STDOUT: 030 HOOK STDOUT: 031 Calling `add` with instances of other types fails: HOOK STDOUT: 032 HOOK STDOUT: 033 >>> add("Hello ", "World") HOOK STDOUT: 034 Traceback (most recent call last): HOOK STDOUT: 035 ... HOOK STDOUT: 036 NotImplementedError: Generic '__main__.add' has no implementation for type(s): __builtin__.str, __builtin__.str HOOK STDOUT: 037 HOOK STDOUT: 038 Of course `add` can also by defined for two strings: HOOK STDOUT: 039 HOOK STDOUT: 040 >>> @method() HOOK STDOUT: 041 ... def add(s0: str, s1: str): HOOK STDOUT: 042 ... return s0 + s1 HOOK STDOUT: 043 HOOK STDOUT: 044 Now our hello world example works: HOOK STDOUT: 045 HOOK STDOUT: 046 >>> add("Hello ", "World") HOOK STDOUT: 047 'Hello World' HOOK STDOUT: 048 HOOK STDOUT: 049 `add` can also be defined for a string and an integer: HOOK STDOUT: 050 HOOK STDOUT: 051 >>> @method() HOOK STDOUT: 052 ... def add(s: str, n: int): HOOK STDOUT: 053 ... return s + str(n) HOOK STDOUT: 054 HOOK STDOUT: 055 Thus we can add a string and a number: HOOK STDOUT: 056 HOOK STDOUT: 057 >>> add("You ", 2) HOOK STDOUT: 058 'You 2' HOOK STDOUT: 059 HOOK STDOUT: 060 Python's Special Methods HOOK STDOUT: 061 ------------------------ HOOK STDOUT: 062 HOOK STDOUT: 063 `gf.Object` implements (nearly) all of the `special instance HOOK STDOUT: 064 methods of a python object`_ as a generic function. HOOK STDOUT: 065 The package includes a rational number implementation that makes HOOK STDOUT: 066 heavy use of this feature: HOOK STDOUT: 067 HOOK STDOUT: 068 .. code:: python HOOK STDOUT: 069 HOOK STDOUT: 070 @method() HOOK STDOUT: 071 def __add__(a: object, b: Rational): HOOK STDOUT: 072 """Add an object and a rational number. HOOK STDOUT: 073 HOOK STDOUT: 074 `a` is converted to a `Rational` and then both are added.""" HOOK STDOUT: 075 return Rational(a) + b HOOK STDOUT: 076 HOOK STDOUT: 077 @method(Rational, object) HOOK STDOUT: 078 def __add__(a: Rational, b: object): HOOK STDOUT: 079 """Add a rational number and an object. HOOK STDOUT: 080 HOOK STDOUT: 081 `b` is converted to a `Rational` and then both are added.""" HOOK STDOUT: 082 return a + Rational(b) HOOK STDOUT: 083 HOOK STDOUT: 084 `gf.Object` also has a more Smalltalk means of overwriting HOOK STDOUT: 085 `object.__str__` and `object.__repr__` using a file like object. HOOK STDOUT: 086 Again the rational example is instructive about its usage. HOOK STDOUT: 087 HOOK STDOUT: 088 .. code:: python HOOK STDOUT: 089 HOOK STDOUT: 090 @method() HOOK STDOUT: 091 def __out__(rational: Rational, writer: Writer): HOOK STDOUT: 092 """Write a nice representation of the rational. HOOK STDOUT: 093 HOOK STDOUT: 094 Denominators that equal 1 are not printed.""" HOOK STDOUT: 095 writer("%d", rational.numerator) HOOK STDOUT: 096 if rational.denominator != 1: HOOK STDOUT: 097 writer(" / %d", rational.denominator) HOOK STDOUT: 098 HOOK STDOUT: 099 @method() HOOK STDOUT: 100 def __spy__(rational: Rational, writer: Writer): HOOK STDOUT: 101 """Write a debug representation of the rational.""" HOOK STDOUT: 102 writer("%s(", rational.__class__.__name__) HOOK STDOUT: 103 if rational.numerator != 0: HOOK STDOUT: 104 writer("%r", rational.numerator) HOOK STDOUT: 105 if rational.denominator != 1: HOOK STDOUT: 106 writer(", %r", rational.denominator) HOOK STDOUT: 107 writer(")") HOOK STDOUT: 108 HOOK STDOUT: 109 .. _special instance methods of a python object: HOOK STDOUT: 110 http://docs.python.org/2/reference/datamodel.html#special-method-names HOOK STDOUT: 111 HOOK STDOUT: 112 HOOK STDOUT: 113 Installation HOOK STDOUT: 114 ------------ HOOK STDOUT: 115 HOOK STDOUT: 116 As usual `gf3` can be installed with `pip`, like this: HOOK STDOUT: 117 HOOK STDOUT: 118 pip install gf3 HOOK STDOUT: 119 HOOK STDOUT: 120 Documentation HOOK STDOUT: 121 ------------- HOOK STDOUT: 122 HOOK STDOUT: 123 The whole documentation is available at in the following formats HOOK STDOUT: 124 HOOK STDOUT: 125 HTML HOOK STDOUT: 126 http://gf3.klix.ch (Also servers as `gf`'s homepage) HOOK STDOUT: 127 HOOK STDOUT: 128 PDF HOOK STDOUT: 129 http://gf3.klix.ch/gf3.pdf HOOK STDOUT: 130 HOOK STDOUT: 131 Changes HOOK STDOUT: 132 ------- HOOK STDOUT: 133 HOOK STDOUT: 134 A short sketch of the changes done in each release. HOOK STDOUT: 135 HOOK STDOUT: 136 Release 0.2.4 HOOK STDOUT: 137 ~~~~~~~~~~~~~ HOOK STDOUT: 138 HOOK STDOUT: 139 The following was changed in Release 0.2.4: HOOK STDOUT: 140 HOOK STDOUT: 141 * The `push`-method accepts an identation string HOOK STDOUT: 142 for identing writers. HOOK STDOUT: 143 * The methods `push` and `pop` now accept HOOK STDOUT: 144 arbitrary arguments in the general case. HOOK STDOUT: 145 * Successfully tested the whole framework with Python 3.5. HOOK STDOUT: 146 HOOK STDOUT: 147 HOOK STDOUT: 148 Release 0.2.3 HOOK STDOUT: 149 ~~~~~~~~~~~~~ HOOK STDOUT: 150 HOOK STDOUT: 151 The following was changed in Release 0.2.3: HOOK STDOUT: 152 HOOK STDOUT: 153 * Fixed the long description. HOOK STDOUT: 154 * Wrote some documentation about changing the implementation HOOK STDOUT: 155 class of a generic function. HOOK STDOUT: 156 HOOK STDOUT: 157 HOOK STDOUT: 158 Release 0.2.2 HOOK STDOUT: 159 ~~~~~~~~~~~~~ HOOK STDOUT: 160 HOOK STDOUT: 161 The following was changed in Release 0.2.2: HOOK STDOUT: 162 HOOK STDOUT: 163 * Write more documentation. HOOK STDOUT: 164 Especially documented the `merge` and the `isgeneric` HOOK STDOUT: 165 functions. HOOK STDOUT: 166 * Consistency between the long text and on PyPi and the documentation. HOOK STDOUT: 167 HOOK STDOUT: 168 HOOK STDOUT: 169 Release 0.2.1 HOOK STDOUT: 170 ~~~~~~~~~~~~~ HOOK STDOUT: 171 HOOK STDOUT: 172 Needed to bump the version information, because the homepage HOOK STDOUT: 173 in the package-information was wrong [#]_ and a new upload was needed. HOOK STDOUT: 174 HOOK STDOUT: 175 HOOK STDOUT: 176 Release 0.2.0 HOOK STDOUT: 177 ~~~~~~~~~~~~~ HOOK STDOUT: 178 HOOK STDOUT: 179 The following was changed in Release 0.2.0: HOOK STDOUT: 180 HOOK STDOUT: 181 * Ported the whole module to Python 3.6 and Python 3.7. HOOK STDOUT: 182 * Exclusively uses `parameter annotations`_ to specify the types to dispatch on. HOOK STDOUT: 183 * Added standard conforming default implementations for methods HOOK STDOUT: 184 like `__add__`. All these methods now raise a proper HOOK STDOUT: 185 `TypeError` instead of raising a `NotImplementedError`. HOOK STDOUT: 186 * Added some means to write generic functions that dispatch types only. HOOK STDOUT: 187 This is the generic function equivalent of a class-method. HOOK STDOUT: 188 * Added some means to dispatch on single objects. HOOK STDOUT: 189 This is the equivalent adding methods to class-instances [#]_. HOOK STDOUT: 190 * The package name for PyPi is now ``gf3``. HOOK STDOUT: 191 HOOK STDOUT: 192 .. _parameter annotations: https://docs.python.org/3/reference/compound_stmts.html#grammar-token-parameter HOOK STDOUT: 193 HOOK STDOUT: 194 HOOK STDOUT: 195 Release 0.1.4 HOOK STDOUT: 196 ~~~~~~~~~~~~~ HOOK STDOUT: 197 HOOK STDOUT: 198 The following was fixed in Release 0.1.4: HOOK STDOUT: 199 HOOK STDOUT: 200 * Fixed an issue with variadic methods. Sometimes definitions HOOK STDOUT: 201 of variadic methods added after the method was already called HOOK STDOUT: 202 where not added. HOOK STDOUT: 203 * Specified and implemented a precedence rule for overlapping HOOK STDOUT: 204 variadic methods of generic functions. HOOK STDOUT: 205 * Improved generated documentation for variadic methods. HOOK STDOUT: 206 * Fixed the markup of some notes in the documentation. HOOK STDOUT: 207 HOOK STDOUT: 208 HOOK STDOUT: 209 Release 0.1.3 HOOK STDOUT: 210 ~~~~~~~~~~~~~ HOOK STDOUT: 211 HOOK STDOUT: 212 The following was changed in Release 0.1.3: HOOK STDOUT: 213 HOOK STDOUT: 214 * Added variadic methods, e.g. multi-methods with a HOOK STDOUT: 215 variable number of arguments. HOOK STDOUT: 216 * Improved the long description text a bit HOOK STDOUT: 217 and fixed bug in its markup. HOOK STDOUT: 218 * Fixed invalid references in the long description. HOOK STDOUT: 219 HOOK STDOUT: 220 HOOK STDOUT: 221 Release 0.1.2 HOOK STDOUT: 222 ~~~~~~~~~~~~~ HOOK STDOUT: 223 HOOK STDOUT: 224 The following was changed in Release 0.1.2: HOOK STDOUT: 225 HOOK STDOUT: 226 * Added a generic functions for `gf.Object.__call__`. HOOK STDOUT: 227 * Added a `gf.go.FinalizingMixin`. HOOK STDOUT: 228 * `gf.generic` now also accepts a type. HOOK STDOUT: 229 * Improved the exception information for ambiguous calls. HOOK STDOUT: 230 * Fixed some documentation glitches. HOOK STDOUT: 231 HOOK STDOUT: 232 HOOK STDOUT: 233 Release 0.1.1 HOOK STDOUT: 234 ~~~~~~~~~~~~~ HOOK STDOUT: 235 HOOK STDOUT: 236 This was the initial release. HOOK STDOUT: 237 HOOK STDOUT: 238 .. [#] Silly me discovered about the shutdown of pythonhosted.org HOOK STDOUT: 239 after version 0.2.0 was uploaded. HOOK STDOUT: 240 .. [#] Of course this is not possible with standard python classes HOOK STDOUT: 241 and their instances. HOOK STDOUT: 242 HOOK STDOUT: 243 Acknowledgements HOOK STDOUT: 244 ================ HOOK STDOUT: 245 HOOK STDOUT: 246 Guido van Rossum created the core of this package. I just renamed some things HOOK STDOUT: 247 and added some^H^H^H^H oodles of convenience stuff. Thank you Guido! HOOK STDOUT: 248 HOOK STDOUT: 249 HOOK STDOUT: 250 Copyright HOOK STDOUT: 251 ========= HOOK STDOUT: 252 HOOK STDOUT: 253 © 2006-2013 Python Software Foundation. HOOK STDOUT: 254 © 2013-2018 Gerald Klix. HOOK STDOUT: 255 HOOK STDOUT: running egg_info HOOK STDOUT: writing gf3.egg-info/PKG-INFO HOOK STDOUT: writing dependency_links to gf3.egg-info/dependency_links.txt HOOK STDOUT: writing top-level names to gf3.egg-info/top_level.txt HOOK STDOUT: reading manifest file 'gf3.egg-info/SOURCES.txt' HOOK STDOUT: reading manifest template 'MANIFEST.in' HOOK STDOUT: writing manifest file 'gf3.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.36.2) HOOK STDOUT: 001 ============================================= HOOK STDOUT: 002 GF3: Lisp-Like Generic Functions For Python 3 HOOK STDOUT: 003 ============================================= HOOK STDOUT: 004 HOOK STDOUT: 005 Overview HOOK STDOUT: 006 ======== HOOK STDOUT: 007 HOOK STDOUT: 008 `gf` lets you write generic functions HOOK STDOUT: 009 `generic functions `_ HOOK STDOUT: 010 with multi-methods, that dispatch on all their arguments. HOOK STDOUT: 011 HOOK STDOUT: 012 Simple Example HOOK STDOUT: 013 -------------- HOOK STDOUT: 014 HOOK STDOUT: 015 >>> from gf import generic, method HOOK STDOUT: 016 >>> add = generic() HOOK STDOUT: 017 >>> type(add) HOOK STDOUT: 018 HOOK STDOUT: 019 HOOK STDOUT: 020 Lets define `add` for two integers: HOOK STDOUT: 021 HOOK STDOUT: 022 >>> @method() HOOK STDOUT: 023 ... def add(n0: int, n1: int): HOOK STDOUT: 024 ... return n0 + n1 HOOK STDOUT: 025 HOOK STDOUT: 026 Lets test it: HOOK STDOUT: 027 HOOK STDOUT: 028 >>> add(1, 2) HOOK STDOUT: 029 3 HOOK STDOUT: 030 HOOK STDOUT: 031 Calling `add` with instances of other types fails: HOOK STDOUT: 032 HOOK STDOUT: 033 >>> add("Hello ", "World") HOOK STDOUT: 034 Traceback (most recent call last): HOOK STDOUT: 035 ... HOOK STDOUT: 036 NotImplementedError: Generic '__main__.add' has no implementation for type(s): __builtin__.str, __builtin__.str HOOK STDOUT: 037 HOOK STDOUT: 038 Of course `add` can also by defined for two strings: HOOK STDOUT: 039 HOOK STDOUT: 040 >>> @method() HOOK STDOUT: 041 ... def add(s0: str, s1: str): HOOK STDOUT: 042 ... return s0 + s1 HOOK STDOUT: 043 HOOK STDOUT: 044 Now our hello world example works: HOOK STDOUT: 045 HOOK STDOUT: 046 >>> add("Hello ", "World") HOOK STDOUT: 047 'Hello World' HOOK STDOUT: 048 HOOK STDOUT: 049 `add` can also be defined for a string and an integer: HOOK STDOUT: 050 HOOK STDOUT: 051 >>> @method() HOOK STDOUT: 052 ... def add(s: str, n: int): HOOK STDOUT: 053 ... return s + str(n) HOOK STDOUT: 054 HOOK STDOUT: 055 Thus we can add a string and a number: HOOK STDOUT: 056 HOOK STDOUT: 057 >>> add("You ", 2) HOOK STDOUT: 058 'You 2' HOOK STDOUT: 059 HOOK STDOUT: 060 Python's Special Methods HOOK STDOUT: 061 ------------------------ HOOK STDOUT: 062 HOOK STDOUT: 063 `gf.Object` implements (nearly) all of the `special instance HOOK STDOUT: 064 methods of a python object`_ as a generic function. HOOK STDOUT: 065 The package includes a rational number implementation that makes HOOK STDOUT: 066 heavy use of this feature: HOOK STDOUT: 067 HOOK STDOUT: 068 .. code:: python HOOK STDOUT: 069 HOOK STDOUT: 070 @method() HOOK STDOUT: 071 def __add__(a: object, b: Rational): HOOK STDOUT: 072 """Add an object and a rational number. HOOK STDOUT: 073 HOOK STDOUT: 074 `a` is converted to a `Rational` and then both are added.""" HOOK STDOUT: 075 return Rational(a) + b HOOK STDOUT: 076 HOOK STDOUT: 077 @method(Rational, object) HOOK STDOUT: 078 def __add__(a: Rational, b: object): HOOK STDOUT: 079 """Add a rational number and an object. HOOK STDOUT: 080 HOOK STDOUT: 081 `b` is converted to a `Rational` and then both are added.""" HOOK STDOUT: 082 return a + Rational(b) HOOK STDOUT: 083 HOOK STDOUT: 084 `gf.Object` also has a more Smalltalk means of overwriting HOOK STDOUT: 085 `object.__str__` and `object.__repr__` using a file like object. HOOK STDOUT: 086 Again the rational example is instructive about its usage. HOOK STDOUT: 087 HOOK STDOUT: 088 .. code:: python HOOK STDOUT: 089 HOOK STDOUT: 090 @method() HOOK STDOUT: 091 def __out__(rational: Rational, writer: Writer): HOOK STDOUT: 092 """Write a nice representation of the rational. HOOK STDOUT: 093 HOOK STDOUT: 094 Denominators that equal 1 are not printed.""" HOOK STDOUT: 095 writer("%d", rational.numerator) HOOK STDOUT: 096 if rational.denominator != 1: HOOK STDOUT: 097 writer(" / %d", rational.denominator) HOOK STDOUT: 098 HOOK STDOUT: 099 @method() HOOK STDOUT: 100 def __spy__(rational: Rational, writer: Writer): HOOK STDOUT: 101 """Write a debug representation of the rational.""" HOOK STDOUT: 102 writer("%s(", rational.__class__.__name__) HOOK STDOUT: 103 if rational.numerator != 0: HOOK STDOUT: 104 writer("%r", rational.numerator) HOOK STDOUT: 105 if rational.denominator != 1: HOOK STDOUT: 106 writer(", %r", rational.denominator) HOOK STDOUT: 107 writer(")") HOOK STDOUT: 108 HOOK STDOUT: 109 .. _special instance methods of a python object: HOOK STDOUT: 110 http://docs.python.org/2/reference/datamodel.html#special-method-names HOOK STDOUT: 111 HOOK STDOUT: 112 HOOK STDOUT: 113 Installation HOOK STDOUT: 114 ------------ HOOK STDOUT: 115 HOOK STDOUT: 116 As usual `gf3` can be installed with `pip`, like this: HOOK STDOUT: 117 HOOK STDOUT: 118 pip install gf3 HOOK STDOUT: 119 HOOK STDOUT: 120 Documentation HOOK STDOUT: 121 ------------- HOOK STDOUT: 122 HOOK STDOUT: 123 The whole documentation is available at in the following formats HOOK STDOUT: 124 HOOK STDOUT: 125 HTML HOOK STDOUT: 126 http://gf3.klix.ch (Also servers as `gf`'s homepage) HOOK STDOUT: 127 HOOK STDOUT: 128 PDF HOOK STDOUT: 129 http://gf3.klix.ch/gf3.pdf HOOK STDOUT: 130 HOOK STDOUT: 131 Changes HOOK STDOUT: 132 ------- HOOK STDOUT: 133 HOOK STDOUT: 134 A short sketch of the changes done in each release. HOOK STDOUT: 135 HOOK STDOUT: 136 Release 0.2.4 HOOK STDOUT: 137 ~~~~~~~~~~~~~ HOOK STDOUT: 138 HOOK STDOUT: 139 The following was changed in Release 0.2.4: HOOK STDOUT: 140 HOOK STDOUT: 141 * The `push`-method accepts an identation string HOOK STDOUT: 142 for identing writers. HOOK STDOUT: 143 * The methods `push` and `pop` now accept HOOK STDOUT: 144 arbitrary arguments in the general case. HOOK STDOUT: 145 * Successfully tested the whole framework with Python 3.5. HOOK STDOUT: 146 HOOK STDOUT: 147 HOOK STDOUT: 148 Release 0.2.3 HOOK STDOUT: 149 ~~~~~~~~~~~~~ HOOK STDOUT: 150 HOOK STDOUT: 151 The following was changed in Release 0.2.3: HOOK STDOUT: 152 HOOK STDOUT: 153 * Fixed the long description. HOOK STDOUT: 154 * Wrote some documentation about changing the implementation HOOK STDOUT: 155 class of a generic function. HOOK STDOUT: 156 HOOK STDOUT: 157 HOOK STDOUT: 158 Release 0.2.2 HOOK STDOUT: 159 ~~~~~~~~~~~~~ HOOK STDOUT: 160 HOOK STDOUT: 161 The following was changed in Release 0.2.2: HOOK STDOUT: 162 HOOK STDOUT: 163 * Write more documentation. HOOK STDOUT: 164 Especially documented the `merge` and the `isgeneric` HOOK STDOUT: 165 functions. HOOK STDOUT: 166 * Consistency between the long text and on PyPi and the documentation. HOOK STDOUT: 167 HOOK STDOUT: 168 HOOK STDOUT: 169 Release 0.2.1 HOOK STDOUT: 170 ~~~~~~~~~~~~~ HOOK STDOUT: 171 HOOK STDOUT: 172 Needed to bump the version information, because the homepage HOOK STDOUT: 173 in the package-information was wrong [#]_ and a new upload was needed. HOOK STDOUT: 174 HOOK STDOUT: 175 HOOK STDOUT: 176 Release 0.2.0 HOOK STDOUT: 177 ~~~~~~~~~~~~~ HOOK STDOUT: 178 HOOK STDOUT: 179 The following was changed in Release 0.2.0: HOOK STDOUT: 180 HOOK STDOUT: 181 * Ported the whole module to Python 3.6 and Python 3.7. HOOK STDOUT: 182 * Exclusively uses `parameter annotations`_ to specify the types to dispatch on. HOOK STDOUT: 183 * Added standard conforming default implementations for methods HOOK STDOUT: 184 like `__add__`. All these methods now raise a proper HOOK STDOUT: 185 `TypeError` instead of raising a `NotImplementedError`. HOOK STDOUT: 186 * Added some means to write generic functions that dispatch types only. HOOK STDOUT: 187 This is the generic function equivalent of a class-method. HOOK STDOUT: 188 * Added some means to dispatch on single objects. HOOK STDOUT: 189 This is the equivalent adding methods to class-instances [#]_. HOOK STDOUT: 190 * The package name for PyPi is now ``gf3``. HOOK STDOUT: 191 HOOK STDOUT: 192 .. _parameter annotations: https://docs.python.org/3/reference/compound_stmts.html#grammar-token-parameter HOOK STDOUT: 193 HOOK STDOUT: 194 HOOK STDOUT: 195 Release 0.1.4 HOOK STDOUT: 196 ~~~~~~~~~~~~~ HOOK STDOUT: 197 HOOK STDOUT: 198 The following was fixed in Release 0.1.4: HOOK STDOUT: 199 HOOK STDOUT: 200 * Fixed an issue with variadic methods. Sometimes definitions HOOK STDOUT: 201 of variadic methods added after the method was already called HOOK STDOUT: 202 where not added. HOOK STDOUT: 203 * Specified and implemented a precedence rule for overlapping HOOK STDOUT: 204 variadic methods of generic functions. HOOK STDOUT: 205 * Improved generated documentation for variadic methods. HOOK STDOUT: 206 * Fixed the markup of some notes in the documentation. HOOK STDOUT: 207 HOOK STDOUT: 208 HOOK STDOUT: 209 Release 0.1.3 HOOK STDOUT: 210 ~~~~~~~~~~~~~ HOOK STDOUT: 211 HOOK STDOUT: 212 The following was changed in Release 0.1.3: HOOK STDOUT: 213 HOOK STDOUT: 214 * Added variadic methods, e.g. multi-methods with a HOOK STDOUT: 215 variable number of arguments. HOOK STDOUT: 216 * Improved the long description text a bit HOOK STDOUT: 217 and fixed bug in its markup. HOOK STDOUT: 218 * Fixed invalid references in the long description. HOOK STDOUT: 219 HOOK STDOUT: 220 HOOK STDOUT: 221 Release 0.1.2 HOOK STDOUT: 222 ~~~~~~~~~~~~~ HOOK STDOUT: 223 HOOK STDOUT: 224 The following was changed in Release 0.1.2: HOOK STDOUT: 225 HOOK STDOUT: 226 * Added a generic functions for `gf.Object.__call__`. HOOK STDOUT: 227 * Added a `gf.go.FinalizingMixin`. HOOK STDOUT: 228 * `gf.generic` now also accepts a type. HOOK STDOUT: 229 * Improved the exception information for ambiguous calls. HOOK STDOUT: 230 * Fixed some documentation glitches. HOOK STDOUT: 231 HOOK STDOUT: 232 HOOK STDOUT: 233 Release 0.1.1 HOOK STDOUT: 234 ~~~~~~~~~~~~~ HOOK STDOUT: 235 HOOK STDOUT: 236 This was the initial release. HOOK STDOUT: 237 HOOK STDOUT: 238 .. [#] Silly me discovered about the shutdown of pythonhosted.org HOOK STDOUT: 239 after version 0.2.0 was uploaded. HOOK STDOUT: 240 .. [#] Of course this is not possible with standard python classes HOOK STDOUT: 241 and their instances. HOOK STDOUT: 242 HOOK STDOUT: 243 Acknowledgements HOOK STDOUT: 244 ================ HOOK STDOUT: 245 HOOK STDOUT: 246 Guido van Rossum created the core of this package. I just renamed some things HOOK STDOUT: 247 and added some^H^H^H^H oodles of convenience stuff. Thank you Guido! HOOK STDOUT: 248 HOOK STDOUT: 249 HOOK STDOUT: 250 Copyright HOOK STDOUT: 251 ========= HOOK STDOUT: 252 HOOK STDOUT: 253 © 2006-2013 Python Software Foundation. HOOK STDOUT: 254 © 2013-2018 Gerald Klix. HOOK STDOUT: 255 HOOK STDOUT: running dist_info HOOK STDOUT: writing gf3.egg-info/PKG-INFO HOOK STDOUT: writing dependency_links to gf3.egg-info/dependency_links.txt HOOK STDOUT: writing top-level names to gf3.egg-info/top_level.txt HOOK STDOUT: reading manifest file 'gf3.egg-info/SOURCES.txt' HOOK STDOUT: reading manifest template 'MANIFEST.in' HOOK STDOUT: writing manifest file 'gf3.egg-info/SOURCES.txt' HOOK STDOUT: creating '/builddir/build/BUILD/gf3-0.2.4/gf3.dist-info' Wrote: /builddir/build/SRPMS/python-gf3-0.2.4-1.el9.buildreqs.nosrc.rpm + RPM_EC=0 ++ jobs -p + exit 0 Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --target x86_64 --nodeps /builddir/build/SPECS/python-gf3.spec'], chrootPath='/var/lib/mock/centos-stream+epel-9-x86_64-1649174405.004284/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1000gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'be442883ee874e2eaaa2414cc72fc8c5', '-D', '/var/lib/mock/centos-stream+epel-9-x86_64-1649174405.004284/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.6d6jesa1:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --target x86_64 --nodeps /builddir/build/SPECS/python-gf3.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1649030400 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.62X2Dp + umask 022 + cd /builddir/build/BUILD + cd gf3-0.2.4 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv gf3.dist-info/ removed 'gf3.dist-info/METADATA' removed 'gf3.dist-info/top_level.txt' removed 'gf3.dist-info/zip-safe' removed directory 'gf3.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py39 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 53.0.0) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.36.2) HOOK STDOUT: 001 ============================================= HOOK STDOUT: 002 GF3: Lisp-Like Generic Functions For Python 3 HOOK STDOUT: 003 ============================================= HOOK STDOUT: 004 HOOK STDOUT: 005 Overview HOOK STDOUT: 006 ======== HOOK STDOUT: 007 HOOK STDOUT: 008 `gf` lets you write generic functions HOOK STDOUT: 009 `generic functions `_ HOOK STDOUT: 010 with multi-methods, that dispatch on all their arguments. HOOK STDOUT: 011 HOOK STDOUT: 012 Simple Example HOOK STDOUT: 013 -------------- HOOK STDOUT: 014 HOOK STDOUT: 015 >>> from gf import generic, method HOOK STDOUT: 016 >>> add = generic() HOOK STDOUT: 017 >>> type(add) HOOK STDOUT: 018 HOOK STDOUT: 019 HOOK STDOUT: 020 Lets define `add` for two integers: HOOK STDOUT: 021 HOOK STDOUT: 022 >>> @method() HOOK STDOUT: 023 ... def add(n0: int, n1: int): HOOK STDOUT: 024 ... return n0 + n1 HOOK STDOUT: 025 HOOK STDOUT: 026 Lets test it: HOOK STDOUT: 027 HOOK STDOUT: 028 >>> add(1, 2) HOOK STDOUT: 029 3 HOOK STDOUT: 030 HOOK STDOUT: 031 Calling `add` with instances of other types fails: HOOK STDOUT: 032 HOOK STDOUT: 033 >>> add("Hello ", "World") HOOK STDOUT: 034 Traceback (most recent call last): HOOK STDOUT: 035 ... HOOK STDOUT: 036 NotImplementedError: Generic '__main__.add' has no implementation for type(s): __builtin__.str, __builtin__.str HOOK STDOUT: 037 HOOK STDOUT: 038 Of course `add` can also by defined for two strings: HOOK STDOUT: 039 HOOK STDOUT: 040 >>> @method() HOOK STDOUT: 041 ... def add(s0: str, s1: str): HOOK STDOUT: 042 ... return s0 + s1 HOOK STDOUT: 043 HOOK STDOUT: 044 Now our hello world example works: HOOK STDOUT: 045 HOOK STDOUT: 046 >>> add("Hello ", "World") HOOK STDOUT: 047 'Hello World' HOOK STDOUT: 048 HOOK STDOUT: 049 `add` can also be defined for a string and an integer: HOOK STDOUT: 050 HOOK STDOUT: 051 >>> @method() HOOK STDOUT: 052 ... def add(s: str, n: int): HOOK STDOUT: 053 ... return s + str(n) HOOK STDOUT: 054 HOOK STDOUT: 055 Thus we can add a string and a number: HOOK STDOUT: 056 HOOK STDOUT: 057 >>> add("You ", 2) HOOK STDOUT: 058 'You 2' HOOK STDOUT: 059 HOOK STDOUT: 060 Python's Special Methods HOOK STDOUT: 061 ------------------------ HOOK STDOUT: 062 HOOK STDOUT: 063 `gf.Object` implements (nearly) all of the `special instance HOOK STDOUT: 064 methods of a python object`_ as a generic function. HOOK STDOUT: 065 The package includes a rational number implementation that makes HOOK STDOUT: 066 heavy use of this feature: HOOK STDOUT: 067 HOOK STDOUT: 068 .. code:: python HOOK STDOUT: 069 HOOK STDOUT: 070 @method() HOOK STDOUT: 071 def __add__(a: object, b: Rational): HOOK STDOUT: 072 """Add an object and a rational number. HOOK STDOUT: 073 HOOK STDOUT: 074 `a` is converted to a `Rational` and then both are added.""" HOOK STDOUT: 075 return Rational(a) + b HOOK STDOUT: 076 HOOK STDOUT: 077 @method(Rational, object) HOOK STDOUT: 078 def __add__(a: Rational, b: object): HOOK STDOUT: 079 """Add a rational number and an object. HOOK STDOUT: 080 HOOK STDOUT: 081 `b` is converted to a `Rational` and then both are added.""" HOOK STDOUT: 082 return a + Rational(b) HOOK STDOUT: 083 HOOK STDOUT: 084 `gf.Object` also has a more Smalltalk means of overwriting HOOK STDOUT: 085 `object.__str__` and `object.__repr__` using a file like object. HOOK STDOUT: 086 Again the rational example is instructive about its usage. HOOK STDOUT: 087 HOOK STDOUT: 088 .. code:: python HOOK STDOUT: 089 HOOK STDOUT: 090 @method() HOOK STDOUT: 091 def __out__(rational: Rational, writer: Writer): HOOK STDOUT: 092 """Write a nice representation of the rational. HOOK STDOUT: 093 HOOK STDOUT: 094 Denominators that equal 1 are not printed.""" HOOK STDOUT: 095 writer("%d", rational.numerator) HOOK STDOUT: 096 if rational.denominator != 1: HOOK STDOUT: 097 writer(" / %d", rational.denominator) HOOK STDOUT: 098 HOOK STDOUT: 099 @method() HOOK STDOUT: 100 def __spy__(rational: Rational, writer: Writer): HOOK STDOUT: 101 """Write a debug representation of the rational.""" HOOK STDOUT: 102 writer("%s(", rational.__class__.__name__) HOOK STDOUT: 103 if rational.numerator != 0: HOOK STDOUT: 104 writer("%r", rational.numerator) HOOK STDOUT: 105 if rational.denominator != 1: HOOK STDOUT: 106 writer(", %r", rational.denominator) HOOK STDOUT: 107 writer(")") HOOK STDOUT: 108 HOOK STDOUT: 109 .. _special instance methods of a python object: HOOK STDOUT: 110 http://docs.python.org/2/reference/datamodel.html#special-method-names HOOK STDOUT: 111 HOOK STDOUT: 112 HOOK STDOUT: 113 Installation HOOK STDOUT: 114 ------------ HOOK STDOUT: 115 HOOK STDOUT: 116 As usual `gf3` can be installed with `pip`, like this: HOOK STDOUT: 117 HOOK STDOUT: 118 pip install gf3 HOOK STDOUT: 119 HOOK STDOUT: 120 Documentation HOOK STDOUT: 121 ------------- HOOK STDOUT: 122 HOOK STDOUT: 123 The whole documentation is available at in the following formats HOOK STDOUT: 124 HOOK STDOUT: 125 HTML HOOK STDOUT: 126 http://gf3.klix.ch (Also servers as `gf`'s homepage) HOOK STDOUT: 127 HOOK STDOUT: 128 PDF HOOK STDOUT: 129 http://gf3.klix.ch/gf3.pdf HOOK STDOUT: 130 HOOK STDOUT: 131 Changes HOOK STDOUT: 132 ------- HOOK STDOUT: 133 HOOK STDOUT: 134 A short sketch of the changes done in each release. HOOK STDOUT: 135 HOOK STDOUT: 136 Release 0.2.4 HOOK STDOUT: 137 ~~~~~~~~~~~~~ HOOK STDOUT: 138 HOOK STDOUT: 139 The following was changed in Release 0.2.4: HOOK STDOUT: 140 HOOK STDOUT: 141 * The `push`-method accepts an identation string HOOK STDOUT: 142 for identing writers. HOOK STDOUT: 143 * The methods `push` and `pop` now accept HOOK STDOUT: 144 arbitrary arguments in the general case. HOOK STDOUT: 145 * Successfully tested the whole framework with Python 3.5. HOOK STDOUT: 146 HOOK STDOUT: 147 HOOK STDOUT: 148 Release 0.2.3 HOOK STDOUT: 149 ~~~~~~~~~~~~~ HOOK STDOUT: 150 HOOK STDOUT: 151 The following was changed in Release 0.2.3: HOOK STDOUT: 152 HOOK STDOUT: 153 * Fixed the long description. HOOK STDOUT: 154 * Wrote some documentation about changing the implementation HOOK STDOUT: 155 class of a generic function. HOOK STDOUT: 156 HOOK STDOUT: 157 HOOK STDOUT: 158 Release 0.2.2 HOOK STDOUT: 159 ~~~~~~~~~~~~~ HOOK STDOUT: 160 HOOK STDOUT: 161 The following was changed in Release 0.2.2: HOOK STDOUT: 162 HOOK STDOUT: 163 * Write more documentation. HOOK STDOUT: 164 Especially documented the `merge` and the `isgeneric` HOOK STDOUT: 165 functions. HOOK STDOUT: 166 * Consistency between the long text and on PyPi and the documentation. HOOK STDOUT: 167 HOOK STDOUT: 168 HOOK STDOUT: 169 Release 0.2.1 HOOK STDOUT: 170 ~~~~~~~~~~~~~ HOOK STDOUT: 171 HOOK STDOUT: 172 Needed to bump the version information, because the homepage HOOK STDOUT: 173 in the package-information was wrong [#]_ and a new upload was needed. HOOK STDOUT: 174 HOOK STDOUT: 175 HOOK STDOUT: 176 Release 0.2.0 HOOK STDOUT: 177 ~~~~~~~~~~~~~ HOOK STDOUT: 178 HOOK STDOUT: 179 The following was changed in Release 0.2.0: HOOK STDOUT: 180 HOOK STDOUT: 181 * Ported the whole module to Python 3.6 and Python 3.7. HOOK STDOUT: 182 * Exclusively uses `parameter annotations`_ to specify the types to dispatch on. HOOK STDOUT: 183 * Added standard conforming default implementations for methods HOOK STDOUT: 184 like `__add__`. All these methods now raise a proper HOOK STDOUT: 185 `TypeError` instead of raising a `NotImplementedError`. HOOK STDOUT: 186 * Added some means to write generic functions that dispatch types only. HOOK STDOUT: 187 This is the generic function equivalent of a class-method. HOOK STDOUT: 188 * Added some means to dispatch on single objects. HOOK STDOUT: 189 This is the equivalent adding methods to class-instances [#]_. HOOK STDOUT: 190 * The package name for PyPi is now ``gf3``. HOOK STDOUT: 191 HOOK STDOUT: 192 .. _parameter annotations: https://docs.python.org/3/reference/compound_stmts.html#grammar-token-parameter HOOK STDOUT: 193 HOOK STDOUT: 194 HOOK STDOUT: 195 Release 0.1.4 HOOK STDOUT: 196 ~~~~~~~~~~~~~ HOOK STDOUT: 197 HOOK STDOUT: 198 The following was fixed in Release 0.1.4: HOOK STDOUT: 199 HOOK STDOUT: 200 * Fixed an issue with variadic methods. Sometimes definitions HOOK STDOUT: 201 of variadic methods added after the method was already called HOOK STDOUT: 202 where not added. HOOK STDOUT: 203 * Specified and implemented a precedence rule for overlapping HOOK STDOUT: 204 variadic methods of generic functions. HOOK STDOUT: 205 * Improved generated documentation for variadic methods. HOOK STDOUT: 206 * Fixed the markup of some notes in the documentation. HOOK STDOUT: 207 HOOK STDOUT: 208 HOOK STDOUT: 209 Release 0.1.3 HOOK STDOUT: 210 ~~~~~~~~~~~~~ HOOK STDOUT: 211 HOOK STDOUT: 212 The following was changed in Release 0.1.3: HOOK STDOUT: 213 HOOK STDOUT: 214 * Added variadic methods, e.g. multi-methods with a HOOK STDOUT: 215 variable number of arguments. HOOK STDOUT: 216 * Improved the long description text a bit HOOK STDOUT: 217 and fixed bug in its markup. HOOK STDOUT: 218 * Fixed invalid references in the long description. HOOK STDOUT: 219 HOOK STDOUT: 220 HOOK STDOUT: 221 Release 0.1.2 HOOK STDOUT: 222 ~~~~~~~~~~~~~ HOOK STDOUT: 223 HOOK STDOUT: 224 The following was changed in Release 0.1.2: HOOK STDOUT: 225 HOOK STDOUT: 226 * Added a generic functions for `gf.Object.__call__`. HOOK STDOUT: 227 * Added a `gf.go.FinalizingMixin`. HOOK STDOUT: 228 * `gf.generic` now also accepts a type. HOOK STDOUT: 229 * Improved the exception information for ambiguous calls. HOOK STDOUT: 230 * Fixed some documentation glitches. HOOK STDOUT: 231 HOOK STDOUT: 232 HOOK STDOUT: 233 Release 0.1.1 HOOK STDOUT: 234 ~~~~~~~~~~~~~ HOOK STDOUT: 235 HOOK STDOUT: 236 This was the initial release. HOOK STDOUT: 237 HOOK STDOUT: 238 .. [#] Silly me discovered about the shutdown of pythonhosted.org HOOK STDOUT: 239 after version 0.2.0 was uploaded. HOOK STDOUT: 240 .. [#] Of course this is not possible with standard python classes HOOK STDOUT: 241 and their instances. HOOK STDOUT: 242 HOOK STDOUT: 243 Acknowledgements HOOK STDOUT: 244 ================ HOOK STDOUT: 245 HOOK STDOUT: 246 Guido van Rossum created the core of this package. I just renamed some things HOOK STDOUT: 247 and added some^H^H^H^H oodles of convenience stuff. Thank you Guido! HOOK STDOUT: 248 HOOK STDOUT: 249 HOOK STDOUT: 250 Copyright HOOK STDOUT: 251 ========= HOOK STDOUT: 252 HOOK STDOUT: 253 © 2006-2013 Python Software Foundation. HOOK STDOUT: 254 © 2013-2018 Gerald Klix. HOOK STDOUT: 255 HOOK STDOUT: running egg_info HOOK STDOUT: creating gf3.egg-info HOOK STDOUT: writing gf3.egg-info/PKG-INFO HOOK STDOUT: writing dependency_links to gf3.egg-info/dependency_links.txt HOOK STDOUT: writing top-level names to gf3.egg-info/top_level.txt HOOK STDOUT: writing manifest file 'gf3.egg-info/SOURCES.txt' HOOK STDOUT: reading manifest file 'gf3.egg-info/SOURCES.txt' HOOK STDOUT: reading manifest template 'MANIFEST.in' HOOK STDOUT: writing manifest file 'gf3.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.36.2) HOOK STDOUT: 001 ============================================= HOOK STDOUT: 002 GF3: Lisp-Like Generic Functions For Python 3 HOOK STDOUT: 003 ============================================= HOOK STDOUT: 004 HOOK STDOUT: 005 Overview HOOK STDOUT: 006 ======== HOOK STDOUT: 007 HOOK STDOUT: 008 `gf` lets you write generic functions HOOK STDOUT: 009 `generic functions `_ HOOK STDOUT: 010 with multi-methods, that dispatch on all their arguments. HOOK STDOUT: 011 HOOK STDOUT: 012 Simple Example HOOK STDOUT: 013 -------------- HOOK STDOUT: 014 HOOK STDOUT: 015 >>> from gf import generic, method HOOK STDOUT: 016 >>> add = generic() HOOK STDOUT: 017 >>> type(add) HOOK STDOUT: 018 HOOK STDOUT: 019 HOOK STDOUT: 020 Lets define `add` for two integers: HOOK STDOUT: 021 HOOK STDOUT: 022 >>> @method() HOOK STDOUT: 023 ... def add(n0: int, n1: int): HOOK STDOUT: 024 ... return n0 + n1 HOOK STDOUT: 025 HOOK STDOUT: 026 Lets test it: HOOK STDOUT: 027 HOOK STDOUT: 028 >>> add(1, 2) HOOK STDOUT: 029 3 HOOK STDOUT: 030 HOOK STDOUT: 031 Calling `add` with instances of other types fails: HOOK STDOUT: 032 HOOK STDOUT: 033 >>> add("Hello ", "World") HOOK STDOUT: 034 Traceback (most recent call last): HOOK STDOUT: 035 ... HOOK STDOUT: 036 NotImplementedError: Generic '__main__.add' has no implementation for type(s): __builtin__.str, __builtin__.str HOOK STDOUT: 037 HOOK STDOUT: 038 Of course `add` can also by defined for two strings: HOOK STDOUT: 039 HOOK STDOUT: 040 >>> @method() HOOK STDOUT: 041 ... def add(s0: str, s1: str): HOOK STDOUT: 042 ... return s0 + s1 HOOK STDOUT: 043 HOOK STDOUT: 044 Now our hello world example works: HOOK STDOUT: 045 HOOK STDOUT: 046 >>> add("Hello ", "World") HOOK STDOUT: 047 'Hello World' HOOK STDOUT: 048 HOOK STDOUT: 049 `add` can also be defined for a string and an integer: HOOK STDOUT: 050 HOOK STDOUT: 051 >>> @method() HOOK STDOUT: 052 ... def add(s: str, n: int): HOOK STDOUT: 053 ... return s + str(n) HOOK STDOUT: 054 HOOK STDOUT: 055 Thus we can add a string and a number: HOOK STDOUT: 056 HOOK STDOUT: 057 >>> add("You ", 2) HOOK STDOUT: 058 'You 2' HOOK STDOUT: 059 HOOK STDOUT: 060 Python's Special Methods HOOK STDOUT: 061 ------------------------ HOOK STDOUT: 062 HOOK STDOUT: 063 `gf.Object` implements (nearly) all of the `special instance HOOK STDOUT: 064 methods of a python object`_ as a generic function. HOOK STDOUT: 065 The package includes a rational number implementation that makes HOOK STDOUT: 066 heavy use of this feature: HOOK STDOUT: 067 HOOK STDOUT: 068 .. code:: python HOOK STDOUT: 069 HOOK STDOUT: 070 @method() HOOK STDOUT: 071 def __add__(a: object, b: Rational): HOOK STDOUT: 072 """Add an object and a rational number. HOOK STDOUT: 073 HOOK STDOUT: 074 `a` is converted to a `Rational` and then both are added.""" HOOK STDOUT: 075 return Rational(a) + b HOOK STDOUT: 076 HOOK STDOUT: 077 @method(Rational, object) HOOK STDOUT: 078 def __add__(a: Rational, b: object): HOOK STDOUT: 079 """Add a rational number and an object. HOOK STDOUT: 080 HOOK STDOUT: 081 `b` is converted to a `Rational` and then both are added.""" HOOK STDOUT: 082 return a + Rational(b) HOOK STDOUT: 083 HOOK STDOUT: 084 `gf.Object` also has a more Smalltalk means of overwriting HOOK STDOUT: 085 `object.__str__` and `object.__repr__` using a file like object. HOOK STDOUT: 086 Again the rational example is instructive about its usage. HOOK STDOUT: 087 HOOK STDOUT: 088 .. code:: python HOOK STDOUT: 089 HOOK STDOUT: 090 @method() HOOK STDOUT: 091 def __out__(rational: Rational, writer: Writer): HOOK STDOUT: 092 """Write a nice representation of the rational. HOOK STDOUT: 093 HOOK STDOUT: 094 Denominators that equal 1 are not printed.""" HOOK STDOUT: 095 writer("%d", rational.numerator) HOOK STDOUT: 096 if rational.denominator != 1: HOOK STDOUT: 097 writer(" / %d", rational.denominator) HOOK STDOUT: 098 HOOK STDOUT: 099 @method() HOOK STDOUT: 100 def __spy__(rational: Rational, writer: Writer): HOOK STDOUT: 101 """Write a debug representation of the rational.""" HOOK STDOUT: 102 writer("%s(", rational.__class__.__name__) HOOK STDOUT: 103 if rational.numerator != 0: HOOK STDOUT: 104 writer("%r", rational.numerator) HOOK STDOUT: 105 if rational.denominator != 1: HOOK STDOUT: 106 writer(", %r", rational.denominator) HOOK STDOUT: 107 writer(")") HOOK STDOUT: 108 HOOK STDOUT: 109 .. _special instance methods of a python object: HOOK STDOUT: 110 http://docs.python.org/2/reference/datamodel.html#special-method-names HOOK STDOUT: 111 HOOK STDOUT: 112 HOOK STDOUT: 113 Installation HOOK STDOUT: 114 ------------ HOOK STDOUT: 115 HOOK STDOUT: 116 As usual `gf3` can be installed with `pip`, like this: HOOK STDOUT: 117 HOOK STDOUT: 118 pip install gf3 HOOK STDOUT: 119 HOOK STDOUT: 120 Documentation HOOK STDOUT: 121 ------------- HOOK STDOUT: 122 HOOK STDOUT: 123 The whole documentation is available at in the following formats HOOK STDOUT: 124 HOOK STDOUT: 125 HTML HOOK STDOUT: 126 http://gf3.klix.ch (Also servers as `gf`'s homepage) HOOK STDOUT: 127 HOOK STDOUT: 128 PDF HOOK STDOUT: 129 http://gf3.klix.ch/gf3.pdf HOOK STDOUT: 130 HOOK STDOUT: 131 Changes HOOK STDOUT: 132 ------- HOOK STDOUT: 133 HOOK STDOUT: 134 A short sketch of the changes done in each release. HOOK STDOUT: 135 HOOK STDOUT: 136 Release 0.2.4 HOOK STDOUT: 137 ~~~~~~~~~~~~~ HOOK STDOUT: 138 HOOK STDOUT: 139 The following was changed in Release 0.2.4: HOOK STDOUT: 140 HOOK STDOUT: 141 * The `push`-method accepts an identation string HOOK STDOUT: 142 for identing writers. HOOK STDOUT: 143 * The methods `push` and `pop` now accept HOOK STDOUT: 144 arbitrary arguments in the general case. HOOK STDOUT: 145 * Successfully tested the whole framework with Python 3.5. HOOK STDOUT: 146 HOOK STDOUT: 147 HOOK STDOUT: 148 Release 0.2.3 HOOK STDOUT: 149 ~~~~~~~~~~~~~ HOOK STDOUT: 150 HOOK STDOUT: 151 The following was changed in Release 0.2.3: HOOK STDOUT: 152 HOOK STDOUT: 153 * Fixed the long description. HOOK STDOUT: 154 * Wrote some documentation about changing the implementation HOOK STDOUT: 155 class of a generic function. HOOK STDOUT: 156 HOOK STDOUT: 157 HOOK STDOUT: 158 Release 0.2.2 HOOK STDOUT: 159 ~~~~~~~~~~~~~ HOOK STDOUT: 160 HOOK STDOUT: 161 The following was changed in Release 0.2.2: HOOK STDOUT: 162 HOOK STDOUT: 163 * Write more documentation. HOOK STDOUT: 164 Especially documented the `merge` and the `isgeneric` HOOK STDOUT: 165 functions. HOOK STDOUT: 166 * Consistency between the long text and on PyPi and the documentation. HOOK STDOUT: 167 HOOK STDOUT: 168 HOOK STDOUT: 169 Release 0.2.1 HOOK STDOUT: 170 ~~~~~~~~~~~~~ HOOK STDOUT: 171 HOOK STDOUT: 172 Needed to bump the version information, because the homepage HOOK STDOUT: 173 in the package-information was wrong [#]_ and a new upload was needed. HOOK STDOUT: 174 HOOK STDOUT: 175 HOOK STDOUT: 176 Release 0.2.0 HOOK STDOUT: 177 ~~~~~~~~~~~~~ HOOK STDOUT: 178 HOOK STDOUT: 179 The following was changed in Release 0.2.0: HOOK STDOUT: 180 HOOK STDOUT: 181 * Ported the whole module to Python 3.6 and Python 3.7. HOOK STDOUT: 182 * Exclusively uses `parameter annotations`_ to specify the types to dispatch on. HOOK STDOUT: 183 * Added standard conforming default implementations for methods HOOK STDOUT: 184 like `__add__`. All these methods now raise a proper HOOK STDOUT: 185 `TypeError` instead of raising a `NotImplementedError`. HOOK STDOUT: 186 * Added some means to write generic functions that dispatch types only. HOOK STDOUT: 187 This is the generic function equivalent of a class-method. HOOK STDOUT: 188 * Added some means to dispatch on single objects. HOOK STDOUT: 189 This is the equivalent adding methods to class-instances [#]_. HOOK STDOUT: 190 * The package name for PyPi is now ``gf3``. HOOK STDOUT: 191 HOOK STDOUT: 192 .. _parameter annotations: https://docs.python.org/3/reference/compound_stmts.html#grammar-token-parameter HOOK STDOUT: 193 HOOK STDOUT: 194 HOOK STDOUT: 195 Release 0.1.4 HOOK STDOUT: 196 ~~~~~~~~~~~~~ HOOK STDOUT: 197 HOOK STDOUT: 198 The following was fixed in Release 0.1.4: HOOK STDOUT: 199 HOOK STDOUT: 200 * Fixed an issue with variadic methods. Sometimes definitions HOOK STDOUT: 201 of variadic methods added after the method was already called HOOK STDOUT: 202 where not added. HOOK STDOUT: 203 * Specified and implemented a precedence rule for overlapping HOOK STDOUT: 204 variadic methods of generic functions. HOOK STDOUT: 205 * Improved generated documentation for variadic methods. HOOK STDOUT: 206 * Fixed the markup of some notes in the documentation. HOOK STDOUT: 207 HOOK STDOUT: 208 HOOK STDOUT: 209 Release 0.1.3 HOOK STDOUT: 210 ~~~~~~~~~~~~~ HOOK STDOUT: 211 HOOK STDOUT: 212 The following was changed in Release 0.1.3: HOOK STDOUT: 213 HOOK STDOUT: 214 * Added variadic methods, e.g. multi-methods with a HOOK STDOUT: 215 variable number of arguments. HOOK STDOUT: 216 * Improved the long description text a bit HOOK STDOUT: 217 and fixed bug in its markup. HOOK STDOUT: 218 * Fixed invalid references in the long description. HOOK STDOUT: 219 HOOK STDOUT: 220 HOOK STDOUT: 221 Release 0.1.2 HOOK STDOUT: 222 ~~~~~~~~~~~~~ HOOK STDOUT: 223 HOOK STDOUT: 224 The following was changed in Release 0.1.2: HOOK STDOUT: 225 HOOK STDOUT: 226 * Added a generic functions for `gf.Object.__call__`. HOOK STDOUT: 227 * Added a `gf.go.FinalizingMixin`. HOOK STDOUT: 228 * `gf.generic` now also accepts a type. HOOK STDOUT: 229 * Improved the exception information for ambiguous calls. HOOK STDOUT: 230 * Fixed some documentation glitches. HOOK STDOUT: 231 HOOK STDOUT: 232 HOOK STDOUT: 233 Release 0.1.1 HOOK STDOUT: 234 ~~~~~~~~~~~~~ HOOK STDOUT: 235 HOOK STDOUT: 236 This was the initial release. HOOK STDOUT: 237 HOOK STDOUT: 238 .. [#] Silly me discovered about the shutdown of pythonhosted.org HOOK STDOUT: 239 after version 0.2.0 was uploaded. HOOK STDOUT: 240 .. [#] Of course this is not possible with standard python classes HOOK STDOUT: 241 and their instances. HOOK STDOUT: 242 HOOK STDOUT: 243 Acknowledgements HOOK STDOUT: 244 ================ HOOK STDOUT: 245 HOOK STDOUT: 246 Guido van Rossum created the core of this package. I just renamed some things HOOK STDOUT: 247 and added some^H^H^H^H oodles of convenience stuff. Thank you Guido! HOOK STDOUT: 248 HOOK STDOUT: 249 HOOK STDOUT: 250 Copyright HOOK STDOUT: 251 ========= HOOK STDOUT: 252 HOOK STDOUT: 253 © 2006-2013 Python Software Foundation. HOOK STDOUT: 254 © 2013-2018 Gerald Klix. HOOK STDOUT: 255 HOOK STDOUT: running dist_info HOOK STDOUT: writing gf3.egg-info/PKG-INFO HOOK STDOUT: writing dependency_links to gf3.egg-info/dependency_links.txt HOOK STDOUT: writing top-level names to gf3.egg-info/top_level.txt HOOK STDOUT: reading manifest file 'gf3.egg-info/SOURCES.txt' HOOK STDOUT: reading manifest template 'MANIFEST.in' HOOK STDOUT: writing manifest file 'gf3.egg-info/SOURCES.txt' HOOK STDOUT: creating '/builddir/build/BUILD/gf3-0.2.4/gf3.dist-info' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Cj0ROm + umask 022 + cd /builddir/build/BUILD + cd gf3-0.2.4 + mkdir -p /builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' + TMPDIR=/builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir + /usr/bin/python3 -m pip wheel --wheel-dir /builddir/build/BUILD/gf3-0.2.4/pyproject-wheeldir --no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --no-clean --progress-bar off --verbose . Processing /builddir/build/BUILD/gf3-0.2.4 Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) 001 ============================================= 002 GF3: Lisp-Like Generic Functions For Python 3 003 ============================================= 004 005 Overview 006 ======== 007 008 `gf` lets you write generic functions 009 `generic functions `_ 010 with multi-methods, that dispatch on all their arguments. 011 012 Simple Example 013 -------------- 014 015 >>> from gf import generic, method 016 >>> add = generic() 017 >>> type(add) 018 019 020 Lets define `add` for two integers: 021 022 >>> @method() 023 ... def add(n0: int, n1: int): 024 ... return n0 + n1 025 026 Lets test it: 027 028 >>> add(1, 2) 029 3 030 031 Calling `add` with instances of other types fails: 032 033 >>> add("Hello ", "World") 034 Traceback (most recent call last): 035 ... 036 NotImplementedError: Generic '__main__.add' has no implementation for type(s): __builtin__.str, __builtin__.str 037 038 Of course `add` can also by defined for two strings: 039 040 >>> @method() 041 ... def add(s0: str, s1: str): 042 ... return s0 + s1 043 044 Now our hello world example works: 045 046 >>> add("Hello ", "World") 047 'Hello World' 048 049 `add` can also be defined for a string and an integer: 050 051 >>> @method() 052 ... def add(s: str, n: int): 053 ... return s + str(n) 054 055 Thus we can add a string and a number: 056 057 >>> add("You ", 2) 058 'You 2' 059 060 Python's Special Methods 061 ------------------------ 062 063 `gf.Object` implements (nearly) all of the `special instance 064 methods of a python object`_ as a generic function. 065 The package includes a rational number implementation that makes 066 heavy use of this feature: 067 068 .. code:: python 069 070 @method() 071 def __add__(a: object, b: Rational): 072 """Add an object and a rational number. 073 074 `a` is converted to a `Rational` and then both are added.""" 075 return Rational(a) + b 076 077 @method(Rational, object) 078 def __add__(a: Rational, b: object): 079 """Add a rational number and an object. 080 081 `b` is converted to a `Rational` and then both are added.""" 082 return a + Rational(b) 083 084 `gf.Object` also has a more Smalltalk means of overwriting 085 `object.__str__` and `object.__repr__` using a file like object. 086 Again the rational example is instructive about its usage. 087 088 .. code:: python 089 090 @method() 091 def __out__(rational: Rational, writer: Writer): 092 """Write a nice representation of the rational. 093 094 Denominators that equal 1 are not printed.""" 095 writer("%d", rational.numerator) 096 if rational.denominator != 1: 097 writer(" / %d", rational.denominator) 098 099 @method() 100 def __spy__(rational: Rational, writer: Writer): 101 """Write a debug representation of the rational.""" 102 writer("%s(", rational.__class__.__name__) 103 if rational.numerator != 0: 104 writer("%r", rational.numerator) 105 if rational.denominator != 1: 106 writer(", %r", rational.denominator) 107 writer(")") 108 109 .. _special instance methods of a python object: 110 http://docs.python.org/2/reference/datamodel.html#special-method-names 111 112 113 Installation 114 ------------ 115 116 As usual `gf3` can be installed with `pip`, like this: 117 118 pip install gf3 119 120 Documentation 121 ------------- 122 123 The whole documentation is available at in the following formats 124 125 HTML 126 http://gf3.klix.ch (Also servers as `gf`'s homepage) 127 128 PDF 129 http://gf3.klix.ch/gf3.pdf 130 131 Changes 132 ------- 133 134 A short sketch of the changes done in each release. 135 136 Release 0.2.4 137 ~~~~~~~~~~~~~ 138 139 The following was changed in Release 0.2.4: 140 141 * The `push`-method accepts an identation string 142 for identing writers. 143 * The methods `push` and `pop` now accept 144 arbitrary arguments in the general case. 145 * Successfully tested the whole framework with Python 3.5. 146 147 148 Release 0.2.3 149 ~~~~~~~~~~~~~ 150 151 The following was changed in Release 0.2.3: 152 153 * Fixed the long description. 154 * Wrote some documentation about changing the implementation 155 class of a generic function. 156 157 158 Release 0.2.2 159 ~~~~~~~~~~~~~ 160 161 The following was changed in Release 0.2.2: 162 163 * Write more documentation. 164 Especially documented the `merge` and the `isgeneric` 165 functions. 166 * Consistency between the long text and on PyPi and the documentation. 167 168 169 Release 0.2.1 170 ~~~~~~~~~~~~~ 171 172 Needed to bump the version information, because the homepage 173 in the package-information was wrong [#]_ and a new upload was needed. 174 175 176 Release 0.2.0 177 ~~~~~~~~~~~~~ 178 179 The following was changed in Release 0.2.0: 180 181 * Ported the whole module to Python 3.6 and Python 3.7. 182 * Exclusively uses `parameter annotations`_ to specify the types to dispatch on. 183 * Added standard conforming default implementations for methods 184 like `__add__`. All these methods now raise a proper 185 `TypeError` instead of raising a `NotImplementedError`. 186 * Added some means to write generic functions that dispatch types only. 187 This is the generic function equivalent of a class-method. 188 * Added some means to dispatch on single objects. 189 This is the equivalent adding methods to class-instances [#]_. 190 * The package name for PyPi is now ``gf3``. 191 192 .. _parameter annotations: https://docs.python.org/3/reference/compound_stmts.html#grammar-token-parameter 193 194 195 Release 0.1.4 196 ~~~~~~~~~~~~~ 197 198 The following was fixed in Release 0.1.4: 199 200 * Fixed an issue with variadic methods. Sometimes definitions 201 of variadic methods added after the method was already called 202 where not added. 203 * Specified and implemented a precedence rule for overlapping 204 variadic methods of generic functions. 205 * Improved generated documentation for variadic methods. 206 * Fixed the markup of some notes in the documentation. 207 208 209 Release 0.1.3 210 ~~~~~~~~~~~~~ 211 212 The following was changed in Release 0.1.3: 213 214 * Added variadic methods, e.g. multi-methods with a 215 variable number of arguments. 216 * Improved the long description text a bit 217 and fixed bug in its markup. 218 * Fixed invalid references in the long description. 219 220 221 Release 0.1.2 222 ~~~~~~~~~~~~~ 223 224 The following was changed in Release 0.1.2: 225 226 * Added a generic functions for `gf.Object.__call__`. 227 * Added a `gf.go.FinalizingMixin`. 228 * `gf.generic` now also accepts a type. 229 * Improved the exception information for ambiguous calls. 230 * Fixed some documentation glitches. 231 232 233 Release 0.1.1 234 ~~~~~~~~~~~~~ 235 236 This was the initial release. 237 238 .. [#] Silly me discovered about the shutdown of pythonhosted.org 239 after version 0.2.0 was uploaded. 240 .. [#] Of course this is not possible with standard python classes 241 and their instances. 242 243 Acknowledgements 244 ================ 245 246 Guido van Rossum created the core of this package. I just renamed some things 247 and added some^H^H^H^H oodles of convenience stuff. Thank you Guido! 248 249 250 Copyright 251 ========= 252 253 © 2006-2013 Python Software Foundation. 254 © 2013-2018 Gerald Klix. 255 running dist_info creating /builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir/pip-modern-metadata-wtixlcrx/gf3.egg-info writing /builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir/pip-modern-metadata-wtixlcrx/gf3.egg-info/PKG-INFO writing dependency_links to /builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir/pip-modern-metadata-wtixlcrx/gf3.egg-info/dependency_links.txt writing top-level names to /builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir/pip-modern-metadata-wtixlcrx/gf3.egg-info/top_level.txt writing manifest file '/builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir/pip-modern-metadata-wtixlcrx/gf3.egg-info/SOURCES.txt' reading manifest file '/builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir/pip-modern-metadata-wtixlcrx/gf3.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file '/builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir/pip-modern-metadata-wtixlcrx/gf3.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir/pip-modern-metadata-wtixlcrx/gf3.dist-info' Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: gf3 Building wheel for gf3 (pyproject.toml): started Running command Building wheel for gf3 (pyproject.toml) 001 ============================================= 002 GF3: Lisp-Like Generic Functions For Python 3 003 ============================================= 004 005 Overview 006 ======== 007 008 `gf` lets you write generic functions 009 `generic functions `_ 010 with multi-methods, that dispatch on all their arguments. 011 012 Simple Example 013 -------------- 014 015 >>> from gf import generic, method 016 >>> add = generic() 017 >>> type(add) 018 019 020 Lets define `add` for two integers: 021 022 >>> @method() 023 ... def add(n0: int, n1: int): 024 ... return n0 + n1 025 026 Lets test it: 027 028 >>> add(1, 2) 029 3 030 031 Calling `add` with instances of other types fails: 032 033 >>> add("Hello ", "World") 034 Traceback (most recent call last): 035 ... 036 NotImplementedError: Generic '__main__.add' has no implementation for type(s): __builtin__.str, __builtin__.str 037 038 Of course `add` can also by defined for two strings: 039 040 >>> @method() 041 ... def add(s0: str, s1: str): 042 ... return s0 + s1 043 044 Now our hello world example works: 045 046 >>> add("Hello ", "World") 047 'Hello World' 048 049 `add` can also be defined for a string and an integer: 050 051 >>> @method() 052 ... def add(s: str, n: int): 053 ... return s + str(n) 054 055 Thus we can add a string and a number: 056 057 >>> add("You ", 2) 058 'You 2' 059 060 Python's Special Methods 061 ------------------------ 062 063 `gf.Object` implements (nearly) all of the `special instance 064 methods of a python object`_ as a generic function. 065 The package includes a rational number implementation that makes 066 heavy use of this feature: 067 068 .. code:: python 069 070 @method() 071 def __add__(a: object, b: Rational): 072 """Add an object and a rational number. 073 074 `a` is converted to a `Rational` and then both are added.""" 075 return Rational(a) + b 076 077 @method(Rational, object) 078 def __add__(a: Rational, b: object): 079 """Add a rational number and an object. 080 081 `b` is converted to a `Rational` and then both are added.""" 082 return a + Rational(b) 083 084 `gf.Object` also has a more Smalltalk means of overwriting 085 `object.__str__` and `object.__repr__` using a file like object. 086 Again the rational example is instructive about its usage. 087 088 .. code:: python 089 090 @method() 091 def __out__(rational: Rational, writer: Writer): 092 """Write a nice representation of the rational. 093 094 Denominators that equal 1 are not printed.""" 095 writer("%d", rational.numerator) 096 if rational.denominator != 1: 097 writer(" / %d", rational.denominator) 098 099 @method() 100 def __spy__(rational: Rational, writer: Writer): 101 """Write a debug representation of the rational.""" 102 writer("%s(", rational.__class__.__name__) 103 if rational.numerator != 0: 104 writer("%r", rational.numerator) 105 if rational.denominator != 1: 106 writer(", %r", rational.denominator) 107 writer(")") 108 109 .. _special instance methods of a python object: 110 http://docs.python.org/2/reference/datamodel.html#special-method-names 111 112 113 Installation 114 ------------ 115 116 As usual `gf3` can be installed with `pip`, like this: 117 118 pip install gf3 119 120 Documentation 121 ------------- 122 123 The whole documentation is available at in the following formats 124 125 HTML 126 http://gf3.klix.ch (Also servers as `gf`'s homepage) 127 128 PDF 129 http://gf3.klix.ch/gf3.pdf 130 131 Changes 132 ------- 133 134 A short sketch of the changes done in each release. 135 136 Release 0.2.4 137 ~~~~~~~~~~~~~ 138 139 The following was changed in Release 0.2.4: 140 141 * The `push`-method accepts an identation string 142 for identing writers. 143 * The methods `push` and `pop` now accept 144 arbitrary arguments in the general case. 145 * Successfully tested the whole framework with Python 3.5. 146 147 148 Release 0.2.3 149 ~~~~~~~~~~~~~ 150 151 The following was changed in Release 0.2.3: 152 153 * Fixed the long description. 154 * Wrote some documentation about changing the implementation 155 class of a generic function. 156 157 158 Release 0.2.2 159 ~~~~~~~~~~~~~ 160 161 The following was changed in Release 0.2.2: 162 163 * Write more documentation. 164 Especially documented the `merge` and the `isgeneric` 165 functions. 166 * Consistency between the long text and on PyPi and the documentation. 167 168 169 Release 0.2.1 170 ~~~~~~~~~~~~~ 171 172 Needed to bump the version information, because the homepage 173 in the package-information was wrong [#]_ and a new upload was needed. 174 175 176 Release 0.2.0 177 ~~~~~~~~~~~~~ 178 179 The following was changed in Release 0.2.0: 180 181 * Ported the whole module to Python 3.6 and Python 3.7. 182 * Exclusively uses `parameter annotations`_ to specify the types to dispatch on. 183 * Added standard conforming default implementations for methods 184 like `__add__`. All these methods now raise a proper 185 `TypeError` instead of raising a `NotImplementedError`. 186 * Added some means to write generic functions that dispatch types only. 187 This is the generic function equivalent of a class-method. 188 * Added some means to dispatch on single objects. 189 This is the equivalent adding methods to class-instances [#]_. 190 * The package name for PyPi is now ``gf3``. 191 192 .. _parameter annotations: https://docs.python.org/3/reference/compound_stmts.html#grammar-token-parameter 193 194 195 Release 0.1.4 196 ~~~~~~~~~~~~~ 197 198 The following was fixed in Release 0.1.4: 199 200 * Fixed an issue with variadic methods. Sometimes definitions 201 of variadic methods added after the method was already called 202 where not added. 203 * Specified and implemented a precedence rule for overlapping 204 variadic methods of generic functions. 205 * Improved generated documentation for variadic methods. 206 * Fixed the markup of some notes in the documentation. 207 208 209 Release 0.1.3 210 ~~~~~~~~~~~~~ 211 212 The following was changed in Release 0.1.3: 213 214 * Added variadic methods, e.g. multi-methods with a 215 variable number of arguments. 216 * Improved the long description text a bit 217 and fixed bug in its markup. 218 * Fixed invalid references in the long description. 219 220 221 Release 0.1.2 222 ~~~~~~~~~~~~~ 223 224 The following was changed in Release 0.1.2: 225 226 * Added a generic functions for `gf.Object.__call__`. 227 * Added a `gf.go.FinalizingMixin`. 228 * `gf.generic` now also accepts a type. 229 * Improved the exception information for ambiguous calls. 230 * Fixed some documentation glitches. 231 232 233 Release 0.1.1 234 ~~~~~~~~~~~~~ 235 236 This was the initial release. 237 238 .. [#] Silly me discovered about the shutdown of pythonhosted.org 239 after version 0.2.0 was uploaded. 240 .. [#] Of course this is not possible with standard python classes 241 and their instances. 242 243 Acknowledgements 244 ================ 245 246 Guido van Rossum created the core of this package. I just renamed some things 247 and added some^H^H^H^H oodles of convenience stuff. Thank you Guido! 248 249 250 Copyright 251 ========= 252 253 © 2006-2013 Python Software Foundation. 254 © 2013-2018 Gerald Klix. 255 running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/gf copying gf/go.py -> build/lib/gf copying gf/base.py -> build/lib/gf copying gf/__init__.py -> build/lib/gf installing to build/bdist.linux-x86_64/wheel running install running install_lib creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/wheel creating build/bdist.linux-x86_64/wheel/gf copying build/lib/gf/__init__.py -> build/bdist.linux-x86_64/wheel/gf copying build/lib/gf/base.py -> build/bdist.linux-x86_64/wheel/gf copying build/lib/gf/go.py -> build/bdist.linux-x86_64/wheel/gf running install_egg_info running egg_info creating gf3.egg-info writing gf3.egg-info/PKG-INFO writing dependency_links to gf3.egg-info/dependency_links.txt writing top-level names to gf3.egg-info/top_level.txt writing manifest file 'gf3.egg-info/SOURCES.txt' reading manifest file 'gf3.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'gf3.egg-info/SOURCES.txt' Copying gf3.egg-info to build/bdist.linux-x86_64/wheel/gf3-0.2.4-py3.9.egg-info running install_scripts creating build/bdist.linux-x86_64/wheel/gf3-0.2.4.dist-info/WHEEL creating '/builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir/pip-wheel-3e592mjj/tmp58p6p9_2/gf3-0.2.4-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it adding 'gf/__init__.py' adding 'gf/base.py' adding 'gf/go.py' adding 'gf3-0.2.4.dist-info/METADATA' adding 'gf3-0.2.4.dist-info/WHEEL' adding 'gf3-0.2.4.dist-info/top_level.txt' adding 'gf3-0.2.4.dist-info/zip-safe' adding 'gf3-0.2.4.dist-info/RECORD' removing build/bdist.linux-x86_64/wheel Building wheel for gf3 (pyproject.toml): finished with status 'done' Created wheel for gf3: filename=gf3-0.2.4-py3-none-any.whl size=13777 sha256=26a69de85831982e703507612b2ba15c71c89d81f8d091e3742181f4e839a3a3 Stored in directory: /builddir/.cache/pip/wheels/2b/20/6b/76a3b97756982bea8c3c8b78ff2d820136cbd59a946083f152 Successfully built gf3 + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.5x5Mfu + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64 ++ dirname /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64 + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64 + cd gf3-0.2.4 ++ ls /builddir/build/BUILD/gf3-0.2.4/pyproject-wheeldir/gf3-0.2.4-py3-none-any.whl ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' ++ xargs basename --multiple + specifier=gf3==0.2.4 + TMPDIR=/builddir/build/BUILD/gf3-0.2.4/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64 --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links /builddir/build/BUILD/gf3-0.2.4/pyproject-wheeldir gf3==0.2.4 Using pip 22.0.4 from /usr/lib/python3.9/site-packages/pip (python 3.9) Looking in links: /builddir/build/BUILD/gf3-0.2.4/pyproject-wheeldir Processing ./pyproject-wheeldir/gf3-0.2.4-py3-none-any.whl Installing collected packages: gf3 Successfully installed gf3-0.2.4 + '[' -d /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/bin ']' + rm -f /builddir/build/BUILD/python-gf3-0.2.4-1.el9.x86_64-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9/site-packages ']' + site_dirs+=("/usr/lib/python3.9/site-packages") + '[' /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib64/python3.9/site-packages '!=' /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9/site-packages ']' + '[' -d /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib64/python3.9/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.9/site-packages/gf3-0.2.4.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9/site-packages/gf3-0.2.4.dist-info/INSTALLER + PYTHONPATH=/usr/lib/rpm/redhat + /usr/bin/python3 -B /usr/lib/rpm/redhat/pyproject_preprocess_record.py --buildroot /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64 --record /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9/site-packages/gf3-0.2.4.dist-info/RECORD --output /builddir/build/BUILD/python-gf3-0.2.4-1.el9.x86_64-pyproject-record + rm -fv /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9/site-packages/gf3-0.2.4.dist-info/RECORD removed '/builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9/site-packages/gf3-0.2.4.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9/site-packages/gf3-0.2.4.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9/site-packages/gf3-0.2.4.dist-info/REQUESTED' ++ wc -l /builddir/build/BUILD/python-gf3-0.2.4-1.el9.x86_64-pyproject-ghost-distinfo ++ cut -f1 '-d ' + lines=1 + '[' 1 -ne 1 ']' + /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output-files /builddir/build/BUILD/python-gf3-0.2.4-1.el9.x86_64-pyproject-files --output-modules /builddir/build/BUILD/python-gf3-0.2.4-1.el9.x86_64-pyproject-modules --buildroot /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64 --sitelib /usr/lib/python3.9/site-packages --sitearch /usr/lib64/python3.9/site-packages --python-version 3.9 --pyproject-record /builddir/build/BUILD/python-gf3-0.2.4-1.el9.x86_64-pyproject-record --prefix /usr '*' +auto + /usr/lib/rpm/find-debuginfo.sh -j2 --strict-build-id -m -i --build-id-seed 0.2.4-1.el9 --unique-debug-suffix -0.2.4-1.el9.x86_64 --unique-debug-src-base python-gf3-0.2.4-1.el9.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /builddir/build/BUILD/gf3-0.2.4 find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9 using python3.9 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.4Vx5P0 + umask 022 + cd /builddir/build/BUILD + cd gf3-0.2.4 + '[' '!' -f /builddir/build/BUILD/python-gf3-0.2.4-1.el9.x86_64-pyproject-modules ']' + PATH=/builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/bin:/builddir/.local/bin:/builddir/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib64/python3.9/site-packages:/builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9/site-packages + _PYTHONSITE=/builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib64/python3.9/site-packages:/builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64/usr/lib/python3.9/site-packages + PYTHONDONTWRITEBYTECODE=1 + /usr/bin/python3 -s /usr/lib/rpm/redhat/import_all_modules.py -f /builddir/build/BUILD/python-gf3-0.2.4-1.el9.x86_64-pyproject-modules -t Check import: gf + RPM_EC=0 ++ jobs -p + exit 0 Processing files: python3-gf3-0.2.4-1.el9.noarch Provides: python-gf3 = 0.2.4-1.el9 python3-gf3 = 0.2.4-1.el9 python3.9-gf3 = 0.2.4-1.el9 python3.9dist(gf3) = 0.2.4 python3dist(gf3) = 0.2.4 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: python(abi) = 3.9 Obsoletes: python39-gf3 < 0.2.4-1.el9 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64 Wrote: /builddir/build/SRPMS/python-gf3-0.2.4-1.el9.src.rpm Wrote: /builddir/build/RPMS/python3-gf3-0.2.4-1.el9.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.nuXww0 + umask 022 + cd /builddir/build/BUILD + cd gf3-0.2.4 + /usr/bin/rm -rf /builddir/build/BUILDROOT/python-gf3-0.2.4-1.el9.x86_64 + RPM_EC=0 ++ jobs -p + exit 0 Child return code was: 0