Compare commits

..

No commits in common. "c9-beta" and "c10s" have entirely different histories.

7 changed files with 133 additions and 88 deletions

24
.gitignore vendored
View File

@ -1 +1,23 @@
SOURCES/websockets-11.0.3.tar.gz /websockets-2.6.tar.gz
/websockets-2.7.tar.gz
/websockets-3.0.tar.gz
/websockets-3.1.tar.gz
/websockets-3.2.tar.gz
/websockets-3.3.tar.gz
/websockets-3.4.tar.gz
/websockets-4.0.1.tar.gz
/websockets-5.0.1.tar.gz
/websockets-6.0.tar.gz
/websockets-8.0.tar.gz
/websockets-8.0.2.tar.gz
/websockets-8.1.tar.gz
/websockets-9.1.tar.gz
/websockets-10.0.tar.gz
/websockets-10.1.tar.gz
/websockets-10.2.tar.gz
/websockets-10.3.tar.gz
/websockets-10.4.tar.gz
/websockets-11.0.2.tar.gz
/websockets-11.0.3.tar.gz
/websockets-12.0.tar.gz
/websockets-14.2.tar.gz

View File

@ -1 +0,0 @@
3a82ef3e6015d985564ed04d2fbc308e0ee8d187 SOURCES/websockets-11.0.3.tar.gz

View File

@ -1,93 +1,18 @@
%global pypi_name websockets * Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 12.0-5
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
%ifarch x86_64 * Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 12.0-4
%bcond_without tests - Bump release for June 2024 mass rebuild
%endif
Name: python-%{pypi_name} * Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 12.0-3
Version: 11.0.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
Release: 6%{?dist}
Summary: Implementation of the WebSocket Protocol for Python
License: BSD * Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 12.0-2
URL: https://github.com/aaugustin/websockets - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
BuildRequires: gcc * Wed Jan 03 2024 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 12.0-1
- Update to 12.0 rhbz#2245452
%if %{with tests}
BuildRequires: python3dist(pytest)
%endif
%global _description %{expand:
websockets is a library for developing WebSocket servers and clients in
Python. It implements RFC 6455 with a focus on correctness and simplicity. It
passes the Autobahn Testsuite.
Built on top of Pythons asynchronous I/O support introduced in PEP 3156, it
provides an API based on coroutines, making it easy to write highly concurrent
applications.}
%description %{_description}
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: python3-devel
%description -n python3-%{pypi_name} %{_description}
%prep
%autosetup -n %{pypi_name}-%{version} -p1
# Upstream uses a src package but does not specify this explicitly in the
# pyproject.toml. This causes the build to fail on CentOS Stream 9 and RHEL 9.
# Workaround this problem by adding a very small setup.cfg file that specifies where
# the source code lives inside `src`.
%if %{defined el9}
cat << EOF > setup.cfg
[metadata]
name = websockets
[options]
package_dir=
=src
packages=find:
[options.packages.find]
where=src
EOF
%endif
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files websockets
%check
%pyproject_check_import
%if %{with tests}
# Skip some tests that require network connectivity and/or a running daemon.
# Investigate: test_server_shuts_down_* tests hang or fail on Python 3.12
%pytest -v --ignore compliance --ignore tests/sync -k "not test_explicit_host_port and not test_server_shuts_down"
%endif
%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%changelog
* Tue Jan 30 2024 Major Hayden <mhayden@redhat.com> - 11.0.3-6
- Bump revision to add gating.yaml
* Tue Aug 15 2023 Major Hayden <major@redhat.com> - 11.0.3-5
- Add setup.cfg for RHEL 9 and CentOS Stream 9
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 11.0.3-4 * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 11.0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

5
gating.yaml Normal file
View File

@ -0,0 +1,5 @@
--- !Policy
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

56
python-websockets.spec Normal file
View File

@ -0,0 +1,56 @@
%global pypi_name websockets
Name: python-%{pypi_name}
Version: 14.2
Release: %autorelease
Summary: Implementation of the WebSocket Protocol for Python
License: BSD-3-Clause
URL: https://github.com/aaugustin/websockets
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
# remove shell=True from experiments/compression/corpus.py
Patch0: remove-shell-true.patch
BuildRequires: gcc
%global _description %{expand:
websockets is a library for developing WebSocket servers and clients in
Python. It implements RFC 6455 with a focus on correctness and simplicity. It
passes the Autobahn Testsuite.
Built on top of Pythons asynchronous I/O support introduced in PEP 3156, it
provides an API based on coroutines, making it easy to write highly concurrent
applications.}
%description %{_description}
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: python3-devel
%description -n python3-%{pypi_name} %{_description}
%prep
%autosetup -n %{pypi_name}-%{version} -p1
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files websockets
%check
%pyproject_check_import
%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%changelog
%autochangelog

37
remove-shell-true.patch Normal file
View File

@ -0,0 +1,37 @@
diff --git a/experiments/compression/corpus.py b/experiments/compression/corpus.py
index 56e2621..c8bd343 100644
--- a/experiments/compression/corpus.py
+++ b/experiments/compression/corpus.py
@@ -10,16 +10,17 @@ import time
def github_commits():
OAUTH_TOKEN = getpass.getpass("OAuth Token? ")
- COMMIT_API = (
- f'curl -H "Authorization: token {OAUTH_TOKEN}" '
- f"https://api.github.com/repos/python-websockets/websockets/git/commits/:sha"
- )
+
+ def fetch_commit(sha):
+ url = f"https://api.github.com/repos/python-websockets/websockets/git/commits/{sha}"
+ headers = ["-H", f"Authorization: token {OAUTH_TOKEN}"]
+ cmd = ["curl"] + headers + [url]
+ return subprocess.check_output(cmd)
commits = []
head = subprocess.check_output(
- "git rev-parse origin/main",
- shell=True,
+ ["git", "rev-parse", "origin/main"],
text=True,
).strip()
todo = [head]
@@ -27,7 +28,7 @@ def github_commits():
while todo:
sha = todo.pop(0)
- commit = subprocess.check_output(COMMIT_API.replace(":sha", sha), shell=True)
+ commit = fetch_commit(sha)
commits.append(commit)
seen.add(sha)
for parent in json.loads(commit)["parents"]:

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (websockets-14.2.tar.gz) = b5b5ce455e5b68a14993ac1d02c6f417db6cc89cdb9b21e12ba1e1975050fdf7e1935e08a35d8fcb41f5e255385c72834627c989f0734d7015bc1817f6067fe9