oz123 / pytest-localftpserver

A PyTest plugin which gives you a local ftp server for your tests
Other
16 stars 9 forks source link

1.1.3: sphinx fails #166

Open kloczek opened 1 year ago

kloczek commented 1 year ago

Looks like it is some issue with latest sphinx 5.1.1

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.1.1
making output directory... done
[autosummary] generating autosummary for: api_doc.rst, authors.rst, contributing.rst, history.rst, index.rst, installation.rst, readme.rst, usage.rst

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/ext/autosummary/generate.py", line 394, in generate_autosummary_docs
    name, obj, parent, modname = import_by_name(entry.name)
  File "/usr/lib/python3.8/site-packages/sphinx/ext/autosummary/__init__.py", line 655, in import_by_name
    raise ImportExceptionGroup('no module named %s' % ' or '.join(tried), exceptions)
sphinx.ext.autosummary.ImportExceptionGroup: no module named pytest_localftpserver.servers.FunctionalityWrapper

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/events.py", line 94, in emit
    results.append(listener.handler(self.app, *args))
  File "/usr/lib/python3.8/site-packages/sphinx/ext/autosummary/__init__.py", line 805, in process_generate_options
    generate_autosummary_docs(genfiles, suffix=suffix, base_path=app.srcdir,
  File "/usr/lib/python3.8/site-packages/sphinx/ext/autosummary/generate.py", line 399, in generate_autosummary_docs
    name, obj, parent, modname = import_ivar_by_name(entry.name)
  File "/usr/lib/python3.8/site-packages/sphinx/ext/autosummary/__init__.py", line 714, in import_ivar_by_name
    real_name, obj, parent, modname = import_by_name(name, prefixes, grouped_exception)
  File "/usr/lib/python3.8/site-packages/sphinx/ext/autosummary/__init__.py", line 655, in import_by_name
    raise ImportExceptionGroup('no module named %s' % ' or '.join(tried), exceptions)
sphinx.ext.autosummary.ImportExceptionGroup: no module named pytest_localftpserver.servers

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 272, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 261, in __init__
    self._init_builder()
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 334, in _init_builder
    self.events.emit('builder-inited')
  File "/usr/lib/python3.8/site-packages/sphinx/events.py", line 105, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function process_generate_options at 0x7f854655ac10> for event 'builder-inited' threw an exception (exception: no module named pytest_localftpserver.servers)

Extension error (sphinx.ext.autosummary):
Handler <function process_generate_options at 0x7f854655ac10> for event 'builder-inited' threw an exception (exception: no module named pytest_localftpserver.servers)
oz123 commented 1 year ago

I think it might work if you create a virtual environment and install sphinx and python-localftpserver in this environment.

kloczek commented 1 year ago

I'm not interested usimg tox as it tests aleays in env with fixed set of installed modules. You have details in what kind of scenario pytest fails. Could you please try to reproduce taht issue using that scenario?

oz123 commented 1 year ago

? I never said you should use tox. Read again. You are using the system installation of sphinx and it's not finding the module : : no module named pytest_localftpserver.servers.

I'm currently busy with higher priority projects. If it's urgent, I'm free to hire.

kloczek commented 1 year ago

It is not urgent. I've temprary disabled pytest execution during package build.