Warnings Encountered During SimpleLogin Update to v4.67.1 – Parser and Syntax Issues
I just updated to version v4.67.1 using a custom update script (works fine normally) on Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-139-generic x86_64), and noticed a few warnings that I wanted to bring to your attention:
1. Unreachable Symbols in Flanker Parser During the update, I encountered multiple warnings about unreachable symbols in the flanker.addresslib._parser.parser module. Here are the specific warnings:
WARNI [flanker.addresslib._parser.parser] Symbol 'mailbox_or_url_list' is unreachable
WARNI [flanker.addresslib._parser.parser] Symbol 'delim' is unreachable
WARNI [flanker.addresslib._parser.parser] Symbol 'mailbox_or_url' is unreachable
WARNI [flanker.addresslib._parser.parser] Symbol 'url' is unreachable
This could indicate issues with the email address or URL parsing logic. While it doesn't seem to cause an immediate failure, it might lead to inconsistencies in parsing certain types of email addresses or URLs.
2. Syntax Warnings in Python Code There are also several syntax warnings regarding invalid escape sequences in regular expressions in some of the Python files:
/code/.venv/lib/python3.12/site-packages/flanker/addresslib/plugins/gmail.py:3: SyntaxWarning: invalid escape sequence '\-'
/code/.venv/lib/python3.12/site-packages/flanker/mime/message/headers/wrappers.py:185: SyntaxWarning: invalid escape sequence '\d'
/code/.venv/lib/python3.12/site-packages/spf.py:1724: SyntaxWarning: invalid escape sequence '\d'
These warnings might not directly break functionality but should be addressed to ensure compatibility with future versions of Python and to avoid potential parsing issues.
3. Database Migration The database migration completed successfully, including these migrations:
INFO [alembic.runtime.migration] Running upgrade fd79503179dd -> 07855f9f39b1, alias_trash
INFO [alembic.runtime.migration] Running upgrade 07855f9f39b1 -> 51a061fd6ef0, Job missing index
INFO [alembic.runtime.migration] Running upgrade 51a061fd6ef0 -> 87da368d282b, Provider Complaint FK
Everything appears to be fine with the database itself.
System Details: OS Version: Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-139-generic x86_64)
Custom Update Script used for upgrading to v4.67.1
Overall, the update to v4.67.1 seems to have completed without major issues, but I would recommend addressing the warnings related to email parsing and the invalid escape sequences to prevent potential issues in the future.
Thanks!
Hi,
I wanted to provide an update regarding the issue I raised earlier. After updating to v4.67.3 using the custom update script, the same errors persist. Here’s a recap of what I’m seeing:
- Unreachable Symbols in Flanker Parser The following unreachable symbols continue to appear in the logs:
WARNI [flanker.addresslib._parser.parser] Symbol 'mailbox_or_url_list' is unreachable
WARNI [flanker.addresslib._parser.parser] Symbol 'delim' is unreachable
WARNI [flanker.addresslib._parser.parser] Symbol 'mailbox_or_url' is unreachable
WARNI [flanker.addresslib._parser.parser] Symbol 'url' is unreachable
These warnings are exactly the same as those observed prior to the update.
- SyntaxWarnings in Python Code The same syntax warnings related to invalid escape sequences in regular expressions persist:
/code/.venv/lib/python3.12/site-packages/flanker/addresslib/plugins/gmail.py:3: SyntaxWarning: invalid escape sequence '\-'
/code/.venv/lib/python3.12/site-packages/flanker/mime/message/headers/wrappers.py:185: SyntaxWarning: invalid escape sequence '\d'
/code/.venv/lib/python3.12/site-packages/spf.py:1724: SyntaxWarning: invalid escape sequence '\d'
System Details: OS Version: Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-139-generic x86_64)
It seems that these warnings have not been resolved in the latest update, so it may require a fix in the app's code or one of its dependencies (such as the flanker library).
Thank you.
Just updated to v4.68.1 and the same warnings are still present during the update process:
- Multiple unreachable symbol warnings from flanker.addresslib._parser.parser
- Several SyntaxWarning: invalid escape sequence lines (from gmail.py, wrappers.py, and spf.py)
- The utils.py logic also still triggers at startup:
load words file: /code/local_data/words.txt
Nothing seems broken, but the noise is still there — would be good to tidy up if possible.
These messages are "SyntaxWarning" messages from Python 3.12 and not actual errors - the SimpleLogin project will continue to run without problems.
In older versions, Python was tolerant of "invalid escape sequences" (such as \d, \:, or \-), but since version 3.12, it displays warnings by default if strings are not marked as raw strings (r"...").
Possible solutions:
-
Ignore: The warning is harmless. As long as you are not running unit tests with "warnings as errors," you can ignore it.
-
Set the environment variable
PYTHONWARNINGS=ignore::SyntaxWarning: This will suppress the display of the warnings (in the logs). -
Fork the affected packages (e.g., flanker and pyspf—not SimpleLogin itself!) and correct the regular expression strings with r"..." there.