ert icon indicating copy to clipboard operation
ert copied to clipboard

Remove deprecated warnings from snake_oil

Open hnformentin opened this issue 3 years ago • 4 comments

Describe the bug When running snake_oil.ert, I get the following deprecation warnings:

ert gui snake_oil.ert
2022-08-29 09:44:40,967 [WARNING] res.enkf: ** There were warnings when parsing the configuration file: snake_oil.ert. 0 : UMASK is deprecated and will be removed in the future. 2022-08-29 09:44:40,981 [CRITICAL] res.enkf: Using RANDOM_SEED: 3593114179000630026631423308983283277868 DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead DeprecationWarning: There is no current event loop DeprecationWarning: There is no current event loop

We should address them.

To reproduce Steps to reproduce the behaviour:

  1. Clone ert
  2. pip install -e .
  3. ert gui test-data/local/snake_oil/snake_oil.ert
  4. Run experiment
  5. Read warnings

Expected behaviour No deprecation warnings should be reported when the file is updated.

Environment

  • ERT 3.0.0rc1

hnformentin avatar Aug 29 '22 07:08 hnformentin

UMASK warning is covered by #3017

berland avatar Aug 29 '22 13:08 berland

Replacing setDaemon() is perhaps possible now that we support 3.8 only?

berland avatar Aug 29 '22 14:08 berland

Nice that you shared the context. I don't know the answer for your question. It is curious though if we have the deprecation warnings but we are not able to remove/substitute the keys. I would expect that if we can not remove, we would not consider to be deprecated and not have the warnings. Is this expectation wrong somehow?

hnformentin avatar Aug 30 '22 07:08 hnformentin

Fixing the setDaemon() warning is actionable right now, https://docs.python.org/3.8/library/threading.html#threading.Thread.setDaemon

(umask is just harder to get rid of due to the peculiar current c-code parsing the ert config file, may just hold off until we have replaced the parsing by python code)

berland avatar Aug 30 '22 08:08 berland

Will close the issue since UMASK is covered by another issue and setDaemon is solved.

hnformentin avatar Sep 05 '22 06:09 hnformentin