Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Add support for python 3 and drop python 2 support #48

Closed
wants to merge 1 commit into from

Conversation

mraarif
Copy link

@mraarif mraarif commented Jun 4, 2020

Relevant JIRA issue here.

@mraarif mraarif marked this pull request as draft June 4, 2020 11:35
@mraarif mraarif marked this pull request as ready for review June 4, 2020 11:52
@mraarif mraarif requested review from awais786 and jmbowman June 4, 2020 11:52
@awais786
Copy link

awais786 commented Jun 4, 2020

@morenol please review.

Makefile Outdated
@@ -4,3 +4,13 @@ clean:

test:
py.test
Copy link

Choose a reason for hiding this comment

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

could you change this with pytest?

matrix:
include:
- python: 2.7
Copy link

Choose a reason for hiding this comment

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

If we are removing the python2.7 tests then I think that it is not needed the usage of six and the future imports

@morenol
Copy link

morenol commented Jun 4, 2020

It looks good to me, but I would not remove the python2.7 tests until the internal job of jenkins that runs this is configured to use python3. So I think that we should keep the python2.7 tests and then after the jenkins job is changed we can drop python2.7

@mraarif
Copy link
Author

mraarif commented Jun 4, 2020

It looks good to me, but I would not remove the python2.7 tests until the internal job of jenkins that runs this is configured to use python3. So I think that we should keep the python2.7 tests and then after the jenkins job is changed we can drop python2.7

@jmbowman does the said Jenkins internal job still use python 2? and in that case, we shouldn't drop python 2 support here?

@jmbowman
Copy link

jmbowman commented Jun 5, 2020

Yes, it looks like both jobs need to be updated; they're using the virtualenv DSL command without specifying a Python version, which means they're getting the system default 2.7:

As far as I can tell, those are the only uses of this repository; once they're updated, it should be safe to drop the 2.7 support. They'll need to use 3.5 for now, since we don't have 3.8 on the Jenkins workers yet (I'll check today to see how close we are to getting that resolved).

@mraarif mraarif force-pushed the py38-support branch 2 times, most recently from 0c1b9b5 to 273062a Compare June 5, 2020 14:33
@jmbowman
Copy link

So it seems like we won't be able to drop Python 2.7 support for a while due to details of how these jobs are currently run in Jenkins; there are plans to fix that, but it probably won't happen in the next few months. It's probably ok to merge any changes already made in this PR that add support for newer Python versions as long as the Python 2.7 support continues to work; but further work on upgrading this repo isn't a high priority since the production usage of it won't change for a while.

@mraarif mraarif force-pushed the py38-support branch 2 times, most recently from 7f90a31 to cfe7e88 Compare June 21, 2020 12:51
@mraarif
Copy link
Author

mraarif commented Jun 21, 2020

As suggested I've only added support for Python 3.5 for now.

@mraarif mraarif changed the title dropped python 2 support and add support for python 3.5 and 3.8 Add support for python 3.5 Jun 21, 2020
@mraarif
Copy link
Author

mraarif commented Jun 22, 2020

@awais786 , @jmbowman please review.

@mraarif mraarif changed the title Add support for python 3.5 Added support for python 3 Jun 22, 2020
Copy link

@jmbowman jmbowman left a comment

Choose a reason for hiding this comment

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

Given that I'm finding (admittedly minor) issues that could impact the execution of the Jenkins jobs, and DE doesn't actually plan to do the upgrade for a while, I'm starting to think we should just defer further work on this for now. It doesn't seem worth the risk of breaking the jobs and needing to spend time debugging it if we aren't going to actually do the Python upgrade now.

@@ -28,6 +28,8 @@
Can use wildcards.
"""

from __future__ import absolute_import
from __future__ import print_function
Copy link

Choose a reason for hiding this comment

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

These imports should be on the same line; ditto for the next file changed.

@@ -1 +1,3 @@
-c constraints.txt

http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.2.2.zip
Copy link

Choose a reason for hiding this comment

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

This file is still referenced in the Jenkins jobs by name, so we can't just rename it. We'd have to leave a stub in place that just includes a -r entry for the new file location.

#
# make upgrade
#
http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.2.2.zip # via -r requirements/github.in

Choose a reason for hiding this comment

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

Do we still need this file? I think it's just leftover from before we updated the Makefile to rename the file for compatibility with the existing Jenkins job code.

-c constraints.txt

-r base.txt
-r github.txt

Choose a reason for hiding this comment

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

Shouldn't this be updated to use the same filename generated in the Makefile?

Copy link
Author

Choose a reason for hiding this comment

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

You mean it should be named as github_requirements.txt?

Copy link

@jmbowman jmbowman left a comment

Choose a reason for hiding this comment

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

@pwnage101 Do you want to control the timing on merging this, since it drops 2.7 support? I presume the Jenkins jobs also need to be updated to use Python 3.7 for their virtualenvs.

@mraarif
Copy link
Author

mraarif commented Nov 10, 2020

@jmbowman could you point me to the Jenkins job that needs to switch its python version? or DE team would like to handle that update?

@mraarif mraarif changed the title Added support for python 3 Add support for python 3 and drop python 2 support Nov 10, 2020
@jmbowman
Copy link

This was ultimately done via #73

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants