Repository navigation
Conversation
sep = "\s+" relies on Python treating an unrecognised escape literally. On the image Python (3.14) that emits SyntaxWarning: "\s" is an invalid escape sequence. Such sequences will not work in the future. It still works today, so nothing fails yet, but it is in the notebook every student copies. r"\s+" is the form that keeps working.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One character.
sep = '\s+'→sep = r'\s+'inclimate.ipynb.\sis not a recognised Python escape. Python currently falls back to treating such sequences literally, so the regex works and the tests pass — but on the image's Python 3.14 it emits:"Will not work in the future" is the operative part: this is slated to become a hard error. It sits in the notebook every student copies, so it would break the whole cohort at once whenever that lands.
How this came up
Chasing a
delim_whitespacefailure in a student repo. Worth recording what that turned up, since it is not what it looked like:delim_whitespaceappears nowhere in any of the four templates, nor inespm-157/website. The template has always used the correctsep. That student introduced it themselves — it is a pandas 1.x idiom removed in pandas 3.0, which the image ships.FileNotFoundError: 'co2_mm_mlo.csv'is a student switching to an uncommitted local file; and the template's kernelspec ispython3, soNoSuchKernel: climateis a student's locally-created venv kernel saved into notebook metadata.So the course materials were not the source of any of those. This escape sequence is the one real latent issue in them, found by compiling every code cell of all four template notebooks under 3.14 — it was the only hit.