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

Fix #9481: autosummary: some warnings contain non-existing filenames #9498

Merged
merged 1 commit into from Jul 26, 2021

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Jul 25, 2021

Feature or Bugfix

  • Bugfix

Purpose

  • SphinxDirective.get_source_info() returns the pair of fullpath of
    source and current line number. But our logging module expects one of
    these:

    • A string consists of fullpath and current line number
    • A pair of docname and current line number

    To show correct location for warnings, this adds get_location() method
    that returns the former one.

  • Note: This also modifies C/C++ domains.

  • refs: Some warnings contain non-existing paths #9481

@@ -3388,13 +3388,13 @@ def run(self) -> List[Node]:
stack: List[Symbol] = []
else:
parser = DefinitionParser(self.arguments[0],
location=self.get_source_info(),
location=self.get_location(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: Please take care to use get_location() for logging @jakobandersen

…filenames

`SphinxDirective.get_source_info()` returns the pair of fullpath of
source and current line number.  But our logging module expects one of
these:

* A string consists of fullpath and current line number
* A pair of docname and current line number

To show correct location for warnings, this adds `get_location()` method
that returns the former one.

Note: This also modifies C/C++ domains.
@tk0miya tk0miya merged commit f590268 into sphinx-doc:4.x Jul 26, 2021
@tk0miya tk0miya deleted the 9481_autosummary_warnings branch July 26, 2021 17:17
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant