Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'source,': 0.04; '(even': 0.05; 'that?': 0.05; 'subject:Python': 0.06; '21,': 0.07; 'incompatible': 0.07; 'app,': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'imports': 0.16; 'patches': 0.16; 'remix': 0.16; 'subject:dependencies': 0.16; 'subject:import': 0.16; 'wrote:': 0.18; 'module': 0.19; "hasn't": 0.19; 'slightly': 0.19; 'import': 0.22; 'cc:addr:python.org': 0.22; 'install': 0.23; 'of.': 0.24; 'versions': 0.24; 'cc:2**0': 0.24; 'this:': 0.26; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'change,': 0.30; 'nature': 0.30; 'message-id:@mail.gmail.com': 0.30; 'this.': 0.32; 'open': 0.33; 'fri,': 0.33; 'subject:the': 0.34; 'problem': 0.35; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'two': 0.37; 'project': 0.37; 'nov': 0.38; 'changed': 0.39; 'called': 0.40; 'how': 0.40; 'even': 0.60; 'solve': 0.60; 'subject:"': 0.60; 'name': 0.63; 'soon': 0.63; 'believe': 0.68; 'anything.': 0.68; 'subject:history': 0.84; 'to:none': 0.92; 'incorporated': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=wNW0aB4/wRf5chGzcN+79pw8NiY7GUDMkfrHkReGCpg=; b=dsOmCLhFg7ZqOxzpyB/SxdHRu6zJLpIfBR6/cgliXz6+nQxVv5VWobw63gHAYt3vVn xSOaLciZIlxIKyhT99nb62Tl03mMYJPuve97EQeE0um9ArvddvA8YDAa72FUFGM4Pa5q mcABsXOynGk58nzxrAi5mpRbTjC+bnTjSNbrrDTh0Hi/a2hjjKfV3sNRVucvp7QIKXnb xxYL6F9URO2xLAujk6PDLhsW7I1jC754UKMDsmRxQMTtVw4bTWYIpmM0fQydSw+SiIZ8 cKCOWQPdd5FNbd+VMAN1394vjofnEREGuxw6dqEiLhH/mx/KqC56o44ZAx8h/CkrCuxY EYYA== MIME-Version: 1.0 X-Received: by 10.107.136.92 with SMTP id k89mr1293391iod.43.1416529893766; Thu, 20 Nov 2014 16:31:33 -0800 (PST) In-Reply-To: References: <066c46c8-a04d-4489-b15a-b603c1b1818b@googlegroups.com> Date: Fri, 21 Nov 2014 11:31:33 +1100 Subject: Re: PyWart: "Python's import statement and the history of external dependencies" From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416529897 news.xs4all.nl 2855 [2001:888:2000:d::a6]:45822 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81153 On Fri, Nov 21, 2014 at 11:14 AM, alex23 wrote: >> 1. Name clashes! >> 2. Smaller name pool! > > Just off the top of my head, we have several solutions for this: > > 1) Rebinding imports > > import foo as foo2 To be fair to Rick, this doesn't actually solve anything. If you have two modules called "foo", you can't import one of them this way. But part of the problem is actually before you even get as far as importing: it's the nature of open source, forking, and the internet. There's a module called "remix", which one Peter Sobot forked and tweaked for his own use, and then distributed a slightly changed version of. (I believe the original intention was for the patches to be incorporated into trunk, but that hasn't happened as yet.) If you want to use his app, you need to use his tweaked remix module; if you want to use someone else's, you might need to use the original from upstream. What do you do about that? They're both called "remix". How do you import one or the other? How do you install one or the other? There is fundamentally no solution to this. As soon as there are two incompatible (even just slightly incompatible) versions of a project in the wild, people need to cope with it. It's the same with avconv vs ffmpeg, it's the same with wodim vs cdrecord, it's the same with all of them - until one of them undergoes a name change, everyone's stuck. ChrisA