Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; '(except': 0.07; 'subject:file': 0.07; 'lawrence': 0.09; 'pep': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tismer': 0.09; 'python': 0.11; '3.3,': 0.16; 'behaviour.': 0.16; 'it),': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'rewritten': 0.16; 'url:peps': 0.16; 'url:whatsnew': 0.16; 'language': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'mechanism': 0.19; 'written': 0.21; 'programming': 0.22; 'import': 0.22; 'header :User-Agent:1': 0.23; 'url:dev': 0.24; 'second': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'url:bugs': 0.29; '(although': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'url:python': 0.33; 'bugs': 0.33; 'but': 0.35; 'there': 0.35; 'url:org': 0.36; 'list': 0.37; 'christian': 0.38; 'to:addr:python- list': 0.38; 'rather': 0.38; 'does': 0.39; 'moving': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'most': 0.60; 'full': 0.61; 'url:3': 0.61; 'world.': 0.61; 'nobody': 0.68; '3.4': 0.84; 'received:89': 0.85 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Importing by file name Date: Sun, 24 Nov 2013 16:30:27 +0000 References: <52920a19$0$29993$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-89-240-173-71.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: <52920a19$0$29993$c3e8da3$5496439d@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1385310641 news.xs4all.nl 15931 [2001:888:2000:d::a6]:44719 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60387 On 24/11/2013 14:15, Steven D'Aprano wrote: > > That was the case up to 3.3, but Python 3.4 has the import machinery re- > written in pure Python (except for a tiny bit of bootstrapping machinery, > if I understand correctly). I understand that nobody understood the > import machinery in full (although there were a couple of people who > understood most of it), and that moving it to Python was a Herculean job. > If I remember correctly, it uncovered a number of undetected bugs and > dark corners with unspecified behaviour. > The import mechanism was rewritten in 3.3 see http://docs.python.org/3/whatsnew/3.3.html#importlib. PEP 451 also does work on the import mechanism http://www.python.org/dev/peps/pep-0451/ This is in 3.4, see http://bugs.python.org/issue18864 and a rather long list of associated issues. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence