Package: python-py-ecc / 8.0.0-2

Metadata

Package Version Patches format
python-py-ecc 8.0.0-2 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
fix recursion limit s390x.patch | (download)

py_ecc/fields/field_elements.py | 21 13 + 8 - 0 !
1 file changed, 13 insertions(+), 8 deletions(-)

 fix recursionerror in __pow__ on s390x
 The recursive implementation of __pow__ reaches the maximum recursion depth
 on s390x during pairing tests. This patch converts it to an iterative
 square-and-multiply algorithm.
inject debian version into auto version.patch | (download)

py_ecc/__init__.py | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 change auto version before build to use debian version

During Debian packaging, this call to `__version("py_ecc")` fails
because the package metadata is not available in the build environment.
Replace this instead with `@DEB_VERSION@` which will at build time be
replaced with the Debian version by debian/rules.

Mock eth_abi for Sphinx autodoc.patch | (download)

docs/conf.py | 5 5 + 0 - 0 !
1 file changed, 5 insertions(+)

 mock `eth_abi` for sphinx autodoc

Mock the import to allow Sphinx to generate documentation stubs for
`eth_abi` without requiring the actual package to be installed, ensuring
the documentation is complete and does not emit warnings like:

    ModuleNotFoundError: No module named 'eth_abi'

This does not need to upstreamed as the upstream builds likely have
access to all possible modules.

Ensure py_ecc modules are discoverable by Sphinx autodoc.patch | (download)

docs/conf.py | 8 5 + 3 - 0 !
1 file changed, 5 insertions(+), 3 deletions(-)

 ensure `py_ecc` modules are discoverable by sphinx autodoc

Explicitly define the project's root directory to ensure Sphinx will
correctly import `py_ecc` modules for API documentation, eliminating
build warnings such as:

    WARNING: autodoc: failed to import module 'bls.ciphersuites' from module 'py_ecc'; the following exception was raised:
    ['Traceback (most recent call last):\n', '  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 269, in import_object\n    module = import_module(modname, try_reload=True)\n', '  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 172, in import_module\n    raise ModuleNotFoundError(msg, name=modname)  # NoQA: TRY301\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', "ModuleNotFoundError: No module named 'py_ecc'\n"] [autodoc.import_object]
    WARNING: autodoc: failed to import module 'bls.constants' from module 'py_ecc'; the following exception was raised:
    ['Traceback (most recent call last):\n', '  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 269, in import_object\n    module = import_module(modname, try_reload=True)\n', '  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 172, in import_module\n    raise ModuleNotFoundError(msg, name=modname)  # NoQA: TRY301\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', "ModuleNotFoundError: No module named 'py_ecc'\n"] [autodoc.import_object]
    WARNING: autodoc: failed to import module 'bls.g2_primitives' from module 'py_ecc'; the following exception was raised:
    ['Traceback (most recent call last):\n', '  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 269, in import_object\n    module = import_module(modname, try_reload=True)\n', '  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 172, in import_module\n    raise ModuleNotFoundError(msg, name=modname)  # NoQA: TRY301\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', "ModuleNotFoundError: No module named 'py_ecc'\n"] [autodoc.import_object]
    ...

Additionally, correct the `DIR` variable assignment to not use quotes
but to evaluate the `__file__` variable.

Disable intersphinx to prevent network access during buil.patch | (download)

docs/conf.py | 21 15 + 6 - 0 !
1 file changed, 15 insertions(+), 6 deletions(-)

 force intersphinx to use local file instead of network

Debian package builds must be reproducible and isolated from external
network access, so prevent the `sphinx.ext.intersphinx` extension from
doing network requests to `docs.python.org` during the documentation
build process.

This fixes the warning seen during the build:

    intersphinx inventory 'https://docs.python.org/3.10/objects.inv' not fetchable due to <class 'requests.exceptions.ConnectionError'>: HTTPSConnectionPool(host='docs.python.org', port=443): Max retries exceeded with url: /3.10/objects.inv (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7fda772e97f0>: Failed to resolve 'docs.python.org' ([Errno -3] Temporary failure in name resolution)"))

This does not need to be forwarded as upstream builds likely want to
fetch latest links database over the network on every build.