-
Notifications
You must be signed in to change notification settings - Fork 250
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
Doesn't work with Python 3.11 due to removed gettext.bind_textdomain_codeset API #710
Comments
Monkey patch (restores compatibility with Python 3.11 / Fedora 37) :
|
monkeypatch applied but
seems it misses to import gettext correctly ? |
I think there's no point in keeping any "bind_textdomain_codeset" call at all. AFAIK gettext will return Unicode strings. The codeset is only relevant if you retrieve bytes out of the translation and I don't see why we would use functions that do that. I have uploaded a fixed package in Debian unstable which switched to Python 3.11. It would be nice to have this fixed in git too (and maybe have a new release!). |
I can positively confirm it works
uname -a
Linux ghost 6.2.0-rc2 #1 SMP PREEMPT_DYNAMIC Tue Jan 3 09:06:34 CET 2023
x86_64 GNU/Linux
***@***.***:~$ cat /etc/debian_version
bookworm/sid
…On Tue, Jan 10, 2023 at 10:17 AM Raphaël Hertzog ***@***.***> wrote:
I think there's no point in keeping any "bind_textdomain_codeset" call at
all. AFAIK gettext will return Unicode strings. The codeset is only
relevant if you retrieve bytes out of the translation and I don't see why
we would use functions that do that.
I have uploaded a fixed package in Debian unstable which switched to
Python 3.11. It would be nice to have this fixed in git too (and maybe have
a new release!).
https://salsa.debian.org/projecthamster-team/hamster-time-tracker/-/commit/ba336b272a216ae031b92eec5e5f78b0ed39047d
—
Reply to this email directly, view it on GitHub
<#710 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKTHVL7NIBWVYTTCJZHTZDWRUSKLANCNFSM6AAAAAAQKLE6L4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Can you just create a PR? |
There's one already at #707 though you probably want to remove the line instead of commenting it out and update the explanation. |
The mentioned line is removed in Python 3.11 (or 3.10 in fact), and removing it from the code fixes the problem.
The text was updated successfully, but these errors were encountered: