test/lint/lint-python.py thinks flake8 is not installed when it actually is #26792

issue kristapsk openend this issue on January 2, 2023
  1. kristapsk commented at 4:40 pm on January 2, 2023: contributor
    0$ ./test/lint/lint-python.py 
    1Skipping Python linting since flake8 is not installed.
    2$ flake8 --version
    35.0.4 (mccabe: 0.7.0, pycodestyle: 2.9.1, pyflakes: 2.5.0) CPython 3.10.9 on Linux
    

    If I try old lint-python.sh, it works.

  2. kristapsk added the label Bug on Jan 2, 2023
  3. jonatack commented at 6:42 pm on January 2, 2023: contributor
    Out of curiosity, do you still see the issue with the change at #26257? (Will rebase it.) Perhaps the dependencies need updating. Also, what is the result of running uname -a?
  4. kristapsk commented at 6:49 pm on January 2, 2023: contributor

    Also, what is the result of running uname -a?

    It’s Linux on x86_64 (Gentoo).

  5. maflcko commented at 9:17 am on January 3, 2023: member
    Previously the check was done with command flake8, now it is done via import pkg_resources
  6. maflcko added the label Tests on Jan 3, 2023
  7. maflcko commented at 9:26 am on January 3, 2023: member
    Unrelated: You’ll need the version specified in the script. Currently, flake8==4.0.1
  8. kristapsk commented at 9:38 am on January 3, 2023: contributor

    Figured out what’s happening. I have Python 3.8, 3.9 and 3.10 present in the system. The default is set to 3.8, but flake8 was installed only for 3.9 and 3.10. Also, flake8 5.0.4 works, but gives lots of E275 errors.

      0$ eselect python list
      1Available Python interpreters, in order of preference:
      2  [1]   python3.8
      3  [2]   python3.10
      4  [3]   python3.9
      5$ python --version
      6Python 3.8.15
      7$ sudo emerge -pv flake8
      8
      9These are the packages that would be merged, in order:
     10
     11Calculating dependencies... done!
     12[ebuild   R    ] dev-python/flake8-5.0.4::gentoo  USE="-doc -test" PYTHON_TARGETS="python3_9 python3_10 (-pypy3) -python3_8 -python3_11" 0 KiB
     13
     14Total: 1 package (1 reinstall), Size of downloads: 0 KiB
     15
     16$ python test/lint/lint-python.py 
     17Skipping Python linting since flake8 is not installed.
     18$ python3.10 test/lint/lint-python.py 
     19contrib/linearize/linearize-hashes.py:81:19: E275 missing whitespace after keyword
     20contrib/seeds/generate-seeds.py:73:23: E275 missing whitespace after keyword
     21contrib/seeds/generate-seeds.py:79:15: E275 missing whitespace after keyword
     22test/functional/feature_coinstatsindex.py:224:15: E275 missing whitespace after keyword
     23test/functional/feature_coinstatsindex.py:271:15: E275 missing whitespace after keyword
     24test/functional/feature_coinstatsindex.py:276:15: E275 missing whitespace after keyword
     25test/functional/feature_index_prune.py:65:19: E275 missing whitespace after keyword
     26test/functional/feature_index_prune.py:83:19: E275 missing whitespace after keyword
     27test/functional/feature_index_prune.py:90:19: E275 missing whitespace after keyword
     28test/functional/interface_usdt_utxocache.py:360:19: E275 missing whitespace after keyword
     29test/functional/interface_usdt_utxocache.py:361:19: E275 missing whitespace after keyword
     30test/functional/interface_usdt_validation.py:115:19: E275 missing whitespace after keyword
     31test/functional/mempool_fee_histogram.py:38:15: E275 missing whitespace after keyword
     32test/functional/mocks/invalid_signer.py:13:7: E275 missing whitespace after keyword
     33test/functional/mocks/signer.py:13:7: E275 missing whitespace after keyword
     34test/functional/p2p_addr_relay.py:52:15: E275 missing whitespace after keyword
     35test/functional/p2p_blocksonly.py:107:15: E275 missing whitespace after keyword
     36test/functional/p2p_getaddr_caching.py:63:15: E275 missing whitespace after keyword
     37test/functional/p2p_getaddr_caching.py:88:23: E275 missing whitespace after keyword
     38test/functional/p2p_getaddr_caching.py:89:23: E275 missing whitespace after keyword
     39test/functional/p2p_getaddr_caching.py:90:23: E275 missing whitespace after keyword
     40test/functional/p2p_getaddr_caching.py:122:15: E275 missing whitespace after keyword
     41test/functional/p2p_getaddr_caching.py:123:15: E275 missing whitespace after keyword
     42test/functional/p2p_getaddr_caching.py:124:15: E275 missing whitespace after keyword
     43test/functional/p2p_headers_sync_with_minchainwork.py:60:19: E275 missing whitespace after keyword
     44test/functional/p2p_headers_sync_with_minchainwork.py:72:19: E275 missing whitespace after keyword
     45test/functional/p2p_headers_sync_with_minchainwork.py:92:15: E275 missing whitespace after keyword
     46test/functional/p2p_message_capture.py:39:15: E275 missing whitespace after keyword
     47test/functional/p2p_message_capture.py:47:19: E275 missing whitespace after keyword
     48test/functional/rpc_blockchain.py:373:15: E275 missing whitespace after keyword
     49test/functional/rpc_rawtransaction.py:219:19: E275 missing whitespace after keyword
     50test/functional/rpc_rawtransaction.py:221:23: E275 missing whitespace after keyword
     51test/functional/rpc_rawtransaction.py:222:23: E275 missing whitespace after keyword
     52test/functional/rpc_rawtransaction.py:224:23: E275 missing whitespace after keyword
     53test/functional/rpc_rawtransaction.py:225:23: E275 missing whitespace after keyword
     54test/functional/rpc_rawtransaction.py:238:15: E275 missing whitespace after keyword
     55test/functional/rpc_rawtransaction.py:242:15: E275 missing whitespace after keyword
     56test/functional/rpc_scanblocks.py:49:15: E275 missing whitespace after keyword
     57test/functional/rpc_scanblocks.py:59:15: E275 missing whitespace after keyword
     58test/functional/rpc_scanblocks.py:63:15: E275 missing whitespace after keyword
     59test/functional/rpc_scanblocks.py:67:15: E275 missing whitespace after keyword
     60test/functional/rpc_scanblocks.py:71:15: E275 missing whitespace after keyword
     61test/functional/rpc_scanblocks.py:75:15: E275 missing whitespace after keyword
     62test/functional/rpc_scanblocks.py:92:15: E275 missing whitespace after keyword
     63test/functional/rpc_scanblocks.py:94:15: E275 missing whitespace after keyword
     64test/functional/test_framework/key.py:142:15: E275 missing whitespace after keyword
     65test/functional/test_framework/key.py:265:15: E275 missing whitespace after keyword
     66test/functional/test_framework/key.py:279:15: E275 missing whitespace after keyword
     67test/functional/test_framework/key.py:352:15: E275 missing whitespace after keyword
     68test/functional/test_framework/key.py:365:15: E275 missing whitespace after keyword
     69test/functional/test_framework/key.py:378:15: E275 missing whitespace after keyword
     70test/functional/test_framework/key.py:391:15: E275 missing whitespace after keyword
     71test/functional/test_framework/script.py:827:15: E275 missing whitespace after keyword
     72test/functional/test_framework/script.py:830:15: E275 missing whitespace after keyword
     73test/functional/test_framework/siphash.py:34:11: E275 missing whitespace after keyword
     74test/functional/test_framework/siphash.py:64:11: E275 missing whitespace after keyword
     75test/functional/wallet_avoidreuse.py:198:15: E275 missing whitespace after keyword
     76test/functional/wallet_backwards_compatibility.py:196:35: E275 missing whitespace after keyword
     77test/functional/wallet_backwards_compatibility.py:202:35: E275 missing whitespace after keyword
     78test/functional/wallet_backwards_compatibility.py:204:31: E275 missing whitespace after keyword
     79test/functional/wallet_backwards_compatibility.py:207:31: E275 missing whitespace after keyword
     80test/functional/wallet_bumpfee.py:560:11: E275 missing whitespace after keyword
     81test/functional/wallet_implicitsegwit.py:39:19: E275 missing whitespace after keyword
     82test/functional/wallet_importdescriptors.py:490:15: E275 missing whitespace after keyword
     83test/functional/wallet_importdescriptors.py:491:15: E275 missing whitespace after keyword
     84test/functional/wallet_reorgsrestore.py:97:15: E275 missing whitespace after keyword
     85test/functional/wallet_reorgsrestore.py:101:15: E275 missing whitespace after keyword
     86test/functional/wallet_send.py:282:15: E275 missing whitespace after keyword
     87test/functional/wallet_send.py:286:15: E275 missing whitespace after keyword
     88test/functional/wallet_signer.py:177:15: E275 missing whitespace after keyword
     89test/functional/wallet_signer.py:206:15: E275 missing whitespace after keyword
     90test/functional/wallet_signer.py:215:15: E275 missing whitespace after keyword
     91test/functional/wallet_signer.py:221:15: E275 missing whitespace after keyword
     92test/functional/wallet_taproot.py:247:15: E275 missing whitespace after keyword
     93test/functional/wallet_taproot.py:263:15: E275 missing whitespace after keyword
     94test/functional/wallet_taproot.py:265:15: E275 missing whitespace after keyword
     95test/functional/wallet_taproot.py:287:15: E275 missing whitespace after keyword
     96test/functional/wallet_taproot.py:289:15: E275 missing whitespace after keyword
     97test/functional/wallet_taproot.py:305:19: E275 missing whitespace after keyword
     98test/functional/wallet_taproot.py:310:15: E275 missing whitespace after keyword
     99test/functional/wallet_taproot.py:332:15: E275 missing whitespace after keyword
    100test/functional/wallet_taproot.py:334:15: E275 missing whitespace after keyword
    101test/functional/wallet_taproot.py:336:15: E275 missing whitespace after keyword
    102test/functional/wallet_taproot.py:338:15: E275 missing whitespace after keyword
    103test/functional/wallet_taproot.py:341:19: E275 missing whitespace after keyword
    104test/functional/wallet_taproot.py:378:19: E275 missing whitespace after keyword
    105test/functional/wallet_taproot.py:386:15: E275 missing whitespace after keyword
    
  9. fanquake commented at 9:42 am on January 3, 2023: member

    You’ll need the version specified in the script. Currently, flake8==4.0.1

    Closing as this isn’t an issue. If you want to run the linters, you need to use the same versions of dependencies as the CI. We cannot gaurantee that any other versions will “work”.

  10. fanquake closed this on Jan 3, 2023

  11. maflcko referenced this in commit 4bb840a453 on Jan 4, 2023
  12. sidhujag referenced this in commit 3eb0157842 on Jan 4, 2023
  13. bitcoin locked this on Jan 3, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-06-29 07:13 UTC

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