reportportal / agent-Python-RobotFramework

Robot Framework integration for Report Portal
Apache License 2.0
59 stars 33 forks source link

Python 3.12 dropped distutils #187

Closed d0b3rm4n closed 4 weeks ago

d0b3rm4n commented 5 months ago

Describe the bug See PEP-0632 Python 3.12 dropped distutils.

Steps to Reproduce Steps to reproduce the behavior:

python --version
Python 3.12.3
pip install robotframework-reportportal robotframework
post_report
Traceback (most recent call last):
  File "/.pyenv/versions/bugreport/bin/post_report", line 5, in <module>
    from robotframework_reportportal.post_report import main
  File "/.pyenv/versions/3.12.3/envs/bugreport/lib/python3.12/site-packages/robotframework_reportportal/post_report.py", line 50, in <module>
    from robotframework_reportportal.result_visitor import RobotResultsVisitor
  File "/.pyenv/versions/3.12.3/envs/bugreport/lib/python3.12/site-packages/robotframework_reportportal/result_visitor.py", line 22, in <module>
    from . import listener
  File "/.pyenv/versions/3.12.3/envs/bugreport/lib/python3.12/site-packages/robotframework_reportportal/listener.py", line 29, in <module>
    from .service import RobotService
  File "/.pyenv/versions/3.12.3/envs/bugreport/lib/python3.12/site-packages/robotframework_reportportal/service.py", line 31, in <module>
    from .variables import Variables
  File "/.pyenv/versions/3.12.3/envs/bugreport/lib/python3.12/site-packages/robotframework_reportportal/variables.py", line 16, in <module>
    from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils'

Expected behavior Either dependency to distutils is removed or a dependency to setuptools is added since that ships distutils and command runs without problems.

Actual behavior See stack trace above.

Package versions

pip list
Package                     Version
--------------------------- --------
aenum                       3.1.15
aiohttp                     3.9.5
aiosignal                   1.3.1
attrs                       23.2.0
certifi                     2024.2.2
charset-normalizer          3.3.2
frozenlist                  1.4.1
idna                        3.7
multidict                   6.0.5
pip                         24.0
python-dateutil             2.8.2
reportportal-client         5.5.6
requests                    2.31.0
robotframework              7.0
robotframework-reportportal 5.5.3
six                         1.16.0
urllib3                     2.2.1
yarl                        1.9.4

Additional context Installing setuptools fixes the issue currently in 3.12.x as suggested in https://stackoverflow.com/a/77233866 or https://stackoverflow.com/a/77284076