redhat-aqe / review-rot

GNU General Public License v3.0
13 stars 16 forks source link

Use Python 3.9 in container image, drop Python 3.6 support #125

Closed hluk closed 2 years ago

hluk commented 2 years ago

Python package python-gitlab supports only Python 3.7+.

Builds the container image with Python 3.9.

hluk commented 2 years ago

@pbortlov Please review.

hluk commented 2 years ago

GitLab integration is broken in the latest container image. The error is:

Traceback (most recent call last):
  File "/usr/local/bin/review-rot", line 4, in <module>
    __import__('pkg_resources').run_script('review-rot==1.0', 'review-rot')
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 656, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1453, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.6/site-packages/review_rot-1.0-py3.6.egg/EGG-INFO/scripts/review-rot", line 295, in <module>
    main()
  File "/usr/local/lib/python3.6/site-packages/review_rot-1.0-py3.6.egg/EGG-INFO/scripts/review-rot", line 113, in main
    reviewers_config=reviewers_config,
  File "/usr/local/lib/python3.6/site-packages/review_rot-1.0-py3.6.egg/reviewrot/gitlabstack.py", line 59, in request_reviews
    gl = gitlab.Gitlab(host, token, ssl_verify=ssl_verify)
  File "/usr/local/lib/python3.6/site-packages/python_gitlab-3.4.0-py3.6.egg/gitlab/client.py", line 122, in __init__
    import gitlab.v4.objects
  File "/usr/local/lib/python3.6/site-packages/python_gitlab-3.4.0-py3.6.egg/gitlab/v4/objects/__init__.py", line 18, in <module>
    from .access_requests import *
  File "/usr/local/lib/python3.6/site-packages/python_gitlab-3.4.0-py3.6.egg/gitlab/v4/objects/access_requests.py", line 1, in <module>
    from gitlab.base import RESTManager, RESTObject
  File "/usr/local/lib/python3.6/site-packages/python_gitlab-3.4.0-py3.6.egg/gitlab/base.py", line 21, in <module>
    from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'
pbortlov commented 2 years ago

@hluk where is the fix gitlab support change? Can you rename it?