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

trcli fails to run on python 3.8 #187

Closed
chrisdavi opened this issue Dec 8, 2023 · 6 comments · Fixed by #191
Closed

trcli fails to run on python 3.8 #187

chrisdavi opened this issue Dec 8, 2023 · 6 comments · Fixed by #191
Labels
bug Something isn't working

Comments

@chrisdavi
Copy link
Contributor

chrisdavi commented Dec 8, 2023

TestRail CLI Version

1.6.3

CLI Environment

Ubuntu 20.04, Python 3.8.10

TestRail Version

7.41.8092

TestRail Instance Type

Professional Server

Current behavior

Created a virtual environment, used pip to install trcli. After installation, running trcli throws a stacktrace

(test) { ~ } » trcli
Traceback (most recent call last):
  File "/home/dev/.virtualenvs/bleh/bin/trcli", line 5, in <module>
    from trcli.cli import cli
  File "/home/dev/.virtualenvs/bleh/lib/python3.8/site-packages/trcli/cli.py", line 19, in <module>
    from trcli.data_classes.data_parsers import FieldsParser
  File "/home/dev/.virtualenvs/bleh/lib/python3.8/site-packages/trcli/data_classes/data_parsers.py", line 49, in <module>
    class FieldsParser:
  File "/home/dev/.virtualenvs/bleh/lib/python3.8/site-packages/trcli/data_classes/data_parsers.py", line 52, in FieldsParser
    def resolve_fields(fields: Union[list[str], dict]) -> (dict, str):
TypeError: 'type' object is not subscriptable

Desired behavior

Expected behavior would be for trcli to print a help page.

More Details

No response

@chrisdavi chrisdavi added the bug Something isn't working label Dec 8, 2023
@bitcoder
Copy link
Collaborator

bitcoder commented Dec 9, 2023

Unfortunately, we don't provide support for Python 3.8. As mentioned on the documentation We recommend using Python 3.10 or newer.

@chrisdavi
Copy link
Contributor Author

chrisdavi commented Dec 9, 2023

I understand.

Recommending 3.10 and above is a bit softer than saying that it only works on 3.10 and above though. Perhaps now you have positive confirmation that it definitely doesn't work below that version, a python_requires='>3.10.0' can be added to setup.py.

In any case, thank you for looking at the issue.

@chrisdavi
Copy link
Contributor Author

I was able to get it working locally by replacing all the list type annotations with List imported from typing. Is this a thing y'all would be interested in me working through your PR / testing process or meh?

@bitcoder
Copy link
Collaborator

hi @chrisdavi , if you can make a quick PR and the changes are small/self-contained maybe we can include them.
Nevertheless, I cannot fully commit that Python 3.8 will be supported on the future.

@chrisdavi chrisdavi mentioned this issue Dec 12, 2023
3 tasks
@bitcoder bitcoder added enhancement New feature or request bug Something isn't working and removed bug Something isn't working enhancement New feature or request labels Dec 14, 2023
@bitcoder
Copy link
Collaborator

@chrisdavi , can you please update the PR with the latest changes from main?

@chrisdavi
Copy link
Contributor Author

Synced.

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

Successfully merging a pull request may close this issue.

2 participants