Update: productivity/khal 0.9.9* -> 0.9.10

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Update: productivity/khal 0.9.9* -> 0.9.10

Kurt Mosiejczuk-9
While looking into another port update, I came across productivity/khal
that was temporarily not using PyPi until a new version had a fix for
using py-dateutil >= 2.7. I checked, and such an update is out.

So I converted the port back to using PyPi. While here, I fixed all the
tests that would fail if/because LC_CTYPE=C.UTF-8 was not defined for
the test environment. With that in place, only 4 of the tests fail and
they are all the ones expecting us to print out different days of
the week. With the last revision, on my system that defaults not to UTF-8,
I had some fortysomething tests failing.

cc maintainer jung@

--Kurt

Index: Makefile
===================================================================
RCS file: /cvs/ports/productivity/khal/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile 19 Sep 2018 09:18:44 -0000 1.7
+++ Makefile 14 Mar 2019 01:47:50 -0000
@@ -2,8 +2,8 @@
 
 COMMENT = standards based terminal calendar
 
-MODPY_EGG_VERSION = 0.9.7.dev114+g7932721
-DISTNAME = khal-0.9.9.20180918
+MODPY_EGG_VERSION = 0.9.10
+DISTNAME = khal-${MODPY_EGG_VERSION}
 
 CATEGORIES = productivity
 
@@ -16,14 +16,7 @@ PERMIT_PACKAGE_CDROM = Yes
 
 MODULES = lang/python
 
-# XXX normally use pypi and remove the git BUILD_DEPENDS.
-# currently this is a mirrored checkout of 79327211 from master which has
-# a fix for incompatibility with newer dateutil. setuptools_scm wants
-# either a pypi archive or a full git checkout + the git binary to be
-# present at build time.
-BUILD_DEPENDS = devel/git
-MASTER_SITES = https://spacehopper.org/mirrors/
-#MODPY_PI = Yes
+MODPY_PI = Yes
 
 MODPY_SETUPTOOLS = Yes
 MODPY_VERSION =         ${MODPY_DEFAULT_VERSION_3}
@@ -46,7 +39,10 @@ TEST_DEPENDS = ${RUN_DEPENDS} \
  devel/py-test-cov${MODPY_FLAVOR} \
  devel/py-freezegun${MODPY_FLAVOR}
 
+TEST_ENV += LC_CTYPE=C.UTF-8
+
 do-test:
- cd ${WRKSRC} && ${MODPY_BIN} -m pytest
+ cd ${WRKSRC} && exec ${SETENV} ${MAKE_ENV} ${TEST_ENV} \
+ ${MODPY_BIN} -m pytest
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/productivity/khal/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo 19 Sep 2018 09:18:44 -0000 1.5
+++ distinfo 14 Mar 2019 01:47:50 -0000
@@ -1,2 +1,2 @@
-SHA256 (khal-0.9.9.20180918.tar.gz) = y3GfeKZth+S3aKQMLzZZU92FA6PS7hnlN+uPsiSQEmo=
-SIZE (khal-0.9.9.20180918.tar.gz) = 3775684
+SHA256 (khal-0.9.10.tar.gz) = BA7Rwhg/FquX313pPW6EIb2x+TD7iV06ShD7PhqQAA4=
+SIZE (khal-0.9.10.tar.gz) = 171132
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/productivity/khal/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 19 Sep 2018 09:18:44 -0000 1.2
+++ pkg/PLIST 14 Mar 2019 01:47:50 -0000
@@ -20,7 +20,7 @@ lib/python${MODPY_VERSION}/site-packages
 lib/python${MODPY_VERSION}/site-packages/khal/${MODPY_PYCACHE}configwizard.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/khal/${MODPY_PYCACHE}controllers.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/khal/${MODPY_PYCACHE}exceptions.${MODPY_PYC_MAGIC_TAG}pyc
-lib/python${MODPY_VERSION}/site-packages/khal/${MODPY_PYCACHE}parse_datetime.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/khal/${MODPY_PYCACHE}log.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/khal/${MODPY_PYCACHE}terminal.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/khal/${MODPY_PYCACHE}utils.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/khal/${MODPY_PYCACHE}version.${MODPY_PYC_MAGIC_TAG}pyc
@@ -37,13 +37,15 @@ lib/python${MODPY_VERSION}/site-packages
 lib/python${MODPY_VERSION}/site-packages/khal/khalendar/${MODPY_PYCACHE}event.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/khal/khalendar/${MODPY_PYCACHE}exceptions.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/khal/khalendar/${MODPY_PYCACHE}khalendar.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/khal/khalendar/${MODPY_PYCACHE}utils.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/khal/khalendar/${MODPY_PYCACHE}vdir.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/khal/khalendar/backend.py
 lib/python${MODPY_VERSION}/site-packages/khal/khalendar/event.py
 lib/python${MODPY_VERSION}/site-packages/khal/khalendar/exceptions.py
 lib/python${MODPY_VERSION}/site-packages/khal/khalendar/khalendar.py
+lib/python${MODPY_VERSION}/site-packages/khal/khalendar/utils.py
 lib/python${MODPY_VERSION}/site-packages/khal/khalendar/vdir.py
-lib/python${MODPY_VERSION}/site-packages/khal/parse_datetime.py
+lib/python${MODPY_VERSION}/site-packages/khal/log.py
 lib/python${MODPY_VERSION}/site-packages/khal/settings/
 lib/python${MODPY_VERSION}/site-packages/khal/settings/__init__.py
 lib/python${MODPY_VERSION}/site-packages/khal/settings/${MODPY_PYCACHE}/

Reply | Threaded
Open this post in threaded view
|

Re: Update: productivity/khal 0.9.9* -> 0.9.10

Klemens Nanni-2
On Wed, Mar 13, 2019 at 09:56:23PM -0400, Kurt Mosiejczuk wrote:
> While looking into another port update, I came across productivity/khal
> that was temporarily not using PyPi until a new version had a fix for
> using py-dateutil >= 2.7. I checked, and such an update is out.
Thanks.

> So I converted the port back to using PyPi. While here, I fixed all the
> tests that would fail if/because LC_CTYPE=C.UTF-8 was not defined for
> the test environment. With that in place, only 4 of the tests fail and
> they are all the ones expecting us to print out different days of
> the week.
Looks good to me; OK kn.  Two unrelated nits inline if you care to fix
them along the way.

FWIW, I see five not four tests failing: see my test.log below.

> cc maintainer jung@
Either you put him on Bcc or actually forgot the Cc, so I just added him
to the loop.

>  MODPY_SETUPTOOLS = Yes
>  MODPY_VERSION =         ${MODPY_DEFAULT_VERSION_3}
Replace these     ^^^^^^^^^ spaces with tabs.

> @@ -46,7 +39,10 @@ TEST_DEPENDS = ${RUN_DEPENDS} \
>   devel/py-test-cov${MODPY_FLAVOR} \
>   devel/py-freezegun${MODPY_FLAVOR}
Sort dependencies alphabetically.


cd /usr/ports/pobj/khal-0.9.10/khal-0.9.10 && exec /usr/bin/env -i CC=cc PYTHONUSERBASE= PORTSDIR="/usr/ports" LIBTOOL="/usr/bin/libtool"  PATH='/usr/ports/pobj/khal-0.9.10/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin' PREFIX='/usr/local'  LOCALBASE='/usr/local' X11BASE='/usr/X11R6'  CFLAGS='-O2 -pipe'  TRUEPREFIX='/usr/local' DESTDIR=''  HOME='/khal-0.9.10_writes_to_HOME' COMPILER_VERSION=clang  PICFLAG="-fpic"  BINGRP=bin BINOWN=root BINMODE=755 NONBINMODE=644  DIRMODE=755  INSTALL_COPY=-c INSTALL_STRIP=-s  MANGRP=bin MANOWN=root MANMODE=644 BSD_INSTALL_PROGRAM="/usr/ports/pobj/khal-0.9.10/bin/install -c -s -m 755"  BSD_INSTALL_SCRIPT="/usr/ports/pobj/khal-0.9.10/bin/install -c -m 755"  BSD_INSTALL_DATA="/usr/ports/pobj/khal-0.9.10/bin/install -c -m 644"  BSD_INSTALL_MAN="/usr/ports/pobj/khal-0.9.10/bin/install -c -m 644"  BSD_INSTALL_PROGRAM_DIR="/usr/ports/pobj/khal-0.9.10/bin/install -d -m 755"  BSD_INSTALL_SCRIPT_DIR="/usr/ports/pobj/khal-0.9.10/bin/install -d -m 755"  BSD_INSTALL_DATA_DIR="/usr/ports/pobj/khal-0.9.10/bin/install -d -m 755"  BSD_INSTALL_MAN_DIR="/usr/ports/pobj/khal-0.9.10/bin/install -d -m 755" LC_CTYPE=C.UTF-8  /usr/local/bin/python3.6 -m pytest
============================= test session starts ==============================
platform openbsd6 -- Python 3.6.8, pytest-3.5.0, py-1.8.0, pluggy-0.6.0
rootdir: /usr/ports/pobj/khal-0.9.10/khal-0.9.10, inifile:
plugins: cov-2.5.1, hypothesis-3.55.1
collected 275 items

tests/backend_test.py ..............................                     [ 10%]
tests/cal_display_test.py ...FFFF                                        [ 13%]
tests/cli_test.py ..............x.......................                 [ 27%]
tests/configwizard_test.py .                                             [ 27%]
tests/controller_test.py ............                                    [ 32%]
tests/event_test.py ...........................................          [ 47%]
tests/khalendar_test.py .......................                          [ 56%]
tests/khalendar_utils_test.py .......................................    [ 70%]
tests/settings_test.py ...........                                       [ 74%]
tests/terminal_test.py ...                                               [ 75%]
tests/utils_test.py ..............................................F..... [ 94%]
....                                                                     [ 95%]
tests/vdir_test.py x..                                                   [ 96%]
tests/vtimezone_test.py ...                                              [ 97%]
tests/ui/test_calendarwidget.py ...                                      [ 98%]
tests/ui/test_editor.py ..                                               [ 99%]
tests/ui/test_widgets.py .                                               [100%]

=================================== FAILURES ===================================
_________________________ test_vertical_month_unicode __________________________

    def test_vertical_month_unicode():
        try:
            locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')
            vert_str = vertical_month(month=12, year=2011,
                                      today=datetime.date(2011, 12, 12))
            # de_DE locale on at least Net and FreeBSD is different from the one
            # commonly used on linux systems
            if platform.system() == 'FreeBSD':
                assert vert_str == example_de_freebsd
            elif platform.system() == 'NetBSD':
                assert vert_str == example_de_netbsd
            else:
>               assert vert_str == example_de
E               AssertionError: assert ['\x1b[1m    ... 31  1 ', ...] == ['\x1b[1m    M... 31  1 ', ...]
E                 At index 0 diff: '\x1b[1m    Mo Tu We Th Fr Sa Su \x1b[0m' != '\x1b[1m    Mo Di Mi Do Fr Sa So \x1b[0m'
E                 Use -v to get the full diff

tests/cal_display_test.py:234: AssertionError
____________________ test_vertical_month_unicode_weekdeays _____________________

    def test_vertical_month_unicode_weekdeays():
        try:
            locale.setlocale(locale.LC_ALL, 'cs_CZ.UTF-8')
            vert_str = vertical_month(month=12, year=2011,
                                      today=datetime.date(2011, 12, 12))
>           assert [line.lower() for line in vert_str] == [line.lower() for line in example_cz]
E           AssertionError: assert ['\x1b[1m    ... 31  1 ', ...] == ['\x1b[1m    p... 31  1 ', ...]
E             At index 0 diff: '\x1b[1m    mo tu we th fr sa su \x1b[0m' != '\x1b[1m    po út st čt pá so ne \x1b[0m'
E             Use -v to get the full diff

tests/cal_display_test.py:256: AssertionError
___________________ test_vertical_month_unicode_weekdeays_gr ___________________

    def test_vertical_month_unicode_weekdeays_gr():
        try:
            locale.setlocale(locale.LC_ALL, 'el_GR.UTF-8')
            vert_str = vertical_month(month=12, year=2011,
                                      today=datetime.date(2011, 12, 12))
            # on some OSes, Greek locale's abbreviated day of the week and
            # month names have accents, on some they haven't
>           assert strip_accents('\n'.join([line.lower() for line in vert_str])) == \
                '\n'.join(example_gr)
E               AssertionError: assert '\x1b[1m    m...  1  2  3  4 ' == '\x1b[1m     δ...  1  2  3  4 '
E                 -     mo tu we th fr sa su 
E                 +      δε τρ τε πε πα σα κυ 
E                 - dec 28 29 30  1  2  3  4
E                 ?     ^^^
E                 + δεκ  28 29 30  1  2  3  4
E                 ?     ^^^^
E                 -      5  6  7  8  9 10 11 ...
E                
E                 ...Full output truncated (42 lines hidden), use '-vv' to show

tests/cal_display_test.py:285: AssertionError
_________________________ test_vertical_month_abbr_fr __________________________

    def test_vertical_month_abbr_fr():
        # see issue #653
        try:
            locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8')
            vert_str = vertical_month(month=12, year=2011,
                                      today=datetime.date(2011, 12, 12))
>           assert '\n'.join(vert_str) == '\n'.join(example_fr)
E           AssertionError: assert '\x1b[1m    M...  1  2  3  4 ' == '\x1b[1m      ...  1  2  3  4 '
E             -     Mo Tu We Th Fr Sa Su 
E             +       lu ma me je ve sa di 
E             - Dec 28 29 30  1  2  3  4
E             ?     ^^
E             + déc.  28 29 30  1  2  3  4
E             ?     ^^ ++
E             -      5  6  7  8  9 10 11 ...
E            
E             ...Full output truncated (42 lines hidden), use '-vv' to show

tests/cal_display_test.py:308: AssertionError
_________________ test_description_and_location_and_categories _________________

    def test_description_and_location_and_categories():
        for data_list, vevent in test_set_description_and_location_and_categories:
            with freeze_time('2014-02-16 12:00:00'):
                event = _construct_event(data_list.split(),
                                         description='please describe the event',
                                         location='in the office',
                                         categories='boring meeting',
                                         locale=LOCALE_BERLIN)
>               assert _replace_uid(event).to_ical() == vevent
E               AssertionError: assert b'BEGIN:VEVEN...ND:VEVENT\r\n' == b'BEGIN:VEVENT...ND:VEVENT\r\n'
E                 At index 253 diff: 44 != 111
E                 Left contains more items, first extra item: 10
E                 Use -v to get the full diff

tests/utils_test.py:569: AssertionError
=============== 5 failed, 268 passed, 2 xfailed in 12.44 seconds ===============
*** Error 1 in . (Makefile:44 'do-test')

Reply | Threaded
Open this post in threaded view
|

Re: Update: productivity/khal 0.9.9* -> 0.9.10

Kurt Mosiejczuk-9
On Sun, Mar 17, 2019 at 05:28:44PM +0100, Klemens Nanni wrote:

> Looks good to me; OK kn.  Two unrelated nits inline if you care to fix
> them along the way.

> FWIW, I see five not four tests failing: see my test.log below.

I'll check on that again.

> > cc maintainer jung@
> Either you put him on Bcc or actually forgot the Cc, so I just added him
> to the loop.

I forgot the Cc, so sent a copy to him manually.

> >  MODPY_SETUPTOOLS = Yes
> >  MODPY_VERSION =         ${MODPY_DEFAULT_VERSION_3}
> Replace these     ^^^^^^^^^ spaces with tabs.

> > @@ -46,7 +39,10 @@ TEST_DEPENDS = ${RUN_DEPENDS} \
> >   devel/py-test-cov${MODPY_FLAVOR} \
> >   devel/py-freezegun${MODPY_FLAVOR}
> Sort dependencies alphabetically.

I missed both these since they were in there before. I usually try to
minimize changes anyway, but didn't notice. I'll see about adding those
to the list of things I check.

--Kurt

Reply | Threaded
Open this post in threaded view
|

Re: Update: productivity/khal 0.9.9* -> 0.9.10

Anthony J. Bentley-4
In reply to this post by Klemens Nanni-2
Klemens Nanni writes:
> On Wed, Mar 13, 2019 at 09:56:23PM -0400, Kurt Mosiejczuk wrote:
> > While looking into another port update, I came across productivity/khal
> > that was temporarily not using PyPi until a new version had a fix for
> > using py-dateutil >= 2.7. I checked, and such an update is out.

ok bentley@