Skip to content

Commit

Permalink
Update python-papermill to version 2.5.0 / rev 13 via SR 1146564
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/1146564
by user bnavigator + anag+factory
- Add papermill-pr779-moto5.patch gh#nteract/papermill#779
  • Loading branch information
bnavigator authored and bmwiedemann committed Feb 14, 2024
1 parent ac9b871 commit 0d464e7
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 2 deletions.
Binary file modified packages/p/python-papermill/.files
Binary file not shown.
8 changes: 8 additions & 0 deletions packages/p/python-papermill/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,12 @@
* Removed use of ansiwrap PR #681</comment>
<requestid>1135502</requestid>
</revision>
<revision rev="13" vrev="2">
<srcmd5>5c6f033d46cca70e2b27b6de1677c0ee</srcmd5>
<version>2.5.0</version>
<time>1707949182</time>
<user>anag+factory</user>
<comment>- Add papermill-pr779-moto5.patch gh#nteract/papermill#779</comment>
<requestid>1146564</requestid>
</revision>
</revisionlist>
51 changes: 51 additions & 0 deletions packages/p/python-papermill/papermill-pr779-moto5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From 7795b90537f73971ccd547b0a078e8f0f37b3c76 Mon Sep 17 00:00:00 2001
From: Ben Greiner <code@bnavigator.de>
Date: Wed, 14 Feb 2024 12:48:01 +0100
Subject: [PATCH 1/2] Replace mock_s3 with mock_aws (Moto 5)

---
papermill/tests/test_s3.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Index: papermill-2.5.0/papermill/tests/test_s3.py
===================================================================
--- papermill-2.5.0.orig/papermill/tests/test_s3.py
+++ papermill-2.5.0/papermill/tests/test_s3.py
@@ -5,7 +5,7 @@ import pytest
import boto3
import moto

-from moto import mock_s3
+from moto import mock_aws

from ..s3 import Bucket, Prefix, Key, S3

@@ -138,7 +138,7 @@ def test_key_defaults():
assert k1.is_prefix is False


-@mock_s3
+@mock_aws
def test_s3_defaults():
s1 = S3()
s2 = S3()
@@ -164,8 +164,8 @@ read_from_gen = lambda g: "\n".join(g)

@pytest.fixture(scope="function")
def s3_client():
- mock_s3 = moto.mock_s3()
- mock_s3.start()
+ mock_aws = moto.mock_aws()
+ mock_aws.start()

client = boto3.client('s3')
client.create_bucket(
@@ -180,7 +180,7 @@ def s3_client():
client.delete_object(Bucket=test_bucket_name, Key=test_empty_file_path)
except Exception:
pass
- mock_s3.stop()
+ mock_aws.stop()


def test_s3_read(s3_client):
5 changes: 5 additions & 0 deletions packages/p/python-papermill/python-papermill.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Feb 14 12:10:30 UTC 2024 - Ben Greiner <code@bnavigator.de>

- Add papermill-pr779-moto5.patch gh#nteract/papermill#779

-------------------------------------------------------------------
Thu Dec 28 15:30:12 UTC 2023 - Ben Greiner <code@bnavigator.de>

Expand Down
10 changes: 8 additions & 2 deletions packages/p/python-papermill/python-papermill.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# spec file for package python-papermill
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -23,6 +23,8 @@ Summary: Tool to parametrize and run Jupyter and nteract Notebooks
License: BSD-3-Clause
URL: https://github.com/nteract/papermill
Source: https://files.pythonhosted.org/packages/source/p/papermill/papermill-%{version}.tar.gz
# PATCH-FIX-UPSTREAM papermill-pr779-moto5.patch gh#nteract/papermill#779
Patch0: papermill-pr779-moto5.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
Expand All @@ -37,8 +39,11 @@ Requires: python-nbformat >= 5.1.2
Requires: python-requests >= 2.21.0
Requires: python-tenacity >= 5.0.2
Requires: python-tqdm >= 4.32.2
%if 0%{?python_version_nodots} >= 312
Requires: python-aiohttp
%endif
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
Recommends: python-azure-datalake-store >= 0.0.30
Recommends: python-azure-identity >= 1.3.1
Recommends: python-azure-storage-blob >= 12.1.0
Expand All @@ -48,6 +53,7 @@ Recommends: python-gcsfs >= 0.2.0
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module aiohttp if %python-base >= 3.12}
BuildRequires: %{python_module azure-datalake-store >= 0.0.30}
BuildRequires: %{python_module azure-identity >= 1.3.1}
BuildRequires: %{python_module azure-storage-blob >= 12.1.0}
Expand Down

0 comments on commit 0d464e7

Please sign in to comment.