bip-0069: Fix Python 3 compatibility by replacing deprecated cmp para… #1986

pull strmfos wants to merge 1 commits into bitcoin:master from strmfos:fix/bip-0069-python3-compatibility changing 1 files +4 −2
  1. strmfos commented at 6:23 am on September 25, 2025: contributor

    Replace deprecated cmp parameter in sorted() calls with key=cmp_to_key() to fix Python 3 compatibility. The cmp parameter was removed in Python 3.0.

    • Use functools.cmp_to_key() as the official migration path
    • Maintains identical sorting behavior across Python versions
    • Fixes: TypeError: ‘cmp’ is an invalid keyword argument for sorted()
  2. bip-0069: Fix Python 3 compatibility by replacing deprecated cmp parameter e502a3f489
  3. jonatack commented at 9:50 pm on September 25, 2025: member
    Thank you @strmfos for your proposal. However, it is a duplicate of #1943 that goes further (don’t hesitate to review it!), so closing here for now.
  4. jonatack closed this on Sep 25, 2025


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-10-27 15:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me