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

MAINT: Drop Python3.7 from supported versions. #19665

Merged
merged 4 commits into from Aug 18, 2021

Conversation

charris
Copy link
Member

@charris charris commented Aug 13, 2021

This drops Python 3.7 for NumPy 1.22.x. The following changes are made

  • Python 3.7 is dropped from testing
  • Setup.py is adjusted with Python 3.10 added
  • Some small code cleanups

Note that testing of gcc48 is dropped. Does that matter anymore?

EDIT: I temporarily left the version check in setup.py to 3.7+ to work around LGTM. If LGTM isn't updated by release time we will need to drop it.

@charris charris added this to the 1.22.0 release milestone Aug 13, 2021
@charris
Copy link
Member Author

charris commented Aug 13, 2021

LGTM is going to be a problem, it is stuck on ubuntu 19.10 which has Python 3.7 as the default. They seem to be falling behind the latest releases pretty badly and I can see this being a continuing problem going forward. Should we suspend it? That might cause a long wait if we enable it again, as I think it plays catch up by doing all the missed runs. Is there something better? Do we need it?

@charris charris force-pushed the drop-python3.7 branch 2 times, most recently from 82e612d to a6c9ff7 Compare August 14, 2021 17:03
@mattip
Copy link
Member

mattip commented Aug 14, 2021

I think we should drop LGTM. Was there a PR that was improved due to its output over the past year or so?

@charris
Copy link
Member Author

charris commented Aug 14, 2021

Was there a PR that was improved due to its output over the past year or so

I can't think of one :) The alerts are good for code cleanup, but I think there are standalone applications that might do as well. AFAICT, Semmle is more interested in their corporate version. Let me make a post on the mailing list to see if anyone complains.

@charris
Copy link
Member Author

charris commented Aug 14, 2021

@jhelie Do you still have any connection with LGTM? If so, could you comment on the chance of having Python 3.8+ available for the C builds?

@jhelie
Copy link
Contributor

jhelie commented Aug 15, 2021

Hi @charris, thanks for the ping. Yes, let me see if I can get a member of the Python team to get back to you on this.

#- uses: actions/setup-python@v2
#with:
#python-version: pypy-3.7-v7.3.4
#- uses: ./.github/actions
Copy link
Member

Choose a reason for hiding this comment

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

Hopefully we can turn this back on with pypy-3.8 soonish

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's why I commented it out instead of deleting.

@mattip
Copy link
Member

mattip commented Aug 16, 2021

Note that testing of gcc48 is dropped. Does that matter anymore?

I think gcc 4.8.5 is still the default version on CentOS7 (EOL 2024-07)see issue #14147. With that, it is pretty easy to get a more recent version of gcc. Maybe we should leave that one commented out for a while rather than remove it, just in case we get pushback.

@charris
Copy link
Member Author

charris commented Aug 16, 2021

Maybe we should leave that one commented out for a while

Done.

@mattip
Copy link
Member

mattip commented Aug 16, 2021

I think this will break downstream packages wanting to test our latest builds against their packages, so they too will have to drop 3.7 right?

@charris
Copy link
Member Author

charris commented Aug 16, 2021

I think this will break downstream packages wanting to test our latest builds

They can't use the latest builds running 3.7. Pandas, IIRC, is dropping 3.7 in their next release. By the schedule, anyone releasing after Dec 26 should be dropping 3.7.

EDIT: I already dropped 3.7 nightly builds, I should probably drop earlier builds so that we can elicit complaints.

@RasmusWL
Copy link

Do you still have any connection with LGTM? If so, could you comment on the chance of having Python 3.8+ available for the C builds?

Hi 👋 I'm part of the team at GitHub that works on CodeQL and maintains LGTM.com (GitHub bought Semmle, the company which ran LGTM.com, in 2019). We're planning to upgrade the dev environment to Ubuntu 20.04 at some point in this quarter, which will make Python 3.8 available. I have 2 ideas for workarounds until then:

  1. You could manually install Python 3.8+ as part of each C++ analysis with an after_prepare step
  2. You could use Code Scanning instead, which is the spiritual successor to LGTM.com fully integrated into GitHub (this is free to use for public repos). With a minor bit of configuration, it's possible to make it run the same queries that is used on LGTM.com. Since it's targeted for security alerts, it currently only allows access to the alerts for people with write permission (docs) -- I'm not sure how well that fits your main use-case of helping out with code cleanup, but that will be for you to decide 😊

@charris
Copy link
Member Author

charris commented Aug 17, 2021

@RasmusWL Thanks for getting back to us. It sounds like waiting for the upgrade is the easiest path forward. What are your plans for future upgrades? The Python scientific stack has settled on supporting Python versions for around 42 months, so we will be dropping older versions on a yearly basis if Python continues with yearly releases.

@charris charris merged commit f520fc1 into numpy:main Aug 18, 2021
@charris charris deleted the drop-python3.7 branch August 18, 2021 14:59
@RasmusWL
Copy link

Indeed, you could wait until the upgrade to 20.04. To have greater flexibility and choice in the OSes that are used for the analysis, I would recommend that you switch to GitHub Code Scanning. It uses the same CodeQL engine and queries, and integrates straight into your development workflow on GitHub.

(sorry for the late reply, I was down with heavy fever after getting my covid vaccine)

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

Successfully merging this pull request may close these issues.

None yet

4 participants