[openstack-dev] [neutron] clean up your git checkout!

Amrith Kumar amrith at tesora.com
Fri Sep 30 19:01:58 UTC 2016


Clark,

I'm not sure what question you are answering but my question was more about the 

	PYTHONDONTWRITEBYTECODE = 1

setting. I assumed that this meant that the .pyc's wouldn't be created.

Did I misunderstand that?

	git clean -f -x -d

does in fact clean out the .tox directory. 

-amrith
 
> -----Original Message-----
> From: Clark Boylan [mailto:cboylan at sapwetik.org]
> Sent: Friday, September 30, 2016 2:50 PM
> To: openstack-dev at lists.openstack.org
> Subject: Re: [openstack-dev] [neutron] clean up your git checkout!
> 
> I want to say this happens if .tox is in your gitignore list. Just run
> tox with the -r flag which will rebuild the tox envs.
> 
> Clark
> 
> On Fri, Sep 30, 2016, at 11:22 AM, Amrith Kumar wrote:
> > I tried that but even with it in place, a .tox directory with a ton of
> > .pyc's was left around after the test.
> >
> > I'm assuming that this is OK?
> >
> > -amrith
> >
> > > -----Original Message-----
> > > From: John Villalovos [mailto:openstack.org at sodarock.com]
> > > Sent: Friday, September 30, 2016 1:57 PM
> > > To: OpenStack Development Mailing List (not for usage questions)
> > > <openstack-dev at lists.openstack.org>
> > > Subject: Re: [openstack-dev] [neutron] clean up your git checkout!
> > >
> > > Projects may want to add to their tox.ini something like this:
> > >
> > >
> https://github.com/openstack/ironic/blob/c445c19285c2f3ee6a099f9f7473dd6fe
> > > 087116b/tox.ini#L10
> > >
> > > Basically add:
> > > PYTHONDONTWRITEBYTECODE = 1
> > >
> > > On Fri, Sep 30, 2016 at 7:20 AM, Ihar Hrachyshka <ihrachys at redhat.com>
> > > wrote:
> > > > Michał Dulko <michal.dulko at intel.com> wrote:
> > > >
> > > >> On 09/30/2016 04:06 PM, Ihar Hrachyshka wrote:
> > > >>>
> > > >>> Ihar Hrachyshka <ihrachys at redhat.com> wrote:
> > > >>>
> > > >>>> Hi all,
> > > >>>>
> > > >>>> today we landed https://review.openstack.org/#/c/269658/ (huge!)
> that
> > > >>>> removed neutron/objects/network/ directory and replaced it with
> > > >>>> neutron/objects/network.py file. Though it makes python that sees
> old
> > > >>>> .pyc files sad:
> > > >>>>
> > > >>>> Failed to import test module:
> neutron.tests.unit.objects.test_network
> > > >>>> Traceback (most recent call last):
> > > >>>>   File
> > > >>>>
> > > >>>> "/home/vagrant/git/neutron/.tox/py27/lib/python2.7/site-
> > > packages/unittest2/loader.py",
> > > >>>> line 456, in _find_test_path
> > > >>>>     module = self._get_module_from_name(name)
> > > >>>>   File
> > > >>>>
> > > >>>> "/home/vagrant/git/neutron/.tox/py27/lib/python2.7/site-
> > > packages/unittest2/loader.py",
> > > >>>> line 395, in _get_module_from_name
> > > >>>>     __import__(name)
> > > >>>>   File "neutron/tests/unit/objects/test_network.py", line 23, in
> > > >>>> <module>
> > > >>>>     obj_test_base.BaseObjectIfaceTestCase):
> > > >>>>   File "neutron/tests/unit/objects/test_network.py", line 24, in
> > > >>>> NetworkPortSecurityIfaceObjTestCase
> > > >>>>     _test_class = network.NetworkPortSecurity
> > > >>>> AttributeError: 'module' object has no attribute
> > > 'NetworkPortSecurity'
> > > >>>> The test run didn't actually run any tests
> > > >>>>
> > > >>>> Please run git clean -f -x in your checkout to remove all .pyc
> files.
> > > >>>> This should solve any import issues you may experience due to the
> new
> > > >>>> patch.
> > > >>>
> > > >>>
> > > >>> I hear that -f -x is not enough. Please add -d too:
> > > >>>
> > > >>> $ git clean -f -x -d
> > > >>>
> > > >>> Ihar
> > > >>
> > > >>
> > > >> Isn't ``find . -name \*.pyc -delete`` enough? That way you won't
> remove
> > > >> anything else. In Cinder we have that in tox.ini [1].
> > > >>
> > > >> [1]
> > > >>
> > > >>
> > >
> https://github.com/openstack/cinder/blob/792108f771607b75a25e9c4cfaaa26e50
> > > 39d1748/tox.ini#L21-L21
> > > >
> > > >
> > > > Actually not, because empty directories won’t be cleaned by the
> command
> > > you
> > > > suggested.
> > > >
> > > > Ihar
> > > >
> > > >
> > > >
> > >
> __________________________________________________________________________
> > > > OpenStack Development Mailing List (not for usage questions)
> > > > Unsubscribe: OpenStack-dev-
> > > request at lists.openstack.org?subject:unsubscribe
> > > > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> > >
> > >
> __________________________________________________________________________
> > > OpenStack Development Mailing List (not for usage questions)
> > > Unsubscribe: OpenStack-dev-
> request at lists.openstack.org?subject:unsubscribe
> > > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
> __________________________________________________________________________
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> > OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


More information about the OpenStack-dev mailing list