transifex / transifex-client

The Transifex command-line tool.
https://www.transifex.com/
GNU General Public License v2.0
135 stars 75 forks source link

Python 3.10 support #332

Open m-aciek opened 2 years ago

m-aciek commented 2 years ago

The latest releases of the project don't support Python 3.10. Latest project version that claims to support it is 0.12.5, which has different API from current versions.

For me it breaks on tx pull with:

% tx pull
Did you know that you can create an apitoken under your transifex user's settings?
(Read more at https://docs.transifex.com/api/introduction#authentication)
tx ERROR: EOFError: EOF when reading a line
So, do you have an api token? [y/N]: 
Error: Process completed with exit code 1.

https://github.com/python/python-docs-pl/runs/3990248624

m-aciek commented 2 years ago

https://github.com/transifex/transifex-client/pull/330

pankav commented 2 years ago

Hello @m-aciek ,

Thank you for your comment. In order to understand better your case, could you please share with us more details because, I am not sure if I understood clear what do you mean.

For example, You wrote "the latest releases of the project " and I believe you are referring to TX Client, but I am not sure where you are referring with the following one " Latest project version that claims to support it is 0.12.5, which has different API from current versions." ? The important thing to know is that Python 3.9 works, while Python 3.10 is not working with the latest Tx CLient. On the other hand you have also the option to download the new CLI which has not Python dependency. Here is the link: https://github.com/transifex/cli

Looking forward to your response. Kind regards, Panagiotis

m-aciek commented 2 years ago

Hello @pankav, thank you for your response.

In Python 3.10 environment, running pip install transifex-client causes an installation of transifex-client in version 0.12.5, because newer versions of the package claim to not support Python 3.10.

Kind regards, Maciej

transifexGithub commented 2 years ago

Hello @m-aciek,

Let me chime in here since @pankav is out of the office. Could you please try the following approach ?

Command 1 sudo pip3 install transifex-client Command 2 sudo pip3 install --upgrade transifex-client Command 3 tx --version 0.14.2, py 3.9, arm

Let me know if you encounter any issues:) Best Regards Cesar

terencehonles commented 2 years ago

@transifexGithub the Python you are using is Python 3.9 as outputted by tx --version if you use Python 3.10 transifex will not install. The PR #330 does roughly what I did in #266 and #303, and we need it again for Python 3.10. The PR #330 removes the need to do this in the future since it doesn't set an upper bound to the Python version supported.

transifexGithub commented 2 years ago

Hello @terencehonles,

Thanks for your response, I. just upgraded my python version to 3.10 and installed CLI successfully, Am I missing something ?, Could you elaborate the scenario ?

MacBook-Air-de-Cesar:~ cesargarcia$ tx --version 0.12.5, py 3.10, arm64

Best Regards Cesar

terencehonles commented 2 years ago

@transifexGithub you actually installed an old version of the transifex client before Python was restricted to a specific version. Currently (on the latest version 0.14.3) it's Python < 3.10 https://github.com/transifex/transifex-client/blob/6df9dce5db43d1bf6fd9634ed132b9d0efe9385c/setup.py#L27 and on your system the pip resolver installed 0.12.5 (from Jan 2017) which does not specify the python_requires https://github.com/transifex/transifex-client/blob/5a0336ef98c3d4bf95e7296c1a8deeaf3a4a079c/setup.py#L14-L43

The exact error others will be getting is:

pip install transifex-client==0.14.3
ERROR: Could not find a version that satisfies the requirement transifex-client==0.14.3 (from versions: 0.1, 0.2, 0.2.1, 0.3, 0.4, 0.4.1, 0.5, 0.5.1, 0.5.2, 0.6, 0.6.1, 0.7, 0.7.2, 0.7.3, 0.8, 0.9, 0.9.1, 0.10, 0.11b0, 0.11b3, 0.11, 0.11.1b0, 0.12b0, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.12.5)    
#10 315.9 ERROR: No matching distribution found for transifex-client==0.14.3
terencehonles commented 2 years ago

@transifexGithub / @pankav any chance this can get looked at?

transifexGithub commented 2 years ago

@terencehonles, Perhaps this is related to your pip/python config as I just tried to install the same version through pip and it worked! image

terencehonles commented 2 years ago

@transifexGithub you are now using Python 3.9 again. You need to use Python 3.10 and check that you can install something newer than 0.12.5.

noliveleger commented 2 years ago

Any update from Python 3.10 support?

goapunk commented 2 years ago

@noliveleger might be worth to upgrade to the new client instead of waiting for this to get fixed (if it ever happens)

nelefth commented 2 years ago

Hi all,

As it was officially announced (you can find more info here: https://community.transifex.com/t/postponing-api-2-0-2-5-and-transifex-client-sunset-date/2759), the sunset of the deprecated Transifex client has been scheduled for Nov 30, 2022.

We are not planning any further improvements there so as @goapunk said above, upgrading to the new cli (https://developers.transifex.com/docs/cli) is what we also highly recommend.

For any further assistance, feel free to reach out to us at support@transifex.com.