Skip to content

MAINT: f2py cleanup#22885

Merged
seberg merged 3 commits intonumpy:mainfrom
HaoZeke:cleanCrackfortran
Jan 16, 2023
Merged

MAINT: f2py cleanup#22885
seberg merged 3 commits intonumpy:mainfrom
HaoZeke:cleanCrackfortran

Conversation

@HaoZeke
Copy link
Copy Markdown
Member

@HaoZeke HaoZeke commented Dec 25, 2022

Updates the free format handling of .f90 and other common extensions (through a minor re-write). Also removes an unused function.

This disallows previously allowed (but highly unlikely to be present) code-paths, namely having fixed form F77 code in a fortran 90 file (with .f90).

Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
@seberg
Copy link
Copy Markdown
Member

seberg commented Jan 16, 2023

Well, the days of this code are counted, it looks fine, and I will trust you follow up if something breaks. So lets put this in, thanks @HaoZeke. (the distutils mainly is ugly with the \, but that code is de-facto end-of-life anyway, so I will not bother today)

@seberg seberg merged commit 6b5cd92 into numpy:main Jan 16, 2023
@seberg
Copy link
Copy Markdown
Member

seberg commented Jan 16, 2023

To be clear, I am assuming that the change:

This disallows previously allowed (but highly unlikely to be present) code-paths, namely having fixed form F77 code in a fortran 90 file (with .f90).

Does seemingly not worry the f2py specialists here.

rgommers added a commit to rgommers/numpy that referenced this pull request Jan 22, 2023
The `Path` and `COMMON_FIXED_EXTENSIONS` variables were not
defined at all. This code is untested, and SciPy doesn't build
with NumPy `main` before this fix. The issue was introduced
a few days ago in numpygh-22885.
@rgommers
Copy link
Copy Markdown
Member

The numpy.distutils changes in this PR are completely broken, Path and COMMON_FIXED_EXTENSIONS are not defined. This code is both deprecated and untested, so please avoid touching it. And if you really have to, please test that you do not break SciPy.

@rgommers
Copy link
Copy Markdown
Member

I'll merge gh-23066 once CI passes and will trigger new nightly builds, to unbreak SciPy CI.

@mattip
Copy link
Copy Markdown
Member

mattip commented Jan 22, 2023

I wonder why coverage did not mark the lack of tests here.

@rgommers
Copy link
Copy Markdown
Member

It probably does show that. There are very few tests for numpy.distutils, and branch coverage is even worse.

rgommers added a commit that referenced this pull request Jan 22, 2023
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.

4 participants