Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.7.4: sphinx errors #570

Open
kloczek opened this issue Jun 5, 2021 · 3 comments
Open

2.7.4: sphinx errors #570

kloczek opened this issue Jun 5, 2021 · 3 comments

Comments

@kloczek
Copy link

kloczek commented Jun 5, 2021

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.0.2
making output directory... done
loading intersphinx inventory from http://docs.python.org/objects.inv...
intersphinx inventory has moved: http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 58 added, 0 changed, 0 removed
/home/tkloczko/rpmbuild/BUILD/whoosh-2.7.4/src/whoosh/collectors.py:docstring of whoosh.collectors.UnlimitedCollector:5: WARNING: Field list ends without a blank line; unexpected unindent.
/home/tkloczko/rpmbuild/BUILD/whoosh-2.7.4/src/whoosh/formats.py:docstring of whoosh.formats.Existence:8: WARNING: Field list ends without a blank line; unexpected unindent.

Exception occurred:
  File "/usr/lib/python3.8/site-packages/sphinx/util/typing.py", line 112, in restify
    elif cls in INVALID_BUILTIN_CLASSES:
TypeError: unhashable type: 'NullMatcherClass'
The full traceback has been saved in /tmp/sphinx-err-tfuzyzqe.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
@mcepl
Copy link

mcepl commented Jun 21, 2021

This NullMatcherClass-hashable.patch seems to fix this, or at least it works around the issue. I wonder whether __hash__ method (of the same content, that’s why I made it so complicated) shouldn’t be added directly to MatcherClass, but this is the least patch that makes Sphinx4 build. On the other hand, if hashability should mean immutability, then probably it would not be appropriate?

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Jun 23, 2021
https://build.opensuse.org/request/show/901102
by user mcepl + dimstar_suse
- Add NullMatcherClass-hashable.patch which adds __hash__
  method to NullMatcherClass, so that it works with Sphinx4
  (gh#whoosh-community/whoosh#570).
@kloczek
Copy link
Author

kloczek commented Jul 30, 2021

Just checked with sphinx 4.1.1 and looks like all buiulds without errors/warnings and without additional changes.

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.1.1
making output directory... done
loading intersphinx inventory from http://docs.python.org/objects.inv...
intersphinx inventory has moved: http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 58 added, 0 changed, 0 removed
reading sources... [100%] threads
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-Whoosh.3 { releases/index releases/2_0 releases/1_0 releases/0_3 quickstart intro glossary schema indexing searching parsing querylang dates query analysis stemming ngrams facets highlight keywords spelling fieldcaches batch threads nested recipes api/api api/analysis api/codec/base api/collectors api/columns api/fields api/filedb/filestore api/filedb/filetables api/filedb/structfile api/formats api/highlight api/idsets api/index api/lang/morph_en api/lang/porter api/lang/wordnet api/matching api/qparser api/query api/reading api/scoring api/searching api/sorting api/spelling api/support/charset api/support/levenshtein api/util api/writing tech/index tech/backend tech/filedb } done
build succeeded.

Feel free to close that ticket.

@kloczek
Copy link
Author

kloczek commented Jul 30, 2021

BTW do you have any plans to make new release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants