#106 requirements: fix invalid bodhi import
Merged 2 years ago by jskladan. Opened 2 years ago by kparal.

@@ -22,7 +22,8 @@ 

  from datetime import datetime

  import logging

  

- from fedora.client import bodhi, ServerError

+ from fedora.client import ServerError

+ from bodhi.client.bindings import BodhiClient, BodhiClientException

  

  from blockerbugs import app

  from blockerbugs.models.update import Update
@@ -38,7 +39,7 @@ 

              self.bodhi_interface = bodhi_interface()

          else:

              # disable saving session on disk by cache_session=False

-             self.bodhi_interface = bodhi.BodhiClient(base_url=bodhi_baseurl, cache_session=False)

+             self.bodhi_interface = BodhiClient(base_url=bodhi_baseurl, cache_session=False)

          self.log = logging.getLogger('update_sync')

  

      def extract_information(self, update):
@@ -120,7 +121,7 @@ 

          )

          try:

              result = self.bodhi_interface.query(**queries_data)

-         except bodhi.BodhiClientException as e:

+         except BodhiClientException as e:

              # ignore invalid release error so it doesn't blow up when

              # bug trackers for a release not present in bodhi are added

              if 'Invalid releases' in str(e):

file modified
+8 -1
@@ -28,7 +28,7 @@ 

  

  Create a new virtualenv in the base of the source tree::

  

-   virtualenv env_blockerbugs

+   virtualenv --system-site-packages env_blockerbugs

  

  In order to install python packages into the virtualenv or use the packages

  inside the virtualenv, it must be activated::
@@ -44,6 +44,13 @@ 

  

    pip install -r requirements.txt

  

+ Install bodhi-client in the system until `https://github.com/fedora-infra/bodhi/issues/3919`_

+ is fixed::

+ 

+   sudo dnf install python3-bodhi-client

+ 

+ **FIXME: Remove this and ``--system-site-packages`` once the bug is fixed.**

+ 

  

  Configuring dev environment

  ===========================

file modified
+1
@@ -1,4 +1,5 @@ 

  alembic >= 1.1.0

+ # bodhi-client >= 5.0.0  # uncomment once this is fixed: https://github.com/fedora-infra/bodhi/issues/3919

  Flask-Admin >= 1.5.2

  Flask-SQLAlchemy == 2.4.0

  Flask-WTF >= 0.14.2