Skip to content

ENH: Bump to 24.04 and tomllib#30

Closed
larsoner wants to merge 5 commits into
scientific-python:mainfrom
larsoner:bump
Closed

ENH: Bump to 24.04 and tomllib#30
larsoner wants to merge 5 commits into
scientific-python:mainfrom
larsoner:bump

Conversation

@larsoner

Copy link
Copy Markdown
Contributor

Over in MNE-Python we get:

https://github.com/mne-tools/mne-python/actions/runs/18803456223/job/53654097297?pr=13460

  File "/check_changelog.py", line 34, in <module>
    toml_cfg = loads(pyproject_toml.decoded_content.decode('utf-8'))
Bot username: changelog-bot
  File "/usr/local/lib/python3.10/dist-packages/toml/decoder.py", line 511, in loads
    ret = decoder.load_line(line, currentlevel, multikey,
  File "/usr/local/lib/python3.10/dist-packages/toml/decoder.py", line 778, in load_line
Base repository: mne-tools/mne-python

    value, vtype = self.load_value(pair[1], strictly_valid)
  File "/usr/local/lib/python3.10/dist-packages/toml/decoder.py", line 880, in load_value
    return (self.load_array(v), "array")
  File "/usr/local/lib/python3.10/dist-packages/toml/decoder.py", line 1002, in load_array
    a[b] = a[b] + ',' + a[b + 1]
IndexError: list index out of range

So let's bump to tomllib instead of using toml, which is easily achieved (hopefully) by using 24.04 + Python 3.12 instead of Python 3.10.

I don't see anything that actually tries to run the PR'ed version of the action, so I'm going to add a CI workflow to do this first. I'll also add a dummy run first, replicating the issue (hopefully). Then once that works, I'll push a fix.

@codecov

codecov Bot commented Oct 27, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.39%. Comparing base (44c2498) to head (07fee69).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #30   +/-   ##
=======================================
  Coverage   94.39%   94.39%           
=======================================
  Files           2        2           
  Lines         107      107           
=======================================
  Hits          101      101           
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pllim

pllim commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

Thanks! It was a long time ago when toml people refactored an internal function that we used here, broke something, and Stuart Mumford made decision to copy the old function out because it was the fastest way to fix the incompatibility. Perhaps things are different now.

Comment thread pyproject.toml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The dependency list here seems unrelated. Is this for testing?

@larsoner

Copy link
Copy Markdown
Contributor Author

Ooof I'm messing with the wrong repo... need to do this to actions-check-changelog 🤦

@larsoner larsoner closed this Oct 27, 2025
Comment thread check_changelog.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The fix using Auth here is uncontroversial. So if you want to just open a mini PR with this Auth fix, we can probably merge it right away.

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