karask / python-bitcoin-utils

Library to interact with the Bitcoin network. Ideal for low-level learning and experimenting.
MIT License
270 stars 101 forks source link

Please allow some flexibility for dependency versions #22

Closed comtom closed 2 years ago

comtom commented 2 years ago

For projects that depend on the libraries that bitconutils uses, it is very possible that there are conflicting dependencies causing the project to fail to install. With pip install usually it only prints a warning in the terminal, but if the main project uses pipenv or poetry such a conflict will prevent to install any dependency.

Reason of this issue is in setup.py. Instead of:

      install_requires=[
          'base58check==1.0.2',
          'ecdsa==0.17.0',
          'sympy==1.3',
          'python-bitcoinrpc==1.0'
      ],

can be

      install_requires=[
          'base58check>=1.0.0,<1.0.3',
          'ecdsa>=0.12.0,<0.18.0',
          'sympy>=1.2,<1.4',
          'python-bitcoinrpc>=1.0',<2.0
      ],

These ranges should be replaced too in requirements.txt

karask commented 2 years ago

I had issues with breaking changes in the past so I fixed the versions so as to make sure it is stable.

Still, I relaxed the requirements somewhat (for future upgrades mostly) except for ecdsa where I would need to test explicitly even for future versions.

If you have problems with a specific older version let me know and I will (test it first and) add it to the setup.py as required.

comtom commented 2 years ago

thanks, in my case I would need to relax ecdsa and sympy requirements a little bit. In general when there is a breaking change a library should increase their major version number. Although I understand that is still necessary to test, should be "safe" for most cases.

karask commented 2 years ago

The major version number wrt breaking changes does not apply to 0.x.x. That is actually where I had the problem previously (ecdsa).

I believe 'sympy>=1.2,<1.4' would be fine but in ecdsa I am afraid that I cannot even move it to 0.16 (although I will try if that would help).

I will not relax the requirements randomly. Please let me know exact version numbers of specific libraries and I will see if I can help.

karask commented 2 years ago

I noticed that I already did relax everything except ecdsa.

comtom commented 2 years ago

thanks I think is good for now. I'm closing this issue