Skip to content

Commit 98531c5

Browse files
committed
Prepare 16.0.0 release.
1 parent eaf4571 commit 98531c5

File tree

5 files changed

+26
-24
lines changed

5 files changed

+26
-24
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changes relevant to the users of python-tcod are documented here.
44
This project adheres to [Semantic Versioning](https://semver.org/) since version `2.0.0`.
55

66
## [Unreleased]
7+
8+
## [16.0.0] - 2023-05-27
79
### Added
810
- Added PathLike support to more libtcodpy functions.
911
- New `tcod.sdl.mouse.show` function for querying or setting mouse visibility.
@@ -17,7 +19,7 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
1719
- Deprecated the libtcodpy functions for images and noise generators.
1820

1921
### Removed
20-
- `tcod.console_set_custom_font` can no longer take bytes.
22+
- `tcod.console_set_custom_font` can no longer take bytes as the file path.
2123

2224
### Fixed
2325
- Fix `tcod.sdl.mouse.warp_in_window` function.

tcod/image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def from_array(cls, array: ArrayLike) -> Image:
6969
def from_file(cls, path: str | PathLike[str]) -> Image:
7070
"""Return a new Image loaded from the given `path`.
7171
72-
.. versionadded:: Unreleased
72+
.. versionadded:: 16.0
7373
"""
7474
path = Path(path).resolve(strict=True)
7575
return cls._from_cdata(ffi.gc(lib.TCOD_image_load(bytes(path)), lib.TCOD_image_delete))
@@ -303,7 +303,7 @@ def save_as(self, filename: str | PathLike[str]) -> None:
303303
Args:
304304
filename (Text): File path to same this Image.
305305
306-
.. versionchanged:: Unreleased
306+
.. versionchanged:: 16.0
307307
Added PathLike support.
308308
"""
309309
lib.TCOD_image_save(self.image_c, bytes(Path(filename)))

tcod/libtcodpy.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ def console_set_custom_font(
985985
Load fonts using :any:`tcod.tileset.load_tilesheet` instead.
986986
See :ref:`getting-started` for more info.
987987
988-
.. versionchanged:: Unreleased
988+
.. versionchanged:: 16.0
989989
Added PathLike support. `fontFile` no longer takes bytes.
990990
"""
991991
fontFile = Path(fontFile).resolve(strict=True)
@@ -1800,7 +1800,7 @@ def console_from_file(filename: str | PathLike[str]) -> tcod.console.Console:
18001800
18011801
Other formats are not actively supported.
18021802
1803-
.. versionchanged:: Unreleased
1803+
.. versionchanged:: 16.0
18041804
Added PathLike support.
18051805
"""
18061806
filename = Path(filename).resolve(strict=True)
@@ -1979,7 +1979,7 @@ def console_load_asc(con: tcod.console.Console, filename: str | PathLike[str]) -
19791979
.. deprecated:: 12.7
19801980
This format is no longer supported.
19811981
1982-
.. versionchanged:: Unreleased
1982+
.. versionchanged:: 16.0
19831983
Added PathLike support.
19841984
"""
19851985
filename = Path(filename).resolve(strict=True)
@@ -1993,7 +1993,7 @@ def console_save_asc(con: tcod.console.Console, filename: str | PathLike[str]) -
19931993
.. deprecated:: 12.7
19941994
This format is no longer supported.
19951995
1996-
.. versionchanged:: Unreleased
1996+
.. versionchanged:: 16.0
19971997
Added PathLike support.
19981998
"""
19991999
return bool(lib.TCOD_console_save_asc(_console(con), bytes(Path(filename))))
@@ -2006,7 +2006,7 @@ def console_load_apf(con: tcod.console.Console, filename: str | PathLike[str]) -
20062006
.. deprecated:: 12.7
20072007
This format is no longer supported.
20082008
2009-
.. versionchanged:: Unreleased
2009+
.. versionchanged:: 16.0
20102010
Added PathLike support.
20112011
"""
20122012
filename = Path(filename).resolve(strict=True)
@@ -2020,7 +2020,7 @@ def console_save_apf(con: tcod.console.Console, filename: str | PathLike[str]) -
20202020
.. deprecated:: 12.7
20212021
This format is no longer supported.
20222022
2023-
.. versionchanged:: Unreleased
2023+
.. versionchanged:: 16.0
20242024
Added PathLike support.
20252025
"""
20262026
return bool(lib.TCOD_console_save_apf(_console(con), bytes(Path(filename))))
@@ -2034,7 +2034,7 @@ def console_load_xp(con: tcod.console.Console, filename: str | PathLike[str]) ->
20342034
Functions modifying console objects in-place are deprecated.
20352035
Use :any:`tcod.console_from_xp` to load a Console from a file.
20362036
2037-
.. versionchanged:: Unreleased
2037+
.. versionchanged:: 16.0
20382038
Added PathLike support.
20392039
"""
20402040
filename = Path(filename).resolve(strict=True)
@@ -2045,7 +2045,7 @@ def console_load_xp(con: tcod.console.Console, filename: str | PathLike[str]) ->
20452045
def console_save_xp(con: tcod.console.Console, filename: str | PathLike[str], compress_level: int = 9) -> bool:
20462046
"""Save a console to a REXPaint `.xp` file.
20472047
2048-
.. versionchanged:: Unreleased
2048+
.. versionchanged:: 16.0
20492049
Added PathLike support.
20502050
"""
20512051
return bool(lib.TCOD_console_save_xp(_console(con), bytes(Path(filename)), compress_level))
@@ -2055,7 +2055,7 @@ def console_save_xp(con: tcod.console.Console, filename: str | PathLike[str], co
20552055
def console_from_xp(filename: str | PathLike[str]) -> tcod.console.Console:
20562056
"""Return a single console from a REXPaint `.xp` file.
20572057
2058-
.. versionchanged:: Unreleased
2058+
.. versionchanged:: 16.0
20592059
Added PathLike support.
20602060
"""
20612061
filename = Path(filename).resolve(strict=True)
@@ -2068,7 +2068,7 @@ def console_list_load_xp(
20682068
) -> list[tcod.console.Console] | None:
20692069
"""Return a list of consoles from a REXPaint `.xp` file.
20702070
2071-
.. versionchanged:: Unreleased
2071+
.. versionchanged:: 16.0
20722072
Added PathLike support.
20732073
"""
20742074
filename = Path(filename).resolve(strict=True)
@@ -2093,7 +2093,7 @@ def console_list_save_xp(
20932093
) -> bool:
20942094
"""Save a list of consoles to a REXPaint `.xp` file.
20952095
2096-
.. versionchanged:: Unreleased
2096+
.. versionchanged:: 16.0
20972097
Added PathLike support.
20982098
"""
20992099
tcod_list = lib.TCOD_list_new()
@@ -3040,10 +3040,10 @@ def image_load(filename: str | PathLike[str]) -> tcod.image.Image:
30403040
Args:
30413041
filename: Path to a .bmp or .png image file.
30423042
3043-
.. versionchanged:: Unreleased
3043+
.. versionchanged:: 16.0
30443044
Added PathLike support.
30453045
3046-
.. deprecated:: Unreleased
3046+
.. deprecated:: 16.0
30473047
Use :any:`tcod.image.Image.from_file` instead.
30483048
"""
30493049
return tcod.image.Image.from_file(filename)
@@ -3058,7 +3058,7 @@ def image_from_console(console: tcod.console.Console) -> tcod.image.Image:
30583058
Args:
30593059
console (Console): Any Console instance.
30603060
3061-
.. deprecated:: Unreleased
3061+
.. deprecated:: 16.0
30623062
:any:`Tileset.render` is a better alternative.
30633063
"""
30643064
return tcod.image.Image._from_cdata(
@@ -3073,7 +3073,7 @@ def image_from_console(console: tcod.console.Console) -> tcod.image.Image:
30733073
def image_refresh_console(image: tcod.image.Image, console: tcod.console.Console) -> None:
30743074
"""Update an image made with :any:`image_from_console`.
30753075
3076-
.. deprecated:: Unreleased
3076+
.. deprecated:: 16.0
30773077
This function is unnecessary, use :any:`Tileset.render` instead.
30783078
"""
30793079
image.refresh_console(console)
@@ -3419,7 +3419,7 @@ def map_get_height(map: tcod.map.Map) -> int:
34193419
def mouse_show_cursor(visible: bool) -> None:
34203420
"""Change the visibility of the mouse cursor.
34213421
3422-
.. deprecated:: Unreleased
3422+
.. deprecated:: 16.0
34233423
Use :any:`tcod.sdl.mouse.show` instead.
34243424
"""
34253425
lib.TCOD_mouse_show_cursor(visible)
@@ -3429,7 +3429,7 @@ def mouse_show_cursor(visible: bool) -> None:
34293429
def mouse_is_cursor_visible() -> bool:
34303430
"""Return True if the mouse cursor is visible.
34313431
3432-
.. deprecated:: Unreleased
3432+
.. deprecated:: 16.0
34333433
Use :any:`tcod.sdl.mouse.show` instead.
34343434
"""
34353435
return bool(lib.TCOD_mouse_is_cursor_visible())
@@ -4087,7 +4087,7 @@ def sys_save_screenshot(name: str | PathLike[str] | None = None) -> None:
40874087
This function is not supported by contexts.
40884088
Use :any:`Context.save_screenshot` instead.
40894089
4090-
.. versionchanged:: Unreleased
4090+
.. versionchanged:: 16.0
40914091
Added PathLike support.
40924092
"""
40934093
lib.TCOD_sys_save_screenshot(bytes(Path(name)) if name is not None else ffi.NULL)

tcod/sdl/audio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def convert_audio(
111111
112112
.. versionadded:: 13.6
113113
114-
.. versionchanged:: Unreleased
114+
.. versionchanged:: 16.0
115115
Now converts floating types to `np.float32` when SDL doesn't support the specific format.
116116
117117
.. seealso::
@@ -167,7 +167,7 @@ class AudioDevice:
167167
When you use this object directly the audio passed to :any:`queue_audio` is always played synchronously.
168168
For more typical asynchronous audio you should pass an AudioDevice to :any:`BasicMixer`.
169169
170-
.. versionchanged:: Unreleased
170+
.. versionchanged:: 16.0
171171
Can now be used as a context which will close the device on exit.
172172
"""
173173

tcod/sdl/mouse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def show(visible: bool | None = None) -> bool:
244244
Returns:
245245
True if the cursor is visible.
246246
247-
.. versionadded:: Unreleased
247+
.. versionadded:: 16.0
248248
"""
249249
_OPTIONS = {None: lib.SDL_QUERY, False: lib.SDL_DISABLE, True: lib.SDL_ENABLE}
250250
return _check(lib.SDL_ShowCursor(_OPTIONS[visible])) == int(lib.SDL_ENABLE)

0 commit comments

Comments
 (0)