mailgun / flanker

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

Disable generating the parser.out file in production #208

Open haggag opened 5 years ago

haggag commented 5 years ago

The parser.out file is used for debugging. In production, it's not needed. And it's generating write errors for environments like AWS Lambda where the file system is read only (i.e. the default path is read only '/var/task/flanker/addresslib/_parser/parser.out')

To disable that, pass debug=False to yacc.yacc's constructor.

kanekv commented 4 years ago

Even with this patch I'm getting errors:

 "Couldn't create 'flanker.addresslib._parser.url_parsetab'. [Errno 30] Read-only file system: '/env/local/lib/python3.7/site-packages/flanker/addresslib/_parser/url_parsetab.py'"  

This seems to be relevant: https://github.com/ivelum/djangoql/issues/53 Also does it need write_tables=False too?