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

Logger doesn't support stacklevel #198

Closed
SabinaRachocka opened this issue Nov 15, 2022 · 2 comments
Closed

Logger doesn't support stacklevel #198

SabinaRachocka opened this issue Nov 15, 2022 · 2 comments
Labels

Comments

@SabinaRachocka
Copy link

Describe the bug
The RPLogger doesn't accept stacklevel as an argument, which results in an error.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Use any library that logs internally using stacklevel as an argument.
    Ex. sqlalchemy 1.4.44

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
> E TypeError: _log() got an unexpected keyword argument 'stacklevel' args = () kwargs = {'stacklevel': 3} level = 20 msg = 'select pg_catalog.version()' selected_level = 20 self = <sqlalchemy.log.InstanceLogger object at 0x7faff18d6700> venv/lib/python3.9/site-packages/sqlalchemy/log.py:179: TypeError

Package versions
Debian GNU/Linux 11 (bullseye)
Python 3.9.15
pytest==7.2.0
pytest-reportportal==5.0.10
reportportal-client==5.2.5

@HardNorth
Copy link
Member

@SabinaRachocka, Thanks for pointing this out! This parameter was added in Python 3.8: python/cpython#77346
If I add it into our logging module we will loose support of Python 3.6-3.7. I'm not ready to do this :-/
Need to test somehow with **kwargs parameter.

@HardNorth HardNorth transferred this issue from reportportal/agent-python-pytest Nov 18, 2022
HardNorth added a commit that referenced this issue Nov 18, 2022
HardNorth added a commit that referenced this issue Nov 18, 2022
HardNorth added a commit that referenced this issue Nov 18, 2022
@HardNorth
Copy link
Member

Fixed in: cd18e87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants