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

Type consolidation and improvements #5319

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Commits on Feb 13, 2024

  1. Move types and coercion functions to own module

    The content of the new types module is purely lift and shift, with the
    exception of references to other moved types. Some functions and methods
    have been reordered but the code is unchanged.
    mal committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    ad3c60d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    509d3a9 View commit details
    Browse the repository at this point in the history
  3. pos: Add explicit operator methods to position

    This avoids other code needing to know or care about which operators are
    implemented directly and thus more performant and which are amalgams of
    other operators with additional overhead.
    mal committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    2249826 View commit details
    Browse the repository at this point in the history
  4. pos: Add support for equality checks to position

    This is used by the transform interpolation code to identify which
    properties have changed. The lack of this method causes it to run no-op
    interpolations.
    mal committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    8e43693 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f5c7724 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    69cb6b8 View commit details
    Browse the repository at this point in the history
  7. pos: Drop ATL *_or_none functions

    The rationale for this is that they didn't serve their intended purpose,
    and somewhat misleading. They only called by interpolation, and in such
    a way that the argument could never be None.
    
    In 8.2 a special case was added to spline interpolation which used one
    of these functions directly, however the additional None handling failed
    to make the result any more usable. In order to address this in a more
    useful way, and align with non-spline interpolation, None values will
    now be treated as zero.
    mal committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    6a570b4 View commit details
    Browse the repository at this point in the history
  8. Expand dual angle operators and separate from_any

    Same logic as for position, other code shouldn't have to worry which
    operators have first class support, and there are less mental hoops to
    jump through when we look back from years in the future.
    mal committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    9a76213 View commit details
    Browse the repository at this point in the history
  9. Apply position type pattern to dualangle

    Merges the DualAngle type and dualangle function removing the burden on
    calling code to appreciate the nuance and simply ask for a dualangle.
    mal committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    d82f9da View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    18d32aa View commit details
    Browse the repository at this point in the history
  11. Minor style tweaks

    mal committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    82bcbc5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e824522 View commit details
    Browse the repository at this point in the history
  13. Ensure pickle safety for position and dualangle

    We got away without defining __getnewargs__ in 8.2 because we didn't
    require arguments to __new__, but probably still ought to have done it.
    
    As pickled 8.2 types don't have the necessary arguments available to
    them, they require compat wrappers during unpickling.
    mal committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    f6bf7f9 View commit details
    Browse the repository at this point in the history