Upgrade sphinx conf + update some doc

This commit is contained in:
hakril
2024-06-14 16:19:44 +02:00
parent e3fd66b3d6
commit 50b0493364
12 changed files with 37 additions and 47 deletions
+2
View File
@@ -18,6 +18,8 @@ div.body {
div.bodywrapper { margin-right: 20px; }
.sphinxsidebarwrapper { overflow-y: scroll; }
div.admonition-todo {
border-top: 2px solid red;
border-bottom: 2px solid red;
+1 -1
View File
@@ -18,7 +18,7 @@ It's possible to directly call `COM` interface from python. All you need is the
There are three ways to get the definition of the code interface:
* By using it from :mod:`windows.generated_def.interfaces`
* By writing it yourself : <https://github.com/sogeti-esec-lab/LKD/blob/ba40727d7d257b00f89fc6ca7296c9833b7b75b2/dbginterface/remote.py#L56>`_
* By writing it yourself : `<https://github.com/sogeti-esec-lab/LKD/blob/ba40727d7d257b00f89fc6ca7296c9833b7b75b2/dbginterface/remote.py#L56>`_
* By generating it.
To generate a `COM` interface you need its definition from the ".c" file.
+13 -10
View File
@@ -46,9 +46,16 @@ extensions = [
'sphinx.ext.todo',
]
autodoc_default_flags = ['inherited-members']
autodoc_default_options = {
"members": True,
"inherited-members": True
}
# autodoc_default_flags = ['members', 'inherited-members']
# autodoc_member_order = "groupwise"
todo_include_todos = True
toc_object_entries_show_parents = "hide"
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -71,16 +78,16 @@ copyright = u'2015-2020, Clement Rouault'
# built documents.
#
# The short X.Y version.
version = '0.6'
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '0.6'
release = '1.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# 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"
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
@@ -368,10 +375,6 @@ epub_exclude_files = ['search.html']
#epub_use_index = True
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/2.7': None}
def get_rst(app, what, name, obj, options, lines):
pass
@@ -403,5 +406,5 @@ def miss_ref(app, env, node, contnode):
return res
def setup(app):
app.add_stylesheet('css/mbasic.css') # may also be an URL
# app.connect('missing-reference', miss_ref)
app.add_css_file ('css/mbasic.css') # may also be an URL
app.connect('missing-reference', miss_ref)
-7
View File
@@ -34,13 +34,6 @@ import_pfx
Certificate
"""""""""""
.. warning::
The classes described here are still under test and possible rewrite/refactor.
The classes, methods and properties described here will problably change as I haven't yet had the time
to try it out in real cases and figure out the final look of the API I want to do.
.. note::
See sample :ref:`sample_crypto_certificate`
-4
View File
@@ -19,10 +19,6 @@ For now, the best thing to do is look at the sample:
See sample :ref:`sample_event_log`
.. warning::
This API have not been tested on real case yet and may be subject to changes.
EvtlogManager
"""""""""""""
+12 -8
View File
@@ -14,9 +14,7 @@ Its goal is to offer abstractions around some of the OS features in a (I hope) p
It also tries to make the barrier between python and native execution thinner in both ways.
There is no external dependencies but it relies heavily on the ``ctypes`` module.
Some of this code is clean (IMHO) and some parts are just a wreck that works for now.
Let's say that the codebase evolves with my needs and my curiosity.
Let's say that the codebase evolves with my needs, my researches and my curiosity.
If you have any issue, question, suggestion do not hesitate to contact me.
I am always glad to have feedbacks from people using this project.
@@ -44,13 +42,19 @@ You can also install PythonForWindows by cloning it and using the ``setup.py`` a
python setup.py install
Python3
Encoding & unicode
^^^^^^^^^^^^^^^^^^
PythonForWindows support `python2.7` & `python3` and is currently tested for `Python2.7`, `3.6` & `3.11` via `Github Workflow <https://github.com/hakril/PythonForWindows/actions/workflows/mypytest.yml>`_
Since 1.0.0, the code uses "wide APIs" whenever possible and accept/returns python3 `str` (py2.7 `unicode` type) almost everywhere. Any functions/APIs not accepting unicode string can be considered a bug if its not stated explicitly in the documentation.
Python2
^^^^^^^
python3 support is still in beta.
All the tests pass on master, but I did not test it heavily on real case.
Do not hesitate report bugs and issues.
PythonForWindows continues to support python2.7 as its the only way to have it running on `Windows XP` & `Windows Server 2003` which are sadly still seen in production.
Encoding errors at print time might be awkward for unicode string on python2, see the `PythonForWindows encoding guide <https://hakril.github.io/PythonForWindows/build/html/encoding.html>`_ in the documentation.
Documentation
"""""""""""""
-4
View File
@@ -12,10 +12,6 @@ The :class:`ObjectManager` instance is accessible via :py:attr:`windows.system.o
See sample at :ref:`sample_object_manager`
.. warning::
This API have not been tested on real cases yet and may be subject to changes.
ObjectManager
"""""""""""""
-4
View File
@@ -10,10 +10,6 @@ The :class:`TaskService` is accessible via :py:attr:`windows.system.task_schedul
See sample :ref:`sample_scheduled_task`
.. warning::
This API have not been tested on real cases yet and may be subject to changes.
TaskService
"""""""""""
+4 -2
View File
@@ -34,8 +34,10 @@ The ``system`` object
See sample :ref:`sample_system`
.. currentmodule:: windows.winobject
.. module:: windows.winobject.system
.. autoclass:: windows.winobject.system.System
:no-show-inheritance:
:members:
:show-inheritance:
:inherited-members:
+4 -1
View File
@@ -548,7 +548,10 @@ class ChannelConfig(EvtHandle):
return EvtPublisher(chaninfo(self, gdef.EvtChannelConfigOwningPublisher).value)
def publishers(self):
"TEST"
""" The list of Publisher publishing on the channel. seems pertinent for Legacy channel like "System"
:type: [:class:`EvtPublisher`] - A list of :class:`EvtPublisher`
"""
return [EvtPublisher(pub) for pub in chaninfo(self, gdef.EvtChannelPublisherList).value]
@property
-5
View File
@@ -200,11 +200,6 @@ class KernelObject(object):
class ObjectManager(object):
"""Represent the object manager.
.. note::
For now, it only offers the ``root`` :class:`KernelObject`. But I want a ``manager`` object accessible
from ``windows.system`` just like other API and not directly the ``root`` directory.
"""
@property
+1 -1
View File
@@ -134,7 +134,7 @@ class System(object):
Same as os.environ on py3
Custom dict built on GetEnvironmentStringsW() on py2
:type: :class:`dict` -- {unicode: unicode}
:type: :class:`dict` -- {:class:`unicode`: :class:`unicode`}
"""
if windows.pycompat.is_py3:
return os.environ # Py3 environ is already unicode