Bitcoin and other Cryptocurrencies Library for Python. Includes a fully functional wallet, Mnemonic key generation and management and connection with various service providers to receive and send blockchain and transaction information.
In config/config.py on line 123 and 127, the result of locale.getpreferredencoding() is compared against "UTF-8" with a not equal comparison. This should be updated to be locale.getpreferredencoding() not in ('UTF-8', 'utf-8') instead. I'm not sure if this is a Python-specific change or something with my OS, but after upgrading to Python 3.11, locale.getpreferredencoding() returns the lowercase "utf-8" as opposed to "UTF-8". This is not incorrect, although because bitcoinlib is only checking against the uppercase version, this check fails. Comparing against both would expand bitcoinlib's general usability across Python versions, variations, and operating systems.
In
config/config.py
on line 123 and 127, the result oflocale.getpreferredencoding()
is compared against"UTF-8"
with a not equal comparison. This should be updated to belocale.getpreferredencoding() not in ('UTF-8', 'utf-8')
instead. I'm not sure if this is a Python-specific change or something with my OS, but after upgrading to Python 3.11,locale.getpreferredencoding()
returns the lowercase"utf-8"
as opposed to"UTF-8"
. This is not incorrect, although becausebitcoinlib
is only checking against the uppercase version, this check fails. Comparing against both would expandbitcoinlib
's general usability across Python versions, variations, and operating systems.