pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/misc/todoman todoman: update to 4.0.0.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5d9be74a398f
branches:  trunk
changeset: 453099:5d9be74a398f
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sun May 23 11:08:39 2021 +0000

description:
todoman: update to 4.0.0.

v4.0.0
------

Breaking changes in the configuration format
********************************************

The configuration format is changing with release 4.0.0. We currently depend on
an unmaintained library for configuration. It's not currently in a working
state, and while some distributions are patching it, setting up a clean
environment is a bit non-trivial, and the situation will only degrade in future.

The changes in format are be subtle, and also come with an intention to add
further extensibility in future. Configuration files will be plain python. If
you don't know Python don't worry, you don't _need_ to know Python.

I'll take my own config as a reference. The pre-4.0.0 format is:

```dosini
[main]
path = ~/.local/share/calendars/*
time_format = '%H:%M'
default_list = todo
humanize = true
startable = true
```

The 4.0.0 version would look like this:

```python
path = "~/.local/share/calendars/*"
time_format = "%H:%M"
default_list = "todo"
humanize = True
startable = True
```

Key differences:

- The `[main]` header is no longer needed.
- All strings must be quoted (this was previously optional).
- True and False start with uppercase.
- Using `yes` or `on` is no longer valid; only `True` and `False` are valid.

That's basically it. This lets up drop the problematic dependency, and we don't
actually need anything to read the config: it's just python code like the rest
of `todoman`!

For those users who _are_ python developers, you'll note this gives some
interesting flexibility: you CAN add any custom python code into the config
file. For example, you can defined the `path` programatically:

```python
def get_path() -> str:
    ...


path = get_path
```

Dropped support
***************

* Dropped support older Python versions. Only 3.8 and 3.9 are now supported.

Minor changes
*************

* Added support for python 3.9.
* The dependency `configobj` is no longer required.
* Click 8.0 is now supported.
* Fix crash when ``default_command`` has arguments.

diffstat:

 misc/todoman/Makefile |   6 +++---
 misc/todoman/PLIST    |   3 +--
 misc/todoman/distinfo |  10 +++++-----
 3 files changed, 9 insertions(+), 10 deletions(-)

diffs (53 lines):

diff -r 18a6cb1de86f -r 5d9be74a398f misc/todoman/Makefile
--- a/misc/todoman/Makefile     Sun May 23 11:06:15 2021 +0000
+++ b/misc/todoman/Makefile     Sun May 23 11:08:39 2021 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.24 2020/12/06 10:40:33 wiz Exp $
+# $NetBSD: Makefile,v 1.25 2021/05/23 11:08:39 wiz Exp $
 
-DISTNAME=              todoman-3.9.0
+DISTNAME=              todoman-4.0.0
 CATEGORIES=            misc
 MASTER_SITES=          ${MASTER_SITE_PYPI:=t/todoman/}
 #MASTER_SITES=         ${MASTER_SITE_GITHUB:=pimutils/}
@@ -34,7 +34,7 @@
 BUILD_DEPENDS+=        ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
 BUILD_DEPENDS+=        ${PYPKGPREFIX}-test-cov-[0-9]*:../../devel/py-test-cov
 
-PYTHON_VERSIONS_INCOMPATIBLE=  27
+PYTHON_VERSIONS_INCOMPATIBLE=  27 36 37
 REPLACE_PYTHON+=               bin/todo
 USE_LANGUAGES=                 # none
 
diff -r 18a6cb1de86f -r 5d9be74a398f misc/todoman/PLIST
--- a/misc/todoman/PLIST        Sun May 23 11:06:15 2021 +0000
+++ b/misc/todoman/PLIST        Sun May 23 11:08:39 2021 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2017/04/27 13:09:30 wiz Exp $
+@comment $NetBSD: PLIST,v 1.8 2021/05/23 11:08:39 wiz Exp $
 bin/todo
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
@@ -18,7 +18,6 @@
 ${PYSITELIB}/todoman/configuration.py
 ${PYSITELIB}/todoman/configuration.pyc
 ${PYSITELIB}/todoman/configuration.pyo
-${PYSITELIB}/todoman/confspec.ini
 ${PYSITELIB}/todoman/exceptions.py
 ${PYSITELIB}/todoman/exceptions.pyc
 ${PYSITELIB}/todoman/exceptions.pyo
diff -r 18a6cb1de86f -r 5d9be74a398f misc/todoman/distinfo
--- a/misc/todoman/distinfo     Sun May 23 11:06:15 2021 +0000
+++ b/misc/todoman/distinfo     Sun May 23 11:08:39 2021 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.19 2020/12/06 10:40:33 wiz Exp $
+$NetBSD: distinfo,v 1.20 2021/05/23 11:08:39 wiz Exp $
 
-SHA1 (todoman-3.9.0.tar.gz) = 056f06e8b50fa749bff4b391b06e2d424aab1151
-RMD160 (todoman-3.9.0.tar.gz) = f276537cebdf7737420e91d5a9dc38d4235b6ec8
-SHA512 (todoman-3.9.0.tar.gz) = 4ff8fe5972360cdc587797f1d89045f69678cc22a8a0db42c50b88b4c5a6ff4d0e6d445ccad799e3a6d38888d8d7af29d18d527abf34f262267c54b68763d6ee
-Size (todoman-3.9.0.tar.gz) = 62813 bytes
+SHA1 (todoman-4.0.0.tar.gz) = ede1677620c344fda1775fa45aa694f9ad000e27
+RMD160 (todoman-4.0.0.tar.gz) = 7029ba842e3affdbb4fa71a07578029ce81a2440
+SHA512 (todoman-4.0.0.tar.gz) = 53838682ef4145c4fea57bd7b63ff3322002df032719ab5f397408ac2a4ea72ab172148505fc86393177a3ac4801d0ae986736e98ccb9047313c7e32698529fd
+Size (todoman-4.0.0.tar.gz) = 65974 bytes



Home | Main Index | Thread Index | Old Index