Re: [openstack-dev] [devstack] issues with requiring python3 only tool?

2017-01-24 Thread Sean M. Collins
Sean Dague wrote:
> I'll probably still default this to python3, it is the future direction
> we are headed.

Works for me  :)

-- 
Sean M. Collins

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [devstack] issues with requiring python3 only tool?

2017-01-17 Thread Doug Hellmann
Excerpts from Sean Dague's message of 2017-01-17 11:50:39 -0500:
> On 01/17/2017 11:46 AM, Victor Stinner wrote:
> > Le 17/01/2017 à 17:36, Sean Dague a écrit :
> >> When putting the cli interface on it, I discovered python3's argparse
> >> has subparsers built in. This makes building up the cli much easier, and
> >> removes pulling in a dependency for that. (Currently the only item in
> >> requirements.txt is pbr). This is useful both from an ease to install,
> >> as well as overall runtime.
> > 
> > Do you mean the argparse module of the Python standard library? It is
> > available on Python 2.7. Subparsers are also supported on Python 2.7, no?
> > https://docs.python.org/2/library/argparse.html#sub-commands
> > 
> > If you need a more recent version of argparse on Python 2.7, you might try:
> > https://pypi.python.org/pypi/argparse
> > 
> > But I'm not sure that this third-party module is used on Python 2.7,
> > since import checks the stdlib before checking site-packages.
> 
> Hmm... I don't know how I missed that in the docs. I guess I was going
> code blind last night. I guess it should be easy to make it all work. I
> did specifically want to avoid installing pypi argparse.
> 
> I'll probably still default this to python3, it is the future direction
> we are headed.

+1

Doug

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [devstack] issues with requiring python3 only tool?

2017-01-17 Thread Sean Dague
On 01/17/2017 11:46 AM, Victor Stinner wrote:
> Le 17/01/2017 à 17:36, Sean Dague a écrit :
>> When putting the cli interface on it, I discovered python3's argparse
>> has subparsers built in. This makes building up the cli much easier, and
>> removes pulling in a dependency for that. (Currently the only item in
>> requirements.txt is pbr). This is useful both from an ease to install,
>> as well as overall runtime.
> 
> Do you mean the argparse module of the Python standard library? It is
> available on Python 2.7. Subparsers are also supported on Python 2.7, no?
> https://docs.python.org/2/library/argparse.html#sub-commands
> 
> If you need a more recent version of argparse on Python 2.7, you might try:
> https://pypi.python.org/pypi/argparse
> 
> But I'm not sure that this third-party module is used on Python 2.7,
> since import checks the stdlib before checking site-packages.

Hmm... I don't know how I missed that in the docs. I guess I was going
code blind last night. I guess it should be easy to make it all work. I
did specifically want to avoid installing pypi argparse.

I'll probably still default this to python3, it is the future direction
we are headed.

-Sean

-- 
Sean Dague
http://dague.net

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [devstack] issues with requiring python3 only tool?

2017-01-17 Thread Victor Stinner

Le 17/01/2017 à 17:36, Sean Dague a écrit :

When putting the cli interface on it, I discovered python3's argparse
has subparsers built in. This makes building up the cli much easier, and
removes pulling in a dependency for that. (Currently the only item in
requirements.txt is pbr). This is useful both from an ease to install,
as well as overall runtime.


Do you mean the argparse module of the Python standard library? It is 
available on Python 2.7. Subparsers are also supported on Python 2.7, no?

https://docs.python.org/2/library/argparse.html#sub-commands

If you need a more recent version of argparse on Python 2.7, you might try:
https://pypi.python.org/pypi/argparse

But I'm not sure that this third-party module is used on Python 2.7, 
since import checks the stdlib before checking site-packages.


Victor

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [devstack] issues with requiring python3 only tool?

2017-01-17 Thread Sean Dague
In attempting to get local.conf support into devstack-gate and grenade,
some of the more advanced merging scenarios of local.conf fragments have
surpassed anyone's desire and ability to do this in awk. So I started
down the path of moving the ini file and local.conf manipulation code
into a python tool that's currently being prototyped here -
https://github.com/sdague/devstack-tools

When putting the cli interface on it, I discovered python3's argparse
has subparsers built in. This makes building up the cli much easier, and
removes pulling in a dependency for that. (Currently the only item in
requirements.txt is pbr). This is useful both from an ease to install,
as well as overall runtime.

Short term, this is only going to be in grenade, which only runs on
Ubuntu today, where python3 is easy to have access to.

But as we expand this into devstack-gate and devstack, it will put a
hard python3 dependency on those environments. Is this an issue in the
Centos 7 land (or any other platforms)?

-Sean

-- 
Sean Dague
http://dague.net

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev