14
0

Accepting request 1218128 from home:yeey:OpenWebUI

SUSE AI needs version 1.0.2

OBS-URL: https://build.opensuse.org/request/show/1218128
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-pptx?expand=0&rev=11
This commit is contained in:
2024-10-25 14:45:25 +00:00
committed by Git OBS Bridge
parent dcb64b2067
commit 49aebe10cc
5 changed files with 39 additions and 104 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:587497ff28e779ab18dbb074f6d4052893c85dedc95ed75df319364f331fedee
size 10083771

View File

@@ -1,3 +1,26 @@
-------------------------------------------------------------------
Fri Sep 27 17:49:50 UTC 2024 - Thiago Bertoldi <thiago.bertoldi@suse.com>
- Remove UTC patch (not necessary since 1.0.0)
- Update to 1.0.2 (2024-08-07)
* fix: #1003 restore read-only enum members
- Update to 1.0.1 (2024-08-05)
* fix: #1000 add py.typed
- Update to 1.0.0 (2024-08-03)
* fix: #929 raises on JPEG with image/jpg MIME-type
* fix: #943 remove mention of a Px Length subtype
* fix: #972 next-slide-id fails in rare cases
* fix: #990 do not require strict timestamps for Zip
* Add type annotations
-------------------------------------------------------------------
Thu Sep 26 20:25:47 UTC 2024 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- fixed %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Fri Mar 15 09:18:12 UTC 2024 - Markéta Machová <mmachova@suse.com>

View File

@@ -14,46 +14,46 @@
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-python-pptx
Version: 0.6.23
Version: 1.0.2
Release: 0
Summary: Generate and manipulate Open XML PowerPoint (pptx) files
License: MIT
URL: http://github.com/scanny/python-pptx
Source: https://files.pythonhosted.org/packages/source/p/python-pptx/python-pptx-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/scanny/python-pptx/pull/957 Use UTC-aware datetime objects
Patch: utc.patch
BuildRequires: %{python_module setuptools}
Source: https://files.pythonhosted.org/packages/source/p/python-pptx/python_pptx-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 61.0.0}
# SECTION test requirements
BuildRequires: %{python_module lxml >= 3.1.0}
BuildRequires: %{python_module Pillow >= 3.3.2}
BuildRequires: %{python_module typing_extensions >= 4.9.0}
BuildRequires: %{python_module XlsxWriter >= 0.5.7}
BuildRequires: %{python_module behave}
BuildRequires: %{python_module pyparsing >= 2.0.1}
BuildRequires: %{python_module pytest}
# /SECTION
BuildRequires: fdupes
Requires: python-Pillow >= 3.3.2
Requires: python-XlsxWriter >= 0.5.7
Requires: python-lxml >= 3.1.0
Requires: python-Pillow >= 3.3.2
Requires: python-typing_extensions >= 4.9.0
Requires: python-XlsxWriter >= 0.5.7
BuildArch: noarch
%python_subpackages
%description
Generate and manipulate Open XML PowerPoint (.pptx) files.
Create, read, and update PowerPoint 2007+ (.pptx) files.
%prep
%autosetup -p1 -n python-pptx-%{version}
%autosetup -p1 -n python_pptx-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check

3
python_pptx-1.0.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:479a8af0eaf0f0d76b6f00b0887732874ad2e3188230315290cd1f9dd9cc7095
size 10109297

View File

@@ -1,88 +0,0 @@
Index: python-pptx-0.6.23/features/steps/coreprops.py
===================================================================
--- python-pptx-0.6.23.orig/features/steps/coreprops.py
+++ python-pptx-0.6.23/features/steps/coreprops.py
@@ -6,7 +6,7 @@ Gherkin step implementations for core pr
from __future__ import absolute_import
-from datetime import datetime, timedelta
+from datetime import datetime, timedelta, timezone
from behave import given, when, then
@@ -67,7 +67,7 @@ def step_then_a_core_props_part_with_def
assert core_props.revision == 1
# core_props.modified only stores time with seconds resolution, so
# comparison needs to be a little loose (within two seconds)
- modified_timedelta = datetime.utcnow() - core_props.modified
+ modified_timedelta = datetime.now(timezone.utc) - core_props.modified
max_expected_timedelta = timedelta(seconds=2)
assert modified_timedelta < max_expected_timedelta
Index: python-pptx-0.6.23/pptx/parts/coreprops.py
===================================================================
--- python-pptx-0.6.23.orig/pptx/parts/coreprops.py
+++ python-pptx-0.6.23/pptx/parts/coreprops.py
@@ -2,7 +2,7 @@
"""Core properties part, corresponds to ``/docProps/core.xml`` part in package."""
-from datetime import datetime
+from datetime import datetime, timezone
from pptx.opc.constants import CONTENT_TYPE as CT
from pptx.opc.package import XmlPart
@@ -27,7 +27,7 @@ class CorePropertiesPart(XmlPart):
core_props.title = "PowerPoint Presentation"
core_props.last_modified_by = "python-pptx"
core_props.revision = 1
- core_props.modified = datetime.utcnow()
+ core_props.modified = datetime.now(timezone.utc)
return core_props
@property
Index: python-pptx-0.6.23/tests/parts/test_coreprops.py
===================================================================
--- python-pptx-0.6.23.orig/tests/parts/test_coreprops.py
+++ python-pptx-0.6.23/tests/parts/test_coreprops.py
@@ -4,7 +4,7 @@
import pytest
-from datetime import datetime, timedelta
+from datetime import datetime, timedelta, timezone
from pptx.opc.constants import CONTENT_TYPE as CT
from pptx.oxml.coreprops import CT_CoreProperties
@@ -55,7 +55,7 @@ class DescribeCorePropertiesPart(object)
assert core_props.revision == 1
# core_props.modified only stores time with seconds resolution, so
# comparison needs to be a little loose (within two seconds)
- modified_timedelta = datetime.utcnow() - core_props.modified
+ modified_timedelta = datetime.now(timezone.utc) - core_props.modified
max_expected_timedelta = timedelta(seconds=2)
assert modified_timedelta < max_expected_timedelta
@@ -70,7 +70,7 @@ class DescribeCorePropertiesPart(object)
)
def date_prop_get_fixture(self, request, core_properties):
prop_name, expected_datetime = request.param
- return core_properties, prop_name, expected_datetime
+ return core_properties, prop_name, expected_datetime.astimezone() if expected_datetime is not None else None
@pytest.fixture(
params=[
Index: python-pptx-0.6.23/pptx/oxml/coreprops.py
===================================================================
--- python-pptx-0.6.23.orig/pptx/oxml/coreprops.py
+++ python-pptx-0.6.23/pptx/oxml/coreprops.py
@@ -247,7 +247,7 @@ class CT_CoreProperties(BaseOxmlElement)
dt = None
for tmpl in templates:
try:
- dt = datetime.strptime(parseable_part, tmpl)
+ dt = datetime.strptime(parseable_part, tmpl).astimezone()
except ValueError:
continue
if dt is None: