Skip to content

Commit 50b0493

Browse files
committed
Upgrade sphinx conf + update some doc
1 parent e3fd66b commit 50b0493

File tree

12 files changed

+37
-47
lines changed

12 files changed

+37
-47
lines changed

docs/source/_static/css/mbasic.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ div.body {
1818

1919
div.bodywrapper { margin-right: 20px; }
2020

21+
.sphinxsidebarwrapper { overflow-y: scroll; }
22+
2123
div.admonition-todo {
2224
border-top: 2px solid red;
2325
border-bottom: 2px solid red;

docs/source/com.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ It's possible to directly call `COM` interface from python. All you need is the
1818
There are three ways to get the definition of the code interface:
1919

2020
* By using it from :mod:`windows.generated_def.interfaces`
21-
* By writing it yourself : <https://github.com/sogeti-esec-lab/LKD/blob/ba40727d7d257b00f89fc6ca7296c9833b7b75b2/dbginterface/remote.py#L56>`_
21+
* By writing it yourself : `<https://github.com/sogeti-esec-lab/LKD/blob/ba40727d7d257b00f89fc6ca7296c9833b7b75b2/dbginterface/remote.py#L56>`_
2222
* By generating it.
2323

2424
To generate a `COM` interface you need its definition from the ".c" file.

docs/source/conf.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,16 @@
4646
'sphinx.ext.todo',
4747
]
4848

49-
autodoc_default_flags = ['inherited-members']
49+
autodoc_default_options = {
50+
"members": True,
51+
"inherited-members": True
52+
53+
}
54+
55+
# autodoc_default_flags = ['members', 'inherited-members']
5056
# autodoc_member_order = "groupwise"
5157
todo_include_todos = True
58+
toc_object_entries_show_parents = "hide"
5259

5360
# Add any paths that contain templates here, relative to this directory.
5461
templates_path = ['_templates']
@@ -71,16 +78,16 @@
7178
# built documents.
7279
#
7380
# The short X.Y version.
74-
version = '0.6'
81+
version = '1.0'
7582
# The full version, including alpha/beta/rc tags.
76-
release = '0.6'
83+
release = '1.0.0'
7784

7885
# The language for content autogenerated by Sphinx. Refer to documentation
7986
# for a list of supported languages.
8087
#
8188
# This is also used if you do content translation via gettext catalogs.
8289
# Usually you set "language" from the command line for these cases.
83-
language = None
90+
language = "en"
8491

8592
# There are two options for replacing |today|: either, you set today to some
8693
# non-false value, then it is used:
@@ -368,10 +375,6 @@
368375
#epub_use_index = True
369376

370377

371-
# Example configuration for intersphinx: refer to the Python standard library.
372-
intersphinx_mapping = {'https://docs.python.org/2.7': None}
373-
374-
375378
def get_rst(app, what, name, obj, options, lines):
376379
pass
377380

@@ -403,5 +406,5 @@ def miss_ref(app, env, node, contnode):
403406
return res
404407

405408
def setup(app):
406-
app.add_stylesheet('css/mbasic.css') # may also be an URL
407-
# app.connect('missing-reference', miss_ref)
409+
app.add_css_file ('css/mbasic.css') # may also be an URL
410+
app.connect('missing-reference', miss_ref)

docs/source/crypto.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ import_pfx
3434
Certificate
3535
"""""""""""
3636

37-
.. warning::
38-
39-
The classes described here are still under test and possible rewrite/refactor.
40-
41-
The classes, methods and properties described here will problably change as I haven't yet had the time
42-
to try it out in real cases and figure out the final look of the API I want to do.
43-
4437
.. note::
4538

4639
See sample :ref:`sample_crypto_certificate`

docs/source/evtlog.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ For now, the best thing to do is look at the sample:
1919

2020
See sample :ref:`sample_event_log`
2121

22-
.. warning::
23-
24-
This API have not been tested on real case yet and may be subject to changes.
25-
2622

2723
EvtlogManager
2824
"""""""""""""

docs/source/index.rst

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ Its goal is to offer abstractions around some of the OS features in a (I hope) p
1414
It also tries to make the barrier between python and native execution thinner in both ways.
1515
There is no external dependencies but it relies heavily on the ``ctypes`` module.
1616

17-
18-
Some of this code is clean (IMHO) and some parts are just a wreck that works for now.
19-
Let's say that the codebase evolves with my needs and my curiosity.
17+
Let's say that the codebase evolves with my needs, my researches and my curiosity.
2018

2119
If you have any issue, question, suggestion do not hesitate to contact me.
2220
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
4442
python setup.py install
4543

4644

47-
Python3
48-
^^^^^^^
45+
Encoding & unicode
46+
^^^^^^^^^^^^^^^^^^
47+
48+
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>`_
4949

50-
python3 support is still in beta.
51-
All the tests pass on master, but I did not test it heavily on real case.
52-
Do not hesitate report bugs and issues.
50+
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.
51+
52+
53+
Python2
54+
^^^^^^^
5355

56+
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.
57+
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.
5458

5559
Documentation
5660
"""""""""""""

docs/source/object_manager.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ The :class:`ObjectManager` instance is accessible via :py:attr:`windows.system.o
1212
See sample at :ref:`sample_object_manager`
1313

1414

15-
.. warning::
16-
17-
This API have not been tested on real cases yet and may be subject to changes.
18-
1915
ObjectManager
2016
"""""""""""""
2117

docs/source/task_scheduler.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ The :class:`TaskService` is accessible via :py:attr:`windows.system.task_schedul
1010

1111
See sample :ref:`sample_scheduled_task`
1212

13-
.. warning::
14-
15-
This API have not been tested on real cases yet and may be subject to changes.
16-
1713

1814
TaskService
1915
"""""""""""

docs/source/windows.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ The ``system`` object
3434

3535
See sample :ref:`sample_system`
3636

37-
.. currentmodule:: windows.winobject
37+
.. module:: windows.winobject.system
3838

3939
.. autoclass:: windows.winobject.system.System
40-
:no-show-inheritance:
40+
:members:
41+
:show-inheritance:
42+
:inherited-members:
4143

windows/winobject/event_log.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,10 @@ def publisher(self):
548548
return EvtPublisher(chaninfo(self, gdef.EvtChannelConfigOwningPublisher).value)
549549

550550
def publishers(self):
551-
"TEST"
551+
""" The list of Publisher publishing on the channel. seems pertinent for Legacy channel like "System"
552+
553+
:type: [:class:`EvtPublisher`] - A list of :class:`EvtPublisher`
554+
"""
552555
return [EvtPublisher(pub) for pub in chaninfo(self, gdef.EvtChannelPublisherList).value]
553556

554557
@property

0 commit comments

Comments
 (0)