[Git][debian-gis-team/pystac][master] 4 commits: New 0004-Do-not-use-the-deprecated-utcnow.patch
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Nov 25 18:15:37 GMT 2023
Antonio Valentino pushed to branch master at Debian GIS Project / pystac
Commits:
8a0d9cc4 by Antonio Valentino at 2023-11-25T17:55:23+00:00
New 0004-Do-not-use-the-deprecated-utcnow.patch
sq
- - - - -
d623030b by Antonio Valentino at 2023-11-25T17:55:28+00:00
New 0005-Do-not-raise-error-on-deprecations.patch
- - - - -
50686b03 by Antonio Valentino at 2023-11-25T17:58:44+00:00
Skip test_get_schema_uri
- - - - -
fe6a7bed by Antonio Valentino at 2023-11-25T18:14:16+00:00
Forward 0004-Do-not-use-the-deprecated-utcnow.patch
- - - - -
5 changed files:
- debian/changelog
- + debian/patches/0004-Do-not-use-the-deprecated-utcnow.patch
- + debian/patches/0005-Do-not-raise-error-on-deprecations.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+pystac (1.9.0-2) UNRELEASED; urgency=medium
+
+ * debian/patches:
+ - New 0004-Do-not-use-the-deprecated-utcnow.patch and
+ 0005-Do-not-raise-error-on-deprecations.patch
+ (Closes: #1056444).
+ * debian/rules:
+ - Skip test_get_schema_uri due to
+ 0005-Do-not-raise-error-on-deprecations.patch.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 25 Nov 2023 16:50:13 +0000
+
pystac (1.9.0-1) unstable; urgency=medium
* New upstream release.
=====================================
debian/patches/0004-Do-not-use-the-deprecated-utcnow.patch
=====================================
@@ -0,0 +1,216 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sat, 25 Nov 2023 16:49:45 +0000
+Subject: Do not use the deprecated utcnow
+
+Forwarded: https://github.com/stac-utils/pystac/pull/1283
+---
+ pystac/collection.py | 4 ++--
+ tests/test_catalog.py | 28 ++++++++++++++--------------
+ tests/utils/test_cases.py | 6 +++---
+ tests/validation/test_validate.py | 4 ++--
+ 4 files changed, 21 insertions(+), 21 deletions(-)
+
+diff --git a/pystac/collection.py b/pystac/collection.py
+index e5e0696..b9d5541 100644
+--- a/pystac/collection.py
++++ b/pystac/collection.py
+@@ -3,7 +3,7 @@ from __future__ import annotations
+ import warnings
+ from collections.abc import Iterable
+ from copy import deepcopy
+-from datetime import datetime
++from datetime import datetime, timezone
+ from typing import (
+ TYPE_CHECKING,
+ Any,
+@@ -294,7 +294,7 @@ class TemporalExtent:
+ TemporalExtent: The resulting TemporalExtent.
+ """
+ return TemporalExtent(
+- intervals=[[datetime.utcnow().replace(microsecond=0), None]]
++ intervals=[[datetime.now(timezone.utc).replace(microsecond=0), None]]
+ )
+
+
+diff --git a/tests/test_catalog.py b/tests/test_catalog.py
+index f5030aa..ea059bf 100644
+--- a/tests/test_catalog.py
++++ b/tests/test_catalog.py
+@@ -8,7 +8,7 @@ import unittest
+ from collections import defaultdict
+ from collections.abc import Iterator
+ from copy import deepcopy
+-from datetime import datetime
++from datetime import datetime, timezone
+ from pathlib import Path
+ from typing import Any, cast
+
+@@ -140,7 +140,7 @@ class TestCatalog:
+ id="test-item",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={"key": "one"},
+ )
+ subcat.add_item(item)
+@@ -154,7 +154,7 @@ class TestCatalog:
+ id="test-item",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={"key": "two"},
+ )
+ subcat.add_item(item)
+@@ -168,7 +168,7 @@ class TestCatalog:
+ id="test-item",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={"key": "three"},
+ )
+ subcat.add_item(item)
+@@ -710,7 +710,7 @@ class TestCatalog:
+ id=f"item{ni}",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties=properties,
+ )
+ )
+@@ -748,7 +748,7 @@ class TestCatalog:
+ id="item1",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties=properties,
+ )
+ )
+@@ -758,7 +758,7 @@ class TestCatalog:
+ id="item2",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties=properties,
+ )
+ )
+@@ -787,7 +787,7 @@ class TestCatalog:
+ id=f"item{ni}",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties=properties,
+ )
+ )
+@@ -812,7 +812,7 @@ class TestCatalog:
+ id=f"item{ni}",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties=properties,
+ )
+ )
+@@ -896,7 +896,7 @@ class TestCatalog:
+ id="item1",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={},
+ )
+ item1.add_asset("ortho", Asset(href="/some/ortho.tif"))
+@@ -907,7 +907,7 @@ class TestCatalog:
+ id="item2",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={},
+ )
+ item2.add_asset("ortho", Asset(href="/some/other/ortho.tif"))
+@@ -1436,7 +1436,7 @@ class FullCopyTest(unittest.TestCase):
+ id="test_item",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={},
+ )
+
+@@ -1456,7 +1456,7 @@ class FullCopyTest(unittest.TestCase):
+ id="Imagery",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={},
+ )
+ for key in ["ortho", "dsm"]:
+@@ -1469,7 +1469,7 @@ class FullCopyTest(unittest.TestCase):
+ id="Labels",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={},
+ )
+ cat.add_items([image_item, label_item])
+diff --git a/tests/utils/test_cases.py b/tests/utils/test_cases.py
+index 90a1590..2208145 100644
+--- a/tests/utils/test_cases.py
++++ b/tests/utils/test_cases.py
+@@ -1,6 +1,6 @@
+ import csv
+ import os
+-from datetime import datetime
++from datetime import datetime, timezone
+ from typing import Any
+
+ import pystac
+@@ -156,7 +156,7 @@ class TestCases:
+ id="imagery-item",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={},
+ )
+
+@@ -168,7 +168,7 @@ class TestCases:
+ id="label-items",
+ geometry=ARBITRARY_GEOM,
+ bbox=ARBITRARY_BBOX,
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={},
+ )
+
+diff --git a/tests/validation/test_validate.py b/tests/validation/test_validate.py
+index e6af2cb..bf78b01 100644
+--- a/tests/validation/test_validate.py
++++ b/tests/validation/test_validate.py
+@@ -2,7 +2,7 @@ import json
+ import os
+ import shutil
+ import tempfile
+-from datetime import datetime
++from datetime import datetime, timezone
+ from typing import Any
+
+ import jsonschema
+@@ -176,7 +176,7 @@ class TestValidate:
+ id="test-item",
+ geometry=geom,
+ bbox=[-115.308, 36.126, -115.305, 36.129],
+- datetime=datetime.utcnow(),
++ datetime=datetime.now(timezone.utc),
+ properties={},
+ )
+
=====================================
debian/patches/0005-Do-not-raise-error-on-deprecations.patch
=====================================
@@ -0,0 +1,24 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sat, 25 Nov 2023 16:57:15 +0000
+Subject: Do not raise error on deprecations
+
+Forwarded: not-needed
+---
+ pyproject.toml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 86820f1..e32a3be 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -99,8 +99,8 @@ ignore_missing_imports = true
+ line-length = 88
+ select = ["E", "F", "I"]
+
+-[tool.pytest.ini_options]
+-filterwarnings = ["error"]
++# [tool.pytest.ini_options]
++# filterwarnings = ["error"]
+
+ [build-system]
+ requires = ["setuptools>=61.0"]
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,5 @@
0001-Fix-privacy-breachs.patch
0002-Fix-links-to-source-in-docs.patch
0003-Include-package-data.patch
+0004-Do-not-use-the-deprecated-utcnow.patch
+0005-Do-not-raise-error-on-deprecations.patch
=====================================
debian/rules
=====================================
@@ -50,7 +50,8 @@ and not CollectionScientificExtensionTest \
and not AssetStorageExtensionTest \
and not TimestampsTest \
and not ViewTest \
-and not ProjectionTest" \
+and not ProjectionTest \
+and not test_get_schema_uri" \
--ignore=$(CURDIR)/tests/validation/test_validate.py \
--ignore=$(CURDIR)/tests/test_writing.py \
$(CURDIR)/tests
View it on GitLab: https://salsa.debian.org/debian-gis-team/pystac/-/compare/d6f351ea3ee4ac1099d2cb770032da5c01f441f2...fe6a7bed3b8f62f48d5a512a89af14368840ebeb
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pystac/-/compare/d6f351ea3ee4ac1099d2cb770032da5c01f441f2...fe6a7bed3b8f62f48d5a512a89af14368840ebeb
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20231125/be7c4735/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list