Skip to content

Releases: WMOkiishi/types-panda3d

v0.4.1 for Panda3D 1.10.14

03 Jul 19:20
Compare
Choose a tag to compare

Not much has changed in this release. The main differences are the addition of the missing ShowBase.aspect2d attribute and the utilization of the typing.type_check_only decorator.

v0.4.0 for Panda3D 1.10.14

15 Jan 20:55
Compare
Choose a tag to compare

This release most notably updates the stubs for Panda3D 1.10.14. This means that Python 3.12 is now supported and support for 3.7 has been dropped. Other changes to the stubs include:

  • C++ wrapper properties that may be set to None are now typed as such.
  • Stub files for panda3d modules have been reformatted. Outside of stylistic changes, this includes writing out individual docstrings for function overloads. PyCharm doesn't have support for overload docstrings, but Pylance (used in the VS Code) does.
  • Deprecated functions are now decorated with typing_extensions.deprecated (See PEP 702).
  • Overloads for Loader methods have been expanded to account for more use cases.
  • Various other minor improvements and corrections have been made across the stubs.

v0.3.3 for Panda3D 1.10.13

08 Jul 17:26
Compare
Choose a tag to compare

Most of the work done since the last release has been on the code that generates the stubs for the panda3d package. Nevertheless, many miscellaneous corrections and improvements have been added to the stubs themselves, most notably:

  • Default arguments that are simple containers are now included in the stubs for direct.
  • Many uses of Literal types have been replaces with the type of the literal, as these can often be more trouble than they're worth.
  • Subclasses are now written after their base classes in the stubs for panda3d where they are defined in the same file.
  • Docstrings for dunder methods are (once again) included in the stubs for panda3d.
  • Some additional implicit type conversions that will be removed in Panda3D 1.11 are ignored in the stubs.

v0.3.2 for Panda3D 1.10.13

19 Feb 00:23
Compare
Choose a tag to compare

Significant changes since the last release:

  • Many annotations and signatures relating to tasks have been improved and corrected.
  • The direct stubs now include simple default parameter values where possible in place of ....
  • With the release of mypy 1.0.0, typing.Self is now used where applicable.

v0.3.1 for Panda3D 1.10.13

03 Feb 04:24
Compare
Choose a tag to compare

In addition to some miscellaneous improvements, this update greatly improves the handling of Panda3D's parameter type coercion. The logic has been updated to better reflect what's accepted at runtime, as well as to decrease unnecessary verbosity across overloads in the stubs. Additionally, some more coercions are now supported:

  • Using a Python callable in place of a CallbackObject
  • Using a Python tuple in place of a vector
  • Using a 3x3 matrix in place of a 4x4 one

v0.3.0 for Panda3D 1.10.13

02 Jan 02:02
Compare
Choose a tag to compare

Notable changes to the stubs since the last release:

  • Update to Panda3D version 1.10.13
  • Miscellaneous improvements to stubs for the direct package.
  • Variadic parameters (i.e., *args or **kwargs) are now written as such in the stubs for the panda3d package.
  • Some improvements to the stubs for PointerToArray classes.
  • Utilizing updates to interrogatedb in Panda3D 1.10.13, C++ implicit type coercion is now more generally accounted for. A handful of cases (such as converting a number to a vector) are intentionally omitted, though.
  • Also utilizing 1.10.13 additions, __copy__ and __deepcopy__ methods are now included in the panda3d stubs.
  • An empty NodePath (specifically, one constructed as NodePath()) is now typed as NodePath[typing.Never]. This means, for example, that a type-checker will flag NodePath().node() as not returning, matching runtime behavior.
  • All assign methods are now typed as returning the same type as self.

In addition to the changes to the stubs, numerous improvements have been made to the code that generates stubs for the panda3d package (i.e., the C++ part of Panda3D).

v0.2.1 for Panda3D 1.10.12

24 Nov 21:14
Compare
Choose a tag to compare

Changes since v0.2.0:

  • Various miscellaneous simplifications and improvements
  • Parameterization of many generic types in direct
  • Improved stubs for direct.leveleditor (Although I'm not sure anyone really uses that module)
  • More descriptive names for vector type aliases
  • Changes to vector base class method annotations to allow for less repetition in subclasses
  • When generating stubs for panda3d, type aliases are preserved when expanding parameter types
  • Sequence and mapping elements in C++ classes are now correctly annotated
  • More consistent annotation of vectors in direct stubs

v0.2.0 for Panda3D 1.10.12

30 Oct 20:57
Compare
Choose a tag to compare

A lot of work has been put into the stubs since the last release, but these are the highlights:

  • Stubs for the direct package are now included. These are in general less complete than those for panda3d, but are still fairly extensive. (This is largely due to the sheer size of direct.)
  • Multiple inheritance is now taken into account when removing class members implied by inheritance.
  • Illusory __iter__ methods have been added to all classes implementing iteration via __len__ and __getitem__.

Additionally, some noteworthy work has been done outside the package itself:

  • The stubs are now checked with stubtest and Pyright in addition to mypy.
  • The package has been uploaded to PyPI, allowing users to install it using pip install types-panda3d.

As always, feedback is welcome and encouraged. (I'd really appreciate some bug reports.)

v0.1.0 for Panda3D 1.10.12

17 Sep 23:17
Compare
Choose a tag to compare

In addition to general fine-tuning of the stubs to improve their accuracy, this release also adds docstrings to the stub files. While these aren't really related to typing, including them in the stub files allows many IDEs to read and display them without having to inspect the runtime objects dynamically. It's worth noting that, while both the runtime docstrings and those in stubs are generated from comments stored by Interrogate, they aren't always the same. Most obviously, the stub docstrings include comments from different overloads of a function, noting the signature they apply to.

Other notable changes include:

  • The minimum required version of Python has been lowered to 3.7 by importing from typing_extensions instead of typing for newer features.
  • NodePath is now treaded as a generic type with respect to the type of node it points to.
  • In some cases, stubs are skipped for methods and attributes implied by inheritance.
  • All enum values exposed to Python as integers are now annotated with typing.Final.
  • Where possible, method overloads with differing parameter counts are merged by making the final parameter optional.
  • With the help of some type: ignore comments, the stubs now pass a Mypy check.

While the utility of the package has been greatly improved, it's still incomplete. Close to 100% of the types, methods, and variables available at runtime are covered by the stubs, but their typing isn't always as accurate as it could be. The size of Panda3D means that there are huge chunks that I've never even touched, so I would request that anyone interested in the idea of type-checking Panda3D programs try out the stubs and report any bugs or inaccuracies they come across. The stubs won't be as useful as they can be without insight into how Panda3D is used in practice.

v0.0.2 for Panda3D 1.10.11

05 Aug 00:11
Compare
Choose a tag to compare

I may have jumped the gun a little with the initial release. This one is a little more refined. Most notably, imports in the stubs are fixed, and some "fake" __iter__ method stubs have been added to some types that implement iteration via __getitem__.