question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Backports not properly ignored

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
netromdkcommented, Sep 28, 2020

That’s real easy. Will be sure to do that the next time around.

1reaction
adamjstewartcommented, Sep 28, 2020

Awesome, I added you.

Btw, in the future, if you cut a new release, you can add it to Spack by running:

$ spack checksum py-vermin 0.10.5

==> Fetching https://github.com/netromdk/vermin/archive/v0.10.5.tar.gz
####################################################################################### 100.0% 

    version('0.10.5', sha256='00601356e8e10688c52248ce0acc55d5b45417b462d5aa6887a6b073f0d33e0b')

Then run spack edit py-vermin and 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I enable the "backports" repository? - Ask Ubuntu
Command-line/Server Instructions. Backports are enabled by default, here's how you can check to make sure they are turned on. Ensuring Backports are enabled....
Read more >
linux - R Backports and Invalid Signature - Stack Overflow
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error:...
Read more >
Fixed issue not checking for DONE token errors properly so ...
Fixed issue not checking for DONE token errors properly so exceptions are ignored (backport of 1857, 1943, 1989 to 10.2.2) #1990.
Read more >
[SOLVED] - Issues During Install on Fresh Debian 11
I assume that this complaint is that the directory is not found, but the install process does create it correctly. Therefore it can...
Read more >
How to install Backports in Debian/Ubuntu/Mint - YouTube
Here's how to use backports to easily get newer software in Debian and Debian-based distros, including installing the latest kernel.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found