Skip to content

Refactor scanner in Py2.7-compatible form (temporarily) and enable full testing#177

Merged
marshallward merged 2 commits intomainfrom
deversion
Jul 30, 2025
Merged

Refactor scanner in Py2.7-compatible form (temporarily) and enable full testing#177
marshallward merged 2 commits intomainfrom
deversion

Conversation

@marshallward
Copy link
Copy Markdown
Owner

This PR contains two commits:

  • scanner.py is "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.

marshallward and others added 2 commits July 29, 2025 14:54
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
Copy link
Copy Markdown

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.20%. Comparing base (ce0d8b1) to head (dc4f59e).

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              
Flag Coverage Δ
python2.7 96.67% <100.00%> (?)
python3.5 96.91% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@marshallward
Copy link
Copy Markdown
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.

@neutrinoceros
Copy link
Copy Markdown
Contributor

that's alright with me, thanks for the ping and glad I was of help !

@marshallward marshallward merged commit 91558fe into main Jul 30, 2025
58 checks passed
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