[MacPorts] #68601: py310-fastapi package does work with available starlette version
MacPorts
noreply at macports.org
Tue Oct 31 17:54:20 UTC 2023
#68601: py310-fastapi package does work with available starlette version
---------------------+------------------------
Reporter: cquike | Owner: (none)
Type: defect | Status: new
Priority: High | Milestone:
Component: ports | Version:
Keywords: fastapi | Port: py-fastapi
---------------------+------------------------
Hi,
I have tried to use the py310-fastapi package but it seems that the
installation now in macports is kind of broken as shown from this snippet:
{{{
# sudo install py310-fastapi
...
$ python3.10
Python 3.10.13 (main, Aug 25 2023, 02:38:26) [Clang 14.0.3
(clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from fastapi import FastAPI
>>> app = FastAPI(title="myapp")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10
/site-packages/fastapi/applications.py", line 145, in __init__
self.middleware_stack: ASGIApp = self.build_middleware_stack()
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10
/site-packages/fastapi/applications.py", line 151, in
build_middleware_stack
debug = self.debug
AttributeError: 'FastAPI' object has no attribute 'debug'. Did you mean:
'_debug'?
}}}
I believe the problem lies in the py310-starlette package, which is in
version 0.31.0 which seems to be incompatible with the rather old fastapi
0.78.0 version.
--
Ticket URL: <https://trac.macports.org/ticket/68601>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list