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

Reference target not found: _thread.allocate_loc #9338

Open
kasium opened this issue Jun 14, 2021 · 0 comments
Open

Reference target not found: _thread.allocate_loc #9338

kasium opened this issue Jun 14, 2021 · 0 comments

Comments

@kasium
Copy link

kasium commented Jun 14, 2021

Describe the bug
If I use sphinx with autodoc and a typing hint on lock, I get the nitpick error:
picky/picky/__init__.py:docstring of picky.do_lock::py:class reference target not found: _thread.allocate_loc

To Reproduce

setup

virtualenv venv --python=python3.7
source venv/bin/activate
pip install Sphinx==4.0.2

docs/conf.py

import os
import sys
sys.path.insert(0, os.path.abspath('..'))
extensions = ["sphinx.ext.autodoc"]

docs/index.rst

PICKY
=====

.. automodule:: picky
   :members:
   :undoc-members:
   :show-inheritance:

picky/__init__.py

import threading
def do_lock(lock: threading.Lock):
    """dummy"""
    pass

Build

rm -rf docs/_build/ && sphinx-build -b html -W -n -a  docs docs/_build/

Expected behavior
It should work fine

Environment info

  • OS: Linux
  • Python version: 3.7.1
  • Sphinx version: 4.0.2
  • Sphinx extensions: sphinx.ext.autodoc
@AA-Turner AA-Turner added this to the some future version milestone Sep 29, 2022
csm10495 added a commit to csm10495/py-filelock that referenced this issue Apr 6, 2023
I'm not sure why it resolves this way, but there is no link for that pathing

Related sphinx issue: sphinx-doc/sphinx#9338
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants