Re: [openstack-dev] Sphinx testing fun
On Thu, 2018-10-04 at 18:00 -0400, Doug Hellmann wrote: > Stephen Finucane writes: > > > On Thu, 2018-10-04 at 07:21 -0400, Doug Hellmann wrote: > > > Stephen Finucane writes: > > [snip] > > > > > Anyway, we can go figure out what's changed here and handle it but this > > > > is, at best, going to be a band aid. The fact is 'sphinx_testing' is > > > > unmaintained and has been for some time now. The new hotness is > > > > 'sphinx.testing' [3], which is provided (with zero documentation) as > > > > part of Sphinx. Unfortunately, this uses pytest fixtures [4] which I'm > > > > pretty sure Monty (and a few others?) are vehemently against using in > > > > OpenStack. That leaves us with three options: > > > > > > > > * Take over 'sphinx_testing' and bring it up-to-date. Maintain > > > >forever. > > > > * Start using 'sphinx.testing' and everything it comes with > > > > * Delete any tests that use 'sphinx_testing' and deal with the lack of > > > >coverage > > > > > > Could we change our tests to use pathlib to wrap app.outdir and get the > > > same results as before? > > > > That's what I've done [2], which is kind of based on how I fixed this > > in Sphinx. However, this is at best a stopgap. The fact remains that > > 'sphinx_testing' is dead and the large changes that Sphinx is > > undergoing (2.0 will be Python 3 only, with multiple other fixes) will > > make further breakages more likely. Unless we want a repeat of the Mox > > situation, I do think we should start thinking about this sooner rather > > than later. > > Yeah, it sounds like we need to deal with the change. > > It looks like only the os-api-ref repo uses sphinx-testing. How many > tests are we talking about having to rewrite/update there? > > Doug That's good news. I'd expected other projects would use it but then nothing I've worked on does (and that likely constitutes a large percentage of Sphinx extensions in OpenStack). I see four failing tests so I guess, if they break again, we can opt for option 3 above and deal with it. I can't see os-api-ref changing too much in the future (barring adding PDF support at some point). Stephen __ 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] Sphinx testing fun
Stephen Finucane writes: > On Thu, 2018-10-04 at 07:21 -0400, Doug Hellmann wrote: >> Stephen Finucane writes: [snip] >> > Anyway, we can go figure out what's changed here and handle it but this >> > is, at best, going to be a band aid. The fact is 'sphinx_testing' is >> > unmaintained and has been for some time now. The new hotness is >> > 'sphinx.testing' [3], which is provided (with zero documentation) as >> > part of Sphinx. Unfortunately, this uses pytest fixtures [4] which I'm >> > pretty sure Monty (and a few others?) are vehemently against using in >> > OpenStack. That leaves us with three options: >> > >> > * Take over 'sphinx_testing' and bring it up-to-date. Maintain >> >forever. >> > * Start using 'sphinx.testing' and everything it comes with >> > * Delete any tests that use 'sphinx_testing' and deal with the lack of >> >coverage >> >> Could we change our tests to use pathlib to wrap app.outdir and get the >> same results as before? > > That's what I've done [2], which is kind of based on how I fixed this > in Sphinx. However, this is at best a stopgap. The fact remains that > 'sphinx_testing' is dead and the large changes that Sphinx is > undergoing (2.0 will be Python 3 only, with multiple other fixes) will > make further breakages more likely. Unless we want a repeat of the Mox > situation, I do think we should start thinking about this sooner rather > than later. Yeah, it sounds like we need to deal with the change. It looks like only the os-api-ref repo uses sphinx-testing. How many tests are we talking about having to rewrite/update there? 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] Sphinx testing fun
On Thu, 2018-10-04 at 07:21 -0400, Doug Hellmann wrote: > Stephen Finucane writes: > > > The tests in os-api-ref recently broke: > > > > > > http://logs.openstack.org/62/606362/1/check/openstack-tox-py35/8b709de/testr_results.html.gz > > > > Specifically, we're seeing errors likes this: > > > > ft1.1: > > os_api_ref.tests.test_basic_example.TestBasicExample.test_rest_method_StringException: > > Traceback (most recent call last): > > File > > "/home/zuul/src/git.openstack.org/openstack/os-api-ref/.tox/py35/lib/python3.5/site-packages/sphinx_testing/util.py", > > line 143, in decorator > >func(*(args + (app, status, warning)), **kwargs) > > File > > "/home/zuul/src/git.openstack.org/openstack/os-api-ref/os_api_ref/tests/test_basic_example.py", > > line 41, in setUp > >self.html = (app.outdir / 'index.html').read_text(encoding='utf-8') > >TypeError: unsupported operand type(s) for /: 'str' and 'str' > > > > Which is wrong because 'app.outdir' is not supposed to be an instance > > of 'unicode' but rather 'sphinx_testing.path.path' [1] (which overrides > > the '/' operator to act as concatenation because operator overloading > > is always a good idea ) [2]. > > Is that a change in Sphinx's API? Or sphinx_testing's? It's a change in Sphinx, though not in the API [1]. I should really stop playing with Sphinx. > > > > Anyway, we can go figure out what's changed here and handle it but this > > is, at best, going to be a band aid. The fact is 'sphinx_testing' is > > unmaintained and has been for some time now. The new hotness is > > 'sphinx.testing' [3], which is provided (with zero documentation) as > > part of Sphinx. Unfortunately, this uses pytest fixtures [4] which I'm > > pretty sure Monty (and a few others?) are vehemently against using in > > OpenStack. That leaves us with three options: > > > > * Take over 'sphinx_testing' and bring it up-to-date. Maintain > >forever. > > * Start using 'sphinx.testing' and everything it comes with > > * Delete any tests that use 'sphinx_testing' and deal with the lack of > >coverage > > Could we change our tests to use pathlib to wrap app.outdir and get the > same results as before? That's what I've done [2], which is kind of based on how I fixed this in Sphinx. However, this is at best a stopgap. The fact remains that 'sphinx_testing' is dead and the large changes that Sphinx is undergoing (2.0 will be Python 3 only, with multiple other fixes) will make further breakages more likely. Unless we want a repeat of the Mox situation, I do think we should start thinking about this sooner rather than later. Stephen [1] https://github.com/sphinx-doc/sphinx/commit/3a85b3502f [2] https://review.openstack.org/607984 > 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] Sphinx testing fun
Stephen Finucane writes: > The tests in os-api-ref recently broke: > > > http://logs.openstack.org/62/606362/1/check/openstack-tox-py35/8b709de/testr_results.html.gz > > Specifically, we're seeing errors likes this: > > ft1.1: > os_api_ref.tests.test_basic_example.TestBasicExample.test_rest_method_StringException: > Traceback (most recent call last): > File > "/home/zuul/src/git.openstack.org/openstack/os-api-ref/.tox/py35/lib/python3.5/site-packages/sphinx_testing/util.py", > line 143, in decorator >func(*(args + (app, status, warning)), **kwargs) > File > "/home/zuul/src/git.openstack.org/openstack/os-api-ref/os_api_ref/tests/test_basic_example.py", > line 41, in setUp >self.html = (app.outdir / 'index.html').read_text(encoding='utf-8') >TypeError: unsupported operand type(s) for /: 'str' and 'str' > > Which is wrong because 'app.outdir' is not supposed to be an instance > of 'unicode' but rather 'sphinx_testing.path.path' [1] (which overrides > the '/' operator to act as concatenation because operator overloading > is always a good idea ) [2]. Is that a change in Sphinx's API? Or sphinx_testing's? > > Anyway, we can go figure out what's changed here and handle it but this > is, at best, going to be a band aid. The fact is 'sphinx_testing' is > unmaintained and has been for some time now. The new hotness is > 'sphinx.testing' [3], which is provided (with zero documentation) as > part of Sphinx. Unfortunately, this uses pytest fixtures [4] which I'm > pretty sure Monty (and a few others?) are vehemently against using in > OpenStack. That leaves us with three options: > > * Take over 'sphinx_testing' and bring it up-to-date. Maintain >forever. > * Start using 'sphinx.testing' and everything it comes with > * Delete any tests that use 'sphinx_testing' and deal with the lack of >coverage Could we change our tests to use pathlib to wrap app.outdir and get the same results as before? 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