commit 856580a2504ef0407bce41282446e820c9951b63356d6fa05c5d5a72b1149ff1 Author: Todd R Date: Wed May 16 17:36:59 2018 +0000 Accepting request 609887 from devel:languages:python:misc Manipulating datetimes with ease and clarityof older code and makes some small modifications to the `Delorean` API to make it more Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string representing the `Delorean` object. + This change introduces the following breaking changes: * `Delorean.epoch` is a property, not a function. * `Delorean.midnight` is a property, not a function. * `Delorean.naive` is a property, not a function. * `Delorean.timezone` is a property, not a function. + delorean/dates.py * `is_datetime_naive()` no longer returns True when dt is None * `localize()` works with pytz tzinfo objects * `normalize()` works with pytz tzinfo objects * `Delorean.__init__()` accepts tzinfo objects as input to timezone * `Delorean.timezone()` is now a property * Added suport for humanizing a `Delorean` object * Added support for localizing a `Delorean` object for string output + delorean/interface.py * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` timezone attached to it instead of returning a `Delorean` object converted to UTC - Implement single-spec version - Complete spec file rewrite - Require python-python-dateutil. package was renamed - Don't run testsuite, there is none - Add LICENSE.txt and README.rst - Add runtime dependencies - created package (version 0.2.0) OBS-URL: https://build.opensuse.org/request/show/609887 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Delorean?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Delorean-1.0.0.tar.gz b/Delorean-1.0.0.tar.gz new file mode 100644 index 0000000..a372441 --- /dev/null +++ b/Delorean-1.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe67786e12338523848bec5588a658c4d425e12d53eb51cfef870bec8f576134 +size 18988 diff --git a/python-Delorean.changes b/python-Delorean.changes new file mode 100644 index 0000000..9560472 --- /dev/null +++ b/python-Delorean.changes @@ -0,0 +1,48 @@ +------------------------------------------------------------------- +Wed May 16 15:25:07 UTC 2018 - toddrme2178@gmail.com + +- Update to version 1.0.0 + + This release cleans up a lot of older code and makes some small modifications to the `Delorean` API to make it more + Pythonic. 1.0.0 includes support for humanizing a `Delorean` object, as well as outputing a localized string + representing the `Delorean` object. + + This change introduces the following breaking changes: + * `Delorean.epoch` is a property, not a function. + * `Delorean.midnight` is a property, not a function. + * `Delorean.naive` is a property, not a function. + * `Delorean.timezone` is a property, not a function. + + delorean/dates.py + * `is_datetime_naive()` no longer returns True when dt is None + * `localize()` works with pytz tzinfo objects + * `normalize()` works with pytz tzinfo objects + * `Delorean.__init__()` accepts tzinfo objects as input to timezone + * `Delorean.timezone()` is now a property + * Added suport for humanizing a `Delorean` object + * Added support for localizing a `Delorean` object for string output + + delorean/interface.py + * `parse()` understands `dateutil.tz.tzoffset`, `datetutil.tz.tzlocal` and `dateutil.tz.tzutc` and converts those tzinfo + objects into pytz based tzinfo objects. This allows `parse()` to return a `Delorean` object with a `pytz.FixedOffset` + timezone attached to it instead of returning a `Delorean` object converted to UTC +- Implement single-spec version +- Complete spec file rewrite + +------------------------------------------------------------------- +Fri Feb 26 13:05:39 UTC 2016 - tbechtold@suse.com + +- Require python-python-dateutil. package was renamed + +------------------------------------------------------------------- +Fri May 3 07:50:48 UTC 2013 - speilicke@suse.com + +- Don't run testsuite, there is none + +------------------------------------------------------------------- +Thu Apr 25 09:50:39 UTC 2013 - speilicke@suse.com + +- Add LICENSE.txt and README.rst +- Add runtime dependencies + +------------------------------------------------------------------- +Thu Apr 25 09:06:58 UTC 2013 - prusnak@opensuse.org + +- created package (version 0.2.0) + diff --git a/python-Delorean.spec b/python-Delorean.spec new file mode 100644 index 0000000..63164f2 --- /dev/null +++ b/python-Delorean.spec @@ -0,0 +1,76 @@ +# +# spec file for package python-Delorean +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-Delorean +Version: 1.0.0 +Release: 0 +License: MIT +Summary: Manipulating datetimes with ease and clarity +Url: https://github.com/myusuf3/delorean +Group: Development/Languages/Python +Source: https://files.pythonhosted.org/packages/source/D/Delorean/Delorean-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module Babel >= 2.1.1} +BuildRequires: %{python_module humanize >= 0.5.1} +BuildRequires: %{python_module mock} +BuildRequires: %{python_module python-dateutil >= 2.4.2} +BuildRequires: %{python_module pytz >= 2015.7} +BuildRequires: %{python_module tzlocal >= 1.2} +# /SECTION +Requires: python-Babel >= 2.1.1 +Requires: python-humanize >= 0.5.1 +Requires: python-python-dateutil >= 2.4.2 +Requires: python-pytz >= 2015.7 +Requires: python-tzlocal >= 1.2 +BuildArch: noarch + +%python_subpackages + +%description +Delorean is a library for clearing up the inconvenient truths that +arise dealing with datetimes in Python. Understanding that timing is +a delicate enough of a problem `delorean` hopes to provide a cleaner +less troublesome solution to shifting, manipulating, and generating +datetimes. + +%prep +%setup -q -n Delorean-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%{python_expand export PYTHONDONTWRITEBYTECODE=1 +export PYTHONPATH=%{buildroot}%{$python_sitelib} +$python tests/delorean_tests.py +} + +%files %{python_files} +%doc CHANGES.rst README.rst +%license LICENSE.txt +%{python_sitelib}/* + +%changelog