Skip to content

Commit

Permalink
Merge #602 #603
Browse files Browse the repository at this point in the history
602: Docs fixups r=pathunstrom a=AstraLuma

* Copyright year and author
* Sphinx build warnings
* Version numbers

603: Remove outstanding deprecations r=pathunstrom a=AstraLuma

Remove any outstanding deprecations, getting all the breaking done for 1.0.

Closes #600.

Co-authored-by: Jamie Bliss <jamie@ivyleav.es>
  • Loading branch information
bors[bot] and AstraLuma authored May 13, 2021
3 parents 348a265 + 7aba840 + e82a921 commit a9dc122
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 48 deletions.
16 changes: 9 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

import importlib.metadata
import re

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
Expand All @@ -20,14 +23,13 @@
# -- Project information -----------------------------------------------------

project = 'PursuedPyBear'
copyright = '2018, Piper Thunstrom'
author = 'Piper Thunstrom'
copyright = '2018-2021, The PPB Community'
author = 'The PPB Community'

# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = ''

release = importlib.metadata.version('ppb')
# The short X.Y version
version = re.match(r"(\d+\.\d+).*", release).group(1)

# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -133,7 +135,7 @@
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'PursuedPyBear.tex', 'PursuedPyBear Documentation',
'Piper Thunstrom', 'manual'),
'The PPB Community', 'manual'),
]


Expand Down
5 changes: 4 additions & 1 deletion docs/howto/use-latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Test Pre-Release Features

Sometimes you want to try the latest features that have been developed for
ppb before they have a formal release on pypi. You have two options: provide
a git uri to the ppb canon branch or use a dev release from test.pypi.org.
a git uri to the ppb canon branch or use a dev release from `test.pypi.org`_.

With pip Directly
----------------------------------------
Expand Down Expand Up @@ -39,3 +39,6 @@ dependencies from PyPI as normal.
Now you need to invoke pip as so::

pip install -r requirements.txt


.. _test.pypi.org: https://test.pypi.org/
3 changes: 1 addition & 2 deletions ppb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
from ppb.assets import Square
from ppb.assets import Triangle
from ppb.engine import GameEngine
from ppb.scenes import BaseScene
from ppb.scenes import Scene
from ppb.sprites import RectangleSprite
from ppb.sprites import Sprite
Expand All @@ -53,7 +52,7 @@

__all__ = (
# Shortcuts
'Vector', 'BaseScene', 'Scene', 'Circle', 'Image', 'Sprite', 'RectangleSprite',
'Vector', 'Scene', 'Circle', 'Image', 'Sprite', 'RectangleSprite',
'Square', 'Sound', 'Triangle', 'events', 'Font', 'Text', 'directions',
'Rectangle', 'Ellipse',
# Local stuff
Expand Down
24 changes: 0 additions & 24 deletions ppb/gomlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,30 +175,6 @@ def remove(self, child: Hashable) -> None:
"""
return self.children.remove(child)

@property
def kinds(self):
"""
Shorthand for :meth:`Children.kinds()`
.. deprecated:: 0.10
Use ``.children.kinds()`` instead.
"""
# Deprecated in 0.10
warnings.warn(".kinds is deprecated, use .children.kinds()", DeprecationWarning)
return self.children.kinds

@property
def tags(self):
"""
Shorthand for :meth:`Children.tags()`
.. deprecated:: 0.10
Use ``.children.tags()`` instead.
"""
# Deprecated in 0.10
warnings.warn(".tags is deprecated, use .children.tags()", DeprecationWarning)
return self.children.tags


def walk(root):
"""
Expand Down
7 changes: 0 additions & 7 deletions ppb/scenes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Callable
from typing import Iterator
from typing import Sequence
import warnings

from ppb.camera import Camera
from ppb.gomlib import GameObject
Expand Down Expand Up @@ -46,9 +45,3 @@ def sprite_layers(self) -> Iterator:
but will be left public for other creative uses.
"""
return sorted(self, key=lambda s: getattr(s, "layer", 0))


class BaseScene(Scene):
def __init__(self, *args, **kwargs):
warnings.warn("BaseScene will be deprecated in 0.14 or 1.0, use Scene instead", DeprecationWarning)
super().__init__(*args, **kwargs)
7 changes: 0 additions & 7 deletions tests/test_scenes.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from pytest import fixture
from pytest import deprecated_call

from ppb.scenes import Scene
from ppb.scenes import BaseScene
from ppb.camera import Camera


Expand Down Expand Up @@ -31,8 +29,3 @@ class BackgroundScene(Scene):

scene = BackgroundScene(background_color=(2, 4, 0))
assert scene.background_color == (2, 4, 0)


def test_base_scene_deprecated():
with deprecated_call():
BaseScene()

0 comments on commit a9dc122

Please sign in to comment.