Skip to content

CPython docs database for module items - #3098

Merged
youknowone merged 2 commits into
RustPython:mainfrom
youknowone:doc-sync
Sep 23, 2021
Merged

youknowone merged 2 commits into
RustPython:mainfrom
youknowone:doc-sync

Conversation

@youknowone

Copy link
Copy Markdown
Member

no more copy & paste

@youknowone
youknowone force-pushed the doc-sync branch 2 times, most recently from 29e6cd7 to b355715 Compare September 21, 2021 11:02
@youknowone youknowone mentioned this pull request Sep 21, 2021
3 of 4 tasks
Comment thread extra_tests/docs_gen.py
from pydoc import ModuleScanner


def scan_modules():

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this only concerns the builtins, why not use sys.builtin_module_names here?

@youknowone youknowone Sep 21, 2021 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I tried it but found sys.bulitin_module_names is not covering all the c modules. I didn't investigate well but I think it is more like pre-loaded module before import.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

huh, maybe that in combination with sys.stdlib_module_names then (but that landed in 3.10 I believe.

Comment thread extra_tests/docs_gen.py Outdated
Comment thread derive/src/pyclass.rs Outdated

@DimitrisJim DimitrisJim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm. module and method docs aren't currently attached as they are for functions/classes but those could be a separate PR, you can choose if you want to merge this now or add them on.

@youknowone
youknowone merged commit 874ed5a into RustPython:main Sep 23, 2021
@youknowone
youknowone deleted the doc-sync branch September 23, 2021 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants