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

Autoconf: Better Unicode Python support in makedep #370

Merged
merged 2 commits into from
Jun 9, 2023

Conversation

marshallward
Copy link
Member

The open() commands in makedep for reading Fortran source now includes an errors= argument for catching bytes outside of the file character set. Unknown characters are replaced with the "unknown" character (usually �) rather than raising an error.

This avoids problems with Unicode characters and older Pythons which do not support them, as well as characters from legacy encodings which can cause errors in Unicode.

Substitution does not break any behavior, since Unicode is only permitted inside of comment blocks and strings.

This fixes several errors which were silent in .testing but were observed by some users which using autoconf to build their own executables.

The `open()` commands in `makedep` for reading Fortran source now
includes an `errors=` argument for catching bytes outside of the file
character set.  Unknown characters are replaced with the "unknown"
character (usually �) rather than raising an error.

This avoids problems with Unicode characters and older Pythons which do not
support them, as well as characters from legacy encodings which can
cause errors in Unicode.

Substitution does not break any behavior, since Unicode is only
permitted inside of comment blocks and strings.

This fixes several errors which were silent in `.testing` but were
observed by some users which using autoconf to build their own
executables.
@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Merging #370 (4a93d47) into dev/gfdl (e45b983) will not change coverage.
The diff coverage is n/a.

❗ Current head 4a93d47 differs from pull request most recent head a280a04. Consider uploading reports for the commit a280a04 to get more accurate results

@@            Coverage Diff            @@
##           dev/gfdl     #370   +/-   ##
=========================================
  Coverage     38.38%   38.38%           
=========================================
  Files           268      268           
  Lines         76010    76010           
  Branches      13987    13987           
=========================================
  Hits          29174    29174           
  Misses        41597    41597           
  Partials       5239     5239           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

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

I am formally approving this PR, in line with the review from Raf Dussin.

@marshallward
Copy link
Member Author

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/19453 ✔️

@marshallward marshallward merged commit d0f7b29 into NOAA-GFDL:dev/gfdl Jun 9, 2023
@marshallward marshallward deleted the ac_makedep_unicode branch July 21, 2023 14:40
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.

3 participants