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

Migrate from iso639 to iso639-lang #3140

Open
C0rn3j opened this issue Sep 1, 2024 · 8 comments
Open

Migrate from iso639 to iso639-lang #3140

C0rn3j opened this issue Sep 1, 2024 · 8 comments

Comments

@C0rn3j
Copy link

C0rn3j commented Sep 1, 2024

iso639 won't work with Python 3.12, maintainer said this February that they are not actively using or developing the library anymore, and that a future version would still need to support Python back to 2.6.

iso639-lang exist which supports 3.7-3.12, which seems perfect for the project as currently minimum marked version for calibre-web is 3.7.

PR in another project that did the same migration can be found here.


EDIT: This may actually not be strictly needed for 3.12 support, but the project being basically dead is not a good outlook for future versions.

@C0rn3j C0rn3j changed the title Migrate from iso639 to iso639-lang to support Python 3.12+ Migrate from iso639 to iso639-lang Sep 1, 2024
@capitanh
Copy link

capitanh commented Sep 2, 2024

I support this. After upgrading to Ubuntu 24 (Python 3.12.3) calibre fails to start:
*** Cannot import iso-639 module, it is needed to run calibre-web, please install it using "pip install iso-639" ***
I haven't been able (yet) to install iso-639 in any way (pip, pipx, apt...) so migrating to lso639-lang looks like a good plan...

@C0rn3j
Copy link
Author

C0rn3j commented Sep 2, 2024

You need python-setuptools as a mandatory dependency on 3.12 which might work around the issue for now, it did for me on Arch Linux.

@capitanh
Copy link

capitanh commented Sep 2, 2024

You need python-setuptools as a mandatory dependency on 3.12 which might work around the issue for now, it did for me on Arch Linux.

I already have python3-setuptools installed (68.1.2-2ubuntu1), how do you suggest to install iso639 packages? pipx returns an error:
No apps associated with package iso-639 or its dependencies
(same for iso-639)
pip no longer installs anything:
error: externally-managed-environment
and apt can't find the package:
E: Unable to locate package python3-iso639
Any help would be greatly appreciated...

@C0rn3j
Copy link
Author

C0rn3j commented Sep 2, 2024 via email

@capitanh
Copy link

capitanh commented Sep 2, 2024

Set up a python venv for it and install all the deps there I suppose, then make calibre-web use the venv

On Mon, Sep 2, 2024, 18:30 Luis Novo @.> wrote: You need python-setuptools as a mandatory dependency on 3.12 which might work around the issue for now, it did for me on Arch Linux. I already have python3-setuptools installed (68.1.2-2ubuntu1), how do you suggest to install iso639 packages? pipx returns an error: No apps associated with package iso-639 or its dependencies (same for iso-639) pip no longer installs anything: error: externally-managed-environment and apt can't find the package: E: Unable to locate package python3-iso639 Any help would be greatly appreciated... — Reply to this email directly, view it on GitHub <#3140 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMQXEQGSO4Y2JWMKLI63Q3ZUSHD5AVCNFSM6AAAAABNO7YUSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRVGA3TINRQHE . You are receiving this because you authored the thread.Message ID: @.>

Thanks for your suggestion. Unfortunately, your original comment about incompatibilty between python 3.12 and iso639 still stands. Even if I could install the package with pipx inside a venv, it wouldn't work...

I'll keep trying, anyway, will let you know if there is any advance in the matter.

@C0rn3j
Copy link
Author

C0rn3j commented Sep 2, 2024

Unfortunately, your original comment about incompatibilty between python 3.12 and iso639 still stands.

I did get it working on Arch in the end as per the comments above, which uses 3.12, but it newly requires setuptools to be available.
You should be able to get it working.

@OzzieIsaacs
Copy link
Collaborator

OzzieIsaacs commented Sep 3, 2024

The newest nightly version already has a fix for it (hopefully):
You will get a message during startup: "Python 3.12 isn't compatible with iso-639. Please install pycountry" (on console, because logging isn't working at the time iso-639 included during startup).
My plan was to wait until the next release to address this:
Option1: iso639 will have a new version with a fix for it -> everything stays as is
Option2: iso639 will have NOT a new version with a fix for it -> use pycountry

Pycountry is already supported as there had been problems with debian (I guess?) in the past.

For now the workaround is delete the line iso639 in the requeirements.txt file and install pycountry

@capitanh
Copy link

capitanh commented Sep 3, 2024

The newest nightly version already has a fix for it (hopefully): You will get a message during startup: "Python 3.12 isn't compatible with iso-639. Please install pycountry" (on console, because logging isn't working at the time iso-639 included during startup). My plan was to wait until the next release to address this: Option1: iso639 will have a new version with a fix for it -> everything stays as is Option2: iso639 will have NOT a new version with a fix for it -> use pycountry

Pycountry is already supported as there had been problems with debian (I guess?) in the past.

For now the workaround is delete the line iso639 in the requeirements.txt file and install pycountry

Yes, that worked :-) Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants