Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Fix #9879: autodoc: AttributeError for object having invalid __doc__ | Takeshi KOMIYA | 2021-11-22 | 1 | -2/+9 | |
| | ||||||
* | Fix #9838: autodoc: AttributeError is raised for lru_cache | Takeshi KOMIYA | 2021-11-21 | 1 | -2/+11 | |
| | ||||||
* | Fix #9757: autodoc_inherit_docstrings does not effect to overriden classmethods | Takeshi KOMIYA | 2021-10-30 | 1 | -1/+3 | |
| | ||||||
* | Fix #9756: autodoc: Crashed if classmethod does not have __func__ attribute | Takeshi KOMIYA | 2021-10-23 | 1 | -1/+1 | |
| | ||||||
* | Fix #9607: autodoc: Incorrect base class detection | Takeshi KOMIYA | 2021-09-20 | 1 | -0/+15 | |
| | | | | | | | | | In case of the descendants of generic class, the value of obj.__orig_bases__ is incorrect because it returns original base arguments for the child of the generic class instead of the target class itself. This uses obj.__dict__ to get the correct __orig_bases__ information. | |||||
* | Close #9639: autodoc: Support asynchronous generator functions | Takeshi KOMIYA | 2021-09-17 | 1 | -1/+2 | |
| | ||||||
* | FIX: do not try to compute the boolean value of a numpy array | Thomas A Caswell | 2021-08-06 | 1 | -2/+3 | |
| | | | | | If there is a numpy array as a class attribute, then `bool(meth)` will raise. | |||||
* | Merge branch '4.1.x' into 4.x | Takeshi KOMIYA | 2021-07-23 | 1 | -5/+8 | |
|\ | ||||||
| * | Fix #9489: autodoc: Custom types using typing.NewType are broken | Takeshi KOMIYA | 2021-07-23 | 1 | -5/+8 | |
| | | | | | | | | | | | | At the HEAD of 3.10, the implementation of ``typing.NewType`` has been changed to the class based. To follow the change, this uses ``isinstance`` on ``sphinx.util.inspect:isNewType()`. | |||||
* | | Close #9445: autodoc: Support class properties | Takeshi KOMIYA | 2021-07-17 | 1 | -1/+12 | |
|/ | | | | | Since python 3.9, `classmethod` starts to support creating a "class property". This supports to generate document for it. | |||||
* | Close #9272: autodoc: Render enum values for the default argument value better | Takeshi KOMIYA | 2021-05-30 | 1 | -2/+5 | |
| | ||||||
* | Fix #9250: autodoc: The inherited method not having docstring is wrongly parsed | Takeshi KOMIYA | 2021-05-23 | 1 | -8/+17 | |
| | | | | | | `sphinx.util.inspect.getdoc()` clean the docstring up if the method is inherited and not having docstring. That causes indentations are removed on processing it. | |||||
* | Close #8588: autodoc: autodoc_type_aliases supports dotted name | Takeshi KOMIYA | 2021-05-03 | 1 | -3/+84 | |
| | | | | | It allows users to define an alias for a class with module name like `foo.bar.BazClass`. | |||||
* | Merge branch '3.x' | Takeshi KOMIYA | 2021-04-11 | 1 | -2/+12 | |
|\ | ||||||
| * | Fix autodoc: Async staticmethods/ classmethods are considered as not async | Takeshi KOMIYA | 2021-04-11 | 1 | -2/+12 | |
| | | | | | | | | | | | | | | | | | | | | Since 3.10.0a7, the instances of staticmethod and classmethod have `__wrapped__` attribute. It confuses sphinx.util.inspect:iscoroutinefunction(). refs: * https://docs.python.org/3.10/whatsnew/3.10.html#other-language-changes * https://bugs.python.org/issue43682 | |||||
* | | refactor: Add Optional to type annotations | Takeshi KOMIYA | 2021-04-08 | 1 | -1/+1 | |
| | | ||||||
* | | refactor: use raw Type for type annotations | Takeshi KOMIYA | 2021-04-04 | 1 | -2/+2 | |
| | | ||||||
* | | Fix #8917: autodoc: Raises a warning if function has wrong __globals__ value | Takeshi KOMIYA | 2021-02-26 | 1 | -3/+12 | |
| | | | | | | | | | | | | `sphinx.util.inspect:signature()` crashes with AttributeError when subject has wrong `__globals__` value. This ignores the error on building. | |||||
* | | Merge branch '3.x' into master_with_merged_3.x | jfbu | 2021-02-02 | 1 | -16/+3 | |
|\ \ | |/ | ||||||
| * | refactor: AttributeError handling for getslots() is not needed | Takeshi KOMIYA | 2021-01-31 | 1 | -1/+0 | |
| | | ||||||
| * | refactor: AttributeError handling for getall() is not needed | Takeshi KOMIYA | 2021-01-31 | 1 | -1/+0 | |
| | | ||||||
| * | refactor: AttributeError handling for getannotations() is not needed | Takeshi KOMIYA | 2021-01-31 | 1 | -4/+1 | |
| | | ||||||
| * | refactor: AttributeError handling for getmro() is not needed | Takeshi KOMIYA | 2021-01-31 | 1 | -10/+2 | |
| | | | | | | | | | | | | | | | | Internally, sphinx.util.inspect.getmro() uses `safe_getattr()` with the `default` keyword. Therefore it never raises AttributeError even if the subject raises an error on accessing `__mro__` attribute. This fixes the wrong its usage. | |||||
* | | Merge branch '3.x' | Takeshi KOMIYA | 2021-01-22 | 1 | -2/+15 | |
|\ \ | |/ | ||||||
| * | Fix #8693: autodoc: Default values for overloads are rendered as string | Takeshi KOMIYA | 2021-01-17 | 1 | -2/+15 | |
| | | | | | | | | | | | | | | | | | | The default values for overloaded functions are rendered as string literal unexpectedly because autodoc extracts code snippets from the source code, not actual value (ex. int, ellipsis, and so on). This introduces a simple wrapper class; `DefaultValue` to render these code snippets like actual values, not string literals. | |||||
* | | Merge branch '3.x' | Takeshi KOMIYA | 2021-01-01 | 1 | -1/+1 | |
|\ \ | |/ | ||||||
| * | A happy new year! | Takeshi KOMIYA | 2021-01-01 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | .. note:: $ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \; $ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype | |||||
* | | Merge branch '3.x' | Takeshi KOMIYA | 2020-12-29 | 1 | -0/+1 | |
|\ \ | |/ | ||||||
| * | doc: Update docstring of getslots() | Takeshi KOMIYA | 2020-12-22 | 1 | -0/+1 | |
| | | ||||||
* | | Merge branch '3.x' | Takeshi KOMIYA | 2020-12-20 | 1 | -1/+17 | |
|\ \ | |/ | ||||||
| * | refactor: Move _getmro() to sphinx.util.inspect module | Takeshi KOMIYA | 2020-12-17 | 1 | -0/+16 | |
| | | ||||||
* | | Merge branch '3.x' | Takeshi KOMIYA | 2020-12-14 | 1 | -1/+1 | |
|\ \ | |/ | ||||||
| * | refactor: pretty change for isproperty() | Takeshi KOMIYA | 2020-12-12 | 1 | -1/+1 | |
| | | | | | | | | It is more readable to use `>=` to compare versions. | |||||
* | | Fix importing error | Takeshi KOMIYA | 2020-11-22 | 1 | -1/+1 | |
| | | ||||||
* | | Merge branch '3.x' | Takeshi KOMIYA | 2020-11-22 | 1 | -0/+25 | |
|\ \ | |/ | ||||||
| * | refactor: Move _getannotations() to sphinx.util.inspect | Takeshi KOMIYA | 2020-11-22 | 1 | -0/+12 | |
| | | ||||||
| * | Merge pull request #8465 from tk0miya/8460_NewType | Takeshi KOMIYA | 2020-11-22 | 1 | -0/+10 | |
| |\ | | | | | | | Fix #8460: autodoc: Support custom types defined by typing.NewType | |||||
| | * | Fix #8460: autodoc: Support custom types defined by typing.NewType | Takeshi KOMIYA | 2020-11-21 | 1 | -0/+10 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A custom type defined by typing.NewType was rendered as a function because the generated type is a function having special attributes. This renders it as a variable. Note: The module name where the NewType object defined is lost on generating it. So it is hard to make cross-reference for these custom types. | |||||
| * | | Handle AttributeError from getall() and getslots() | Takeshi KOMIYA | 2020-11-21 | 1 | -0/+3 | |
| |/ | ||||||
* | | Merge branch '3.x' | Takeshi KOMIYA | 2020-11-21 | 1 | -2/+43 | |
|\ \ | |/ | ||||||
| * | refactor autodoc: Add sphinx.util.inspect.getall() | Takeshi KOMIYA | 2020-11-20 | 1 | -1/+17 | |
| | | | | | | | | | | Move a function that obtains __all__ attribute from a module to sphinx.util.inspect module as getall(). | |||||
| * | Add sphinx.util.inspect:getslots() to get __slots__ attribute | Takeshi KOMIYA | 2020-11-15 | 1 | -0/+21 | |
| | | ||||||
| * | Merge branch '3.3.x' into 3.x | Takeshi KOMIYA | 2020-11-12 | 1 | -1/+5 | |
| |\ | ||||||
| | * | Fix #8350: autosummary_mock_imports causes slow down builds | Takeshi KOMIYA | 2020-11-12 | 1 | -1/+5 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The mock objects set up via `autosummary_mock_imports` causes slow down of autosummary stub generation because AttributeDocumenter falls into infinite recursion call to unwrap decorators of mocked objects. To avoid the trouble, this blocks unwrapping decorators of mocked objects. | |||||
* | | | Merge branch '3.x' | Takeshi KOMIYA | 2020-11-12 | 1 | -10/+3 | |
|\ \ \ | |/ / | ||||||
| * | | Merge pull request #8408 from francoisfreitag/isort | Takeshi KOMIYA | 2020-11-12 | 1 | -10/+3 | |
| |\ \ | | | | | | | | | Sort imports with isort | |||||
| | * | | Sort imports with isort | François Freitag | 2020-11-11 | 1 | -10/+3 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep imports alphabetically sorted and their order homogeneous across Python source files. The isort project has more feature and is more active than the flake8-import-order plugin. Most issues caught were simply import ordering from the same module. Where imports were purposefully placed out of order, tag with isort:skip. | |||||
* | | | | Merge branch '3.x' | Takeshi KOMIYA | 2020-11-10 | 1 | -2/+2 | |
|\ \ \ \ | |/ / / | ||||||
| * | | | test: Adjust type annotataions in python 3.10 | Takeshi KOMIYA | 2020-11-10 | 1 | -1/+1 | |
| | | | | ||||||
| * | | | autodoc: Add Optional[t] to annotation of function and method | Takeshi KOMIYA | 2020-11-10 | 1 | -2/+2 | |
| |/ / | | | | | | | | | | | | | | | | | | | As typing.get_type_hints() doing, this adds Optional[t] to type annotations if a default value equal to None is set. Note: this is default behavior of inspect.signature() since Python 3.10. |