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

Codify support for Python 2 and Python 3 in tests #1588

Open
matthewfeickert opened this issue Jan 11, 2022 · 2 comments
Open

Codify support for Python 2 and Python 3 in tests #1588

matthewfeickert opened this issue Jan 11, 2022 · 2 comments
Assignees
Milestone

Comments

@matthewfeickert
Copy link
Contributor

Hi. While trying to run tests for PR #1585 I realized that the tests for the Python bindings are written to be Python 2 only (as of 98d83fb). Doing some quick checks with a rough pass of

2to3 --write .

also show that the examples and tests all contain Python 2 only code.

  • The bindings/python/examples/ can be easily fixed by just properly applying the print() function.
  • The bindings/python/tests/ are mostly also just need print() functions but also have some string encoding differences and a breaking xrange vs. range change

for i in xrange(3):

  • I see that there has been some work and care put into ensuring that the Python 2 only code in bindings/python/libs/ is properly guarded, so I think that's fine as is. 👍

To be able to run tests I'm willing to contribute a PR that updates the example and tests code to Python 3, but is there a desire to continue to run the tests for Python 2? I don't know how long the XRootD team plans to support Python 2 as it is now EOL for over a year and there isn't any clear statements in the docs about LTS given that the supported OS part of the docs

xrootd/README

Lines 12 to 19 in 98d83fb

1. S U P P O R T E D O P E R A T I N G S Y S T E M S
XRootD is supported on the following platforms:
* RedHat Enterprise Linux 5 and 6 and derivatives (Scientific Linux)
compiled with gcc
* Solaris 10 compiled with SunCC
* MacOSX 10.6 and 10.7 compiled with gcc or clang

was added 10 years ago in 2011 and I don't think is accurate anymore.

Also, if I have this correct, is the https://gitlab.cern.ch/dss/xrootd GitLab mirror used to run the CI. Do you have instructions on how to have contributed PRs run the CI before they get merged so that PRs can link a passing test suite?

@simonmichal
Copy link
Contributor

@matthewfeickert : sorry for the late reply, there's no need to keep the tests compatible with Python2, if you could submit a PR that ports them to Python3 it would be great. (Unfortunately we are not able at the moment to run the CI in gitlab for PR.)

@amadio
Copy link
Member

amadio commented Oct 12, 2023

Since we will drop support for Python 2.x in XRootD 6.0.0, I'm marking this with that milestone, but will try to port the tests to Python 3.x and add them to run in our CI earlier than that (and mark the correct milestone fixing this later on).

@amadio amadio removed the Documentation Issue Missing or incorrect documentation label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants