reportportal / agent-python-pytest

Framework integration with PyTest
Apache License 2.0
94 stars 102 forks source link

Import error for 'RPLogger' and RPLogHandler after update to 5.1.0 #303

Closed dkuchynskyi closed 2 years ago

dkuchynskyi commented 2 years ago

Hi!

selenium==4.1.3 pytest == 7.1.1 pytest-reportportal==5.1.0

After updating to the latest version of pytest report portal (5.1.0) error appears:

ImportError: cannot import name 'RPLogger' from 'pytest_reportportal'

thanks!

lolrenx commented 2 years ago

same error here using pylenium (having report portal as dependency) pytest-reportportal==5.1.0 pytest==7.1.1 pyleniumio==1.14.2

conftest.py:15: in <module>
    from pytest_reportportal import RPLogger, RPLogHandler
E   ImportError: cannot import name 'RPLogger' from 'pytest_reportportal' (.../venv/lib/python3.10/site-packages/pytest_reportportal/__init__.py)
lolrenx commented 2 years ago

looks like RPLogger was moved

@dkuchynskyi

changing my conftest from from pytest_reportportal import RPLogger, RPLogHandler

to from reportportal_client import RPLogger, RPLogHandler

fixed it

HardNorth commented 2 years ago

Yes, it is moved. That's why we changed major version.

dkuchynskyi commented 2 years ago

Please update documentation, now it is looks like that: image

HardNorth commented 2 years ago

@dkuchynskyi Done. Yeah probably not the best decision to move it at once. Will do some transition period with class deprecation next time.

rnestler commented 2 years ago

Yes, it is moved. That's why we changed major version.

Hmm? The major version didn't change. It is still 5.

HardNorth commented 2 years ago

Yes, this one version follows server's API changes.