stjet/bananopie

Requires Python 3.11, not >=3.5 as the pypi docs say

Closed this issue · 7 comments

A recent update uses list[str] as current PEP guidelines suggest (rpc.py, line 28). However, this breaks python installs prior to 3.11

https://stackoverflow.com/questions/75695843/is-liststr-an-iterable

(I just updated my VMs to Python 3.11, so it doesn't affect my projects personally, but recommend updating the pypi docs to specify this)

Ex: def get_blocks(self, blocks: list[str]):

Full error from Ubuntu 20.04 running python 3.8.10

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/bananopie/__init__.py", line 1, in <module>
    from .rpc import RPC
  File "/usr/local/lib/python3.8/dist-packages/bananopie/rpc.py", line 3, in <module>
    class RPC:
  File "/usr/local/lib/python3.8/dist-packages/bananopie/rpc.py", line 28, in RPC
    def get_blocks(self, blocks: list[str]):
TypeError: 'type' object is not subscriptable

Oh and here are the pypi docs that say >=3.5

https://pypi.org/project/bananopie/

stjet commented

Good catch! I might remove those type definitions to support lower versions.

I would agree with that, probably want to support 3.6+

stjet commented

@elementalennui-dev Should be fixed, I removed the list type annotations, let me know if that is not the case

stjet commented

Goddamn I knew I forgot one

stjet commented

Ok, now it should be fixed. Augh.