beda-software / fhir-py

FHIR Client for python
MIT License
174 stars 32 forks source link

New version 2.0.3 seems not support python 3.9 and 3.10, only support 3.11+ #129

Closed LinkunGao closed 2 months ago

LinkunGao commented 2 months ago
from fhirpy import AsyncFHIRClient
  File "C:\Users\AppData\Local\anaconda3\envs\test\lib\site-packages\fhirpy\__init__.py", line 1, in <module>
    from .lib import AsyncFHIRClient, SyncFHIRClient
  File "C:\Users\AppData\Local\anaconda3\envs\test\lib\site-packages\fhirpy\lib.py", line 4, in <module>
    from fhirpy.base.client import TClient
  File "C:\Users\AppData\Local\anaconda3\envs\test\lib\site-packages\fhirpy\base\__init__.py", line 1, in <module>
    from .lib_async import AsyncClient, AsyncReference, AsyncResource, AsyncSearchSet
  File "C:\Users\AppData\Local\anaconda3\envs\test\lib\site-packages\fhirpy\base\lib_async.py", line 19, in <module>
    from fhirpy.base.searchset import AbstractSearchSet
  File "C:\Users\AppData\Local\anaconda3\envs\test\lib\site-packages\fhirpy\base\searchset.py", line 5, in <module>
    from typing import Generic, Self, Union
ImportError: cannot import name 'Self' from 'typing'
ruscoder commented 2 months ago

Hi, @LinkunGao, thanks for noticing that. It's fixed in 2.0.4

LinkunGao commented 2 months ago

Hi @ruscoder, seems there are still some type bugs for fhirpy 2.0.4 running on Python 3.9, 3.10, and 3.11 now.

ruscoder commented 2 months ago

@LinkunGao Indeed, our CI/CD pipeline runs tests on different Python versions but without installation as the package that's why it was not handled. I've added typing-extensions as a required dependency. The fix will be available in 2.0.5