Backports not properly ignored
See original GitHub issueDescribe the bug
Even if I add --backport argparse to vermin, it still reports a minimum version requirement of Python 2.7.
To Reproduce
$ cat > foo.py
import argparse
$ vermin --backport argparse -vvvv foo.py
Detecting python files..
Analyzing using 4 processes..
2.7, 3.2 /Users/Adam/Downloads/foo.py
L1 C7: 'argparse' requires 2.7, 3.2
Minimum required versions: 2.7, 3.2
Expected behavior
Any version of Python should work for this file.
Environment
- Vermin 0.10.4
- macOS 10.15.7
- Python 3.8.5
Additional information
If you have any trouble reproducing this, I suspect that this is a macOS + Python 3.8 bug. See https://docs.python.org/3.8/library/multiprocessing.html#contexts-and-start-methods:
Changed in version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes of the subprocess. See bpo-33725.
One workaround would be to force it to always use the fork start method by replacing multiprocessing with multiprocessing.get_context('fork') everywhere it’s used. We recently had to do this for Spack: https://github.com/spack/spack/pull/18124
A more permanent workaround would be to ensure that both spawn and fork work as expected.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (7 by maintainers)

Top Related StackOverflow Question
That’s real easy. Will be sure to do that the next time around.
Awesome, I added you.
Btw, in the future, if you cut a new release, you can add it to Spack by running:
Then run
spack edit py-verminand copy-n-paste that line into the package and submit a PR. Of course, I’m also happy to add new versions to the package as well, although I might not add new versions as regularly.