Giter Site home page Giter Site logo

Comments (4)

cybaol avatar cybaol commented on June 11, 2024 1

Alternative implementation:

import importlib.util
import sys


def load_dynamic(name, path, file=None):
    spec = importlib.util.spec_from_file_location(name, path)
    module = importlib.util.module_from_spec(spec)
    sys.modules[name] = module
    spec.loader.exec_module(module)
    return sys.modules[name]

from pysmt.

marcogario avatar marcogario commented on June 11, 2024

Thank you for the heads up!

@mikand It seems the whole reason we are using imp.load_dynamic is to avoid having a verbatim copy of the parser (according to this comment).
As we have not made changes to the parser in a long time, shall we just make a copy and simplify all of that? If we do, I'd then suggest we add a CI check for checking the equality of those two files.

This might remove some unnecessary complexity and be an easier fix than trying to re-implement a similar logic.
WDYT?

from pysmt.

dvzrv avatar dvzrv commented on June 11, 2024

Thanks for getting back to this issue so quickly!
A near term resolution would be awesome, as otherwise this project will be broken on Arch Linux once we upgrade. 🙇

(cc @anthraxx for package maintainer reference)

from pysmt.

mikand avatar mikand commented on June 11, 2024

@alvalentini do you have time for a quick pr on this?

from pysmt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.