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

Fix (some) deprecation warnings #431

Merged
merged 5 commits into from
Jun 13, 2024
Merged

Fix (some) deprecation warnings #431

merged 5 commits into from
Jun 13, 2024

Commits on Jun 10, 2024

  1. Configuration menu
    Copy the full SHA
    eaa5858 View commit details
    Browse the repository at this point in the history
  2. refactor: Use PEP-702 @deprecated to mark deprecations

    Use the PEP-702 `@deprecated` decorator to mark deprecated methods and
    classes where possible. This makes deprecation information available to
    static type checkers like mypy.
    
    This commit also adds the deprecation plugin from `mypypp` in order to
    add early support for the feature to mypy.
    Wuestengecko committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    0bea8a1 View commit details
    Browse the repository at this point in the history
  3. fix: Solve most deprecation warnings

    This solves all static deprecation warnings discovered by the previous
    commit, and wmultiple runtime-only warnings that have been around for a
    while now.
    Wuestengecko committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    72ddd75 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5ffaf0e View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2024

  1. chore: Deprecate directly hashing model objects

    Keeping instances of GenericElement and its subclasses hashable has
    caused problems in the past, especially in the case of custom equality
    operators. Those problems include ambiguity about what gets hashed, as
    well as hashing over mutable attributes, which both can cause the object
    in question to end up in an unexpected hash bucket in one way or
    another, which in turn leads to extremely difficult to diagnose issues
    downstream. This is why hashing is now deprecated for all elements.
    Previously it was only deprecated for a limited number of object types,
    where it was definitely known to cause problems; this change improves
    consistency across the API and prevents unexpected TypeErrors if
    unhashable objects suddenly end up in hashing contexts.
    Wuestengecko committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    f1476c0 View commit details
    Browse the repository at this point in the history