Refactor config/plugin compatibility paths to Python 3.12 and remove legacy parsing duplication#2097
Closed
Refactor config/plugin compatibility paths to Python 3.12 and remove legacy parsing duplication#2097
Conversation
Changed Files
|
Co-authored-by: Anselmoo <13209783+Anselmoo@users.noreply.github.com>
Co-authored-by: Anselmoo <13209783+Anselmoo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix legacy compatibility and transformation issues for Python 3.12
Refactor config/plugin compatibility paths to Python 3.12 and remove legacy parsing duplication
Mar 10, 2026
|
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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.



This change removes remaining legacy compatibility branches and anti-pattern typing around config/plugin loading. It centralizes config-file parsing through the core model path and aligns runtime behavior with the project’s Python 3.12 minimum.
All PR-Submissions:
Pull Requests for the same
update/change?
New ✨✨ Feature-Submissions:
Changes to ⚙️ Core-Features:
Have you added an explanation of what your changes do and why you'd like
us to include them?
Have you written new tests for your core changes, as applicable?
Have you successfully run tests with your changes locally?
Problem addressed
Any/casts), duplicated core vs Jupyter parsing paths, and Python <3.12 compatibility code still present in active paths.Core changes
tomlireads with stdlibtomllibin:spectrafit/core/fitting_config.pyspectrafit/cli/commands/convert.pyspectrafit/models/project_config.pytomllib/tomliimport fallback branches in Jupyter config loading and corresponding unit test path.spectrafit/jupyter/config_io.py::load_notebook_config()now validates throughUnifiedFittingConfig.from_file(...)instead of re-implementing file parsing.spectrafit/plugins/discovery.pynow usesentry_points().select(...)directly; removedcast("Any", ...),plugins_eps: Any, and old-version branching.tests/unit/test_plugin_discovery.pyforentry_points().select(...)discovery behavior.tests/unit/test_jupyter_roundtrip.pyto usetomllibdirectly.Representative change
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.