[issue19678] smtpd.py: channel should be passed to process_message

2018-01-09 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I'm going to close this as won't fix since smtpd.py is deprecated, and there's 
little chance that folks are still interested in working on it.  See aiosmtpd 
as a much better third party replacement.

--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19678] smtpd.py: channel should be passed to process_message

2017-12-30 Thread Sanyam Khurana

Change by Sanyam Khurana :


--
keywords: +patch
pull_requests: +4931
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19678] smtpd.py: channel should be passed to process_message

2017-12-10 Thread Sanyam Khurana

Sanyam Khurana  added the comment:

Leslie, would you like to work on a patch for this?

--
nosy: +CuriousLearner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19678] smtpd.py: channel should be passed to process_message

2015-05-17 Thread R. David Murray

R. David Murray added the comment:

At this point (3.5) we have settled on having process_message be required to 
have a **kwargs parameter in its signature in order to support new features 
(ex: enable_SMTPUTF8).  So the solution here would be to use inspect.signature 
to find out if process_message has a **kwargs parameter (kind=VAR_KEYWORD), and 
if so to supply a 'channel' keyword and value.

--
keywords: +easy
stage:  - needs patch
versions: +Python 3.6 -Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19678
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19678] smtpd.py: channel should be passed to process_message

2013-11-25 Thread R. David Murray

R. David Murray added the comment:

I think this is reasonable.  A patch would be welcome.

You could use inspect.  When I had to do something similar I just did the call 
inside a try/except, caught TypeError and retried without the extra argument.  
See the __init__ of email.feedparser.FeedParser.  I don't know which approach 
is better; although, with the new signature support in 3.4 perhaps inspecting 
the signature is better.

Another approach would be to designate a new method name for the new signature, 
and use hasattr to decide which to call.  That's actually a bit more consistent 
with the way the SMTPChannel works.

--
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19678
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19678] smtpd.py: channel should be passed to process_message

2013-11-21 Thread Leslie P. Polzer

New submission from Leslie P. Polzer:

process_message needs to have access to the channel state since it needs to 
make decisions based on the authentication or transport associated with the 
channel. It should be either the first or the last arg.

I can provide a patch for this. Should backwards compatibility be achieved by 
using the inspect module to check the signature of process_message and call it 
accordingly?

--
components: Library (Lib), email
messages: 203609
nosy: barry, lpolzer, r.david.murray
priority: normal
severity: normal
status: open
title: smtpd.py: channel should be passed to process_message
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19678
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com