Bug 48791
| Summary: | getmail не запускается... | ||
|---|---|---|---|
| Product: | Sisyphus | Reporter: | Иван <pidgin> |
| Component: | getmail | Assignee: | real <real> |
| Status: | RESOLVED FIXED | QA Contact: | qa-sisyphus |
| Severity: | normal | ||
| Priority: | P5 | CC: | amakeenk, glebfm, kotopesutility, rider, root |
| Version: | unstable | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
Воспроизводится в сизифе:
$ getmail
/usr/lib/python3/site-packages/getmailcore/utilities.py:588: SyntaxWarning: "is" with a literal. Did you mean "=="?
if ssl_fingerprints is ():
Exception: please read docs/BUGS and include the following information in any bug report:
getmail version 5.14
Python version 3.11.6 (main, Oct 7 2023, 08:19:37) [GCC 13.2.1 20230817 (ALT Sisyphus 13.2.1-alt2)]
Unhandled exception follows:
File "/usr/bin/getmail", line 833, in main
except configparser.NoSectionError as o:
^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'configparser' where it is not associated with a value
Please also include configuration information from running getmail
with your normal options plus "--dump".
Проверка актуальности: воспроизводится на текущем Сизифе (getmail 5.14-alt1, Python 3.14), достаточно пустого ~/.getmail/getmailrc. getmail 5.14 — программа для Python 2 (апстрим остановился в 2019), и её порт на python3 в пакете сломан системно, а не в одном месте: 1. /usr/bin/getmail:633 — локальная переменная configparser = configparser.RawConfigParser(...) затеняет модуль, поэтому except configparser.NoSectionError (строка 833) даёт UnboundLocalError из репорта (а после присваивания — AttributeError); 2. там же используется readfp(), удалённый в Python 3.12; 3. конфиг открывается open(path, 'rb'), а configparser в py3 требует текстовый поток; 4. getmailcore/baseclasses.py: InstanceType = type(_C()) — в py2 это был types.InstanceType, в py3 это конкретный класс _C, поэтому проверка ConfInstance (параметр configparser у всех retriever'ов) в py3 не проходит никогда. Пробовал исправлять по порядку — после устранения первых трёх упирается в четвёртое. Чинить этот порт смысла нет: есть getmail6 (https://github.com/getmail6/getmail6) — поддерживаемый форк на python3 с тем же форматом getmailrc, на него перешли Debian и Fedora. Предлагаю заменить пакет на getmail6, а этот баг закрыть при замене. |

Description
Иван 2023-12-13 15:59:24 MSKaltlinux ~ $ getmail /usr/lib/python3/site-packages/getmailcore/utilities.py:588: SyntaxWarning: "is" with a literal. Did you mean "=="? if ssl_fingerprints is (): Exception: please read docs/BUGS and include the following information in any bug report: getmail version 5.14 Python version 3.9.16 (main, Mar 21 2023, 10:12:38) [GCC 10.3.1 20210703 (ALT Sisyphus 10.3.1-alt2)] Unhandled exception follows: File "/usr/bin/getmail", line 833, in main except configparser.NoSectionError as o: UnboundLocalError: local variable 'configparser' referenced before assignment Please also include configuration information from running getmail with your normal options plus "--dump"