diff --git a/doc/conf.py b/doc/conf.py index 92cda36ff655923bd82e703414d98a8a35317612..df4130764158b9e3edf34f3cdaa97b7a6a4f1eab 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -145,7 +145,7 @@ release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -#language = None +language = 'en' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff --git a/lisa/_doc/helpers.py b/lisa/_doc/helpers.py index 7af72e44c6c90e3031f2461e22dc01f7bf4864a6..3356cbb62ba9b91af3258caeeda69197152454bf 100644 --- a/lisa/_doc/helpers.py +++ b/lisa/_doc/helpers.py @@ -701,8 +701,8 @@ def make_changelog(repo): return f'{title}\n{body}' def format_msg(msg): - subject = msg.splitlines()[0] - return f'- {subject.strip()}' + subject = escape(msg.splitlines()[0].strip()) + return f'- {subject}' rst = '\n\n'.join( format_release(name, sections) @@ -719,4 +719,13 @@ class PlaceHolderRef: documentable. """ +def escape(s): + """ + Escape the string so that it's considered plain reStructuredText input, + without any markup even if it contains some. This avoids having to use a + literal block that is displayed differently. + """ + # https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#escaping-mechanism + return re.sub(r'(?=[^\s])([^\\])', r'\\\1', s) + # vim :set tabstop=4 shiftwidth=4 expandtab textwidth=80 diff --git a/lisa/_doc/manconf.py b/lisa/_doc/manconf.py index 2c7c513f7859d632cf361006ebf979587a40f7f7..a79b7b01b5e97bf6924dfcbdace24e83f22b532f 100644 --- a/lisa/_doc/manconf.py +++ b/lisa/_doc/manconf.py @@ -55,7 +55,7 @@ master_doc = 'man' # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/tools/exekall/exekall/engine.py b/tools/exekall/exekall/engine.py index cc0733c79b560bb2a9508cff901bd68ae3f29d53..cfd893bf9cdd2ac8f7708fcdc9d585bd529235c6 100644 --- a/tools/exekall/exekall/engine.py +++ b/tools/exekall/exekall/engine.py @@ -3696,9 +3696,24 @@ class FrozenExprVal(ExprValBase): return AttributeError(f'Producer of {self} not found') qualname = self.callable_qualname[len(mod_name):].lstrip('.') + qualname = qualname.split('.') attr = mod - for name in qualname.split('.'): - attr = getattr(attr, name) + attr_path = list(functools.accumulate(getattr)) + + if ( + len(attr_path) > 1 and + isinstance( + attr, + ( + # Instance and static methods + types.FunctionType, + # Class methods + types.MethodType, + ) + ) + ): + attr = UnboundMethod(attr, attr_path[-2]) + return attr @property