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

Warnings during compilation of libducohash on Windows, with Python 3.12.2 #1766

Open
GerardoNevarez opened this issue Mar 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@GerardoNevarez
Copy link
Contributor

Describe the bug
Warnings during compilation of libducohash on Windows, with Python 3.12.2, Current library download performed by the PC miner does not seem to be compatible with this Python version, and found a warning message during compilation

To Reproduce
Steps to reproduce the behavior:
Compile libducohash on Windows (rustup installed via scoop)

Expected behavior
No warnings during compilations. To be clear the libra is compiled, but these warning could be easily fixed.

Screenshots/photos

   Compiling ducohasher v0.1.0 (C:\git\duino-coin\libducohash)
warning: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
  --> src\lib.rs:43:31
   |
43 | fn libducohasher(_py: Python, m: &PyModule) -> PyResult<()> {
   |                               ^
   |
   = note: `#[warn(deprecated)]` on by default

warning: method `DUCOS1` should have a snake case name
  --> src\lib.rs:18:12
   |
18 |     pub fn DUCOS1(&mut self, expected_hash: &[u8], diff: u128, eff: u64) -> u128 {
   |            ^^^^^^ help: convert the identifier to snake case: `ducos1`
   |
   = note: `#[warn(non_snake_case)]` on by default

warning: `ducohasher` (lib) generated 2 warnings
    Finished release [optimized] target(s) in 44.25s

image

System (please complete the following information):

  • OS: Windows 10
  • Software:
    • python 3.12.2
    • cargo 1.76.0 (c84b36747 2024-01-18)
    • rustup 1.27.0 (bbb9276d2 2024-03-08)
    • rustc 1.76.0 (07dca489a 2024-02-04)

Additional context
Everything worked after copying the DLL to the correct name and location
copy target\release\ducohasher.dll ..\libducohasher.pyd

image

@profpandaa
Copy link
Contributor

Library "fixed" in https://github.com/EinWildesPanda/libducohash

PC_Miner.py certainly would need fixing (line 352), maybe others as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants