-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
streamlink: update to 7.1.1 #53736
base: master
Are you sure you want to change the base?
streamlink: update to 7.1.1 #53736
Conversation
1df8a8e
to
438602a
Compare
I am unsure why the check/test stage is failing. It does build and run fine though. I'll take a look and see if I can fix but if someone knows from the error why its failing let me know and I will fix. Thanks. |
After some digging it looks like python3-freezegun needs updated (1.2.2 - 1.5.1). I updated it by version bumping it and also removed/deleted the patch it was using because it no longer worked. After that it runs the test(s) successfully locally. I can add that change to this pull request or if it would be better to open a separate request for freezegun I can do that too. Let me know. |
Hi, I met similar issue with python3-freezegun and updated package failed to pass unittest, with or without upstream patch spulec/freezegun#550. How do you solve this? Build log
=> xbps-src: updating repositories for host (x86_64)...
[*] Updating repository `https://repo-default.voidlinux.org/current/bootstrap/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/x86_64-repodata' ...
x86_64-repodata: 1936KB [avg rate: 2206KB/s]
[*] Updating repository `https://repo-default.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/debug/x86_64-repodata' ...
x86_64-repodata: 895KB [avg rate: 30GB/s]
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/bootstrap/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/x86_64-repodata' ...
x86_64-repodata: 736KB [avg rate: 21GB/s]
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> python3-freezegun-1.5.1_1: removing autodeps, please wait...
=> python3-freezegun-1.5.1_1: building with [python3-module] [python3] for x86_64...
[host] python3-setuptools-75.8.0_1: found (https://repo-default.voidlinux.org/current)
[host] python3-packaging-bootstrap-24.2_1: found (https://repo-default.voidlinux.org/current/bootstrap)
[check] python3-dateutil-2.9.0_2: found (https://repo-default.voidlinux.org/current)
[check] python3-pytest-xdist-3.6.1_2: found (https://repo-default.voidlinux.org/current)
[target] python3-3.13.1_1: found (https://repo-default.voidlinux.org/current)
[runtime] python3-dateutil-2.9.0_2: found (https://repo-default.voidlinux.org/current)
=> python3-freezegun-1.5.1_1: installing host dependencies: python3-setuptools-75.8.0_1 python3-packaging-bootstrap-24.2_1 python3-dateutil-2.9.0_2 python3-pytest-xdist-3.6.1_2 ...
=> python3-freezegun-1.5.1_1: installing target dependencies: python3-3.13.1_1 ...
=> python3-freezegun-1.5.1_1: running do_check ...
============================= test session starts ==============================
platform linux -- Python 3.13.1, pytest-8.3.1, pluggy-1.5.0
rootdir: /builddir/python3-freezegun-1.5.1
configfile: pyproject.toml
plugins: xdist-3.6.1
collected 137 items
tests/test_asyncio.py ..... [ 3%]
tests/test_class_import.py .............. [ 13%]
tests/test_configure.py ..... [ 17%]
tests/test_datetimes.py .................s.....s.....s.s................ [ 52%]
FFF....................s [ 70%]
tests/test_errors.py .. [ 71%]
tests/test_import_alias.py ... [ 73%]
tests/test_operations.py ............. [ 83%]
tests/test_pickle.py ... [ 85%]
tests/test_sqlite3.py .. [ 86%]
tests/test_ticking.py .s.......... [ 95%]
tests/test_utils.py .. [ 97%]
tests/test_uuid.py .. [ 98%]
tests/test_warnings.py .. [100%]
=================================== FAILURES ===================================
_ TestUnitTestMethodDecorator.test_method_decorator_works_on_unittest_kwarg_frozen_time _
self = <tests.test_datetimes.TestUnitTestMethodDecorator testMethod=test_method_decorator_works_on_unittest_kwarg_frozen_time>
frozen_time = <freezegun.api.FrozenDateTimeFactory object at 0x7f2a9cdaea80>
@freeze_time('2013-04-09', as_kwarg='frozen_time')
def test_method_decorator_works_on_unittest_kwarg_frozen_time(self, frozen_time: Any) -> None:
self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
> self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today())
E AssertionError: FakeDate(2013, 4, 9) != datetime.datetime(2013, 4, 9, 0, 0)
tests/test_datetimes.py:537: AssertionError
_ TestUnitTestMethodDecorator.test_method_decorator_works_on_unittest_kwarg_frozen_time_with_func _
self = <tests.test_datetimes.TestUnitTestMethodDecorator testMethod=test_method_decorator_works_on_unittest_kwarg_frozen_time_with_func>
frozen_time = <freezegun.api.FrozenDateTimeFactory object at 0x7f2a9cde5c70>
@freeze_time(lambda: datetime.date(year=2013, month=4, day=9), as_kwarg='frozen_time')
def test_method_decorator_works_on_unittest_kwarg_frozen_time_with_func(self, frozen_time: Any) -> None:
self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
> self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today())
E AssertionError: FakeDate(2013, 4, 9) != datetime.datetime(2013, 4, 9, 0, 0)
tests/test_datetimes.py:547: AssertionError
_ TestUnitTestMethodDecorator.test_method_decorator_works_on_unittest_kwarg_hello _
self = <tests.test_datetimes.TestUnitTestMethodDecorator testMethod=test_method_decorator_works_on_unittest_kwarg_hello>
kwargs = {'hello': <freezegun.api.FrozenDateTimeFactory object at 0x7f2a9cde5db0>}
@freeze_time('2013-04-09', as_kwarg='hello')
def test_method_decorator_works_on_unittest_kwarg_hello(self, **kwargs: Any) -> None:
self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
> self.assertEqual(datetime.date(2013, 4, 9), kwargs.get('hello').time_to_freeze.today()) # type: ignore
E AssertionError: FakeDate(2013, 4, 9) != datetime.datetime(2013, 4, 9, 0, 0)
tests/test_datetimes.py:542: AssertionError
=============================== warnings summary ===============================
tests/test_datetimes.py::test_simple_api
/builddir/python3-freezegun-1.5.1/tests/test_datetimes.py:75: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
assert datetime.datetime.utcnow() != datetime.datetime(2012, 1, 14)
tests/test_datetimes.py::test_compare_datetime_and_time_with_timezone
/builddir/python3-freezegun-1.5.1/tests/test_datetimes.py:795: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
assert now == datetime.datetime.utcfromtimestamp(time.time())
tests/test_datetimes.py::test_timestamp_with_tzoffset
/builddir/python3-freezegun-1.5.1/tests/test_datetimes.py:812: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
assert utcnow == datetime.datetime.utcfromtimestamp(time.time())
tests/test_pickle.py::test_pickle
/builddir/python3-freezegun-1.5.1/tests/test_pickle.py:13: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
utc_now = datetime.datetime.utcnow()
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_datetimes.py::TestUnitTestMethodDecorator::test_method_decorator_works_on_unittest_kwarg_frozen_time
FAILED tests/test_datetimes.py::TestUnitTestMethodDecorator::test_method_decorator_works_on_unittest_kwarg_frozen_time_with_func
FAILED tests/test_datetimes.py::TestUnitTestMethodDecorator::test_method_decorator_works_on_unittest_kwarg_hello
============= 3 failed, 128 passed, 6 skipped, 4 warnings in 0.79s =============
=> ERROR: python3-freezegun-1.5.1_1: do_check: 'TZ="UTC" PYTHONPATH="${PWD}/build/lib" python3 -m pytest' exited with 1
=> ERROR: in do_check() at srcpkgs/python3-freezegun/template:20 git format-patch
---
.../python3-freezegun/patches/py3.13.patch | 81 +++++++++++++++++++
srcpkgs/python3-freezegun/template | 6 +-
2 files changed, 84 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/python3-freezegun/patches/py3.13.patch
diff --git a/srcpkgs/python3-freezegun/patches/py3.13.patch b/srcpkgs/python3-freezegun/patches/py3.13.patch
new file mode 100644
index 000000000..448df8cd2
--- /dev/null
+++ b/srcpkgs/python3-freezegun/patches/py3.13.patch
@@ -0,0 +1,81 @@
+Date: Fri, 28 Jun 2024 19:21:04 +0000
+Subject: [PATCH] Admin: Support Python 3.13
+
+---
+ .github/workflows/ci.yaml | 9 ++++++---
+ tests/test_datetimes.py | 6 +++---
+ 2 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
+index 67c263e..59200ca 100644
+--- a/.github/workflows/ci.yaml
++++ b/.github/workflows/ci.yaml
+@@ -11,18 +11,20 @@ jobs:
+ strategy:
+ matrix:
+ python-version:
+- - '3.7'
+ - '3.8'
+ - '3.9'
+ - '3.10'
+ - '3.11'
+ - '3.12'
++ - '3.13.0-beta.2'
+
+ steps:
+ - uses: actions/checkout@master
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
++ with:
++ python-version: ${{ matrix.python-version }}
+
+ - name: Install dependencies
+ run: |
+@@ -44,16 +46,17 @@ jobs:
+ - '3.10'
+ - '3.11'
+ - '3.12'
++ - '3.13.0-beta.2'
+ implementation:
+ - '' # CPython
+ - 'pypy' # PyPy
+ exclude: # unreleased;
+- - implementation: 'pypy'
+- python-version: '3.10'
+ - implementation: 'pypy'
+ python-version: '3.11'
+ - implementation: 'pypy'
+ python-version: '3.12'
++ - implementation: 'pypy'
++ python-version: '3.13.0-beta.2'
+
+ steps:
+ - uses: actions/checkout@master
+diff --git a/tests/test_datetimes.py b/tests/test_datetimes.py
+index a6f1989..b75ad3b 100644
+--- a/tests/test_datetimes.py
++++ b/tests/test_datetimes.py
+@@ -534,17 +534,17 @@ def test_method_decorator_works_on_unittest(self) -> None:
+ @freeze_time('2013-04-09', as_kwarg='frozen_time')
+ def test_method_decorator_works_on_unittest_kwarg_frozen_time(self, frozen_time: Any) -> None:
+ self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
+- self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today())
++ assert frozen_time.time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09"
+
+ @freeze_time('2013-04-09', as_kwarg='hello')
+ def test_method_decorator_works_on_unittest_kwarg_hello(self, **kwargs: Any) -> None:
+ self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
+- self.assertEqual(datetime.date(2013, 4, 9), kwargs.get('hello').time_to_freeze.today()) # type: ignore
++ assert kwargs.get("hello").time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09" # type: ignore
+
+ @freeze_time(lambda: datetime.date(year=2013, month=4, day=9), as_kwarg='frozen_time')
+ def test_method_decorator_works_on_unittest_kwarg_frozen_time_with_func(self, frozen_time: Any) -> None:
+ self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
+- self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today())
++ assert frozen_time.time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09"
+
+
+ @freeze_time('2013-04-09')
diff --git a/srcpkgs/python3-freezegun/template b/srcpkgs/python3-freezegun/template
index 653237b3f..dbc6f581e 100644
--- a/srcpkgs/python3-freezegun/template
+++ b/srcpkgs/python3-freezegun/template
@@ -1,7 +1,7 @@
# Template file for 'python3-freezegun'
pkgname=python3-freezegun
-version=1.2.2
-revision=4
+version=1.5.1
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-dateutil"
@@ -12,7 +12,7 @@ license="Apache-2.0"
homepage="https://github.com/spulec/freezegun"
changelog="https://raw.githubusercontent.com/spulec/freezegun/master/CHANGELOG"
distfiles="${PYPI_SITE}/f/freezegun/freezegun-${version}.tar.gz"
-checksum=cd22d1ba06941384410cd967d8a99d5ae2442f57dfafeff2fda5de8dc5c05446
+checksum=b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9
do_check() {
# Timezone needs to be fixed due to
--
2.47.1 Side note: I think a separate PR would be more appropriate. |
The patch I was talking about was the patch included with void's package of freezegun. All I had to do was update the version and the streamlink package build/tests worked. I will open up a separate PR for freezegun though. |
I have opened a PR for python3-freezegun that should fix the tests here. #53929 |
438602a
to
a471ac7
Compare
Version bump. Did not see any major/breaking changes in the release notes. The one thing I did see is they removed the typing extensions dependency. I tested and it works fine.
Testing the changes
Local build testing