qd-today / qd

QD [v20240210] —— HTTP请求定时任务自动执行框架 base on HAR Editor and Tornado Server
https://qd-today.github.io/qd/
MIT License
4.2k stars 546 forks source link

[Bug] python3.9貌似不兼容了 #508

Closed Doublefire-Chen closed 6 months ago

Doublefire-Chen commented 6 months ago

Verify steps

QD Version

20240210

Bug on OS

Linux

Bug on Platform

Code Build/Linux 64位

To Reproduce

环境:Ubuntu22.04, Python 3.9.5 使用源码安装,python run.py

Describe the Bug

报错:

Traceback (most recent call last):
  File "/var/www/sign/run.py", line 18, in <module>
    from db import DB, db_converter
  File "/var/www/sign/db/__init__.py", line 13, in <module>
    from db.redisdb import RedisDB
  File "/var/www/sign/db/redisdb.py", line 14, in <module>
    from libs.utils import is_lan
  File "/var/www/sign/libs/utils.py", line 84, in <module>
    def varbinary2ip(addr: bytes | int | str):
TypeError: unsupported operand type(s) for |: 'type' and 'type'

QD config

No response

QD log

Traceback (most recent call last):
  File "/var/www/sign/run.py", line 18, in <module>
    from db import DB, db_converter
  File "/var/www/sign/db/__init__.py", line 13, in <module>
    from db.redisdb import RedisDB
  File "/var/www/sign/db/redisdb.py", line 14, in <module>
    from libs.utils import is_lan
  File "/var/www/sign/libs/utils.py", line 84, in <module>
    def varbinary2ip(addr: bytes | int | str):
TypeError: unsupported operand type(s) for |: 'type' and 'type'


### Expected behavior

也许要更新一下wiki了,我后来使用python3.11可以跑,3.10没试过,应该也可以。

### Screenshots

_No response_
Doublefire-Chen commented 6 months ago

附上wiki地址:https://qd-today.github.io/qd/zh_CN/guide/deployment.html#:~:text=Version%20%3E%3D%20python3.9

acooler15 commented 6 months ago

3.10是支持的,这个Union新写法是3.10引入的