classification
Title: Notes about module load path
Type: enhancement Stage:
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Nam.Nguyen, docs@python, eric.araujo, eric.snow
Priority: normal Keywords: patch

Created on 2011-12-09 02:22 by Nam.Nguyen, last changed 2012-01-06 18:55 by Nam.Nguyen.

Files
File name Uploaded Description Edit
module.load.path.diff Nam.Nguyen, 2011-12-09 02:22 module load path review
Messages (5)
msg149071 - (view) Author: Nam Nguyen (Nam.Nguyen) * Date: 2011-12-09 02:22
A doc patch to remind Python embedder to set sys.path prior to Py_Initialize. This is to ensure a controlled module load path to work around these issues:

http://bugs.python.org/issue12989
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983
msg149169 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-12-10 16:35
Thanks for the patch, I will make a few wording/markup editions if you don’t mind and post the edited version.
msg149172 - (view) Author: Nam Nguyen (Nam.Nguyen) * Date: 2011-12-10 17:13
That would be great. Thank you.
msg150741 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-01-06 16:44
I did the markup edits but then found out that the doc for Py_Initialize in c-api/init already mentions the module load path and the module table, so I’m going to make another patch with just a link to that.
msg150760 - (view) Author: Nam Nguyen (Nam.Nguyen) * Date: 2012-01-06 18:55
Please do keep the warning though. It is best to warn in both Python-C Py_Initialize() document and the Embedding tutorial.
History
Date User Action Args
2012-01-06 18:55:10Nam.Nguyensetmessages: + msg150760
2012-01-06 18:27:48eric.snowsetnosy: + eric.snow
2012-01-06 16:44:50eric.araujosetmessages: + msg150741
2011-12-10 17:13:12Nam.Nguyensetmessages: + msg149172
2011-12-10 16:35:22eric.araujosetnosy: + eric.araujo

messages: + msg149169
versions: + Python 3.3, - Python 2.6, Python 3.1
2011-12-09 02:22:04Nam.Nguyencreate