2015-10-16 16 views
2

Python中的twine包用於使用HTTP將內容上傳到PyPi。使用twine進行Python pkg上傳仍然有優勢嗎?

我已經在使用Python 2.7.9和twine自述文件說'只有最近Python 2.7.9停止使用HTTP'。

這是否意味着當我做python setup.py upload時,連接已經安全?如果答案是肯定的,twine是否爲上傳提供了額外的安全優勢?

回答

2
$ python --version 
Python 2.7.10 

$ cat /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/config.py 

class PyPIRCCommand(Command): 
    """Base command that knows how to handle the .pypirc file 
    """ 
    DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi' 

$ cat /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/upload.py 

repository = self.repository or self.DEFAULT_REPOSITORY 

... 

request = Request(self.repository, data=body, headers=headers) 

所以我想這是真的,distutils現在真的使用HTTPS。

但是纏繞還允許您在使用GPG密鑰上傳之前對包進行簽名。

相關問題