gpt4 book ai didi

python - PyAPNs 1.1.2 版本没有增强关键字?

转载 作者:行者123 更新时间:2023-12-01 05:02:32 25 4
gpt4 key购买 nike

我确信这是显而易见的,但我错过了。我已经通过 pip 安装了 PyAPN:

# pip install apns

然后,当我尝试在 APN 中使用“增强”标志时,它不存在。

# python
Python 2.7.6 (default, Nov 11 2013, 18:34:29)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from apns import APNs
>>> server = APNs(use_sandbox=True, cert_file=“/mydir/apns-dev-cert.pem", key_file=“/mydir/apns-dev-key.pem", enhanced=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() got an unexpected keyword argument 'enhanced'
>>>

果然 pip 安装的 1.1.2 版本没有这个关键字。但我认为这是 PyAPNs 存储库中最新发布的版本 https://github.com/djacobs/PyAPNs .

我想使用“enhanced”关键字来进行错误检查。有什么想法吗?

最佳答案

版本 1.1.2 目前可在 PyPI 上获取不为 APNs 类提供增强参数(请参阅 source )。

如果您需要此功能,请直接从 github(主分支)安装该模块:

pip install git+https://github.com/djacobs/PyAPNs.git

请注意,他们尚未更新 setup.py 中的软件包版本,所以,如果你已经安装了这个模块,请先卸载它,然后从 github 安装它:

pip uninstall apns
pip install git+https://github.com/djacobs/PyAPNs.git

关于python - PyAPNs 1.1.2 版本没有增强关键字?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25771589/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com