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 compatibility with Python 3.9 by renaming fancy root logger #3465

Merged
merged 6 commits into from
Oct 13, 2020

Conversation

boegel
Copy link
Member

@boegel boegel commented Oct 10, 2020

Requires because of changed behavior in Python's getLogger function, see python/cpython#15077

Fix for:

 >> python -m easybuild.main --version
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.0/x64/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/hostedtoolcache/Python/3.9.0/x64/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/easybuild-framework/easybuild-framework/easybuild/main.py", line 46, in <module>
    from easybuild.tools.build_log import EasyBuildError, print_error, print_msg, stop_logging
  File "/home/runner/work/easybuild-framework/easybuild-framework/easybuild/tools/build_log.py", line 191, in <module>
    del _init_fancylog.manager.loggerDict[_init_fancylog.name]
KeyError: 'root'

@boegel boegel added the bug fix label Oct 10, 2020
@boegel boegel added this to the next release (4.3.1) milestone Oct 10, 2020
@boegel boegel requested a review from ocaisa October 10, 2020 17:01
Copy link
Member

@ocaisa ocaisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane to me

@ocaisa
Copy link
Member

ocaisa commented Oct 13, 2020

Seems like problem solved:

(py39) [ocaisa@generoso ~]$ python -m easybuild.main --version
This is EasyBuild 4.3.1.dev0 (framework: 4.3.1.dev0, easyblocks: 4.3.1.dev0) on host generoso.

@ocaisa ocaisa merged commit 2f7a426 into easybuilders:develop Oct 13, 2020
@boegel boegel deleted the py39 branch October 13, 2020 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants