Refactor scanner in Py2.7-compatible form (temporarily) and enable full testing#177
Merged
marshallward merged 2 commits intomainfrom Jul 30, 2025
Merged
Refactor scanner in Py2.7-compatible form (temporarily) and enable full testing#177marshallward merged 2 commits intomainfrom
marshallward merged 2 commits intomainfrom
Conversation
This patch "de-versions" the scanner to work on older versions of Python. We did not mean to drop Python 2.7 suddenly, so this removes the following constructs from the scanner: * No `d1 | d2` merges of dicts. * No use of "walrus" operator, `|=` Perhaps a lot of work for nothing, since we plan to drop Py2.7 very soon, but at least it will be on purpose!
This patch makes several changes to the GH action CI:
* Python and OS version testing actually works now.
- The incorrect `python` was renamed to `python-version`
(Thanks to Clément Robert, @neutrinoceros)
- `runs-on` now correctly pulls from the matrix, rather than set to
`ubuntu-latest`.
In fact, references to fixed Ubuntu versions are gone entirely.
* The unsupported Python versions (2.7,3.5-7) are moved to "legacy"
container-based tests, since no sane version of
* `pull_request` trigger added (again, thanks @neutrinoceros)
* `setup-python` upgraded to @v5
All tests appear to be running correctly now.
Co-authored-by: Clément Robert <cr52@protonmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #177 +/- ##
==========================================
+ Coverage 96.98% 97.20% +0.22%
==========================================
Files 9 9
Lines 2120 2150 +30
Branches 294 358 +64
==========================================
+ Hits 2056 2090 +34
+ Misses 39 35 -4
Partials 25 25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Owner
Author
|
@neutrinoceros I added you as a coauthor on the CI commit, but let me know if you would prefer me to remove it. I'm very grateful that you identified this issues in the CI. |
Contributor
|
that's alright with me, thanks for the ping and glad I was of help ! |
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 PR contains two commits:
scanner.pyis "devolved" to work over a wider range of legacy Python versions, including 2.7.The GitHub Actions CI has been widely overhauled to properly support multiple versions of Python and operating systems. Several serious errors in the config file has been fixed.
More details are provided inside of the respective commits.
Although this restores Python 2.7 compatibility, this should only be considered a temporary step towards the eventual removal of Python 2.7 support.
This addresses several of the issues raised in #176.