Bug 257334

Summary: [NEW PORT] devel/py-asgi-lifespan: Programmatic startup/shutdown of ASGI apps
Product: Ports & Packages Reporter: Goran Mekić <meka>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: Closed FIXED    
Severity: Affects Only Me CC: lwhsu, python, tagattie, yuri
Priority: --- Keywords: feature
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on: 257333    
Bug Blocks:    
Attachments:
Description Flags
asgi-lifespan.diff
none
asgi-lifespan.diff
meka: maintainer-approval+
asgi-lifespan.patch meka: maintainer-approval+

Description Goran Mekić 2021-07-22 13:56:01 UTC
Created attachment 226611 [details]
asgi-lifespan.diff

QA:

  * portlint: OK (looks fine.)
  * testport: OK (poudriere: 13.0, amd64 tested)
  * maketest: OK (14 passed, 15 skipped, 1 xfailed, 15 warnings)
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-28 02:21:05 UTC
Python doesn't need to block / be assignee on new ports
Comment 2 Hiroki Tagato freebsd_committer freebsd_triage 2022-01-03 04:32:33 UTC
The ports tree has python 3.7 or later.

So the folllowing lines in the patch appears no longer necessary:

.if ${PYTHON_REL} < 30700
RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}async-exit-stack>=0:devel/py-async-exit-stack@${PY_FLAVOR}
.endif
Comment 3 Goran Mekić 2022-01-03 08:33:04 UTC
Created attachment 230659 [details]
asgi-lifespan.diff
Comment 4 Hiroki Tagato freebsd_committer freebsd_triage 2022-01-03 13:29:56 UTC
The build is fine.

I got the following message when I ran "make test" in a clean jail:

==================================== ERRORS ====================================
____________________ ERROR collecting tests/test_manager.py ____________________
ImportError while importing test module '/wrkdirs/usr/ports/devel/py-asgi-lifespan/work-py38/asgi-lifespan-1.0.1/tests/test_manager.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_manager.py:5: in <module>
    from starlette.routing import Router
E   ModuleNotFoundError: No module named 'starlette'
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.07 seconds ============================

Probably the "starlette" python module is missing.

Could you make it sure that all necessary modules are listed in TEST_DEPENDS?
Comment 5 Goran Mekić 2022-01-24 18:12:50 UTC
Since last time I tried to get some help from upstream: https://github.com/florimondmanca/asgi-lifespan/issues/47. So  far nobody replied, so when I come with an update I'll post it here. Is there something I need to do with this ticket in the mean time?
Comment 6 Goran Mekić 2022-12-08 12:56:39 UTC
Created attachment 238628 [details]
asgi-lifespan.patch

With upgrade to version 2.0 all obstacles are removed.
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2022-12-17 09:14:20 UTC
Committed, thanks!
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-12-17 09:15:26 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b4c9bc97bb146574281e704a28988355ab91dafe

commit b4c9bc97bb146574281e704a28988355ab91dafe
Author:     Goran Mekić <meka@tilda.center>
AuthorDate: 2022-12-17 05:41:15 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-12-17 09:14:19 +0000

    devel/py-asgi-lifespan: New port: Programmatic startup/shutdown of ASGI apps

    PR:             257334

 devel/Makefile                         |  1 +
 devel/py-asgi-lifespan/Makefile (new)  | 26 ++++++++++++++++++++++++++
 devel/py-asgi-lifespan/distinfo (new)  |  3 +++
 devel/py-asgi-lifespan/pkg-descr (new) |  4 ++++
 4 files changed, 34 insertions(+)