py-aniso8601: updated to 9.0.1 aniso8601 9.0.1 =============== Added ----- * Development requirements handled by :code:`extras_require` (install with :code:`pip install -e .[dev]`) * Pre-commit hooks, managed with `pre-commit <https://pre-commit.com/>`_ (install with :code:`pre-commit install`) * Add :code:`readthedocs.yaml` to make configuration explicit Changed ------- * Code formatted with `Black <https://black.readthedocs.io/en/stable/index.html>`_ * Imports sorted with `isort <https://pycqa.github.io/isort/>`_ * Following `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_ for this and future CHANGELOG entries * Removed python-dateutil from :code:`BuildRequires` in specfile as they are no longer required since calendar level duration building was split to a separate project (6.0.0) * Heading level of top of CHANGELOG Fixed ----- * Parsing prescribed durations with only hour and second time components (see `PR 14 <https://bitbucket.org/nielsenb/aniso8601/pull-requests/14>`_) * Parsing prescribed durations with only year and day components aniso8601 9.0.0 =============== Changes ------- * Add support for concise interval format (see `27 <https://bitbucket.org/nielsenb/aniso8601/issues/27/support-for-short-syntax-for-intervals>`_) * Add explicit bounds of [000, 366] to day of year component :code:`_parse_ordinal_date`, this adds the same limits to dates of the format YYYYDDD or YYYY-DDD when using :code:`parse_date` * Add :code:`range_check_date`, :code:`range_check_time`, :code:`range_check_duration`, :code:`range_check_repeating_interval`, and :code:`range_check_timezone` range checking class methods to :code:`BaseTimeBuilder` there are no datetime or non-repeating interval check function as they are made of already checked parts * :code:`PythonTimeBuilder` now calls the appropriate range check functions using the :code:`range_check_date`, :code:`range_check_time`, :code:`range_check_duration`, :code:`range_check_repeating_interval`, and :code:`range_check_timezone` methods defined in :code:`aniso8601.builders` * Add :code:`range_check_duration` to :code:`PythonTimeBuilder` which calls :code:`BaseTimeBuilder.range_check_duration` and performs additional checks against maximum timedelta size * Add :code:`range_check_interval` to :code:`PythonTimeBuilder` which handles building concise dates and performs additional checks against maximum timedelta size * Add :code:`get_datetime_resolution` which behaves like :code:`get_time_resolution` but accepts a ISO 8601 date time as an argument, return value is a :code:`TimeResolution` * Add :code:`exceptions.RangeCheckError` as a parent type of all failures in the range check methods, it descends from :code:`ValueError` * Add :code:`get_duration_resolution` which behaves like other resolution helpers, return value is a :code:`DurationResolution` * Add :code:`get_interval_resolution` which behaves like other resolution helpers, return value is a :code:`IntervalResolution` * Negative durations now fail at the parse step and simply raise :code:`ISOFormatError`, calling a :code:`PythonTimeBuilder.build_duration` directly with a negative duration component will yield an :code:`ISOFormatError` in the range check * Raise :code:`DayOutOfBoundsError` if calendar day exceeds number of days in calendar month * Raise :code:`DayOutOfBoundsError` if ordinal day exceeds number of days in calendar year (366 now raises :code:`DayOutOfBoundsError` in non-leap year) * Raise :code:`ISOFormatError` when date or time string contains extra whitespace * Raise :code:`ISOFormatError` on multiple fraction separators (comma, full-stop) in a time string * Raise :code:`ISOFormatError` when duration contains multiple duration designators ("P"), or time designators ("T") * :code:`PythonTimeBuilder.build_duration` raises :code:`YearOutOfBoundsError`, :code:`MonthOutOfBoundsError`, :code:`WeekOutOfBoundsError`, :code:`HoursOutOfBoundsError`, :code:`MinutesOutOfBoundsError`, or :code:`SecondsOutOfBoundsError` when a given duration component would result in a :code:`timedelta` that would exceed the maximum size * Raise :code:`ISOFormatError` if number of delimiters is not exactly 1 in :code:`parse_interval` * Raise :code:`ISOFormatError` when either part of an interval string before of after the delimiter is empty * Raise :code:`YearOutOfBoundsError` in :code:`PythonTimeBuilder.build_interval` if an interval with a duration would exceed the maximum or minimum years for Python date objects * Simplify :code:`parse_date`, :code:`build_date` will now be called with explicit :code:`None` arguments instead of date components not in the parsed string excluded from the call * Change :code:`get_date_resolution` to call :code:`parse_date` and return the resolution based on the smallest parsed component * Simplify :code:`parse_time`, :code:`build_time` will now be called with explicit :code:`None` arguments instead of date components not in the parsed string excluded from the call * Change :code:`get_time_resolution` to call :code:`parse_time` and return the resolution based on the smallest parsed component * :code:`TupleBuilder` now builds :code:`DateTuple`, :code:`TimeTuple`, :code:`DatetimeTuple`, :code:`DurationTuple`, :code:`IntervalTuple`, :code:`RepeatingIntervalTuple` and :code:`TimezoneTuple` namedtuples * Simplify :code:`parse_duration`, :code:`build_duration` will now be called with explicit :code:`None` arguments when components of a prescribed duration are not present in the ISO 8601 duration string instead of being excluded from the call * Remove unused :code:`decimalfraction.find_separator` * Remove unused :code:`PythonTimeBuilder._split_to_microseconds` * Removed :code:`NegativeDurationError` Deprecation ----------- * **Update on Python 2 support**: Python 2 support was slated to be removed in 7.0.0 but was not, it will remain until a test fails on Python 2 but not Python 3 * Using Setuptools to run tests (:code:`python setup.py tests`) will be removed in the next major or minor version (either 9.1.0, 10.0.0)diff -r1.7 -r1.8 pkgsrc/time/py-aniso8601/Makefile
(adam)
@@ -1,21 +1,21 @@ | @@ -1,21 +1,21 @@ | |||
1 | # $NetBSD: Makefile,v 1.7 2021/02/09 06:58:55 adam Exp $ | 1 | # $NetBSD: Makefile,v 1.8 2021/05/19 11:08:08 adam Exp $ | |
2 | 2 | |||
3 | DISTNAME= aniso8601-8.1.1 | 3 | DISTNAME= aniso8601-9.0.1 | |
4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | 4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | |
5 | CATEGORIES= time python | 5 | CATEGORIES= time python | |
6 | MASTER_SITES= ${MASTER_SITE_PYPI:=a/aniso8601/} | 6 | MASTER_SITES= ${MASTER_SITE_PYPI:=a/aniso8601/} | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= https://bitbucket.org/nielsenb/aniso8601 | 9 | HOMEPAGE= https://bitbucket.org/nielsenb/aniso8601 | |
10 | COMMENT= Library for parsing ISO 8601 strings | 10 | COMMENT= Library for parsing ISO 8601 strings | |
11 | LICENSE= modified-bsd | 11 | LICENSE= modified-bsd | |
12 | 12 | |||
13 | .include "../../lang/python/pyversion.mk" | |||
14 | .if ${_PYTHON_VERSION} == 27 | |||
13 | TEST_DEPENDS+= ${PYPKGPREFIX}-mock>=2.0.0:../../devel/py-mock | 15 | TEST_DEPENDS+= ${PYPKGPREFIX}-mock>=2.0.0:../../devel/py-mock | |
16 | .endif | |||
14 | 17 | |||
15 | USE_LANGUAGES= # none | 18 | USE_LANGUAGES= # none | |
16 | 19 | |||
17 | do-test: | |||
18 | cd ${WRKSRC}/aniso8601/tests && ${PYTHONBIN} -m unittest discover -v | |||
19 | ||||
20 | .include "../../lang/python/egg.mk" | 20 | .include "../../lang/python/egg.mk" | |
21 | .include "../../mk/bsd.pkg.mk" | 21 | .include "../../mk/bsd.pkg.mk" |
@@ -1,6 +1,6 @@ | @@ -1,6 +1,6 @@ | |||
1 | $NetBSD: distinfo,v 1.7 2021/02/09 06:58:55 adam Exp $ | 1 | $NetBSD: distinfo,v 1.8 2021/05/19 11:08:08 adam Exp $ | |
2 | 2 | |||
3 | SHA1 (aniso8601-8.1.1.tar.gz) = a6235d33f75b09fe8228e2eae11557d4538f7e75 | 3 | SHA1 (aniso8601-9.0.1.tar.gz) = fddd95af07cf49ba844bbe3b70037088643908e6 | |
4 | RMD160 (aniso8601-8.1.1.tar.gz) = 64e3f5ea71c5de437fa56a31b7383811e37400b2 | 4 | RMD160 (aniso8601-9.0.1.tar.gz) = 8ad04ab28aed5de651b589d4fd09db88a126adee | |
5 | SHA512 (aniso8601-8.1.1.tar.gz) = f9c3412c5e7dec04cca56df5806a747779848adb90137293368b4d50c365692b1d1f792a00f57172925229ccdee34ef5b50cc2d06f4c9b4d697c651e5a2e3674 | 5 | SHA512 (aniso8601-9.0.1.tar.gz) = a17c363a3a67b69a2fde50cc37b080b52615cebc453ef70090498ffce909775b0109c889b63e87381c795c2d8531efd6048542627c88e97297ac22ce81c10c8c | |
6 | Size (aniso8601-8.1.1.tar.gz) = 39143 bytes | 6 | Size (aniso8601-9.0.1.tar.gz) = 47345 bytes |
@@ -1,17 +1,18 @@ | @@ -1,17 +1,18 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.5 2021/02/09 06:58:55 adam Exp $ | 1 | @comment $NetBSD: PLIST,v 1.6 2021/05/19 11:08:08 adam Exp $ | |
2 | ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO | 2 | ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO | |
3 | ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt | 3 | ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt | |
4 | ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt | 4 | ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt | |
5 | ${PYSITELIB}/${EGG_INFODIR}/requires.txt | |||
5 | ${PYSITELIB}/${EGG_INFODIR}/top_level.txt | 6 | ${PYSITELIB}/${EGG_INFODIR}/top_level.txt | |
6 | ${PYSITELIB}/aniso8601/__init__.py | 7 | ${PYSITELIB}/aniso8601/__init__.py | |
7 | ${PYSITELIB}/aniso8601/__init__.pyc | 8 | ${PYSITELIB}/aniso8601/__init__.pyc | |
8 | ${PYSITELIB}/aniso8601/__init__.pyo | 9 | ${PYSITELIB}/aniso8601/__init__.pyo | |
9 | ${PYSITELIB}/aniso8601/builders/__init__.py | 10 | ${PYSITELIB}/aniso8601/builders/__init__.py | |
10 | ${PYSITELIB}/aniso8601/builders/__init__.pyc | 11 | ${PYSITELIB}/aniso8601/builders/__init__.pyc | |
11 | ${PYSITELIB}/aniso8601/builders/__init__.pyo | 12 | ${PYSITELIB}/aniso8601/builders/__init__.pyo | |
12 | ${PYSITELIB}/aniso8601/builders/python.py | 13 | ${PYSITELIB}/aniso8601/builders/python.py | |
13 | ${PYSITELIB}/aniso8601/builders/python.pyc | 14 | ${PYSITELIB}/aniso8601/builders/python.pyc | |
14 | ${PYSITELIB}/aniso8601/builders/python.pyo | 15 | ${PYSITELIB}/aniso8601/builders/python.pyo | |
15 | ${PYSITELIB}/aniso8601/builders/tests/__init__.py | 16 | ${PYSITELIB}/aniso8601/builders/tests/__init__.py | |
16 | ${PYSITELIB}/aniso8601/builders/tests/__init__.pyc | 17 | ${PYSITELIB}/aniso8601/builders/tests/__init__.pyc | |
17 | ${PYSITELIB}/aniso8601/builders/tests/__init__.pyo | 18 | ${PYSITELIB}/aniso8601/builders/tests/__init__.pyo |