Marcel Telka
2024-03-04 3e91531d22cf7d050d098b327960e501e7d15326
python/time-machine: update to 2.14.0

8 files modified
52 ■■■■ changed files
components/python/time-machine/Makefile 6 ●●●● patch | view | raw | blame | history
components/python/time-machine/history 2 ●●● patch | view | raw | blame | history
components/python/time-machine/manifests/sample-manifest.p5m 4 ●●●● patch | view | raw | blame | history
components/python/time-machine/patches/01-test-skip-failing.patch 16 ●●●● patch | view | raw | blame | history
components/python/time-machine/patches/02-tox.ini-requirements.patch 4 ●●●● patch | view | raw | blame | history
components/python/time-machine/pkg5 6 ●●●● patch | view | raw | blame | history
components/python/time-machine/test/results-all.master 12 ●●●●● patch | view | raw | blame | history
components/python/time-machine/time-machine-PYVER.p5m 2 ●●● patch | view | raw | blame | history
components/python/time-machine/Makefile
@@ -19,13 +19,12 @@
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME =        time-machine
HUMAN_VERSION =            2.13.0
HUMAN_VERSION =            2.14.0
COMPONENT_SUMMARY =        time-machine - Travel through time in your tests.
COMPONENT_PROJECT_URL =        https://github.com/adamchainz/time-machine
COMPONENT_ARCHIVE_URL =        \
    https://github.com/adamchainz/time-machine/archive/refs/tags/$(HUMAN_VERSION).tar.gz
COMPONENT_ARCHIVE_HASH =    \
    sha256:a0892ada963bd16fdaf657d71ef9bec614931c467a935f3217bf08906fe3bd11
    sha256:96d4d0d9af39004f74b705650bd5079c9208ba2c94428621863982e914ed0884
COMPONENT_LICENSE =        MIT
COMPONENT_LICENSE_FILE =    LICENSE
@@ -41,3 +40,4 @@
TEST_REQUIRED_PACKAGES.python += library/python/pytest
TEST_REQUIRED_PACKAGES.python += library/python/pytest-randomly
TEST_REQUIRED_PACKAGES.python += library/python/python-dateutil
TEST_REQUIRED_PACKAGES.python += library/python/tomli
components/python/time-machine/history
@@ -1 +1 @@
library/python/time-machine-37@2.9.0,5.11-2023.0.0.1 noincorporate
library/python/time-machine-37@2.9.0,5.11-2023.0.0.2
components/python/time-machine/manifests/sample-manifest.p5m
@@ -10,7 +10,7 @@
#
#
# Copyright 2023 <contributor>
# Copyright 2024 <contributor>
#
set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
@@ -23,7 +23,7 @@
license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
file path=usr/lib/python$(PYVER)/vendor-packages/_time_machine.so
file path=usr/lib/python$(PYVER)/vendor-packages/_time_machine.cpython-$(PYV).so
file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/LICENSE
file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/METADATA
file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/WHEEL
components/python/time-machine/patches/01-test-skip-failing.patch
@@ -1,6 +1,6 @@
--- time-machine-2.10.0/tests/test_time_machine.py.orig
+++ time-machine-2.10.0/tests/test_time_machine.py
@@ -334,6 +334,7 @@
--- time-machine-2.14.0/tests/test_time_machine.py.orig
+++ time-machine-2.14.0/tests/test_time_machine.py
@@ -380,6 +380,7 @@
     assert time.time() == EPOCH + 21600.0
 
 
@@ -8,7 +8,7 @@
 def test_destination_datetime_tzinfo_zoneinfo():
     orig_timezone = time.timezone
     orig_altzone = time.altzone
@@ -367,6 +368,7 @@
@@ -413,6 +414,7 @@
     assert time.daylight == orig_daylight
 
 
@@ -16,15 +16,15 @@
 def test_destination_datetime_tzinfo_zoneinfo_nested():
     orig_tzname = time.tzname
 
@@ -383,6 +385,7 @@
@@ -429,6 +431,7 @@
     assert time.tzname == orig_tzname
 
 
+@pytest.mark.skip(reason="always fails: https://github.com/adamchainz/time-machine/issues/386")
 def test_destination_datetime_tzinfo_zoneinfo_no_orig_tz():
     orig_tz = os.environ["TZ"]
     del os.environ["TZ"]
@@ -599,6 +602,7 @@
     with change_local_timezone(None):
         orig_tzname = time.tzname
@@ -698,6 +701,7 @@
         assert time.time() == EPOCH
 
 
components/python/time-machine/patches/02-tox.ini-requirements.patch
@@ -1,5 +1,5 @@
--- time-machine-2.12.0/tox.ini.orig
+++ time-machine-2.12.0/tox.ini
--- time-machine-2.14.0/tox.ini.orig
+++ time-machine-2.14.0/tox.ini
@@ -7,7 +7,7 @@
 [testenv]
 package = wheel
components/python/time-machine/pkg5
@@ -7,8 +7,8 @@
        "system/library"
    ],
    "fmris": [
        "library/python/time-machine-39",
        "library/python/time-machine"
        "library/python/time-machine",
        "library/python/time-machine-39"
    ],
    "name": "time-machine"
}
}
components/python/time-machine/test/results-all.master
@@ -1,17 +1,13 @@
py$(PYV): remove tox env folder $(@D)/.tox/py$(PYV)
py$(PYV): commands[0]> python -W error::ResourceWarning -W error::DeprecationWarning -W error::PendingDeprecationWarning -W ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning -W ignore:datetime.datetime.utcnow:DeprecationWarning -m coverage run -m pytest tests
$(PYTHON_DIR)/vendor-packages/pytest_ignore_flaky.py:13: PytestDeprecationWarning: The hookimpl PluginIgnoreFlaky.pytest_runtest_makereport uses old-style configuration options (marks or attributes).
Please use the pytest.hookimpl(hookwrapper=True) decorator instead
 to configure the hooks.
 See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
  @pytest.mark.hookwrapper
============================= test session starts ==============================
platform sunos5 -- Python $(PYTHON_VERSION).X -- $(@D)/.tox/py$(PYV)/bin/python
cachedir: .tox/py$(PYV)/.pytest_cache
rootdir: $(@D)
configfile: pyproject.toml
collecting ... collected 96 items
collecting ... collected 97 items
tests/test_time_machine.py::ClassDecoratorInheritanceTests::test_ineheritance_correctly_rebound PASSED
tests/test_time_machine.py::TestEscapeHatch::test_datetime_now PASSED
tests/test_time_machine.py::TestEscapeHatch::test_datetime_now_tz PASSED
tests/test_time_machine.py::TestEscapeHatch::test_datetime_utcnow PASSED
@@ -109,6 +105,8 @@
tests/test_time_machine.py::test_unsupported_type PASSED
tests/test_time_machine.py::test_uuid1 PASSED
======== 91 passed, 5 skipped ========
======== 92 passed, 5 skipped ========
$(PYTHON_DIR)/vendor-packages/coverage/inorout.py:503: CoverageWarning: Module src/_time_machine.c was never imported. (module-not-imported)
  self.warn(f"Module {pkg} was never imported.", slug="module-not-imported")
  py$(PYV): OK
  congratulations :)
components/python/time-machine/time-machine-PYVER.p5m
@@ -23,7 +23,7 @@
license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'
file path=usr/lib/python$(PYVER)/vendor-packages/_time_machine.so
file path=usr/lib/python$(PYVER)/vendor-packages/_time_machine.cpython-$(PYV).so
file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/LICENSE
file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/METADATA
file path=usr/lib/python$(PYVER)/vendor-packages/time_machine-$(HUMAN_VERSION).dist-info/WHEEL