Skip to content

Replace removed cgi module and update SRA_IDS_TO_RUNINFO to Python 3.13.7 - #403

Open
Flobo2689x wants to merge 3 commits into
nf-core:devfrom
Flobo2689x:fix/sra-ids-to-runinfo-cgi
Open

Flobo2689x wants to merge 3 commits into
nf-core:devfrom
Flobo2689x:fix/sra-ids-to-runinfo-cgi

Conversation

@Flobo2689x

Copy link
Copy Markdown

Closes #390

Description

  • bin/sra_ids_to_runinfo.py: the charset is now read with self._response.headers.get_content_charset("utf-8") instead of cgi.parse_header(). cgi was removed in Python 3.13. get_content_charset() is available on all supported Python versions.
  • SRA_IDS_TO_RUNINFO: conda environment and containers bumped from Python 3.9 to 3.13.7 (conda-forge::python=3.13.7, biocontainers/python:3.13.7, https://depot.galaxyproject.org/singularity/python:3.13.7).
  • Module and pipeline snapshots updated. Only the SRA_IDS_TO_RUNINFO python version changes.

MULTIQC_MAPPINGS_CONFIG and SRA_RUNINFO_TO_FTP still pin Python 3.9.5. I left them out to keep this PR focused on the issue. I can bump them in a follow-up if you want.

Testing

  • nf-test test modules/local/sra_ids_to_runinfo/tests/main.nf.test --profile +docker: 3/3 passed. The SRR13191702.runinfo.tsv md5 is unchanged; only the version entry differs.
  • nf-test test workflows/tests/sra_skip_fastq_download.nf.test --profile +docker: passed.
  • nf-core pipelines lint: 0 failed. The 5 warnings are all TODO strings or a missing subworkflow meta.yml, none of them related to this change.
  • I ran the script directly against ENA/NCBI with SRR13191702, ERR1160846, DRR028935, GSM4907283 and GSE214215:
    • Python 3.9: the original script and the patched one produce the same output.
    • Python 3.13 and 3.14: the original fails with No module named 'cgi', the patched one gives the same output as on 3.9.

PR checklist

  • This comment contains a description of changes (with reason).
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes. I ran the module test and sra_skip_fastq_download, not the full suite.
  • CHANGELOG.md is updated.

cgi was removed in Python 3.13, so the script failed with
"ModuleNotFoundError: No module named 'cgi'" when run outside the
pinned Python 3.9 conda environment or container. Read the charset from
the response headers with get_content_charset() instead.
Bump the conda environment and the container of SRA_IDS_TO_RUNINFO from
Python 3.9 to 3.13.7, and update the module and pipeline snapshots.
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.

1 participant