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

Preserve __slots__ metadata on Undefined types #2026

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Oct 1, 2024

  1. preserve __slots__ on Undefined et al

    * fix copy/deepcopy/pickle of Undefined objects on Python >= 3.6
    * fix ChainedUndefined to raise AttributeError on unimplemented dunder methods to prevent breaking core Python protocols (including copy)
    * add tests
    nitzmahone committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    532a0eb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7d0b64c View commit details
    Browse the repository at this point in the history
  3. ignore ChainedUndefined.__getitem__ return-type annotation

    * base impl/assignment is improperly annotated, but it was already ignored
    nitzmahone committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    5a95332 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d2f6333 View commit details
    Browse the repository at this point in the history
  5. address review requests

    * tighten up dunder method exclusion heuristic and clarify raison d'etre in Undefined/ChainableUndefined.__getattr__
    * use a more granular type ignore for incorrect base class declaration on ChainableUndefined.__getattr__
    nitzmahone committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    020dd78 View commit details
    Browse the repository at this point in the history