Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mentions of overlay module #2411

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions buildconfig/stubs/gen_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,7 @@ def get_all(mod: Any):
pygame_all_imports[f".{k}"] = get_all(getattr(pygame, k))

# misc stubs that must be added to __init__.pyi
misc_stubs = """
from typing import Tuple, NoReturn

def Overlay(format: int, size: Tuple[int, int]) -> NoReturn: ...
"""
misc_stubs = """"""

# write constants.pyi file
constants_file = pathlib.Path(__file__).parent / "pygame" / "constants.pyi"
Expand Down
4 changes: 0 additions & 4 deletions buildconfig/stubs/pygame/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
# A script to auto-generate locals.pyi, constants.pyi and __init__.pyi typestubs
# IMPORTANT NOTE: Do not edit this file by hand!

from typing import Tuple, NoReturn

def Overlay(format: int, size: Tuple[int, int]) -> NoReturn: ...

from pygame import (
display as display,
draw as draw,
Expand Down
8 changes: 3 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,9 @@ in the future.

### Hidden modules

Pygame still has documentation for the Overlay module, which
are discontinued in SDL2 based pygame (pygame 2). It just doesn't show them,
because `docs/reST/themes/classic/elements.html` now has a list of
"blacklisted" modules to not put into the top bar. It also uses this for the
experimental sdl2_video docs.
Pygame-ce has documentation for some experimental modules like sdl2_video. It just
doesn't show them, because `docs/reST/themes/classic/elements.html` has a list of
"blacklisted" modules to not put into the top bar.

### Styling / Themes

Expand Down
1 change: 0 additions & 1 deletion docs/reST/ext/boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ def lowercase_name(d):
"freetype",
"gfxdraw",
"midi",
"Overlay",
"PixelArray",
"pixelcopy",
"sndarray",
Expand Down
79 changes: 0 additions & 79 deletions docs/reST/ref/overlay.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/reST/themes/classic/elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h5>pygame-ce documentation</h5>
#}
{%- set basic = ['Color', 'display', 'draw', 'event', 'font', 'image', 'key', 'locals', 'mixer', 'mouse', 'music', 'pygame', 'Rect', 'Surface', 'time'] %}
{%- set advanced = ['BufferProxy', 'freetype', 'gfxdraw', 'midi', 'PixelArray', 'pixelcopy', 'sndarray', 'surfarray', 'cursors', 'joystick', 'mask', 'math', 'sprite', 'transform'] %}
{%- set hidden = ['Overlay', 'sdl2_video', 'sdl2_controller'] %}
{%- set hidden = ['sdl2_video', 'sdl2_controller'] %}
{%- if pyg_sections %}
<p class="bottom"><b>Most useful stuff</b>:
{% set sep = joiner(" | \n") %}
Expand Down
3 changes: 0 additions & 3 deletions examples/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ music_drop_fade.py
several events. Uses fade_ms added in pygame2, as well as set_endevent,
set_volume, drag and drop events, and the scrap module.

overlay.py
An old way of displaying video content.

pixelarray.py
Process whole arrays of pixels at a time.
Like numpy, but for pixels, and also built into pygame.
Expand Down
5 changes: 0 additions & 5 deletions src_c/doc/overlay_doc.h

This file was deleted.

8 changes: 0 additions & 8 deletions src_py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,6 @@ def PixelArray(surface): # pylint: disable=unused-argument
_attribute_undefined("pygame.PixelArray")


try:
from pygame.overlay import Overlay
except (ImportError, OSError):

def Overlay(format, size): # pylint: disable=unused-argument
_attribute_undefined("pygame.Overlay")


try:
import pygame.time
from pygame.time import Clock
Expand Down