Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 12:55 PM, Random832 wrote: > > What about -S and putting "import site" explicitly in the test code? Or > would that go back to importing everything on people who have packages > installed? I think so, yes. > Really, there should be a

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Random832
On Fri, Aug 19, 2016, at 18:10, Chris Angelico wrote: > On Sat, Aug 20, 2016 at 8:07 AM, Sjoerd Job Postmus > wrote: > > I'd like to re-iterate my suggestion in case it was missed: split the > > current test in 2 tests: > > > > * Running with `-S` which is for checking that by

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 8:07 AM, Sjoerd Job Postmus wrote: > I'd like to re-iterate my suggestion in case it was missed: split the > current test in 2 tests: > > * Running with `-S` which is for checking that by default the collections > are not imported. (Which is what is

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 7:55 AM, Chris Angelico wrote: > If I make a patch to do that, would it have a good chance of being accepted? > Shortcut. I've made the patch and put it on the tracker. http://bugs.python.org/issue27807 Either it's accepted or it's not :) Thank you

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Sjoerd Job Postmus
On Aug 19, 2016 11:10 PM, Chris Angelico wrote: > > On Sat, Aug 20, 2016 at 5:33 AM, Brett Cannon wrote: > >> Hmmm. So the question is, what is this test testing? > > > > > > It's making sure people who work on the modules that are imported during > >

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 7:34 AM, Brett Cannon wrote: >> 1) Demand that .pth files restrict themselves to what's already >> imported. This means startup is still fast even if you have a bunch of >> pths. Downside: Third-party code can break Python's rules. Upside: >> When they

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Steve Dower
On 19Aug2016 1410, Chris Angelico wrote: 2) Change the test to somehow disable .pth execution while keeping the rest of site.py intact. This gives more consistent test results, but still is mostly applicable to normal usage. If you start the process with "-S", then run: import site

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Brett Cannon
On Fri, 19 Aug 2016 at 14:11 Chris Angelico wrote: > On Sat, Aug 20, 2016 at 5:33 AM, Brett Cannon wrote: > >> Hmmm. So the question is, what is this test testing? > > > > > > It's making sure people who work on the modules that are imported during > >

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 5:33 AM, Brett Cannon wrote: >> Hmmm. So the question is, what is this test testing? > > > It's making sure people who work on the modules that are imported during > startup don't accidentally add another module dependency to the startup > sequence.

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Brett Cannon
On Fri, 19 Aug 2016 at 09:47 Chris Angelico wrote: > On Sat, Aug 20, 2016 at 2:25 AM, Steve Dower > wrote: > > On 19Aug2016 0910, Chris Angelico wrote: > >> > >> On Sat, Aug 20, 2016 at 1:26 AM, Steve Dower > >> wrote: > >>> >

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Sjoerd Job Postmus
On Aug 19, 2016 6:46 PM, Chris Angelico wrote: > > On Sat, Aug 20, 2016 at 2:25 AM, Steve Dower wrote: > > On 19Aug2016 0910, Chris Angelico wrote: > >> > >> On Sat, Aug 20, 2016 at 1:26 AM, Steve Dower > >> wrote: > >>> > >>>

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 2:25 AM, Steve Dower wrote: > On 19Aug2016 0910, Chris Angelico wrote: >> >> On Sat, Aug 20, 2016 at 1:26 AM, Steve Dower >> wrote: >>> >>> Check any .pth files you can find. I suspect mpl_toolkits has some magic >>> in >>>

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Terry Reedy
On 8/19/2016 12:10 PM, Chris Angelico wrote: On Sat, Aug 20, 2016 at 1:26 AM, Steve Dower wrote: Check any .pth files you can find. I suspect mpl_toolkits has some magic in it to make the namespace package work on 2.7. sys.path ['/usr/local/lib/python36.zip',

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Terry Reedy
On 8/19/2016 10:13 AM, Chris Angelico wrote: On my main dev system (Debian Stretch), I've had a single long-standing test failure - test_site.py, StartupImportTests.test_startup_imports. It's annoying (partly because it's such a noisy failure), and doesn't appear to be happening on the

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Steve Dower
On 19Aug2016 0910, Chris Angelico wrote: On Sat, Aug 20, 2016 at 1:26 AM, Steve Dower wrote: Check any .pth files you can find. I suspect mpl_toolkits has some magic in it to make the namespace package work on 2.7. $ cat

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 1:26 AM, Steve Dower wrote: > Check any .pth files you can find. I suspect mpl_toolkits has some magic in > it to make the namespace package work on 2.7. >>> sys.path ['/usr/local/lib/python36.zip', '/home/rosuav/cpython/Lib',

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 12:31 AM, Random832 wrote: > the -v output might be helpful in determining what is causing these > modules to be imported. It would at least show what order they're > imported in. Here it is in all its spammy glory. rosuav@sikorsky:~/cpython$

Re: [Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Random832
On Fri, Aug 19, 2016, at 10:13, Chris Angelico wrote: > On my main dev system (Debian Stretch), I've had a single > long-standing test failure - test_site.py, > StartupImportTests.test_startup_imports. It's annoying (partly because > it's such a noisy failure), and doesn't appear to be happening

[Python-Dev] Failures in test_site.py - how to debug?

2016-08-19 Thread Chris Angelico
On my main dev system (Debian Stretch), I've had a single long-standing test failure - test_site.py, StartupImportTests.test_startup_imports. It's annoying (partly because it's such a noisy failure), and doesn't appear to be happening on the buildbots, nor presumably on core devs' computers, so