Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reprosyn does not work on Python < 3.10 (tapas requires >=3.9) #52

Closed
fhoussiau opened this issue Oct 17, 2022 · 1 comment
Closed

Reprosyn does not work on Python < 3.10 (tapas requires >=3.9) #52

fhoussiau opened this issue Oct 17, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@fhoussiau
Copy link
Collaborator

Here is the result from the command line (poetry 1.2.2, reprosyn environment):

Using python3.9 (3.9.14)
Type "help", "copyright", "credits" or "license" for more information.
>>> import reprosyn
>>> import reprosyn.dataset
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/fhoussiau/workspace/reprosyn/src/reprosyn/dataset.py", line 9, in <module>
    class Dataset:
  File "/Users/fhoussiau/workspace/reprosyn/src/reprosyn/dataset.py", line 40, in Dataset
    def read_dataset(dataset: pd.DataFrame | str) -> pd.DataFrame:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

The reason seems to be that the pipe for union has only been added in Python 3.10 (fastapi/typer#371 (comment)). A solution is to add ``future`.

@fhoussiau fhoussiau self-assigned this Oct 17, 2022
@fhoussiau fhoussiau added the bug Something isn't working label Oct 17, 2022
@callummole
Copy link
Collaborator

I see you have already closed this. I think for interoperability it should be able to work on python >= 3.9. The type annotation isn't needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants