[issue15014] smtplib: add support for arbitrary auth methods
Changes by Milan Oberkirch milan...@oberkirch.org: -- nosy: +jesstess ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15014 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21426] Invisible characters in email related souce files.
New submission from Milan Oberkirch: I found non-printable characters in the source files of the email package. Vim rendered it as '^L', pasting it on the linux console has the same effect as CTRL+L. In most places it was combined with regular newlines, sometimes as a replacement, sometimes additionally to them. My guess is that these files were saved with an editor replacing '\n' with '\r' and additional '\n' were inserted afterwards since the linebreaks seemed to be gone. I replaced these chars by '\n' or '' in the attached patch. -- components: email files: linebreak.patch keywords: patch messages: 217874 nosy: barry, r.david.murray, zvyn priority: normal severity: normal status: open title: Invisible characters in email related souce files. versions: Python 3.5 Added file: http://bugs.python.org/file35149/linebreak.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21426 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Milan Oberkirch added the comment: Updated the last patch according to the review comments at https://bugs.python.org/review/20098/. -- Added file: http://bugs.python.org/file35020/mangle_from_20140424.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Changes by Milan Oberkirch milan...@oberkirch.org: Added file: http://bugs.python.org/file35021/mangle_from_20140424.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Changes by Milan Oberkirch milan...@oberkirch.org: Removed file: http://bugs.python.org/file35020/mangle_from_20140424.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20903] smtplib.SMTP raises socket.timeout
Milan Oberkirch added the comment: The attached patch mentions the exception besides the description of the timeout parameter. It doesn't hurt and makes programmers aware of this common exception. -- keywords: +patch nosy: +zvyn Added file: http://bugs.python.org/file34516/doc_socket_timeout.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20903 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20782] base64 module docs do not use the terms 'bytes' and 'string' consistently.
Milan Oberkirch added the comment: changed 'bytes' and 'byte string' to `bytes-like object` and reviewed usage of 'byte' and 'string' (the letter made sense to me at some points, e.g. something like ... altchar is a string with two or less letters ...). -- keywords: +patch nosy: +zvyn Added file: http://bugs.python.org/file34315/base64doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20782 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Milan Oberkirch added the comment: Added documentation for mangle_from. since the name mangle_from_ is not supported by the markup, changed it to mangle_from everywhere, which looks better anyway (I understand why it was the other way so). If it was a bad idea, I can undo it but am unable to do the doc. -- Added file: http://bugs.python.org/file34320/mangle_from_with_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Milan Oberkirch added the comment: Rollback to mangle_from_, sorry for the noise. -- Added file: http://bugs.python.org/file34321/mangle_from_with_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Changes by Milan Oberkirch milan...@oberkirch.org: Removed file: http://bugs.python.org/file34320/mangle_from_with_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Changes by Milan Oberkirch milan...@oberkirch.org: Added file: http://bugs.python.org/file34322/mangle_from_with_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Changes by Milan Oberkirch milan...@oberkirch.org: Removed file: http://bugs.python.org/file34321/mangle_from_with_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20871] Testing: Push email/policy.py line coverage to 100%.
New submission from Milan Oberkirch: Accorcing to coveragepy there was only one line missing for full line coverage in Lib/email/policy.py so I added an test to cover it. It checks that the function email.policy.EmailPolicy.header raises an ValueError if the second parameter includes newlines or linefeeds. This is the documented behavior of the function, so testing it seems to be a good idea. -- components: Tests files: policyTest.patch keywords: patch messages: 212929 nosy: zvyn priority: normal severity: normal status: open title: Testing: Push email/policy.py line coverage to 100%. type: enhancement versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file34306/policyTest.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20871 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14758] SMTPServer of smptd does not support binding to an IPv6 address
Milan Oberkirch added the comment: I was going to work on #3461 where IPv6-tests are missing for smtplib and stumbled over this bug. I would be willing to work on this, since it's quiet clear what needs to be done to me: implement what (vsergeev) suggested and write tests (which includes fixing design flaws in current ones). It may be a good idea to teach mouckup_socket some IPv6, since it's needed for test_smtpd and test_smtplib, but IMHO that can be done as a extra task / will be easy after doing the above. -- nosy: +zvyn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14758 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14758] SMTPServer of smptd does not support binding to an IPv6 address
Milan Oberkirch added the comment: The cleaning up of smtpd.socket was already implemented, so there was nothing to do there. What I did: - Write two TestCases to check if the IP version is chosen depending on the host-parameter - Testing, that everything still works with an IPv6 address by inheriting from SMTPDChannelTest and overriding setUp with an IPv6-Server -- keywords: +patch Added file: http://bugs.python.org/file34289/smtpd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14758 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15014] smtplib: add support for arbitrary auth methods
Milan Oberkirch added the comment: I looked into imaplib a bit to see how the problem is solved there; what I observed: - login() does 'PLAIN' only (and does not use authobj but smtplib would) - there exists an extra function login_cram_md5() for 'CRAM-MD5' So I guess the right way to do it would be to write an authenticate() method as in imaplib and use it in new member functions of the form login_[method](). In contrast to imaplib login() could still be used to probe through the three main methods (to avoid breaking backward compatibility). I'll try to implement this later today, so if you think it's completely dumb and read this before a patch is applied feel free to give me a quick reply to stop me from wasting my time :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15014 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15014] smtplib: add support for arbitrary auth methods
Milan Oberkirch added the comment: Maybe I am a bit hyperactive, but I already was at it when receiving your message, so I finished it. Anyhow most of what I have done is completely independent of the API chosen. What I did: 1. I implemented a new authenticate(self, mechanism, authobject) as in imaplib which can be used for all methods 2. I implemented authobjects for the three most important mechanisms 3. login() has a keyarg 'preferred_auth' which is a list of auth-methods (strings) I think 1. and 2. make sense regardless of how the API should look like in the end, because it's the only way without any code-redundancy. 3 is more a proposal. -- Added file: http://bugs.python.org/file34287/smtplibAuthobj.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15014 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Milan Oberkirch added the comment: (@r.david.murray) I just implemented what you suggested: - Policy has a mangle_from_ property, overridden in EMailPolicy - Generator and DecodedGenerator default to policy.mangle_from_ or True if policy is None. Would be glad if it helps :) -- nosy: +zvyn Added file: http://bugs.python.org/file34275/mangle_from.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Changes by Milan Oberkirch milan...@oberkirch.org: Removed file: http://bugs.python.org/file34275/mangle_from.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Milan Oberkirch added the comment: Updates patch to include necessary changes to test_policy.py. -- Added file: http://bugs.python.org/file34277/mangle_from.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15014] smtplib: add support for arbitrary auth methods
Milan Oberkirch added the comment: I implemented one approach to solve this by writing new member functions for each method (see the patch attached). Bonus: It does not change the usage of login() in any way (which uses the new functions internally). Another option would be to make those functions private/put them into login() and provide an optional keyarg. Or auth objects, but as far as I can see only 3 methods are relevant so it might be an overkill? So that's the easy way to fix it, would be glad if it helps! -- keywords: +patch nosy: +zvyn Added file: http://bugs.python.org/file34279/smtplib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15014 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18540] imaplib.IMAP4() ends with Name or service not known on Fedora 18
Milan Oberkirch added the comment: According to the documentation[1] the values for host should be set to 'localhost' by default. I attached a patch that does just that. Also note, that the minimal example at the end of [1] is broken by this bug. [1]: http://docs.python.org/2/library/imaplib.html?highlight=imap#imaplib.IMAP4 -- nosy: +zvyn Added file: http://bugs.python.org/file34271/imaplib-zvyn.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18540 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com