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

Improve object handling & testing of ensure_unicode #9059

Merged
merged 8 commits into from
May 11, 2022

Commits on May 9, 2022

  1. Configuration menu
    Copy the full SHA
    470c2a3 View commit details
    Browse the repository at this point in the history
  2. Handle Python Buffer Protocol in ensure_unicode

    Any other arbitrary object (like `bytearray` or `memoryview` based
    objects) can be decoded to `unicode` via `codecs.decode`. This is
    analogous to what is done in `ensure_bytes`. So handle this case here.
    If this also fails, then raise as usual.
    jakirkham committed May 9, 2022
    Configuration menu
    Copy the full SHA
    b0f0206 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    726bb8c View commit details
    Browse the repository at this point in the history

Commits on May 10, 2022

  1. Configuration menu
    Copy the full SHA
    f0df8e1 View commit details
    Browse the repository at this point in the history
  2. Clarify error messages

    jakirkham committed May 10, 2022
    Configuration menu
    Copy the full SHA
    4db4132 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2022

  1. Use uint8 in array tests

    This is more consistent with the other tests, which also use this type.
    Though `int8` also works.
    jakirkham committed May 11, 2022
    Configuration menu
    Copy the full SHA
    2c3133a View commit details
    Browse the repository at this point in the history
  2. Pass bytes directly to array

    Appears this already gets interpreted correctly by `array`. Should also
    make the code easier to read for other maintainers.
    jakirkham committed May 11, 2022
    Configuration menu
    Copy the full SHA
    efacc17 View commit details
    Browse the repository at this point in the history
  3. Use from array import array

    Avoids the `array.array` bit which is a tad verbose.
    jakirkham committed May 11, 2022
    Configuration menu
    Copy the full SHA
    cebaf9f View commit details
    Browse the repository at this point in the history