forked from pool/pagure
+ Allow by default the ACL "pull_request_create" on project-less API token + Implement Pagure Git Auth + Add a new API endpoint allowing to update an existing PR + If the user doesn't have a valid ssh key inform but let them log in + Fix various UI issues + Add a button to take/drop a pull-request + Add a new API endpoint to assign pull-request to someone + Allow dots and plus signs in project names + Fix seeing releases when the reference provided returned a commit + Include the PR tags in their JSON representation + Ensure that forking does not run the hook + Deprecate fedmsg for fedora-messaging - Backport fix for pagure-ev issues in Python 3 + Patch: 0001-pagure-ev-python-3-compatibility.patch - Add patch to allow SQLAlchemy 1.3.0+ with Pagure + Patch: 0501-Revert-Add-a-upper-limit-to-sqlalchemy.patch - Update the service list to enable and start in README.SUSE OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/pagure?expand=0&rev=17
64 lines
2.2 KiB
Diff
64 lines
2.2 KiB
Diff
From 47a9abb72e96fac3b03ecefb021a4ec1e8fc95f3 Mon Sep 17 00:00:00 2001
|
|
From: Julen Landa Alustiza <jlanda@fedoraproject.org>
|
|
Date: Thu, 14 Mar 2019 12:56:06 +0100
|
|
Subject: [PATCH] pagure-ev: python 3 compatibility
|
|
|
|
---
|
|
pagure-ev/pagure_stream_server.py | 12 ++++++------
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/pagure-ev/pagure_stream_server.py b/pagure-ev/pagure_stream_server.py
|
|
index 0e4a99a1..4439c917 100644
|
|
--- a/pagure-ev/pagure_stream_server.py
|
|
+++ b/pagure-ev/pagure_stream_server.py
|
|
@@ -26,7 +26,7 @@ import os
|
|
|
|
|
|
import redis
|
|
-from trololio import asyncio as trololio
|
|
+import trololio
|
|
|
|
from six.moves.urllib.parse import urlparse
|
|
|
|
@@ -137,7 +137,7 @@ 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.wait_for(
|
|
+ line = yield trololio.From(trololio.asyncio.wait_for(
|
|
client_reader.readline(),
|
|
timeout=10.0))
|
|
if not line.decode().strip():
|
|
@@ -199,7 +199,7 @@ def handle_client(client_reader, client_writer):
|
|
oncall = 0
|
|
oncall += 1
|
|
yield trololio.From(client_writer.drain())
|
|
- yield trololio.From(trololio.sleep(1))
|
|
+ yield trololio.From(trololio.asyncio.sleep(1))
|
|
else:
|
|
log.info("Sending %s", msg['data'])
|
|
client_writer.write(('data: %s\n\n' % msg['data']).encode())
|
|
@@ -243,8 +243,8 @@ def main():
|
|
_get_session()
|
|
|
|
try:
|
|
- loop = trololio.get_event_loop()
|
|
- coro = trololio.start_server(
|
|
+ loop = trololio.asyncio.get_event_loop()
|
|
+ coro = trololio.asyncio.start_server(
|
|
handle_client,
|
|
host=None,
|
|
port=pagure.config.config['EVENTSOURCE_PORT'],
|
|
@@ -253,7 +253,7 @@ def main():
|
|
log.info(
|
|
'Serving server at {}'.format(SERVER.sockets[0].getsockname()))
|
|
if pagure.config.config.get('EV_STATS_PORT'):
|
|
- stats_coro = trololio.start_server(
|
|
+ stats_coro = trololio.asyncio.start_server(
|
|
stats,
|
|
host=None,
|
|
port=pagure.config.config.get('EV_STATS_PORT'),
|
|
--
|
|
2.20.1
|
|
|