Skip to content

Restore python 3.6 and update CI to import module after installing - #178

Open
tynanford wants to merge 1 commit into
ChannelFinder:masterfrom
tynanford:master
Open

Restore python 3.6 and update CI to import module after installing#178
tynanford wants to merge 1 commit into
ChannelFinder:masterfrom
tynanford:master

Conversation

@tynanford

Copy link
Copy Markdown
Contributor

#177

This updates processors.py and recast.py to work with python3.6 and above - updated type hints and remove removeprefix which is >=3.9

Had claude help with updating the CI. It now actually imports the package as @anderslindho mentioned and manually installs the pip packages for 3.6 since setuptools on 3.6 doesn't work with the pyproject.toml setup. Claude also found an issue with the pyproject.toml file: The <3.8 and <3.7 lines for requests and twisted overlap for python 3.6.

Comment thread .github/workflows/server.yml Fixed
Comment thread .github/workflows/server.yml Fixed
Comment thread .github/workflows/server.yml Fixed
Comment thread .github/workflows/server.yml Fixed

@anderslindho anderslindho left a comment

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.

Unfortunately this doesn’t work as-is - note Successfully installed UNKNOWN-0.0.0 in the 3.6 build log.

We’ll have to reintroduce setup.cfg, move the [project] / package metadata out of pyproject.toml, pin setuptools to something that still runs on 3.6, and fix the smoke test: right now PYTHONPATH=. imports from the checkout even when install failed, so it can’t catch this. After a real pip install ., run the import from /tmp (or any dir outside server/) so it has to use the installed package. We should probably also set ruff to py37 (it doesn’t support 36).

minor=$(python3 --version | cut -d. -f2)
if [ "$minor" -ge 7 ]; then
python -m pip install --upgrade "pip==24.0" --only-binary=:all:
python -m pip install .
@tynanford
tynanford force-pushed the master branch 2 times, most recently from d4e143f to e237c69 Compare August 7, 2026 19:53
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@tynanford

Copy link
Copy Markdown
Contributor Author

Ah, good catch. Instead of reverting back to setup.cfg I propose we just have the CI test the import without installing it as a package. Confirmed in a test commit here that the CI will fail for py3.6 - py3.8 with set keyword: https://github.com/ChannelFinder/recsync/actions/runs/31213348556

Sonarqube is complaining i think because we don't have pinned exact versions in the pyproject.toml file. To me it seems like something that could be dismissed?

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.

3 participants