Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: require python >=3.7 again (the python 3.9 dependency was unnecessary) #2372

Merged
merged 10 commits into from Aug 2, 2023

Conversation

dlaehnemann
Copy link
Contributor

Description

The respective bug was introduced with PR #2341, so it exists starting with version 7.30.2. Also see issue #2369 and PR #2370 for further context.

This code from PR #2341 seems to get run every time a conda environment is used:

if sys.version_info < (3, 9):
raise ValueError("Snakemake requires at least Python 3.9.")

Thus, any conda environment in a rule with an older python version included, will trigger a:

  File "/opt/conda/envs/snakemake/lib/python3.11/site-packages/snakemake/__init__.py", line 9, in <module>
    raise ValueError("Snakemake requires at least Python 3.9.")
ValueError: Snakemake requires at least Python 3.9.

This would preclude snakemake from running any software that needs an older python version, so this is clearly an unwanted side-effect. But I am not sure how to fix this.

Currently, this PR is only a minimal example test to trigger this behaviour in the CI tests. Hopefully, this will make debugging it quicker for @johanneskoester (or someone else?).

QC

  • The PR contains a test case for the changes or the changes are already covered by an existing test case.
  • The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

@github-actions
Copy link
Contributor

Please format your code with black: black snakemake tests/*.py.

@dlaehnemann
Copy link
Contributor Author

A quick workaround for anybody getting this bug, until it is fixed: Downgrade your snakemake to <=7.30.1.

@dlaehnemann
Copy link
Contributor Author

So, this bug gets triggered in the Windows CI already, right here is the actual error message:
https://github.com/snakemake/snakemake/actions/runs/5690154966/job/15423010580?pr=2372#step:6:526

Currently rerunning the Linux CI, as this failed on slurm cluster creation earlier in the tests.

@dlaehnemann
Copy link
Contributor Author

The Linux CI failure seem to be an unrelated and obscure error, where the general GitHub Actions runner is Ubuntu 22.04.2, but the slurm setup tries to download Ubuntu 22.04.1 packages, with the respective version not available on the Azure Ubuntu package mirror. I have no clue, why these versions would be out of sync...

@dlaehnemann
Copy link
Contributor Author

Here's a related PR for the Linux CI failure with the slurm setup #2377 .

@johanneskoester
Copy link
Contributor

johanneskoester commented Jul 31, 2023

I expect this to be fixed with the changes in #2305. However, that will become Snakemake 8.0. I'll think about a fix for the 7.x series, in order to have a final release that works.

@sonarcloud
Copy link

sonarcloud bot commented Aug 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@johanneskoester johanneskoester changed the title fix: bug that triggers python >=3.9 requirement in rule conda envs fix: require python >=3.7 again (the python 3.9 dependency was unnecessary) Aug 2, 2023
@johanneskoester johanneskoester merged commit 0d0e9c4 into main Aug 2, 2023
8 checks passed
@johanneskoester johanneskoester deleted the fix-minimum-python-version-for-conda-envs branch August 2, 2023 06:21
johanneskoester pushed a commit that referenced this pull request Aug 2, 2023
🤖 I have created a release *beep* *boop*
---


##
[7.31.1](v7.31.0...v7.31.1)
(2023-08-02)


### Bug Fixes

* require python &gt;=3.7 again (the python 3.9 dependency was
unnecessary)
([#2372](#2372))
([0d0e9c4](0d0e9c4))


### Documentation

* update CHANGELOG.md: add minimum Python version bump
([#2370](#2370))
([48e934d](48e934d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

None yet

2 participants