Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: Fix push command with aiohttp >= 3.10.6 #139

Merged
merged 4 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \
ADD . /src
RUN cd /src && /root/.cargo/bin/cargo build --release

RUN git clone https://github.com/jameswestman/flathub-hooks.git
RUN cd flathub-hooks && /root/.cargo/bin/cargo build --release
RUN git clone https://github.com/flathub-infra/flat-manager-hooks.git
RUN cd flat-manager-hooks && /root/.cargo/bin/cargo build --release

FROM ubuntu:22.04

Expand Down
3 changes: 3 additions & 0 deletions flat-manager-client
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ class AsyncNamedFilePart(aiohttp.payload.Payload):

self._size = os.stat(value).st_size

def decode(self, encoding: str = "utf-8", errors: str = "strict") -> str:
raise NotImplementedError

async def write(self, writer):
if self._file is None or self._file.closed:
self._file = open(self._value, "rb")
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM quay.io/fedora/fedora:latest
# Install Rust, Cargo, and run-tests.py's dependencies
RUN dnf install -y rust cargo flatpak flatpak-builder python3-pip python3-gobject ostree-devel libpq-devel
RUN flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo
RUN flatpak install --noninteractive flathub org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08
RUN flatpak install --noninteractive flathub org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08
RUN pip install asyncio aiohttp tenacity

# Use the test config.json and configure it with a GPG key
Expand Down
2 changes: 1 addition & 1 deletion tests/org.flatpak.FlatManagerCI.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app-id: org.flatpak.FlatManagerCI
runtime: org.freedesktop.Platform
runtime-version: '21.08'
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
command: hello.sh
modules:
Expand Down
6 changes: 0 additions & 6 deletions tests/run-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@
import os
import subprocess
import sys
import time
from subprocess import PIPE


def sleep(seconds):
print(f"Waiting {seconds} seconds")
time.sleep(seconds)


def exec(cmd):
print("Executing", cmd)

Expand Down