#5463 fix unit tests, bump to F39, unpin python packages and replace deprecated code if necessary
Merged 9 months ago by ngompa. Opened 9 months ago by wombelix.

dev/containers/base-centos-stream9-rpms-py3 dev/containers/base-centos-stream8-rpms-py3
file renamed
+15 -10
@@ -1,4 +1,4 @@ 

- FROM quay.io/centos/centos:stream8

+ FROM quay.io/centos/centos:stream9

  

  LABEL org.opencontainers.image.authors="pagure community"

  LABEL org.opencontainers.image.url="https://pagure.io/pagure"
@@ -9,33 +9,38 @@ 

  

  ENV SPECFILE=$specfile

  

- RUN dnf -y install \

-       epel-release epel-next-release 'dnf-command(config-manager)' \

-     && dnf -y config-manager --enable epel-testing epel-next-testing powertools \

+ RUN dnf -y install 'dnf-command(config-manager)' \

+     && dnf -y config-manager --set-enabled crb \

+     && dnf -y install epel-release \

      && dnf -y install \

        python3-setuptools \

        python3-beautifulsoup4 \

        python3-coverage \

-       python3-mock \

        python3-docutils \

        python3-flake8 \

        python3-pytest-xdist \

-       python3-flask-oidc \

-       python3-cchardet \

-       python3-fedora-messaging \

+       python3-chardet \

+       fedora-messaging \

        python3-pip \

        redis \

        which \

        git \

+       gcc \

      && dnf clean all

  

- RUN pip3 install pagure-messages

+ RUN pip3 install pagure-messages flask-oidc binaryornot celery straight-plugin trololio jenkins

  

  # Install all the requirements from the spec file and replace the macro

  # %{python_pkgversion} by '3' which thus installs all the py3 version of

  # the dependencies.

  RUN curl ${SPECFILE} -o /pagure.spec \

+     && sed -i 's/python%{python_pkgversion}-binaryornot//' /pagure.spec \

+     && sed -i 's/python%{python_pkgversion}-celery//' /pagure.spec \

+     && sed -i 's/python%{python_pkgversion}-flask-oidc//' /pagure.spec \

+     && sed -i 's/python%{python_pkgversion}-straight-plugin.*//' /pagure.spec \

+     && sed -i 's/python%{python_pkgversion}-trololio//' /pagure.spec \

+     && sed -i 's/python%{python_pkgversion}-jenkins//' /pagure.spec \

      && dnf install -y `grep "Requires:" /pagure.spec | \

        awk '{split($0, a, " "); print a[2]}' | grep -v "%{name}" | \

        sed -e "s|%{python_pkgversion}|3|"` \

-     && dnf clean all 

\ No newline at end of file

+     && dnf clean all

@@ -1,4 +1,4 @@ 

- FROM quay.io/fedora/fedora:36-x86_64

+ FROM quay.io/fedora/fedora:39-x86_64

  

  LABEL org.opencontainers.image.authors="pagure community"

  LABEL org.opencontainers.image.url="https://pagure.io/pagure"
@@ -24,15 +24,18 @@ 

          which \

          git \

          glibc-langpack-en \

+         libtiff-devel libjpeg-devel openjpeg2-devel zlib-devel \

+         freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \

+         harfbuzz-devel fribidi-devel libraqm-devel libimagequant-devel libxcb-devel \

      && dnf clean all

  

  # Pre-build tox environments and keep em in the base container

  # to avoid re-build on every run, even if tox config not changed

  RUN mkdir /tox \

      && echo Repo: ${REPO}, Branch: ${BRANCH} \

-     && git clone -b ${BRANCH} ${REPO} /pagure \

+     && GIT_TRACE=1 git clone -b ${BRANCH} ${REPO} /pagure \

      && ln -s /tox /pagure/.tox \

      && cd /pagure \

-     && tox --notest \

+     && tox --notest -vv \

      && cd / \

-     && rm -rf /pagure 

\ No newline at end of file

+     && rm -rf /pagure

@@ -1,4 +1,4 @@ 

- FROM quay.io/fedora/fedora:36-x86_64

+ FROM quay.io/fedora/fedora:39-x86_64

  

  LABEL org.opencontainers.image.authors="pagure community"

  LABEL org.opencontainers.image.url="https://pagure.io/pagure"
@@ -19,12 +19,13 @@ 

        python3-flake8 \

        python3-pytest-xdist \

        python3-flask-oidc \

-       python3-cchardet \

+       python3-chardet \

        python3-fedora-messaging \

        python3-pip \

        redis \

        which \

        git \

+       python3-pytest-timeout \

      && dnf clean all

  

  RUN pip install pagure-messages
@@ -36,4 +37,4 @@ 

      && dnf install -y --enablerepo=updates-testing `grep "Requires:" /pagure.spec | \

        awk '{split($0, a, " "); print a[2]}' | grep -v "%{name}" | \

        sed -e "s|%{python_pkgversion}|3|"` \

-     && dnf clean all 

\ No newline at end of file

+     && dnf clean all

dev/containers/code-centos-stream9-rpms-py3 dev/containers/code-centos-stream8-rpms-py3
file renamed
file was moved with no change to the file
@@ -11,7 +11,6 @@ 

  ENV REPO=$repo

  ENV BRANCH=$branch

  

- COPY tox_py3.sh /tox_py3.sh

  COPY entrypoint_pip.sh /entrypoint.sh

  RUN chmod +x /entrypoint.sh

  ENTRYPOINT /entrypoint.sh 

\ No newline at end of file

@@ -1,10 +1,16 @@ 

  #!/bin/bash

- cd / \

- && GIT_TRACE=1 git clone -b ${BRANCH} ${REPO} /pagure \

- && cp /tox_py3.sh /pagure/dev/containers/tox_py3.sh \

- && chmod +x /pagure/dev/containers/tox_py3.sh \

- && ln -s /tox /pagure/.tox \

- && cd /pagure \

- && ln -s /results /pagure/results \

- && sed -i -e 's|"alembic-3"|"alembic"|' /pagure/tests/test_alembic.py \

- && dev/containers/tox_py3.sh

+ 

+ # Print all executed commands to the terminal

+ set -x

+ 

+ # Fail script if any commands returns an error

+ set -e

+ 

+ cd /

+ GIT_TRACE=1 git clone -b ${BRANCH} ${REPO} /pagure

+ chmod +x /pagure/dev/containers/tox_py3.sh

+ ln -s /tox /pagure/.tox

+ cd /pagure

+ ln -s /results /pagure/results

+ 

+ dev/containers/tox_py3.sh

@@ -1,8 +1,13 @@ 

  #!/bin/bash

- cd / \

- && GIT_TRACE=1 git clone -b ${BRANCH} ${REPO} /pagure \

- && chmod +x /pagure/dev/containers/runtests_py3.sh \

- && cd /pagure \

- && ln -s /results /pagure/results \

- && python3 setup.py build \

- && dev/containers/runtests_py3.sh 

\ No newline at end of file

+ 

+ # Fail script if any commands returns an error

+ set -e

+ 

+ cd /

+ GIT_TRACE=1 git clone -b ${BRANCH} ${REPO} /pagure

+ chmod +x /pagure/dev/containers/runtests_py3.sh

+ cd /pagure

+ ln -s /results /pagure/results

+ python3 setup.py build

+ 

+ dev/containers/runtests_py3.sh

@@ -1,4 +1,4 @@ 

- FROM quay.io/fedora/fedora:36-x86_64

+ FROM quay.io/fedora/fedora:39-x86_64

  

  ARG repo=https://pagure.io/pagure.git

  ARG branch=master
@@ -18,12 +18,14 @@ 

      redis \

      which \

      git \

-     glibc-langpack-en

+     glibc-langpack-en \

+     libtiff-devel libjpeg-devel openjpeg2-devel zlib-devel \

+     freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \

+     harfbuzz-devel fribidi-devel libraqm-devel libimagequant-devel libxcb-devel

  

  RUN cd / \

      && GIT_TRACE=1 git clone -b $BRANCH $REPO \

-     && chmod +x /pagure/dev/containers/tox_py3.sh \

-     && sed -i -e 's|"alembic-3"|"alembic"|' /pagure/tests/test_alembic.py

+     && chmod +x /pagure/dev/containers/tox_py3.sh

  

  WORKDIR /pagure

  ENTRYPOINT ["/pagure/dev/containers/tox_py3.sh"]

@@ -1,4 +1,4 @@ 

- FROM quay.io/fedora/fedora:36-x86_64

+ FROM quay.io/fedora/fedora:39-x86_64

  

  ARG repo=https://pagure.io/pagure.git

  ARG branch=master
@@ -17,7 +17,7 @@ 

      python3-isort \

      python3-pytest-xdist \

      python3-flask-oidc \

-     python3-cchardet \

+     python3-chardet \

      python3-fedora-messaging \

      python3-pip \

      redis \
@@ -41,5 +41,5 @@ 

      python3 setup.py build

  

  WORKDIR /pagure

- ENTRYPOINT ["/pagure/dev/containers/runtests_py3.sh"]

+ ENTRYPOINT ["/bin/sh", "-c", "echo F39 RPM SKIPPED - Bug with pytest+xdist, tests stuck and trigger OOM Killer - see https://pagure.io/pagure/pull-request/5463"]

  CMD []

file modified
+22 -12
@@ -1,5 +1,10 @@ 

  #!/bin/bash

  

+ # Print all executed commands to the terminal

+ set -x

+ 

+ # Fail script if any commands returns an error

+ set -e

  

  ls -l /

  
@@ -8,18 +13,23 @@ 

  echo "============== END ENVIRONMENT ============="

  

  if [ -n "$REPO" -a -n "$BRANCH" ]; then

- git remote rm proposed || true

- git gc --auto

- git remote add proposed "$REPO"

- GIT_TRACE=1 git fetch proposed

- git checkout origin/master

- git config --global user.email "you@example.com"

- git config --global user.name "Your Name"

- git merge --no-ff "proposed/$BRANCH" -m "Merge PR"

- 

- echo "Running tests for branch $BRANCH of repo $REPO"

- echo "Last commits:"

- git --no-pager log -2

+   git remote rm proposed || true

+   git gc --auto

+ 

+   # Merge into upstream/master to identify if feature branch

+   # is out-of-sync or has merge conflicts early in testing

+   git remote add proposed "$REPO"

+   GIT_TRACE=1 git fetch proposed

+   git remote add upstream https://pagure.io/pagure.git

+   GIT_TRACE=1 git fetch upstream

+   git checkout upstream/master

+   git config --global user.email "you@example.com"

+   git config --global user.name "Your Name"

+   git merge --no-ff "proposed/$BRANCH" -m "Merge PR"

+ 

+   echo "Running tests for branch $BRANCH of repo $REPO"

+   echo "Last commits:"

+   git --no-pager log -2

  fi

  

  sed -i -e "s|#!/usr/bin/env python|#!/usr/bin/env python3|" pagure/hooks/files/hookrunner

file modified
+29 -13
@@ -1,5 +1,10 @@ 

  #!/bin/bash

  

+ # Print all executed commands to the terminal

+ set -x

+ 

+ # Fail script if any commands returns an error

+ set -e

  

  ls -l /

  
@@ -8,19 +13,30 @@ 

  echo "============== END ENVIRONMENT ============="

  

  if [ -n "$REPO" -a -n "$BRANCH" ]; then

- git remote rm proposed || true

- git gc --auto

- git remote add proposed "$REPO"

- GIT_TRACE=1 git fetch proposed

- git checkout origin/master

- git config --global user.email "you@example.com"

- git config --global user.name "Your Name"

- git merge --no-ff "proposed/$BRANCH" -m "Merge PR"

- 

- echo "Running tests for branch $BRANCH of repo $REPO"

- echo "Last commits:"

- git --no-pager log -2

+   git remote rm proposed || true

+   git gc --auto

+ 

+   # Merge into upstream/master to identify if feature branch

+   # is out-of-sync or has merge conflicts early in testing

+   git remote add proposed "$REPO"

+   GIT_TRACE=1 git fetch proposed

+   git remote add upstream https://pagure.io/pagure.git

+   GIT_TRACE=1 git fetch upstream

+   git checkout upstream/master

+   git config --global user.email "you@example.com"

+   git config --global user.name "Your Name"

+   git merge --no-ff "proposed/$BRANCH" -m "Merge PR"

+ 

+   echo "Running tests for branch $BRANCH of repo $REPO"

+   echo "Last commits:"

+   git --no-pager log -2

  fi

  

  export LANG="en_US.UTF-8"

- tox -v -e "${PYVER:-py39}" -- ${TESTCASE:-tests/}

+ 

+ echo TOXENV: "${TOXENV}"

+ if [ -z "${TOXENV}" ]; then

+   tox -v -e "${TOXENV}" -- ${TESTCASE:-tests/}

+ else

+   tox -v -- ${TESTCASE:-tests/}

+ fi

file modified
+21 -7
@@ -26,14 +26,15 @@ 

      # fmt: on

      # kwargs can be used to pass '--build-arg'

      build_args = []

-     for arg in kwargs.values():

+     #for arg in kwargs.values():

+     for key, value in kwargs.items():

          build_args.append("--build-arg")

-         build_args.append(arg)

+         build_args.append("{}={}".format(key, value))

  

      volume = []

      if container_volume:

          volume.append("-v")

-         volume.append(volume)

+         volume.append(container_volume)

  

      container_file = ""

      if container_type == "base":
@@ -111,6 +112,13 @@ 

          "test_case", nargs="?", default="", help="Run the given test case"

      )

      parser.add_argument(

+         "--toxenv",

+         default="",

+         help="Pass a custom value for the target python environment to tox tests. "

+              "Only used by the pip test container. "

+              "Default: Use all Environments defined in tox.ini",

+     )

+     parser.add_argument(

          "--fedora",

          action="store_true",

          help="Run the tests in fedora environment (DEFAULT)",
@@ -144,7 +152,6 @@ 

          help="Gives you a shell into the container instead "

          "of running the tests",

      )

- 

      parser.add_argument(

          "--repo",

          dest="repo",
@@ -174,9 +181,9 @@ 

  

      containers = {

          "centos": {

-             "name": "pagure-tests-centos-stream8-rpms-py3",

-             "base": "base-centos-stream8-rpms-py3",

-             "code": "code-centos-stream8-rpms-py3",

+             "name": "pagure-tests-centos-stream9-rpms-py3",

+             "base": "base-centos-stream9-rpms-py3",

+             "code": "code-centos-stream9-rpms-py3",

          },

          "fedora": {

              "name": "pagure-tests-fedora-rpms-py3",
@@ -199,6 +206,7 @@ 

      else:

          container_names = ["centos", "fedora", "pip"]

  

+     mount_wrkdir = False

      # get full path of git repo in current directory

      # and set var to mount it into the container

      if args.repo == "/wrkdir":
@@ -243,10 +251,14 @@ 

                  "Container does not exist, building: %s"

                  % containers[container_name]["base"]

              )

+             container_volume = None

+             if mount_wrkdir:

+                 container_volume = "{}:/wrkdir:z,ro".format(wrkdir_path)

              if _build_container(

                  container_name,

                  "base",

                  result_path,

+                 container_volume,

                  branch="{}".format(os.environ.get("BRANCH") or args.branch),

                  repo="{}".format(os.environ.get("REPO") or args.repo),

              ):
@@ -295,6 +307,8 @@ 

              "REPO={}".format(os.environ.get("REPO") or args.repo),

              "-e",

              "TESTCASE={}".format(args.test_case or ""),

+             "-e",

+             "TOXENV={}".format(os.environ.get("TOXENV") or args.toxenv),

          ]

  

          if args.shell:

@@ -22,7 +22,6 @@ 

  

      python-jenkins

      python-redis

-     python-trololio

  

  .. note:: We ship a systemd unit file for pagure_ci but we welcome patches

          for scripts for other init systems.

@@ -16,7 +16,6 @@ 

  ::

  

      python-redis

-     python-trololio

  

  .. note:: We ship a systemd unit file for pagure_milter but we welcome patches

          for scripts for other init systems.

@@ -14,7 +14,6 @@ 

  ::

  

      python-redis

-     python-trololio

  

  .. note:: We ship a systemd unit file for pagure_loadjson but we welcome patches

          for scripts for other init systems.

@@ -14,7 +14,6 @@ 

  ::

  

      python-redis

-     python-trololio

  

  .. note:: We ship a systemd unit file for pagure_logcom but we welcome patches

          for scripts for other init systems.

@@ -17,7 +17,6 @@ 

  ::

  

      python-redis

-     python-trololio

  

  .. note:: We ship a systemd unit file for pagure_webhook but we welcome patches

          for scripts for other init systems.

file modified
-1
@@ -144,7 +144,6 @@ 

  Summary:            EventSource server for pagure

  BuildArch:          noarch

  Requires:           %{name} = %{version}-%{release}

- Requires:           python%{python_pkgversion}-trololio

  %{?systemd_requires}

  %description        ev

  Pagure comes with an eventsource server allowing live update of the pages

@@ -26,7 +26,7 @@ 

  

  

  import redis

- import trololio

+ import asyncio

  

  from six.moves.urllib.parse import urlparse

  
@@ -137,14 +137,12 @@ 

      return getfunc(repo, objid)

  

  

- @trololio.coroutine

- def handle_client(client_reader, client_writer):

+ async def handle_client(client_reader, client_writer):

      data = None

      while True:

          # give client a chance to respond, timeout after 10 seconds

-         line = yield trololio.From(

-             trololio.asyncio.wait_for(client_reader.readline(), timeout=10.0)

-         )

+         line = await asyncio.wait_for(client_reader.readline(), timeout=10.0)

+ 

          if not line.decode().strip():

              break

          line = line.decode().rstrip()
@@ -204,16 +202,16 @@ 

                      client_writer.write(("event: ping\n\n").encode())

                      oncall = 0

                  oncall += 1

-                 yield trololio.From(client_writer.drain())

-                 yield trololio.From(trololio.asyncio.sleep(1))

+                 await client_writer.drain()

+                 await asyncio.sleep(1)

              else:

                  log.info("Sending %s", msg["data"])

                  client_writer.write(("data: %s\n\n" % msg["data"]).encode())

-                 yield trololio.From(client_writer.drain())

+                 await client_writer.drain()

  

      except OSError:

          log.info("Client closed connection")

-     except trololio.ConnectionResetError as err:

+     except ConnectionResetError as err:

          log.exception("ERROR: ConnectionResetError in handle_client")

      except Exception as err:

          log.exception("ERROR: Exception in handle_client")
@@ -225,8 +223,7 @@ 

          client_writer.close()

  

  

- @trololio.coroutine

- def stats(client_reader, client_writer):

+ async def stats(client_reader, client_writer):

  

      try:

          log.info("Clients: %s", SERVER.active_count)
@@ -234,9 +231,9 @@ 

              ("HTTP/1.0 200 OK\n" "Cache: nocache\n\n").encode()

          )

          client_writer.write(("data: %s\n\n" % SERVER.active_count).encode())

-         yield trololio.From(client_writer.drain())

+         await client_writer.drain()

  

-     except trololio.ConnectionResetError as err:

+     except ConnectionResetError as err:

          log.info(err)

      finally:

          client_writer.close()
@@ -248,8 +245,8 @@ 

      _get_session()

  

      try:

-         loop = trololio.asyncio.get_event_loop()

-         coro = trololio.asyncio.start_server(

+         loop = asyncio.get_event_loop()

+         coro = asyncio.start_server(

              handle_client,

              host=None,

              port=pagure.config.config["EVENTSOURCE_PORT"],
@@ -259,7 +256,7 @@ 

              "Serving server at {}".format(SERVER.sockets[0].getsockname())

          )

          if pagure.config.config.get("EV_STATS_PORT"):

-             stats_coro = trololio.asyncio.start_server(

+             stats_coro = asyncio.start_server(

                  stats,

                  host=None,

                  port=pagure.config.config.get("EV_STATS_PORT"),
@@ -273,7 +270,7 @@ 

          loop.run_forever()

      except KeyboardInterrupt:

          pass

-     except trololio.ConnectionResetError as err:

+     except ConnectionResetError as err:

          log.exception("ERROR: ConnectionResetError in main")

      except Exception:

          log.exception("ERROR: Exception in main")

file modified
+2 -2
@@ -19,9 +19,9 @@ 

  import docutils.examples

  

  try:

-     from jinja2 import escape

- except ImportError:

      from markupsafe import escape

+ except ImportError:

+     from jinja2 import escape

  import kitchen.text.converters as ktc

  from markupsafe import Markup

  

@@ -745,6 +745,7 @@ 

          return response

  

      repopath = repo.repopath("main")

+     print(repopath)

  

      task = pagure.lib.tasks.commits_author_stats.delay(repopath)

  

file modified
+8 -5
@@ -23,8 +23,11 @@ 

  import pygit2

  import six

  

- # from sqlalchemy.orm.session import Session

- from pygit2.remote import RemoteCollection

+ try:

+     from pygit2.remote import RemoteCollection

+ except ImportError:

+     from pygit2.remotes import RemoteCollection

+ 

  from sqlalchemy.exc import SQLAlchemyError

  

  import pagure.exceptions
@@ -85,7 +88,7 @@ 

              # First commit in the repo

              diff = commit.tree.diff_to_tree(swap=True)

  

-         if diff.patch is None:

+         if not diff.patch:

              continue

  

          if find_similar and diff:
@@ -1626,7 +1629,7 @@ 

              _log.info(

                  "  Adding remote: %s pointing to: %s", reponame, repopath

              )

-             remote = new_repo.create_remote(reponame, repopath)

+             remote = new_repo.remotes.create(reponame, repopath)

  

              # Fetch the commits

              remote.fetch()
@@ -1926,7 +1929,7 @@ 

          _log.info(

              "  Adding remote: %s pointing to: %s", upstream, upstream_path

          )

-         remote = new_repo.create_remote(upstream, upstream_path)

+         remote = new_repo.remotes.create(upstream, upstream_path)

  

          # Fetch the commits

          remote.fetch()

file modified
+10 -2
@@ -10,10 +10,18 @@ 

  

  from __future__ import absolute_import, unicode_literals

  

- from straight.plugin import load

- 

  from pagure.lib.model_base import BASE

  

+ # latest straight.plugin release still use 'imp',

+ # which is dropped in python 3.12. mock 'imp' as workaround till

+ # https://github.com/ironfroggy/straight.plugin/pull/30 is published.

+ import sys

+ import mock

+ 

+ sys.modules["imp"] = mock.Mock()

+ 

+ from straight.plugin import load  # noqa: E402

+ 

  

  def get_plugin_names(blacklist=None, without_backref=False):

      """Return the list of plugins names.

file modified
+9 -3
@@ -4409,11 +4409,17 @@ 

          # Install our markdown modifications

          extensions.append("pagure.pfmarkdown")

  

+     extensions_configs = {

+         "markdown.extensions.codehilite": {"guess_lang": False},

+     }

+     if md_version >= (3, 4):

+         extensions_configs["markdown.extensions.tables"] = {

+             "use_align_attribute": True

+         }

+ 

      md_processor = markdown.Markdown(

          extensions=extensions,

-         extension_configs={

-             "markdown.extensions.codehilite": {"guess_lang": False}

-         },

+         extension_configs=extensions_configs,

          output_format="xhtml5",

      )

  

file modified
+26 -18
@@ -868,15 +868,18 @@ 

      stats = collections.defaultdict(int)

      number_of_commits = 0

      authors_email = set()

-     for commit in repo_obj.walk(

-         repo_obj.head.peel().oid.hex, pygit2.GIT_SORT_NONE

-     ):

-         # For each commit record how many times each combination of name and

-         # e-mail appears in the git history.

-         number_of_commits += 1

-         email = commit.author.email

-         author = commit.author.name

-         stats[(author, email)] += 1

+     try:

+         for commit in repo_obj.walk(

+             repo_obj.head.peel().oid.hex, pygit2.GIT_SORT_NONE

+         ):

+             # For each commit record how many times each combination of name and

+             # e-mail appears in the git history.

+             number_of_commits += 1

+             email = commit.author.email

+             author = commit.author.name

+             stats[(author, email)] += 1

+     except pygit2.errors.GitError as e:

+         return e

  

      for (name, email), val in list(stats.items()):

          if not email:
@@ -929,15 +932,20 @@ 

      repo_obj = pygit2.Repository(repopath)

  

      dates = collections.defaultdict(int)

-     for commit in repo_obj.walk(

-         repo_obj.head.peel().oid.hex, pygit2.GIT_SORT_NONE

-     ):

-         delta = (

-             datetime.datetime.utcnow() - arrow.get(commit.commit_time).naive

-         )

-         if delta.days > 365:

-             break

-         dates[arrow.get(commit.commit_time).date().isoformat()] += 1

+ 

+     try:

+         for commit in repo_obj.walk(

+             repo_obj.head.peel().oid.hex, pygit2.GIT_SORT_NONE

+         ):

+             delta = (

+                 datetime.datetime.utcnow()

+                 - arrow.get(commit.commit_time).naive

+             )

+             if delta.days > 365:

+                 break

+             dates[arrow.get(commit.commit_time).date().isoformat()] += 1

+     except pygit2.errors.GitError as e:

+         return e

  

      return [(key, dates[key]) for key in sorted(dates)]

  

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

          """Decorated function, actually does the work."""

          if self is not None:

              try:

-                 self.update_state(state="RUNNING")

+                 self.update_state(self=self, state="RUNNING")

              except TypeError:

                  pass

          session = pagure.lib.model_base.create_session(pagure_config["DB_URL"])

file modified
+8 -7
@@ -31,6 +31,7 @@ 

  import markdown.util

  import pygit2

  import six

+ import xml.etree.ElementTree as etree

  

  import pagure.lib.query

  from pagure.config import config as pagure_config
@@ -100,7 +101,7 @@ 

          if not user:

              return text

  

-         element = markdown.util.etree.Element("a")

+         element = etree.Element("a")

          base_url = pagure_config["APP_URL"]

          if base_url.endswith("/"):

              base_url = base_url[:-1]
@@ -338,7 +339,7 @@ 

  

          text = markdown.util.AtomicString(m.group(2))

  

-         element = markdown.util.etree.Element("del")

+         element = etree.Element("del")

          element.text = text

          return element

  
@@ -359,7 +360,7 @@ 

              url = url[1:]

          if url.endswith(">"):

              url = url[:-1]

-         el = markdown.util.etree.Element("a")

+         el = etree.Element("a")

          el.set("href", self.unescape(url))

          el.text = markdown.util.AtomicString(url)

          return el
@@ -376,11 +377,11 @@ 

              el = out

  

          # Add a noscript tag with the untouched img tag

-         noscript = markdown.util.etree.Element("noscript")

+         noscript = etree.Element("noscript")

          noscript.append(el)

  

          # Modify the origina img tag

-         img = markdown.util.etree.Element("img")

+         img = etree.Element("img")

          img.set("data-src", el.get("src"))

          img.set("src", "")

          img.set("alt", el.get("alt"))
@@ -388,7 +389,7 @@ 

  

          # Create a global span in which we add both the new img tag and the

          # noscript one

-         outel = markdown.util.etree.Element("span")

+         outel = etree.Element("span")

          outel.append(img)

          outel.append(noscript)

  
@@ -607,7 +608,7 @@ 

          else:

              title = obj.title

  

-     element = markdown.util.etree.Element("a")

+     element = etree.Element("a")

      element.set("href", url)

      element.set("title", title)

      element.text = text

file modified
+2 -2
@@ -27,9 +27,9 @@ 

  import six

  

  try:

-     from jinja2 import escape

- except ImportError:

      from markupsafe import escape

+ except ImportError:

+     from jinja2 import escape

  from six.moves.urllib.parse import parse_qsl, urlparse

  

  import pagure.exceptions

file modified
-1
@@ -1,1 +0,0 @@ 

- trololio == 1.0

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

  cryptography <= 36.0.0

  eventlet <= 0.33.2

  fedmsg <= 1.1.2

- flake8 <= 4.0.1

+ flake8

  

  # Important: Until https://github.com/puiterwijk/flask-oidc/pull/144 is merged and a new version of flask-oidc is released,

  # it's necessary to ensure `itsdangerous` is pinned to a version lower as 2.1 as well.
@@ -13,12 +13,11 @@ 

  

  mock <= 4.0.3

  pagure-messages >= 0.0.1

- pytest <= 6.2.5

- pytest-cov <= 4.0.0

- pytest-xdist <= 2.5.0

+ pytest

+ pytest-cov

+ pytest-xdist

  

  python-fedora == 1.1.1

- trololio == 1.0

  

  # Seems that mock doesn't list this one

  funcsigs <= 1.0.2

file modified
+6 -6
@@ -6,7 +6,7 @@ 

  binaryornot == 0.4.4

  bleach <= 5.0.1

  blinker <= 1.5

- celery <= 5.2.6

+ celery

  chardet <= 4.0.0

  cryptography <= 36.0.0

  docutils <= 0.17.1
@@ -18,23 +18,23 @@ 

  werkzeug < 3.0.0

  flask-wtf <= 1.0.0

  kitchen == 1.2.6

- markdown <= 3.3.7

+ markdown

  munch <= 2.5.0

  Pillow <= 9.2.0

  psutil <= 5.9.2

- pygit2 >= 0.26.0, <=1.8.0

+ pygit2

  python3-openid <= 3.2.0

  python-openid-cla == 1.2

  python-openid-teams == 1.1

- redis <= 3.5.3

+ redis

  requests <= 2.28.1

  six <= 1.16.0

  

  # required for backward compatibility

  setuptools

  

- sqlalchemy >= 0.8, <=1.4.46

- straight.plugin == 1.5.0

+ sqlalchemy < 2.0.0

+ straight.plugin

  whitenoise <= 6.2.0

  wtforms <= 3.0.1

  

@@ -21,6 +21,7 @@ 

  git --no-pager log -2

  fi

  

+ 

  # F39 RPM SKIPPED - Bug with pytest+xdist, tests stuck and trigger OOM Killer - see https://pagure.io/pagure/pull-request/5463

  #podman build --rm -t pagure-fedora-rpms-py3 \

  #    -f dev/containers/fedora-rpms-py3 \

file modified
+5 -5
@@ -10,7 +10,7 @@ 

  

  from __future__ import unicode_literals, absolute_import

  

- import imp

+ import importlib

  import json

  import logging

  import os
@@ -388,9 +388,9 @@ 

          os.environ["PAGURE_CONFIG"] = self.config_path

          pagure_config.update(reload_config())

  

-         imp.reload(pagure.lib.tasks)

-         imp.reload(pagure.lib.tasks_mirror)

-         imp.reload(pagure.lib.tasks_services)

+         importlib.reload(pagure.lib.tasks)

+         importlib.reload(pagure.lib.tasks_mirror)

+         importlib.reload(pagure.lib.tasks_services)

  

          self._app = pagure.flask_app.create_app({"DB_URL": self.dbpath})

  
@@ -1173,7 +1173,7 @@ 

  

      # Add the main project as remote repo

      upstream_path = os.path.join(folder, "repos", repo.path)

-     remote = clone_repo.create_remote("upstream", upstream_path)

+     remote = clone_repo.remotes.create("upstream", upstream_path)

      remote.fetch()

  

      # Edit the sources file again

file modified
+1 -1
@@ -31,7 +31,7 @@ 

          """

  

          proc1 = subprocess.Popen(

-             ["alembic-3", "history"], cwd=REPO_PATH, stdout=subprocess.PIPE

+             ["alembic", "history"], cwd=REPO_PATH, stdout=subprocess.PIPE

          )

          proc2 = subprocess.Popen(

              ["grep", " (head), "], stdin=proc1.stdout, stdout=subprocess.PIPE

@@ -3482,7 +3482,7 @@ 

          tests.create_tokens_acl(self.session, "aaabbbcccddd", "modify_project")

  

          project = pagure.lib.query._get_project(self.session, "test")

-         self.assertEquals(

+         self.assertEqual(

              project.access_users,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )
@@ -3746,7 +3746,7 @@ 

          headers = {"Authorization": "token aaabbbcccddd"}

  

          project = pagure.lib.query._get_project(self.session, "test")

-         self.assertEquals(

+         self.assertEqual(

              project.access_users,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )
@@ -3795,7 +3795,7 @@ 

          # Ensure `foo` was properly added:

          project = pagure.lib.query._get_project(self.session, "test")

          user_foo = pagure.lib.query.search_user(self.session, username="foo")

-         self.assertEquals(

+         self.assertEqual(

              project.access_users,

              {

                  "admin": [],
@@ -3877,7 +3877,7 @@ 

          # Ensure `foo` was properly removed

          self.session = pagure.lib.query.create_session(self.dbpath)

          project = pagure.lib.query._get_project(self.session, "test")

-         self.assertEquals(

+         self.assertEqual(

              project.access_users,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )
@@ -3891,7 +3891,7 @@ 

          # Ensure `foo` was properly added:

          project = pagure.lib.query._get_project(self.session, "test")

          user_foo = pagure.lib.query.search_user(self.session, username="foo")

-         self.assertEquals(

+         self.assertEqual(

              project.access_users,

              {

                  "admin": [],
@@ -3958,7 +3958,7 @@ 

          # Ensure `foo` was properly removed

          self.session = pagure.lib.query.create_session(self.dbpath)

          project = pagure.lib.query._get_project(self.session, "test")

-         self.assertEquals(

+         self.assertEqual(

              project.access_users,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )
@@ -4039,15 +4039,15 @@ 

          # Ensure `baz` was properly added

          self.session = pagure.lib.query.create_session(self.dbpath)

          project = pagure.lib.query._get_project(self.session, "test")

-         self.assertEquals(

+         self.assertEqual(

              project.access_users,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )

-         self.assertNotEquals(

+         self.assertNotEqual(

              project.access_groups,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )

-         self.assertEquals(len(project.access_groups["ticket"]), 1)

+         self.assertEqual(len(project.access_groups["ticket"]), 1)

  

          # Remove the group from the project

          data = {"user_type": "group", "name": "baz", "acl": None}
@@ -4106,11 +4106,11 @@ 

          # Ensure `baz` was properly removed

          self.session = pagure.lib.query.create_session(self.dbpath)

          project = pagure.lib.query._get_project(self.session, "test")

-         self.assertEquals(

+         self.assertEqual(

              project.access_users,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )

-         self.assertEquals(

+         self.assertEqual(

              project.access_groups,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )
@@ -4191,11 +4191,11 @@ 

          # Ensure `baz` was properly removed

          self.session = pagure.lib.query.create_session(self.dbpath)

          project = pagure.lib.query._get_project(self.session, "test")

-         self.assertEquals(

+         self.assertEqual(

              project.access_users,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )

-         self.assertEquals(

+         self.assertEqual(

              project.access_groups,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )
@@ -4214,7 +4214,7 @@ 

          tests.create_tokens_acl(self.session, "aaabbbcccddd", "modify_project")

  

          project = pagure.lib.query._get_project(self.session, "test")

-         self.assertEquals(

+         self.assertEqual(

              project.access_users,

              {"admin": [], "collaborator": [], "commit": [], "ticket": []},

          )

@@ -85,7 +85,7 @@ 

          )

  

          # Push the changes to the bare repo

-         remote = repo.create_remote(

+         remote = repo.remotes.create(

              "origin", os.path.join(self.path, "repos", "docs", "test.git")

          )

  

@@ -5440,7 +5440,7 @@ 

          PagureRepo.push(ori_remote, refname)

  

          # Push to the fork repo

-         remote = clone_repo.create_remote("pingou_fork", gitrepo2)

+         remote = clone_repo.remotes.create("pingou_fork", gitrepo2)

          PagureRepo.push(remote, refname)

  

          # Add 1 commits to the fork repo

@@ -1315,7 +1315,7 @@ 

              output_text,

          )

          self.assertIn(

-             '<a href="/login/?next=http%3A%2F%2Flocalhost%2Ftest%2Fissue%2F1">'

+             '<a href="/login/?next=http://localhost/test/issue/1">'

              "Log in</a>\n          to comment on this ticket.",

              output_text,

          )
@@ -1358,7 +1358,7 @@ 

              output_text,

          )

          self.assertIn(

-             '<a href="/login/?next=http%3A%2F%2Flocalhost%2Ftest%2Fissue%2F1">'

+             '<a href="/login/?next=http://localhost/test/issue/1">'

              "Log in</a>\n          to comment on this ticket.",

              output_text,

          )
@@ -1502,7 +1502,7 @@ 

              output_text,

          )

          self.assertIn(

-             '<a href="/login/?next=http%3A%2F%2Flocalhost%2Ftest%2Fissue%2F1">'

+             '<a href="/login/?next=http://localhost/test/issue/1">'

              "Log in</a>\n          to comment on this ticket.",

              output_text,

          )
@@ -1576,7 +1576,7 @@ 

              output_text,

          )

          self.assertTrue(

-             '<a href="/login/?next=http%3A%2F%2Flocalhost%2Ftest%2Fissue%2F1">'

+             '<a href="/login/?next=http://localhost/test/issue/1">'

              "Log in</a>\n          to comment on this ticket." in output_text

          )

  

@@ -109,7 +109,7 @@ 

              output.get_data(as_text=True),

          )

          self.assertTrue(

-             '<a href="/login/?next=http%3A%2F%2Flocalhost%2Ftest%2Fissue%2F1">'

+             '<a href="/login/?next=http://localhost/test/issue/1">'

              "Log in</a>\n          to comment on this ticket."

              in output.get_data(as_text=True)

          )
@@ -372,7 +372,7 @@ 

              output_text,

          )

          self.assertIn(

-             '<a href="/login/?next=http%3A%2F%2Flocalhost%2Ftest%2Fissue%2F1">'

+             '<a href="/login/?next=http://localhost/test/issue/1">'

              "Log in</a>\n          to comment on this ticket.",

              output_text,

          )
@@ -627,7 +627,7 @@ 

              output_text,

          )

          self.assertTrue(

-             '<a href="/login/?next=http%3A%2F%2Flocalhost%2Ftest%2Fissue%2F1">'

+             '<a href="/login/?next=http://localhost/test/issue/1">'

              "Log in</a>\n            to comment on this ticket.",

              output_text,

          )
@@ -880,7 +880,7 @@ 

              output.get_data(as_text=True),

          )

          self.assertTrue(

-             '<a href="/login/?next=http%3A%2F%2Flocalhost%2Ftest%2Fissue%2F1">'

+             '<a href="/login/?next=http://localhost/test/issue/1">'

              "Log in</a>\n          to comment on this ticket."

              in output.get_data(as_text=True)

          )

@@ -213,7 +213,7 @@ 

              output_text,

          )

          self.assertIn(

-             '<a href="/login/?next=http%3A%2F%2Flocalhost%2Ftest%2Fissue%2F1">'

+             '<a href="/login/?next=http://localhost/test/issue/1">'

              "Log in</a>\n          to comment on this ticket.",

              output_text,

          )
@@ -313,7 +313,7 @@ 

              output_text,

          )

          self.assertTrue(

-             '<a href="/login/?next=http%3A%2F%2Flocalhost%2Ftest%2Fissue%2F1">'

+             '<a href="/login/?next=http://localhost/test/issue/1">'

              "Log in</a>\n          to comment on this ticket." in output_text

          )

  

@@ -1102,7 +1102,9 @@ 

                  in (

                      "http://localhost/login/",

                      "/login/?next=http%3A%2F%2Flocalhost%2Fsettings%2F",

+                     "/login/?next=http://localhost/settings/",

                      "http://localhost/login/?next=http%3A%2F%2Flocalhost%2Fsettings%2F",

+                     "http://localhost/login/?next=http://localhost/settings/",

                  )

              )

          # session did not expire

@@ -5450,8 +5450,8 @@ 

          tests.add_readme_git_repo(os.path.join(self.path, "repos", "test.git"))

  

          user = pagure.lib.query.search_user(self.session, username="pingou")

-         self.assertEquals(len(user.emails), 2)

-         self.assertEquals(user.default_email, "bar@pingou.com")

+         self.assertEqual(len(user.emails), 2)

+         self.assertEqual(user.default_email, "bar@pingou.com")

  

          user = tests.FakeUser(username="pingou")

          with tests.user_set(self.app.application, user):

@@ -662,7 +662,7 @@ 

              output_text,

          )

          self.assertIn('<a class="notblue" href="/test/issue/2">', output_text)

-         self.assertEquals(

+         self.assertEqual(

              output_text.count('<a class="notblue" href="/test/issue/2">'), 1

          )

  

@@ -93,6 +93,10 @@ 

          # Add a README to the git repo - First commit

          tests.add_readme_git_repo(self.folder)

  

+     @mock.patch.dict(

+         "pagure.hooks.pagure_hook.pagure_config",

+         {"APP_URL": "http://localhost.localdomain/"},

+     )

      @mock.patch("pagure.hooks.pagure_hook.fixes_relation")

      def test_generate_revision_change_log_short_url(self, fixes_relation):

          """Test generate_revision_change_log when the comment contains
@@ -125,6 +129,10 @@ 

              "http://localhost.localdomain/",

          )

  

+     @mock.patch.dict(

+         "pagure.hooks.pagure_hook.pagure_config",

+         {"APP_URL": "http://localhost.localdomain/"},

+     )

      @mock.patch("pagure.hooks.pagure_hook.fixes_relation")

      def test_generate_revision_change_log_full_url(self, fixes_relation):

          """Test generate_revision_change_log when the comment contains
@@ -161,6 +169,10 @@ 

              "http://localhost.localdomain/",

          )

  

+     @mock.patch.dict(

+         "pagure.hooks.pagure_hook.pagure_config",

+         {"APP_URL": "http://localhost.localdomain/"},

+     )

      @mock.patch("pagure.hooks.pagure_hook.fixes_relation")

      def test_generate_revision_change_log_full_url_fork(self, fixes_relation):

          """Test generate_revision_change_log when the comment contains

@@ -71,7 +71,7 @@ 

              # The last one in the list (which apparently has only one)

              self.assertEqual(result[-1].encoding, "WINDOWS-1250")

          else:

-             if chardet.__version__[0] in ("3", "4"):

+             if chardet.__version__[0] in ("3", "4", "5"):

                  # The first three have different confidence values

                  expexted_list = ["utf-8", "ISO-8859-9", "ISO-8859-1"]

                  # This is the one with the least confidence

file modified
+8 -2
@@ -3639,8 +3639,12 @@ 

  

          # make sure the function works fine even if there's a leftover

          # ref from previous failed run of the function

-         with patch("pygit2.remote.RemoteCollection.delete"):

-             pagure.lib.git.update_pull_ref(fake_pr, fork)

+         try:

+             with patch("pygit2.remote.RemoteCollection.delete"):

+                 pagure.lib.git.update_pull_ref(fake_pr, fork)

+         except ImportError:

+             with patch("pygit2.remotes.RemoteCollection.delete"):

+                 pagure.lib.git.update_pull_ref(fake_pr, fork)

          self.assertIsNotNone(fork.remotes["pingou_1234567"])

          tests.add_content_git_repo(projects[1], append="foobarbaz")

          newesthex = fork.references["refs/heads/master"].peel().hex
@@ -3725,6 +3729,7 @@ 

          )

  

          self.third_commit = repo.revparse_single("HEAD")

+         print(self.third_commit)

  

      def test_commit_to_patch_first_commit(self):

          """Test the commit_to_patch function of pagure.lib.git."""
@@ -4075,6 +4080,7 @@ 

          repo = pygit2.init_repository(self.gitrepo)

  

          patch = pagure.lib.git.commit_to_patch(repo, self.third_commit)

+         print(patch)

          exp = ""

          self.assertEqual(patch, exp)

  

@@ -125,7 +125,7 @@ 

          PagureRepo.push(ori_remote, refname)

  

          # Push to the fork repo

-         remote = clone_repo.create_remote("pingou_fork", gitrepo2)

+         remote = clone_repo.remotes.create("pingou_fork", gitrepo2)

          PagureRepo.push(remote, refname)

  

          # Do another 3 commits to the main repo

file modified
+4 -4
@@ -60,23 +60,23 @@ 

          """Test lookup_deploykey with a non-deploykey username."""

          project = pagure.lib.query._get_project(self.session, "test")

          res = pagure.utils.lookup_deploykey(project, "pingou")

-         self.assertEquals(res, None)

+         self.assertEqual(res, None)

  

      def test_lookup_deploykey_different_project(self):

          """Test lookup_deploykey with a username for another project."""

          project = pagure.lib.query._get_project(self.session, "test2")

          res = pagure.utils.lookup_deploykey(project, "deploykey_test_1")

-         self.assertEquals(res, None)

+         self.assertEqual(res, None)

  

      def test_lookup_deploykey_non_existent_key(self):

          """Test lookup_deploykey with a non-existing deploykey."""

          project = pagure.lib.query._get_project(self.session, "test")

          res = pagure.utils.lookup_deploykey(project, "deploykey_test_2")

-         self.assertEquals(res, None)

+         self.assertEqual(res, None)

  

      def test_lookup_deploykey(self):

          """Test lookup_deploykey with a correct username."""

          project = pagure.lib.query._get_project(self.session, "test")

          res = pagure.utils.lookup_deploykey(project, "deploykey_test_1")

-         self.assertNotEquals(res, None)

+         self.assertNotEqual(res, None)

          self.assertFalse(res.pushaccess)

Early draft and work in progress, started by addressing the issues in https://pagure.io/pagure/issue/5462.
I'm fighting with the unit tests again to bring them to a more recent Fedora and Python version.
This PR will most likely supersede https://pagure.io/pagure/pull-request/5442 and https://pagure.io/pagure/pull-request/5405.

F39 pip tox py39 looks already promising with unpinned pygit2:

============================================================ 1721 passed, 3 skipped, 8723 warnings in 884.93s (0:14:44) ============================================================
py39: exit 0 (885.32 seconds) /pagure> pytest -n auto tests/ pid=33
  py39: OK (885.36=setup[0.04]+cmd[885.32] seconds)
  congratulations :) (885.40 seconds)

Changes only applied to the test container for local testing, I didn't touched the CI container yet, so they will horrible fail at this point.

Requires more to make pip Py310, 311, 312 and F39 RPM tests pass.
I'm also playing around with CentOS Stream 9, but that's not the main focus.

26 new commits added

  • tests: Monkey Patch as temporary workaround for celery task_id = None issues. Needs a better solution later
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • fixup! tests: Debug celery/redis task_id None issue
  • tests: Debug celery/redis task_id None issue
  • build: Version pinning for redis-py package removed
  • build: Pin sqlalchemy to any version below major release 2.0.0, latst 1.4x releases provide Py311 and Py312 support
  • build: Remove version pinning from Celery to support Py311 and Py312
  • fix: Mock 'imp' module to satisfy 'straight.plugin' till https://github.com/ironfroggy/straight.plugin/pull/30 is published.
  • fixup! tests: Add argument --toxenv to run-tests-container.py. Run tests with tox against all environments defined in tox.ini by default. Customizable by the new argument. Passes the value to the '-e' argument of 'tox'.
  • fixup! tests: Add argument --toxenv to run-tests-container.py. Run tests with tox against all environments defined in tox.ini by default. Customizable by the new argument. Passes the value to the '-e' argument of 'tox'.
  • fix: Replace 'imp' with 'importlib' for Python 3.12 compatibility.
9 months ago

Couple of hacky workarounds later down hundreds of failed tests to:

pip py39

============================================================================= short test summary info ==============================================================================
FAILED tests/test_dev_data.py::TestDevData::test_dev_data_all - AssertionError: 42 != 14
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project_namespace_changed - AssertionError: 'Are [71 chars]ne!\nProject deleted\n' != 'Are [71 char...
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project_namespace - AssertionError: 'Are you sure you want to delete: somenam[53 chars]ed\n' != None
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project - AssertionError: 'Are [57 chars]ne!\nProject deleted\n' != 'Are [57 chars]ne!\nNone\nd6e73...
FAILED tests/test_pagure_flask_internal.py::PagureFlaskInternaltests::test_get_stats_commits_empty_git - AssertionError: False is not true
FAILED tests/test_pagure_flask_internal.py::PagureFlaskInternaltests::test_get_stats_commits_trend_empty_git - AssertionError: False is not true
FAILED tests/test_style.py::TestStyle::test_code_with_black - AssertionError: 1 != 0
FAILED tests/test_style.py::TestStyle::test_code_with_flake8 - AssertionError: 1 != 0
======================================================= 8 failed, 1713 passed, 3 skipped, 8714 warnings in 862.60s (0:14:22) =======================================================

pip py310

============================================================================= short test summary info ==============================================================================
FAILED tests/test_dev_data.py::TestDevData::test_dev_data_all - AssertionError: 42 != 14
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project_namespace_changed - AssertionError: 'Are [71 chars]ne!\nProject deleted\n' != 'Are [71 char...
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project_namespace - AssertionError: 'Are you sure you want to delete: somenam[53 chars]ed\n' != None
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project - AssertionError: 'Are [57 chars]ne!\nProject deleted\n' != 'Are [57 chars]ne!\nNone\n67a73...
FAILED tests/test_pagure_flask_internal.py::PagureFlaskInternaltests::test_get_stats_commits_empty_git - AssertionError: False is not true
FAILED tests/test_pagure_flask_internal.py::PagureFlaskInternaltests::test_get_stats_commits_trend_empty_git - AssertionError: False is not true
FAILED tests/test_style.py::TestStyle::test_code_with_black - AssertionError: 1 != 0
FAILED tests/test_style.py::TestStyle::test_code_with_flake8 - AssertionError: 1 != 0
======================================================= 8 failed, 1713 passed, 3 skipped, 8737 warnings in 875.14s (0:14:35) =======================================================

pip py311

============================================================================= short test summary info ==============================================================================
FAILED tests/test_dev_data.py::TestDevData::test_dev_data_all - AssertionError: 42 != 14
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project_namespace - AssertionError: 'Are you sure you want to delete: somenam[53 chars]ed\n' != None
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project_namespace_changed - AssertionError: 'Are [71 chars]ne!\nProject deleted\n' != 'Are [71 char...
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project - AssertionError: 'Are [57 chars]ne!\nProject deleted\n' != 'Are [57 chars]ne!\nNone\n379af...
FAILED tests/test_pagure_flask_internal.py::PagureFlaskInternaltests::test_get_stats_commits_empty_git - AssertionError: False is not true
FAILED tests/test_pagure_flask_internal.py::PagureFlaskInternaltests::test_get_stats_commits_trend_empty_git - AssertionError: False is not true
FAILED tests/test_style.py::TestStyle::test_code_with_flake8 - AssertionError: 1 != 0
FAILED tests/test_style.py::TestStyle::test_code_with_black - AssertionError: 1 != 0
======================================================= 8 failed, 1713 passed, 3 skipped, 8737 warnings in 887.17s (0:14:47) =======================================================

pip py312

============================================================================= short test summary info ==============================================================================
FAILED tests/test_dev_data.py::TestDevData::test_dev_data_all - AssertionError: 42 != 14
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project_namespace - AssertionError: 'Are you sure you want to delete: somenam[53 chars]ed\n' != None
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project_namespace_changed - AssertionError: 'Are [71 chars]ne!\nProject deleted\n' != 'Are [71 char...
FAILED tests/test_pagure_admin.py::PagureAdminDeleteProjectTests::test_delete_project - AssertionError: 'Are [57 chars]ne!\nProject deleted\n' != 'Are [57 chars]ne!\nNone\n10355...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_add_remove_group - AttributeError: 'PagureFlaskApiProjectModifyAclTests'...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_group - AttributeError: 'PagureFlaskApiProjectModifyAclTests' object has...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_invalid_acl - AttributeError: 'PagureFlaskApiProjectModifyAclTests' obje...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_neither_user_nor_group - AttributeError: 'PagureFlaskApiProjectModifyAcl...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_no_acl - AttributeError: 'PagureFlaskApiProjectModifyAclTests' object ha...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_no_group - AttributeError: 'PagureFlaskApiProjectModifyAclTests' object ...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_no_permission - AttributeError: 'PagureFlaskApiProjectModifyAclTests' ob...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_no_project - AttributeError: 'PagureFlaskApiProjectModifyAclTests' objec...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_no_user - AttributeError: 'PagureFlaskApiProjectModifyAclTests' object h...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_remove_group_not_in_project - AttributeError: 'PagureFlaskApiProjectModi...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_remove_own_acl_ - AttributeError: 'PagureFlaskApiProjectModifyAclTests' ...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_remove_own_acl_no_access - AttributeError: 'PagureFlaskApiProjectModifyA...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_remove_someone_else_acl - AttributeError: 'PagureFlaskApiProjectModifyAc...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_user - AttributeError: 'PagureFlaskApiProjectModifyAclTests' object has ...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_get_project_options_w_header - AttributeError: 'PagureFlaskApiProjectOptionsTests' obj...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_get_project_options_wo_header - AttributeError: 'PagureFlaskApiProjectOptionsTests' ob...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_get_project_options_wrong_project - AttributeError: 'PagureFlaskApiProjectOptionsTests...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options - AttributeError: 'PagureFlaskApiProjectOptionsTests' object ha...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options2 - AttributeError: 'PagureFlaskApiProjectOptionsTests' object h...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options_json - AttributeError: 'PagureFlaskApiProjectOptionsTests' obje...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options_no_data - AttributeError: 'PagureFlaskApiProjectOptionsTests' o...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options_wo_header - AttributeError: 'PagureFlaskApiProjectOptionsTests'...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options_wrong_project - AttributeError: 'PagureFlaskApiProjectOptionsTe...
FAILED tests/test_pagure_flask_internal.py::PagureFlaskInternaltests::test_get_stats_commits_empty_git - AssertionError: False is not true
FAILED tests/test_pagure_flask_internal.py::PagureFlaskInternaltests::test_get_stats_commits_trend_empty_git - AssertionError: False is not true
FAILED tests/test_pagure_flask_ui_repo.py::PagureFlaskRepotests::test_edit_file_default_email - AttributeError: 'PagureFlaskRepotests' object has no attribute 'assertEquals'. Di...
FAILED tests/test_pagure_flask_ui_roadmap.py::PagureFlaskRoadmaptests::test_roadmap_ui - AttributeError: 'PagureFlaskRoadmaptests' object has no attribute 'assertEquals'. Did yo...
FAILED tests/test_pagure_utils.py::PagureUtilsTests::test_lookup_deploykey - AttributeError: 'PagureUtilsTests' object has no attribute 'assertNotEquals'. Did you mean: 'assertN...
FAILED tests/test_pagure_utils.py::PagureUtilsTests::test_lookup_deploykey_different_project - AttributeError: 'PagureUtilsTests' object has no attribute 'assertEquals'. Did you...
FAILED tests/test_pagure_utils.py::PagureUtilsTests::test_lookup_deploykey_non_deploykey - AttributeError: 'PagureUtilsTests' object has no attribute 'assertEquals'. Did you mea...
FAILED tests/test_pagure_utils.py::PagureUtilsTests::test_lookup_deploykey_non_existent_key - AttributeError: 'PagureUtilsTests' object has no attribute 'assertEquals'. Did you ...
FAILED tests/test_style.py::TestStyle::test_code_with_black - AssertionError: 1 != 0
FAILED tests/test_style.py::TestStyle::test_code_with_flake8 - AssertionError: 1 != 0
===================================================== 37 failed, 1684 passed, 3 skipped, 146785 warnings in 899.67s (0:14:59) ======================================================

10 new commits added

  • fixup! tests: Fix failed test test_get_stats_commits_empty_git
  • fixup! tests: Fix failed test test_get_stats_commits_empty_git
  • fixup! tests: Fix failed test test_get_stats_commits_empty_git
  • fixup! tests: Fix failed test test_get_stats_commits_empty_git
  • fix: Flake8 formatting issues, findings tests/test_style.py::TestStyle::test_code_with_flake8
  • fix: Black formatting issues, findings of tests/test_style.py::TestStyle::test_code_with_black
  • fixup! tests: Fix failed test test_get_stats_commits_empty_git
  • tests: Fix failed test test_get_stats_commits_empty_git
  • fixup! tests: Undo previous code change during debugging
  • tests: Undo previous code change during debugging
9 months ago

1 new commit added

  • fixup! fix: Mock 'imp' module to satisfy 'straight.plugin' till https://github.com/ironfroggy/straight.plugin/pull/30 is published.
9 months ago

F39 pip: p39, py310 and py311 looking good now. A bit work is still required for py312.
F39 rpm pending, comes when pip is fine.
The next big thing - for another PR - is then to work through the thousands of warnings.

pip py39

============================================================ 1721 passed, 3 skipped, 8723 warnings in 865.10s (0:14:25) ============================================================

pip py310

============================================================ 1721 passed, 3 skipped, 8765 warnings in 872.01s (0:14:32) ============================================================

pip py311

============================================================ 1721 passed, 3 skipped, 8746 warnings in 887.93s (0:14:47) ============================================================

pip py312

============================================================================= short test summary info ==============================================================================
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_add_remove_group - AttributeError: 'PagureFlaskApiProjectModifyAclTests'...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_group - AttributeError: 'PagureFlaskApiProjectModifyAclTests' object has...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_invalid_acl - AttributeError: 'PagureFlaskApiProjectModifyAclTests' obje...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_neither_user_nor_group - AttributeError: 'PagureFlaskApiProjectModifyAcl...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_no_acl - AttributeError: 'PagureFlaskApiProjectModifyAclTests' object ha...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_no_group - AttributeError: 'PagureFlaskApiProjectModifyAclTests' object ...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_no_permission - AttributeError: 'PagureFlaskApiProjectModifyAclTests' ob...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_no_project - AttributeError: 'PagureFlaskApiProjectModifyAclTests' objec...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_no_user - AttributeError: 'PagureFlaskApiProjectModifyAclTests' object h...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_remove_group_not_in_project - AttributeError: 'PagureFlaskApiProjectModi...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_remove_own_acl_ - AttributeError: 'PagureFlaskApiProjectModifyAclTests' ...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_remove_own_acl_no_access - AttributeError: 'PagureFlaskApiProjectModifyA...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_remove_someone_else_acl - AttributeError: 'PagureFlaskApiProjectModifyAc...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectModifyAclTests::test_api_modify_acls_user - AttributeError: 'PagureFlaskApiProjectModifyAclTests' object has ...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_get_project_options_w_header - AttributeError: 'PagureFlaskApiProjectOptionsTests' obj...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_get_project_options_wo_header - AttributeError: 'PagureFlaskApiProjectOptionsTests' ob...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_get_project_options_wrong_project - AttributeError: 'PagureFlaskApiProjectOptionsTests...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options - AttributeError: 'PagureFlaskApiProjectOptionsTests' object ha...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options2 - AttributeError: 'PagureFlaskApiProjectOptionsTests' object h...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options_json - AttributeError: 'PagureFlaskApiProjectOptionsTests' obje...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options_no_data - AttributeError: 'PagureFlaskApiProjectOptionsTests' o...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options_wo_header - AttributeError: 'PagureFlaskApiProjectOptionsTests'...
FAILED tests/test_pagure_flask_api_project.py::PagureFlaskApiProjectOptionsTests::test_api_modify_project_options_wrong_project - AttributeError: 'PagureFlaskApiProjectOptionsTe...
FAILED tests/test_pagure_flask_ui_repo.py::PagureFlaskRepotests::test_edit_file_default_email - AttributeError: 'PagureFlaskRepotests' object has no attribute 'assertEquals'. Di...
FAILED tests/test_pagure_flask_ui_roadmap.py::PagureFlaskRoadmaptests::test_roadmap_ui - AttributeError: 'PagureFlaskRoadmaptests' object has no attribute 'assertEquals'. Did yo...
FAILED tests/test_pagure_utils.py::PagureUtilsTests::test_lookup_deploykey - AttributeError: 'PagureUtilsTests' object has no attribute 'assertNotEquals'. Did you mean: 'assertN...
FAILED tests/test_pagure_utils.py::PagureUtilsTests::test_lookup_deploykey_different_project - AttributeError: 'PagureUtilsTests' object has no attribute 'assertEquals'. Did you...
FAILED tests/test_pagure_utils.py::PagureUtilsTests::test_lookup_deploykey_non_existent_key - AttributeError: 'PagureUtilsTests' object has no attribute 'assertEquals'. Did you ...
FAILED tests/test_style.py::TestStyle::test_code_with_flake8 - AssertionError: 1 != 0
FAILED tests/test_pagure_utils.py::PagureUtilsTests::test_lookup_deploykey_non_deploykey - AttributeError: 'PagureUtilsTests' object has no attribute 'assertEquals'. Did you mea...
===================================================== 30 failed, 1691 passed, 3 skipped, 147020 warnings in 898.36s (0:14:58) ======================================================

rebased onto 74fc99ebddf07c1393aa2bff3ecd79b6aa01ab70

9 months ago

pretty please pagure-ci rebuild

9 months ago

1 new commit added

  • tests: Revert 'CI pipeline - Drop tests on Fedora RPM temporary', bump rpm container Dockerfile to F39
9 months ago

1 new commit added

  • build: python3-cchardet replaced by python3-chardet in F39
9 months ago

pretty please pagure-ci rebuild

9 months ago

1 new commit added

  • tests: Disable F39 RPM test because of pytest+xdist bug
9 months ago

1 new commit added

  • fixup! tests: Disable F39 RPM test because of pytest+xdist bug
9 months ago

rebased onto 685e61e7b6c62ee0f8db563ad9fb53f0003f7ba2

9 months ago

rebased onto 8a9f4fc

9 months ago

2 new commits added

  • tests: Install missing dependencies in pip container to fix 'Failed building wheel for Pillow'
  • tests: Set executable flag for 'runtests_py3.sh' and 'tox_py3.sh' to align with later usage in unit test containers.
9 months ago

pretty please pagure-ci rebuild

9 months ago

2 new commits added

  • tests: Rename 'alembic-3' to 'alembic' in unit tests, sed commands to replace it during container start removed. Not required anymore after dropping Python 2 a while ago.
  • tests: Make container entrypoint and run test scripts more reliable, fail on error, and always merge feature branch against upstream/master and not fork/master.
9 months ago

Unit tests are back to normal (https://jenkins-pagure.apps.ocp.cloud.ci.centos.org/job/pull-requests/285/).
They run on F39 now and pip/tox based tests cover py39, py310, py311 and py312.
RPM container bumped to F39 but tests removed from CI for now, reason below in F39 RPM pytest runs endless, consumes all resources, triggers OOM Killer section.
Also trololio is replaced now and dropped from requirements and spec.
Related PRs are closed in favour of this one.
I cherry picked a couple of patches that were contributed in the past.
All other relevant information are summarizied below.

F39 RPM pytest runs endless, consumes all resources, triggers OOM Killer

F39 pip isn't affected, but on rpm the tests stuck
till the OOM Killer triggers. There are multiple
similar reports upstream but no fix. To unblock
the unit tests, F39 RPM will be skipped for now.
F39 pip covers py39, py310, py311 and py312.

CI jobs that run into the issue:
https://jenkins-pagure.apps.ocp.cloud.ci.centos.org/job/pull-requests/276/
https://jenkins-pagure.apps.ocp.cloud.ci.centos.org/job/pull-requests/277/

GitHub issues that report similar issues:
https://github.com/pytest-dev/pytest-xdist/issues/110
https://github.com/pytest-dev/pytest-xdist/issues/661
https://github.com/pytest-dev/pytest-xdist/issues/872
https://github.com/pytest-dev/pytest-xdist/issues/1005

Version pinning in requirements.txt removed for:
- pygit2
- celery
- redis
- pytest

- flake8
- black
- redis
- setuptools
- straight.plugin
- markdown

Various minor changes in the code base and or tests because of deprecations related to version pin removal.

SQLAlchemy pinned to <2.0.0, the jump to the next major release requires a lot of changes and is a separate activity. 1.4.x is fine for now and works with Python 3.9 and higher.

trololio was replaced by asyncio, I'm not convinced that there is an appropriate test coverage so this needs some more love at a later point.

tox creates and runs the tests now against four environments by default: py39, py310, py311, py312

run-tests-containers.py has a new argument --toxenv to set an individual environment/python version for local testing, default is to use all environments defined in tox.ini.

The CentOS Stream 8 container for local testing was renamed and bumped to CentOS 9. Early stage, some packages are not available, tests failing, to be completed in a separate PR.

Other Issues:
- During container build the repo and branch of the fork was not passed as build-arg. pagure.io/pagure:master was always used which caused some testing related files to never taken into account in the CI. In some cases this also caused a code drift, so the testing locally and in the CI had different results. I also adjusted the shell scripts to fail on errors and that feature branches always get merged into a checkout of upstream/master to identify merge conflicts early.
- straight.plugin doesn't seem to be maintained anymore and the current version uses imp which is removed in Python 3.12. PR pending https://github.com/ironfroggy/straight.plugin/pull/30. It doesn't actually use imp but imports it in one file. imp added as module via Mock as workaround till there is time to evaluate how to replace it.
- There were some wird issues related to importing zope interface. That seemed to be caused by some setuptools versions, was fine after removing the pinning. GH Issues https://github.com/zopefoundation/zope.interface/issues/255, https://github.com/jazzband/pip-tools/issues/1576, https://github.com/pypa/setuptools/issues/3157
- The amount of warnings massively increased, expected but something that has to be addressed next to remove more version pinnings.
- To install Pillow in Python 3.12 pip, additional packages to build the wheel were required and added to the CI and local pip container Dockerfiles

It looks good except for two things:

  • you have two commits with broken attribution
  • you have a fixup commit that needs to be squashed into another commit

55 new commits added

  • tests: Rename 'alembic-3' to 'alembic' in unit tests, sed commands to replace it during container start removed. Not required anymore after dropping Python 2 a while ago.
  • tests: Make container entrypoint and run test scripts more reliable, fail on error, and always merge feature branch against upstream/master and not fork/master.
  • tests: Install missing dependencies in pip container to fix 'Failed building wheel for Pillow'
  • tests: Set executable flag for 'runtests_py3.sh' and 'tox_py3.sh' to align with later usage in unit test containers.
  • tests: Disable F39 RPM test because of pytest+xdist bug
  • build: python3-cchardet replaced by python3-chardet in F39
  • tests: Revert 'CI pipeline - Drop tests on Fedora RPM temporary', bump rpm container Dockerfile to F39
  • fix: black/flake8 formatting issue
  • tests: CI pipeline - Drop tests on Fedora RPM temporary because of pytest xdist issues, tasks stuck till OOM Killer hits. Bump pip based tests to F39 and run against all available tox environments (py39, py310, py311, py312)
  • chore: Remove Celery related MonkeyPatch after applying the Patch from Klaus Koder
  • Fix Celery related exception in get_key_for_task
  • Fix warning jinga2.escape DeprecationWarning
  • Fix PagureHooksPagureHooktests failure when system wide config exist
  • Drop the dependency on python-trololio (in favor of asyncio)
  • fix: Address unit test issues and deprecation warnings
  • tests: Revert 80c9020eae7260851266b539d0aff1fee8222458
  • build: Remove version pinning from pytest* packages
  • tests: Run by default on all logical CPUs in rpm tests containers
  • build: Remove version pinning of flake8 python package
  • tests: 'assertNotEquals' deprecated and removed, replaced by 'assertNotEqual'
  • tests: 'assertEquals' deprecated and removed, replaced by 'assertEqual'
  • fix: Flake8 formatting issues, findings tests/test_style.py::TestStyle::test_code_with_flake8
  • fix: Black formatting issues, findings of tests/test_style.py::TestStyle::test_code_with_black
  • tests: Fix failed test test_get_stats_commits_empty_git
  • tests: Undo previous code change during debugging
  • tests: Monkey Patch as temporary workaround for celery task_id = None issues. Needs a better solution later
  • tests: Debug celery/redis task_id None issue
  • build: Version pinning for redis-py package removed
  • build: Pin sqlalchemy to any version below major release 2.0.0, latst 1.4x releases provide Py311 and Py312 support
  • build: Remove version pinning from Celery to support Py311 and Py312
  • fix: Mock 'imp' module to satisfy 'straight.plugin' till https://github.com/ironfroggy/straight.plugin/pull/30 is published.
  • fix: Replace 'imp' with 'importlib' for Python 3.12 compatibility.
  • build: Don't add tox_py3.sh to fedora pip code container, that file comes from the repo during testing.
  • tests: Add python 3.12 back in tox.ini
  • tests: Add argument --toxenv to run-tests-container.py. Run tests with tox against all environments defined in tox.ini by default. Customizable by the new argument. Passes the value to the '-e' argument of 'tox'.
  • fix: Test for empty string in addition to None Type in 'pagure.lib.git.commit_to_patch'
  • tests: fix test_commit_to_patch_empty_commit
  • tests: fix issues related to log in url in 'tests/test_pagure_flask_ui_login.py'
  • tests: fix issues related to log in url in 'tests/test_pagure_flask_ui_issues_open_access.py'
  • tests: fix issues related to log in url in 'tests/test_pagure_flask_ui_issues.py'
  • tests: fix issues related to log in url in 'tests/test_pagure_flask_ui_issues_acl_checks.py'
  • tests: fix test_view_issue_ticket_access - AssertionError
  • tests: bump CentOS Stream from 8 to 9
  • tests: Fix issue 'No module named pygit2.remote'
  • build: Replace python3-cchardet with python3-chardet
  • tests: bump rpm base container to F39
  • fix: pygit2 Repository.create_remote replaced by Repository.remotes.create
  • build: Verbose / Debug output from tox command during base fedora pip container build
  • build: Fix issue that local volume wasn't mounted inside base container during build initiated by run-tests-container.py
  • build: Fix issue that build-args are not passed correctly to podman in run-tests-container.py
  • build: Enable verbose/debug mode for git clone in fedora base pip container
  • build: Remove version pinning from pygit2
  • tests: bump pip base container to F39
  • tests: Additional packages in fedora pip base container to meet requirements of 'Pillow' python package (compile wheel)
  • tests: Drop py312 from tox tests, pinned Pillow version isn't compatible
9 months ago

pretty please pagure-ci rebuild

9 months ago

Pull-Request has been merged by ngompa

9 months ago

This is all done and merged now. :wine_glass:

Metadata
Changes Summary 48
+15 -10
file renamed
dev/containers/base-centos-stream8-rpms-py3
dev/containers/base-centos-stream9-rpms-py3
+7 -4
file changed
dev/containers/base-fedora-pip-py3
+4 -3
file changed
dev/containers/base-fedora-rpms-py3
+0 -0
file renamed
dev/containers/code-centos-stream8-rpms-py3
dev/containers/code-centos-stream9-rpms-py3
+0 -1
file changed
dev/containers/code-fedora-pip-py3
+15 -9
file changed
dev/containers/entrypoint_pip.sh
+12 -7
file changed
dev/containers/entrypoint_rpms.sh
+6 -4
file changed
dev/containers/fedora-pip-py3
+3 -3
file changed
dev/containers/fedora-rpms-py3
+22 -12
file changed
dev/containers/runtests_py3.sh
+29 -13
file changed
dev/containers/tox_py3.sh
+21 -7
file changed
dev/run-tests-container.py
+0 -1
file changed
doc/install_pagure_ci.rst
+0 -1
file changed
doc/install_pagure_ev.rst
+0 -1
file changed
doc/install_pagure_loadjson.rst
+0 -1
file changed
doc/install_pagure_logcom.rst
+0 -1
file changed
doc/install_pagure_webhooks.rst
+0 -1
file changed
files/pagure.spec
+15 -18
file changed
pagure-ev/pagure_stream_server.py
+2 -2
file changed
pagure/doc_utils.py
+1 -0
file changed
pagure/internal/__init__.py
+8 -5
file changed
pagure/lib/git.py
+10 -2
file changed
pagure/lib/plugins.py
+9 -3
file changed
pagure/lib/query.py
+26 -18
file changed
pagure/lib/tasks.py
+1 -1
file changed
pagure/lib/tasks_utils.py
+8 -7
file changed
pagure/pfmarkdown.py
+2 -2
file changed
pagure/ui/filters.py
+0 -1
file changed
requirements-ev.txt
+4 -5
file changed
requirements-testing.txt
+6 -6
file changed
requirements.txt
+1 -0
file changed
run_ci_tests_containers.sh
+5 -5
file changed
tests/__init__.py
+1 -1
file changed
tests/test_alembic.py
+14 -14
file changed
tests/test_pagure_flask_api_project.py
+1 -1
file changed
tests/test_pagure_flask_docs.py
+1 -1
file changed
tests/test_pagure_flask_ui_fork.py
+4 -4
file changed
tests/test_pagure_flask_ui_issues.py
+4 -4
file changed
tests/test_pagure_flask_ui_issues_acl_checks.py
+2 -2
file changed
tests/test_pagure_flask_ui_issues_open_access.py
+2 -0
file changed
tests/test_pagure_flask_ui_login.py
+2 -2
file changed
tests/test_pagure_flask_ui_repo.py
+1 -1
file changed
tests/test_pagure_flask_ui_roadmap.py
+12 -0
file changed
tests/test_pagure_hooks_pagure_hook.py
+1 -1
file changed
tests/test_pagure_lib_encoding_utils.py
+8 -2
file changed
tests/test_pagure_lib_git.py
+1 -1
file changed
tests/test_pagure_lib_git_diff_pr.py
+4 -4
file changed
tests/test_pagure_utils.py