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

Cherry-pick latest updates from betterproto #10

Merged
merged 11 commits into from
Apr 30, 2024

Commits on Apr 29, 2024

  1. Upgrade actions to 3.12 (#550)

    cclauss authored and ClausHolbechArista committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    2735ad0 View commit details
    Browse the repository at this point in the history
  2. betterproto: support Struct and Value (#551)

    * betterproto: support `Struct` and `Value`
    
    Signed-off-by: William Woodruff <[email protected]>
    
    * betterproto: handle struct in to_dict as well
    
    Signed-off-by: William Woodruff <[email protected]>
    
    * tests: add Struct roundtrip tests
    
    Signed-off-by: William Woodruff <[email protected]>
    
    * specialize from_dict and to_dict on Struct
    
    ...rather than special-casing in the Message ABC.
    
    Signed-off-by: William Woodruff <[email protected]>
    
    * betterproto: `poe format`
    
    Signed-off-by: William Woodruff <[email protected]>
    
    * Update src/betterproto/__init__.py
    
    Co-authored-by: James Hilton-Balfe <[email protected]>
    
    * remove future annotations
    
    Signed-off-by: William Woodruff <[email protected]>
    
    * replace type[...] with typing.T
    
    Signed-off-by: William Woodruff <[email protected]>
    
    * quote instead
    
    Signed-off-by: William Woodruff <[email protected]>
    
    ---------
    
    Signed-off-by: William Woodruff <[email protected]>
    Co-authored-by: James Hilton-Balfe <[email protected]>
    2 people authored and ClausHolbechArista committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    1f3d15f View commit details
    Browse the repository at this point in the history
  3. Add one-of match example to README (#558)

    Removed the parts of the example that showed accessing an unset value, as it now raises an `AttributeError`, and added an example of the `match` way of accessing the attributes.
    
    Related to #510 and #358.
    MicaelJarniac authored and ClausHolbechArista committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    6b1e317 View commit details
    Browse the repository at this point in the history
  4. refactor: use is instead of == (#560)

    PLACEHOLDER is a specific instance of an object, the test here should be "is not" instead of "!="
    I am experimenting with adding ndarray support, and the equality test here causes problems.
    atomicmac authored and ClausHolbechArista committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    c16f235 View commit details
    Browse the repository at this point in the history
  5. ci: Use GITHUB_OUTPUT envvar instead of set-output command (#553)

    * ci: Use GITHUB_OUTPUT envvar instead of set-output command
    
    * Quote envvar to match documentation
    arunsathiya authored and ClausHolbechArista committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    1b504c3 View commit details
    Browse the repository at this point in the history
  6. Add betterproto.Enum __copy__ and __deepcopy__ implementations (#566)

    * Add betterproto.Enum __copy__ and __deepcopy__ implementations
    
    betterproto.Enum is missing __copy__ and __deepcopy__ implementations, which were recently added to enum.Enum, see python/cpython#106602
    This fixes the bug where betterproto messages with Enums nested within cannot be copied via copy.deepcopy.
    
    * Type hint on Enum.__copy__
    
    Co-authored-by: James Hilton-Balfe <[email protected]>
    
    * Type hint on Enum.__deepcopy__
    
    Co-authored-by: James Hilton-Balfe <[email protected]>
    
    ---------
    
    Co-authored-by: James Hilton-Balfe <[email protected]>
    2 people authored and ClausHolbechArista committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    0beaaab View commit details
    Browse the repository at this point in the history
  7. fix: support pydantic-version google pb (#568)

    * feat: pydantic version of google pb
    
    * fix: patch pb Struct to support json, dict rountrip
    
    * fix: pydantic-version google pb, json, dict rntrip
    
    * chore: remove `@generated`, remove gen, code fmt
    
    * chore: test case for pydantic-version google pb
    ii64 authored and ClausHolbechArista committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    bb26683 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    49d6fb3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d04b0e2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    adc15af View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c7b1c99 View commit details
    Browse the repository at this point in the history