mailgun / flanker

Python email address and Mime parsing library
http://www.mailgun.com
Apache License 2.0
1.63k stars 204 forks source link

Logging warnings when first import #231

Open Sheile opened 5 years ago

Sheile commented 5 years ago

Summary

When import parser in addresslib first time, I'm getting same warning that is https://github.com/mailgun/flanker/issues/196 When import next time, warnings aren't displayed.

IMO, The parser is working correctly.

Reproduce

  1. uninstall flanker

    % pip uninstall -y flanker
    Uninstalling flanker-0.9.0:
    Successfully uninstalled flanker-0.9.0
  2. install flanker

    % pip install flanker
    ...
    Installing collected packages: flanker
    Running setup.py install for flanker ... done
    Successfully installed flanker-0.9.0
  3. import and get warnings

    % python -c 'from flanker.addresslib import address'
    Symbol 'mailbox_or_url_list' is unreachable
    Symbol 'delim' is unreachable
    Symbol 'mailbox_or_url' is unreachable
    Symbol 'url' is unreachable
    Symbol 'mailbox_or_url_list' is unreachable
    Symbol 'delim' is unreachable
    Symbol 'mailbox_or_url' is unreachable
    Symbol 'mailbox' is unreachable
    Symbol 'url' is unreachable
    Symbol 'angle_addr' is unreachable
    Symbol 'name_addr' is unreachable
    Symbol 'phrase' is unreachable
    Symbol 'mailbox_or_url_list' is unreachable
    Symbol 'delim' is unreachable
    Symbol 'mailbox_or_url' is unreachable
    Symbol 'mailbox' is unreachable
    Symbol 'addr_spec' is unreachable
    Symbol 'angle_addr' is unreachable
    Symbol 'name_addr' is unreachable
    Symbol 'phrase' is unreachable
    Symbol 'local_part' is unreachable
    Symbol 'domain' is unreachable
    Symbol 'quoted_string' is unreachable
    Symbol 'domain_literal' is unreachable
    Symbol 'quoted_string_text' is unreachable
    Symbol 'domain_literal_text' is unreachable
    Symbol 'mailbox_or_url_list' is unreachable
    Symbol 'delim' is unreachable
  4. import and DON'T get warnings

    % python -c 'from flanker.addresslib import address'

Remarks

Python: 3.7.4 flanker: 0.9.0

Sheile commented 5 years ago

flanker 0.9.8 is working without warnings. Could you release 0.9.8 to PyPI?

pip uninstall -y flanker
pip install git+https://github.com/mailgun/flanker@v0.9.8
python -c 'from flanker.addresslib import address'
rotem-dafni commented 4 years ago

We're using flanker 0.9.11 in AWS Lambda (python3.6) and still seeing these warnings

marban commented 4 years ago

In case this has been fixed in 0.9.12, could you release the package?

n3storm commented 4 years ago

It is not solved.

Python 3.5.3 debian Pip install from git and I get same output.

The problem is we are using flanker in a postfix transport and error returns as a mail delivery error.

Torxed commented 1 year ago

I'm also curious why this triest to create files on my system after launch:

Couldn't create 'flanker.addresslib._parser.mailbox_parsetab'. [Errno 13] Permission denied: '/usr/lib/python3.10/site-packages/flanker/addresslib/_parser/mailbox_parsetab.py'

Felt extremely sketchy.

danielkauffman commented 1 year ago

@Torxed Are you using Debian or a derivative? See my bug report at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033714