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

CA-388527: Keep python2 and python3 compatibility #44

Merged

Conversation

stephenchengCloud
Copy link
Contributor

The PR #42 uses keyword-only argument which is not supported in Python2 (led to build errors, although the Python file worked on XS8) . In XS8, we still uses python2, so fix this to work both in python2 and python3

Build success in XS8:

INFO: Done(/tmp/kojienv.crBpR8EVY/scratch/xsconsole-11.0.5-1.1.g52be83b.xs8.src.rpm) Config(pb-stephenche-x8) 0 minutes 5 seconds
INFO: Results and/or logs in: /home/stephenche/xs9/xsconsole.spec/SRPM//build
Finish: run

Build success in XS9:

INFO: Done(/tmp/kojienv.ZZrHfUNdW/scratch/xsconsole-11.0.5-1.1.g52be83b.xs9.src.rpm) Config(pb-stephenche-x9) 0 minutes 4 seconds
INFO: Results and/or logs in: /home/stephenche/xs9/xsconsole.spec/SRPM//build
Finish: run

The PR xapi-project#42
uses keyword-only argument which is not supported in Python2
In XS8, we still uses python2, so fix this to work both in python2
and python3

Signed-off-by: Stephen Cheng <stephen.cheng@cloud.com>
Copy link
Collaborator

@liulinC liulinC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is quite strange that we can not use py3-only syntax for master, to support py2 backward compatibility. (we have python3.11 for XS9 and python3.6 for XS8)

Yangtze is py2 only. Hope we can drop this once Yangtze is EoL.

Another option is we branch yangtze for py2 only and let master goes to py3 only.

@liulinC liulinC requested a review from rosslagerwall June 7, 2024 05:23
@liulinC liulinC merged commit 171793d into xapi-project:master Jun 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants