Django 1.11:Python 3.6升级导致SSL连接问题 [英] Django 1.11: Python 3.6 Upgrade causes issues with SSL connections

查看:48
本文介绍了Django 1.11:Python 3.6升级导致SSL连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在MacOS Sierra中将Django 1.10(Python 3.5)应用程序升级到Django 1.11(Python 3.6).

I just upgraded my Django 1.10 (Python 3.5) app to Django 1.11 (Python 3.6) in my MacOS Sierra.

大多数事情仍然有效,但是我意识到SSL连接无法像以前那样工作.我注意到了我的AWS S3服务和 python manage.py collectstatic 的一些问题.这些功能未连接到AWS或未通过AWS进行身份验证.

Most things still work, but I realized that SSL connections are not working the way they were before. I noticed it with some issues with my AWS S3 services and python manage.py collectstatic. These features are not connecting/being authenticated with AWS.

这是我第一次处理Django应用程序的更新,因此我不确定处理这些问题的正确方法.

This is the first time there I am dealing with an update for my Django app, so I'm not so sure about what is the right way dealing with those issues.

我做了一些研究,发现这是Mac上使用python 3.6产生的预期问题.

I did some research and found out that it was an expected issue coming from a Mac using python 3.6.

有人知道为此找到解决方案是否值得付出麻烦,或者只切换回python 3.5更好吗?

Does anyone know if it is worth the trouble finding a solution for this or is it better to just switch back to python 3.5?

根据Python 3.6 ReadMe.rft:

According to Python 3.6 ReadMe.rft:

证书验证和OpenSSL

NEW 现在,Python 3.6的此变体包括其自己的OpenSSL 1.0.2私有副本.与以前的版本不同,不再使用Apple提供的已弃用的OpenSSL库.这也意味着Python ssl模块不再将由Keychain Access应用程序和安全性命令行实用程序管理的系统和用户钥匙串中的信任证书用作默认值.对于3.6.0,/Applications/Python 3.6中包含一个示例命令脚本,用于从第三方certifi软件包(

NEW This variant of Python 3.6 now includes its own private copy of OpenSSL 1.0.2. Unlike previous releases, the deprecated Apple-supplied OpenSSL libraries are no longer used. This also means that the trust certificates in system and user keychains managed by the Keychain Access application and the security command line utility are no longer used as defaults by the Python ssl module. For 3.6.0, a sample command script is included in /Applications/Python 3.6 to install a curated bundle of default root certificates from the third-party certifi package (https://pypi.python.org/pypi/certifi). If you choose to use certifi, you should consider subscribing to the project's email update service to be notified when the certificate bundle is updated. The bundled pip included with the Python 3.6 installer has its own default certificate store for verifying download connections.

推荐答案

好的,我意识到我的项目出了什么问题.

Okay, I realized what was wrong with my project.

我与boto一起使用django-storages-redux.现在,我必须更新到boto3并使用django-storages库.

I was using django-storages-redux alongside with boto. Now I had to update to boto3 and use the django-storages library.

这篇关于Django 1.11:Python 3.6升级导致SSL连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆