[openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-27 Thread Sean Dague
So this change came in with adding glance.store - https://review.openstack.org/#/c/115265/5/lib/glance, which I think is a bad direction to be headed. Here is the problem when it comes to working with code from git, in python, that uses namespaces, it's kind of a hack that violates the principle o

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-27 Thread Ben Nemec
On 08/27/2014 09:31 AM, Sean Dague wrote: > So this change came in with adding glance.store - > https://review.openstack.org/#/c/115265/5/lib/glance, which I think is a > bad direction to be headed. > > Here is the problem when it comes to working with code from git, in > python, that uses namespa

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-27 Thread Chris Dent
On Wed, 27 Aug 2014, Sean Dague wrote: Here is the problem when it comes to working with code from git, in python, that uses namespaces, it's kind of a hack that violates the principle of least surprise. It's true this problem does happen... So I'd like us to revisit using a namespace for gl

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-27 Thread Flavio Percoco
On 08/27/2014 04:31 PM, Sean Dague wrote: > So this change came in with adding glance.store - > https://review.openstack.org/#/c/115265/5/lib/glance, which I think is a > bad direction to be headed. > > Here is the problem when it comes to working with code from git, in > python, that uses namespa

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-27 Thread Doug Hellmann
On Aug 27, 2014, at 10:31 AM, Sean Dague wrote: > So this change came in with adding glance.store - > https://review.openstack.org/#/c/115265/5/lib/glance, which I think is a > bad direction to be headed. > > Here is the problem when it comes to working with code from git, in > python, that use

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-27 Thread Sean Dague
On 08/27/2014 11:14 AM, Flavio Percoco wrote: > On 08/27/2014 04:31 PM, Sean Dague wrote: >> So this change came in with adding glance.store - >> https://review.openstack.org/#/c/115265/5/lib/glance, which I think is a >> bad direction to be headed. >> >> Here is the problem when it comes to workin

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-27 Thread Doug Hellmann
On Aug 27, 2014, at 11:14 AM, Flavio Percoco wrote: > On 08/27/2014 04:31 PM, Sean Dague wrote: >> So this change came in with adding glance.store - >> https://review.openstack.org/#/c/115265/5/lib/glance, which I think is a >> bad direction to be headed. >> >> Here is the problem when it comes

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-27 Thread Donald Stufft
> On Aug 27, 2014, at 11:45 AM, Doug Hellmann wrote: > > > On Aug 27, 2014, at 10:31 AM, Sean Dague > wrote: > >> So this change came in with adding glance.store - >> https://review.openstack.org/#/c/115265/5/lib/glance, which I think is a >> bad direction to be headed.

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-27 Thread Doug Hellmann
On Aug 27, 2014, at 11:55 AM, Donald Stufft wrote: >> >> On Aug 27, 2014, at 11:45 AM, Doug Hellmann wrote: >> >> >> On Aug 27, 2014, at 10:31 AM, Sean Dague wrote: >> >>> So this change came in with adding glance.store - >>> https://review.openstack.org/#/c/115265/5/lib/glance, which I th

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-27 Thread James E. Blair
Sean Dague writes: > On 08/27/2014 11:14 AM, Flavio Percoco wrote: >> On 08/27/2014 04:31 PM, Sean Dague wrote: >> 1. Do a partial rename and then complete it after the glance migration >> is done. If I'm not missing anything, we should be able to do something >> like: >> - Rename the projec

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-28 Thread Flavio Percoco
On 08/27/2014 05:52 PM, Doug Hellmann wrote: > > On Aug 27, 2014, at 11:14 AM, Flavio Percoco wrote: > >> On 08/27/2014 04:31 PM, Sean Dague wrote: >>> So this change came in with adding glance.store - >>> https://review.openstack.org/#/c/115265/5/lib/glance, which I think is a >>> bad direction

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-28 Thread Flavio Percoco
On 08/27/2014 09:18 PM, James E. Blair wrote: > Sean Dague writes: > >> On 08/27/2014 11:14 AM, Flavio Percoco wrote: >>> On 08/27/2014 04:31 PM, Sean Dague wrote: >>> 1. Do a partial rename and then complete it after the glance migration >>> is done. If I'm not missing anything, we should be abl

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-28 Thread Radomir Dopieralski
On 27/08/14 16:31, Sean Dague wrote: [snip] > In python 2.7 (using pip) namespaces are a bolt on because of the way > importing modules works. And depending on how you install things in a > namespace will overwrite the base __init__.py for the top level part of > the namespace in such a way that

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-28 Thread Radomir Dopieralski
On 28/08/14 12:41, Radomir Dopieralski wrote: > On 27/08/14 16:31, Sean Dague wrote: > > [snip] > >> In python 2.7 (using pip) namespaces are a bolt on because of the way >> importing modules works. And depending on how you install things in a >> namespace will overwrite the base __init__.py for

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-28 Thread Flavio Percoco
On 08/28/2014 12:50 PM, Radomir Dopieralski wrote: > On 28/08/14 12:41, Radomir Dopieralski wrote: >> On 27/08/14 16:31, Sean Dague wrote: >> >> [snip] >> >>> In python 2.7 (using pip) namespaces are a bolt on because of the way >>> importing modules works. And depending on how you install things i

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-28 Thread Doug Hellmann
On Aug 28, 2014, at 6:41 AM, Radomir Dopieralski wrote: > On 27/08/14 16:31, Sean Dague wrote: > > [snip] > >> In python 2.7 (using pip) namespaces are a bolt on because of the way >> importing modules works. And depending on how you install things in a >> namespace will overwrite the base __i

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-08-28 Thread Sean Dague
On 08/28/2014 12:22 PM, Doug Hellmann wrote: > > On Aug 28, 2014, at 6:41 AM, Radomir Dopieralski > wrote: > >> On 27/08/14 16:31, Sean Dague wrote: >> >> [snip] >> >>> In python 2.7 (using pip) namespaces are a bolt on because of the way >>> importing modules works. And depending on how you in

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-09-23 Thread Robert Collins
On 29 August 2014 04:42, Sean Dague wrote: > On 08/28/2014 12:22 PM, Doug Hellmann wrote: ... >> The problem is that the setuptools implementation of namespace packages >> breaks in a way that is repeatable but difficult to debug when a common >> OpenStack installation pattern is used. So the fi

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-09-23 Thread Mike Bayer
On Sep 23, 2014, at 7:03 PM, Robert Collins wrote: > On 29 August 2014 04:42, Sean Dague wrote: >> On 08/28/2014 12:22 PM, Doug Hellmann wrote: > ... >>> The problem is that the setuptools implementation of namespace packages >>> breaks in a way that is repeatable but difficult to debug when a

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-09-23 Thread Robert Collins
Nuts, thank you. On 24 September 2014 14:28, Mike Bayer wrote: > > On Sep 23, 2014, at 7:03 PM, Robert Collins wrote: > >> On 29 August 2014 04:42, Sean Dague wrote: >>> On 08/28/2014 12:22 PM, Doug Hellmann wrote: >> ... The problem is that the setuptools implementation of namespace packa

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-09-25 Thread Robert Collins
On 24 September 2014 11:03, Robert Collins wrote: > So... FWIW I think I've got a cleaner implementation of namespaces > *for our context* - it takes inspiration from the PEP-420 discussion > and final design. It all started when Mike reported issues with testr > to me. > > https://bugs.launchpad

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-09-26 Thread Doug Hellmann
On Sep 25, 2014, at 6:14 PM, Robert Collins wrote: > On 24 September 2014 11:03, Robert Collins wrote: > >> So... FWIW I think I've got a cleaner implementation of namespaces >> *for our context* - it takes inspiration from the PEP-420 discussion >> and final design. It all started when Mike r

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-09-26 Thread Doug Hellmann
On Sep 23, 2014, at 7:03 PM, Robert Collins wrote: > On 29 August 2014 04:42, Sean Dague wrote: >> On 08/28/2014 12:22 PM, Doug Hellmann wrote: > ... >>> The problem is that the setuptools implementation of namespace packages >>> breaks in a way that is repeatable but difficult to debug when a

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-09-29 Thread Robert Collins
>> Now, as I say, I can fix this quite easily with a virtualenv aware pth >> file, but since its broken today and AFAIK there isn't a bug open >> about this, I think it will be fine. > > The breaking case was having a package installed editable in the global > site-packages and then installing ano

Re: [openstack-dev] [all] [glance] python namespaces considered harmful to development, lets not introduce more of them

2014-09-29 Thread Robert Collins
On 30 September 2014 14:05, Robert Collins wrote: > I'm poking around now. It looks like pip install -e outside a venv > writes to /usr/local/lib/python2.7/dist-packages, which is pure crack > - dist-packages is for the distro, site-packages for pip. Sigh. Also > writing to /usr/local/lib when th