diff --git a/changes.d/6248.fix.md b/changes.d/6248.fix.md new file mode 100644 index 00000000000..88e5d0ab279 --- /dev/null +++ b/changes.d/6248.fix.md @@ -0,0 +1 @@ +Upgrade to EmPy 4 to fix an issue with stdout in detaching mode. diff --git a/conda-environment.yml b/conda-environment.yml index 4a598468d67..de911f87866 100644 --- a/conda-environment.yml +++ b/conda-environment.yml @@ -21,7 +21,7 @@ dependencies: - tomli >=2 # [py<3.11] # optional dependencies - #- empy >=3.3,<3.4 + #- empy >=4.1 #- pandas >=1.0,<2 #- pympler #- matplotlib-base diff --git a/cylc/flow/parsec/empysupport.py b/cylc/flow/parsec/empysupport.py index b4164894e0f..255cc36dc55 100644 --- a/cylc/flow/parsec/empysupport.py +++ b/cylc/flow/parsec/empysupport.py @@ -52,7 +52,11 @@ def empyprocess( os.chdir(dir_) ftempl = StringIO('\n'.join(flines)) xtempl = StringIO() - interpreter = em.Interpreter(output=em.UncloseableFile(xtempl)) + # Requires EmPy >= 4.1 + interpreter = em.Interpreter( + output=em.UncloseableFile(xtempl), + dispatcher=False # raise errors to caller + ) # Add `CYLC_` environment variables to the global namespace. interpreter.updateGlobals( @@ -60,7 +64,7 @@ def empyprocess( ) try: - interpreter.file(ftempl, '