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 tweedledum runtime detection in BooleanExpression.from_dimacs_file (backport #10132) #10137

Merged
merged 1 commit into from
May 22, 2023

Commits on May 22, 2023

  1. Fix tweedledum runtime detection in BooleanExpression.from_dimacs_file (

    #10132)
    
    This commit fixes an oversight in the 0.24.0 release that caused an
    accidental change in the exception raised when attempting to use
    BooleanExpression.from_dimacs_file without having tweedledum installed.
    In #9754 the detection of tweedledum was updated to avoid import time
    detection so that the module can be imported even if tweedledum isn't
    installed. This was done through the use of the optionals decorators
    so that tweedledum is only attempted to be imported when the
    classicalfunction modules is used. However, the decorators don't wrap
    classmethod constructors by default and this caused the incorrect
    exception type to be raised. This commit fixes this by doing the runtime
    checking manually inside the from_dimacs_file constructor.
    
    (cherry picked from commit 9f647c7)
    mtreinish authored and mergify[bot] committed May 22, 2023
    Configuration menu
    Copy the full SHA
    95fd32e View commit details
    Browse the repository at this point in the history