forked from gwastro/pycbc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
centralize python12 backwards compatibility function
- Loading branch information
Showing
4 changed files
with
17 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,19 +32,7 @@ from pycbc import pnutils | |
from pycbc.waveform import TemplateBank | ||
from pycbc.io.ligolw import LIGOLWContentHandler | ||
from pycbc.io.hdf import HFile | ||
|
||
import importlib.util | ||
import importlib.machinery | ||
|
||
def load_source(modname, filename): | ||
loader = importlib.machinery.SourceFileLoader(modname, filename) | ||
spec = importlib.util.spec_from_file_location(modname, filename, loader=loader) | ||
module = importlib.util.module_from_spec(spec) | ||
# The module is always executed and not cached in sys.modules. | ||
# Uncomment the following line to cache the module. | ||
# sys.modules[module.__name__] = module | ||
loader.exec_module(module) | ||
return module | ||
from pycbc import load_source | ||
|
||
__author__ = "Ian Harry <[email protected]>" | ||
__version__ = pycbc.version.git_verbose_msg | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters