[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-29 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-29 Thread Irit Katriel
Irit Katriel added the comment: New changeset 63f32fae79e16e6dc71777bd3fcb623b2c3ff742 by Irit Katriel in branch 'main': bpo-26120: do not exclude __future__ import in pydoc of the __future__ module itself (GH-32180) https://github.com/python/cpython/commit/63f32fae79e16e6dc71777bd3fcb623b2c

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Yet one bug: PR 30888 only changed the text output. But there is also the > html output generator. Sorry, I was wrong. The changed code is common for all generators. Perhaps I tested with wrong version. -- __

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-29 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +30258 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32180 ___ Python tracker ___ _

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-29 Thread Irit Katriel
Irit Katriel added the comment: > Yet one bug: PR 30888 only changed the text output. But there is also the > html output generator. I'm not sure - if I revert the change like this: if isinstance(getattr(obj, name, None), __future__._Feature): -return False +

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one bug: PR 30888 only changed the text output. But there is also the html output generator. -- ___ Python tracker ___ ___

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am sorry that I did not test the changes manually, but it seems that __future__ annotations are now disappeared from the pydoc output for the __future__ module help. $ ./python -m pydoc __future__ It is now difficult to get a list of available featu

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Irit Katriel
Irit Katriel added the comment: Thank you, Serhiy! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Irit Katriel
Irit Katriel added the comment: New changeset 15ba8167d78f9e66bd5b07c4e5cbb0463460310a by Irit Katriel in branch 'main': bpo-26120: make pydoc exclude __future__ imports from the data block of the module (GH-30888) https://github.com/python/cpython/commit/15ba8167d78f9e66bd5b07c4e5cbb0463460

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Module objects are not shown in the help unless they are submodules of the specified module, even if they are imported with the star import. With this precedence I think it is okay to exclude the __future__ annotations as well. --

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I once proposed to exclude modules from the star import by default, but this proposition was rejected. You can try, maybe your proposition will be more acceptable. -- ___ Python tracker

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Irit Katriel
Irit Katriel added the comment: That's a good point. I see that the __future__ imports appear in the dir() of the module, and indeed they are imported with 'from m import *'. But I wonder if that is actually a bug. If you try this: % cat x.py from __future__ import annotations % cat

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am positive about this idea, but we must also think about the possible negative consequences. For example, the future annotations will be included in the star-import by default and can override some global names. The fact that some names not visible in t

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-01-25 Thread Irit Katriel
Change by Irit Katriel : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-01-25 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +29070 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30888 ___ Python tracker ___ ___

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-01-25 Thread Irit Katriel
Irit Katriel added the comment: It's like this: >>> import foo >>> dir(foo) ['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'annotations', 'x'] >>> foo.annotations _Feature((3, 7, 0, 'beta', 1), (3, 11, 0, 'alpha', 0), 16777216) So

[issue26120] pydoc: move __future__ imports out of the DATA block

2021-12-07 Thread Vedran Čačić
Vedran Čačić added the comment: I thought that _Feature starts with an underscore precisely to evade such listings. Do other "private" module data also get listed? -- nosy: +veky ___ Python tracker _

[issue26120] pydoc: move __future__ imports out of the DATA block

2021-12-07 Thread Antony Lee
Change by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue26120] pydoc: move __future__ imports out of the DATA block

2021-12-07 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11. -- nosy: +iritkatriel type: -> enhancement versions: +Python 3.11 -Python 3.5, Python 3.6 ___ Python tracker ___ _

[issue26120] pydoc: move __future__ imports out of the DATA block

2016-01-14 Thread Antony Lee
New submission from Antony Lee: Currently, for a module that uses __future__ imports, the DATA section of `pydoc foo` contains these imports interspersed with the "real" data from the module. Even though it is fully-featured _Feature objects that are imported, it probably makes sense to move