Skip to content

Commit 803154e

Browse files
authored
Merge pull request #3068 from bilhox/experimental-docs
Make experimental API not hidden in the docs anymore
2 parents e5d6b89 + 25e736f commit 803154e

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

docs/reST/index.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,41 @@ section below, check out a video tutorial (`I'm a fan of this one
3838
<https://www.youtube.com/watch?v=AY9MnQ4x3zk>`_), or reference the API
3939
documentation by module.
4040

41+
Experimental modules
42+
--------------------
43+
44+
Experimental modules are work in progress, this is why you should refrain from relying on any features
45+
provided by these modules, as they are subject to change or removal without prior notice.
46+
If you want to test these experimental modules, you might want to understand how you import
47+
them, this is how you can do it:
48+
49+
.. code-block:: python
50+
51+
from pygame import experimental_module
52+
# Or for specific modules like _sdl2.controller
53+
from pygame._sdl2 import controller
54+
# Or
55+
import pygame.experimental_module
56+
57+
Don't forget to report us any problem with the experimental features on `github`_ so we can easily
58+
turn them to stable API in the future ^^.
59+
60+
**Below is currently the list of experimental modules :**
61+
62+
:doc:`ref/geometry`
63+
Pygame module for the Circle, Line, and Polygon objects.
64+
65+
:doc:`ref/window`
66+
Pygame object that handles a window.
67+
68+
:doc:`ref/sdl2_controller`
69+
Pygame module to work with controllers.
70+
71+
:doc:`ref/sdl2_video`
72+
Pygame module for porting new SDL video systems.
73+
74+
.. _github: https://github.com/pygame-community/pygame-ce
75+
4176
Documents
4277
---------
4378

docs/reST/themes/classic/elements.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ <h5>pygame-ce documentation</h5>
3939

4040
#}
4141
{%- set basic = ['Color', 'display', 'draw', 'event', 'font', 'image', 'key', 'locals', 'mixer', 'mouse', 'music', 'pygame', 'Rect', 'Surface', 'time'] %}
42+
{%- set experimental = ['sdl2_video', 'controller', 'geometry', 'Window'] %}
4243
{%- set advanced = ['BufferProxy', 'freetype', 'gfxdraw', 'midi', 'PixelArray', 'pixelcopy', 'sndarray', 'surfarray', 'cursors', 'joystick', 'mask', 'math', 'sprite', 'transform'] %}
43-
{%- set hidden = ['sdl2_video', 'sdl2_controller', 'geometry', 'Window'] %}
44+
{%- set hidden = ['sdl2_video', 'geometry', 'Window'] %}
4445
{%- if pyg_sections %}
4546
<p class="bottom"><b>Most useful stuff</b>:
4647
{% set sep = joiner(" | \n") %}

0 commit comments

Comments
 (0)