Skip to content

refactor/ci: drop Python 3.7, add Python 3.11#1662

Merged
wpbonelli merged 2 commits into
modflowpy:developfrom
mwtoews:drop-py37
Dec 21, 2022
Merged

refactor/ci: drop Python 3.7, add Python 3.11#1662
wpbonelli merged 2 commits into
modflowpy:developfrom
mwtoews:drop-py37

Conversation

@mwtoews
Copy link
Copy Markdown
Contributor

@mwtoews mwtoews commented Dec 18, 2022

This PR drops Python 3.7 for the next development effort. According to PEP 537 Python 3.7 will be maintained until June 2023. NumPy dropped Python 3.7 support December 2021 (NEP 29).

With setting Python 3.8 as the minimum, there are a few new features available (What’s New In Python 3.8). In this PR use of pkg_resources is replaced with importlib.metadata.

CI workflows are adjusted by:

  • Adding Python 3.11 to multi-version jobs
  • Replace single versions that use Python 3.7 with 3.8 as the new minimum

Other changes to note:

  • Changes to the [flake8] section in setup.cfg was needed for their modern configuration
  • Rasterio and Fiona binary wheels are available for Windows, so these are now enabled with the "optional" extra dependency
  • Vtk binary wheels are not published to pip (yet), so this is disabled for now

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 18, 2022

Codecov Report

Merging #1662 (805eabc) into develop (89fc16b) will decrease coverage by 0.0%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           develop   #1662     +/-   ##
=========================================
- Coverage     71.6%   71.5%   -0.1%     
=========================================
  Files          253     253             
  Lines        55724   55724             
=========================================
- Hits         39922   39892     -30     
- Misses       15802   15832     +30     
Impacted Files Coverage Δ
flopy/utils/gridintersect.py 76.2% <0.0%> (-2.8%) ⬇️
flopy/utils/get_modflow.py 63.9% <0.0%> (-1.5%) ⬇️

@mwtoews mwtoews force-pushed the drop-py37 branch 3 times, most recently from 5f26b06 to f31f48c Compare December 18, 2022 23:58
@mwtoews mwtoews marked this pull request as ready for review December 18, 2022 23:59
@wpbonelli
Copy link
Copy Markdown
Member

maybe the recommendation from the NEP could be linked or reproduced in DEVELOPER.md for future reference

@mwtoews
Copy link
Copy Markdown
Contributor Author

mwtoews commented Dec 21, 2022

Strictly adopting NEP 29 would also set the minimum NumPy to 1.20. I'm a bit hesitant to include too much policy wording into DEVELOPER.md. I'm more inclined to suggest that support and CI testing should be loosely aligned with NEP 29 for Python versions. An alternative description would be to support the four most recent major versions of Python (currently 3.8, 3.9, 3.10, 3.11).

@wpbonelli
Copy link
Copy Markdown
Member

Either way seems good to me. I'd never seen that proposal before, just thinking a link may be helpful for newcomers to get the background context on whichever wording or policy we go with

@mwtoews
Copy link
Copy Markdown
Contributor Author

mwtoews commented Dec 21, 2022

NEP 29 is certainly an inspiration for several other projects that depend on NumPy, so I've mentioned this in DEVELOPER.md

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.

2 participants