Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various cleanups #443

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion python-bindings/pythonbindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ PYBIND11_MODULE(blspy, m)

py::class_<Util>(m, "Util").def("hash256", [](const py::bytes &message) {
std::string str(message);
const uint8_t *input = reinterpret_cast<const uint8_t *>(str.data());
uint8_t output[BLS::MESSAGE_HASH_LEN];
{
py::gil_scoped_release release;
Expand Down
6 changes: 2 additions & 4 deletions python-bindings/test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# flake8: noqa: E501
import binascii
import time
from copy import deepcopy

from blspy import (
AugSchemeMPL,
Expand All @@ -10,7 +9,6 @@
G2Element,
PopSchemeMPL,
PrivateKey,
Util,
)


Expand Down Expand Up @@ -134,15 +132,15 @@ def test_vectors_invalid():
for s in invalid_inputs_1:
bytes_ = binascii.unhexlify(s)
try:
g1 = G1Element(bytes_)
G1Element(bytes_)
assert False, "Failed to disallow creation of G1 element."
except Exception as e:
pass

for s in invalid_inputs_2:
bytes_ = binascii.unhexlify(s)
try:
g2 = G2Element(bytes_)
G2Element(bytes_)
assert False, "Failed to disallow creation of G2 element."
except Exception as e:
pass
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import platform
import subprocess
import sys
from pathlib import Path
from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext

Expand Down Expand Up @@ -68,7 +69,7 @@ def build_extension(self, ext):
description="BLS signatures in c++ (python bindings)",
python_requires=">=3.7",
install_requires=["wheel"],
long_description=open("README.md").read(),
long_description=Path("README.md").read_text(),
long_description_content_type="text/markdown",
url="https://github.com/Chia-Network/bls-signatures",
ext_modules=[CMakeExtension("blspy", ".")],
Expand Down
Loading