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

Update/Fixup string encoding to for Python3 and fix UTF-8 for Python2 too #28

Commits on Dec 7, 2023

  1. Remove the use of 'unicode'

    'unicode' is not available in python3, so remove the use of it. And for
    python3 'bytes' string might need to be converted to a regular string
    
    Signed-off-by: Qin Zhang (张琴) <[email protected]>
    qinz0822 authored and bernhardkaindl committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    58ba0d1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    05b27be View commit details
    Browse the repository at this point in the history
  3. Py3-only: Change str encoding from Python2 to only support Python3

    Note by Bernhard: As per the agreement with Andrew in xapi-project#18, we shall
    keep master py2-compatible and py3-only changes go to a py3 branch:
    
    Andrew wrote:
    > However, master needs to remain atomically py2 or py3 compatible,
    > and not a mix of fixes which leaves it broken in both. [...]
    > please keep all commits which break compatibility with py2 in a
    > separate single PR so it can be merged all in one go.
    > The final commit on the py3 branch should [...]
    Reference:
    xapi-project#18 (comment)
    
    Therefore, I'll squash this commit with the next commit for fixing
    it up keep master py2-compatible, at least until all py3 checks and
    a complete manual test was done by QA.
    
    Original commit message by Qin Zhang (张琴):
    Remove the use of 'encode' as it's used to turn a Unicode string into a regular string in Python2
    
    Final Remarks by Bernhard, for completeleness:
    - This commit also adds conversion from curses input bytes to str.
    - Rebased to apply on the current master branch.
    
    Co-authored-by: Bernhard Kaindl <[email protected]>
    Signed-off-by: Qin Zhang (张琴) <[email protected]>
    qinz0822 and bernhardkaindl committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    d15d32b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0e456b0 View commit details
    Browse the repository at this point in the history
  5. Remove 'unicode-builtin' from the pylint --py3k TODO list

    Signed-off-by: Bernhard Kaindl <[email protected]>
    bernhardkaindl committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    4943f34 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2023

  1. Configuration menu
    Copy the full SHA
    130b8d2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6074a85 View commit details
    Browse the repository at this point in the history
  3. Add testcase for convert_anything_to_str()

    Signed-off-by: Bernhard Kaindl <[email protected]>
    bernhardkaindl committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    0496a3b View commit details
    Browse the repository at this point in the history