From barry at list.org Wed Jan 2 21:27:51 2013 From: barry at list.org (Barry Warsaw) Date: Wed, 2 Jan 2013 15:27:51 -0500 Subject: [Mailman-Developers] (no subject) In-Reply-To: References: Message-ID: <20130102152751.06ae26a2@resist.wooz.org> On Dec 29, 2012, at 06:01 PM, Sandesh Agrawal wrote: >I have trying to inject many messages into lmtp queue using : > >./bin/mailman inject abc at xyz.com -f message_file -q lmtp > >But whenever i see the number of messages using: > >>>> from mailman.testing.helpers import get_queue_messages > >>> items = get_queue_messages('lmtp') > >>> len(items) > >it always display 1 , and on executing : > >>>>print items[0].msg.as_string() > >only the latest message is being displayed, where are other older >messages going ? A few things could be happening, but first, this isn't really the right way to get messages into the system. The lmtp runner isn't a queue runner, meaning it does not wake up periodically to scan files in var/queue/lmtp. This runner is really just a daemon process. The fact that it creates such a directory is a bug, which I've now filed (LP: 1095422). If you really want to inject messages into the system by way of the LMTP runner, use Python's smtplib module and connect to the running daemon (started by `bin/mailman start`) with an smtplib.LMTP() instance. Even so, I injected two copies of the following test message, and I ended up with two .pck files in var/queue/lmtp as expected. Then the get_queue_messages('lmtp') dequeued them both and returned a length-2 list of items. Don't forget you can always just `ls -lR var/queue` to see what's actually there. Cheers, -Barry From aurelien at bompard.org Wed Jan 9 15:46:18 2013 From: aurelien at bompard.org (Aurelien Bompard) Date: Wed, 9 Jan 2013 15:46:18 +0100 Subject: [Mailman-Developers] HyperKitty : VCS change Message-ID: Hello Mailmaners, The HyperKitty project was historically using Bazaar as it VCS, and was hosted on fedorahosted.org. An essential component was split off (KittyStore), which was initially source-controlled with Git and hosted on Github. I'm trying to bring back some coherence into this, and considering switching all the components to Git on fedorahosted.org. The reason for this choice is that me and the other two most frequent contributors are much more skilled with git than with bzr. We're concerned however by the uncomfortableness it may cause you, the Mailman community, if/when you want to contribute to HyperKitty. Barry, Terry, Florian, would that be a problem ? Others ? Of course I'm ready to merge patches sent by email or bugtracker, but that's a little more friction. It's not a "speak now or forever hold your peace" moment, but this unnecessary complexity is tiring day-to-day, so I'd rather sort that out quickly-ish. Thanks ! Aur?lien From barry at list.org Wed Jan 9 15:57:56 2013 From: barry at list.org (Barry Warsaw) Date: Wed, 9 Jan 2013 09:57:56 -0500 Subject: [Mailman-Developers] HyperKitty : VCS change In-Reply-To: References: Message-ID: <20130109095756.4c96d559@anarchist.wooz.org> On Jan 09, 2013, at 03:46 PM, Aurelien Bompard wrote: >The HyperKitty project was historically using Bazaar as it VCS, and >was hosted on fedorahosted.org. An essential component was split off >(KittyStore), which was initially source-controlled with Git and >hosted on Github. >I'm trying to bring back some coherence into this, and considering >switching all the components to Git on fedorahosted.org. >The reason for this choice is that me and the other two most frequent >contributors are much more skilled with git than with bzr. Mostly for curiosity: why fedorahosted and not github? >We're concerned however by the uncomfortableness it may cause you, the >Mailman community, if/when you want to contribute to HyperKitty. >Barry, Terry, Florian, would that be a problem ? Others ? >Of course I'm ready to merge patches sent by email or bugtracker, but >that's a little more friction. For my job, I basically have to be functional in bzr, hg, git, svn, and cvs, but thankfully no longer rcs, sccs :). I wouldn't call myself a git guru, but I can manage. One of the advantages of the new architecture is that development can happen independently. I do subscribe to the principle that those doing most of the work should get to decide, so if git works better for you, I think it should be fine. I don't think it will be *too* difficult to stitch everything together for a future sumo-release. No objections from me, as long as the documentation is updated. Please submit a patch or merge-proposal to update the ArchiveUIin5.rst document though. Cheers, -Barry From richard at NFSNet.org Wed Jan 9 16:11:10 2013 From: richard at NFSNet.org (Richard Wackerbarth) Date: Wed, 9 Jan 2013 09:11:10 -0600 Subject: [Mailman-Developers] HyperKitty : VCS change In-Reply-To: References: Message-ID: Personally, I also prefer Git because the tools supporting bzr are not as well integrated into Mac OSX work environments. Postorius is based on Django and it, as well as most of the 3rd-party extensions, utilizes git for a VCS. In maintaining the source, AFAICT, bzr and git are functionally interchangeable and the hosting location for either VCS is an independent issue. Both have reasonable alternatives available. I would like to see all of the MM related development migrate. Richard On Jan 9, 2013, at 8:46 AM, Aurelien Bompard wrote: > Hello Mailmaners, > > The HyperKitty project was historically using Bazaar as it VCS, and > was hosted on fedorahosted.org. An essential component was split off > (KittyStore), which was initially source-controlled with Git and > hosted on Github. > I'm trying to bring back some coherence into this, and considering > switching all the components to Git on fedorahosted.org. > The reason for this choice is that me and the other two most frequent > contributors are much more skilled with git than with bzr. > > We're concerned however by the uncomfortableness it may cause you, the > Mailman community, if/when you want to contribute to HyperKitty. > Barry, Terry, Florian, would that be a problem ? Others ? > Of course I'm ready to merge patches sent by email or bugtracker, but > that's a little more friction. > > It's not a "speak now or forever hold your peace" moment, but this > unnecessary complexity is tiring day-to-day, so I'd rather sort that > out quickly-ish. > > Thanks ! > > Aur?lien > _______________________________________________ > Mailman-Developers mailing list > Mailman-Developers at python.org > http://mail.python.org/mailman/listinfo/mailman-developers > Mailman FAQ: http://wiki.list.org/x/AgA3 > Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ > Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/richard%40nfsnet.org > > Security Policy: http://wiki.list.org/x/QIA9 From barry at list.org Wed Jan 9 16:20:19 2013 From: barry at list.org (Barry Warsaw) Date: Wed, 9 Jan 2013 10:20:19 -0500 Subject: [Mailman-Developers] HyperKitty : VCS change In-Reply-To: References: Message-ID: <20130109102019.1bb6c56e@anarchist.wooz.org> On Jan 09, 2013, at 09:11 AM, Richard Wackerbarth wrote: >I would like to see all of the MM related development migrate. I have no plans to migrate the core off of Launchpad and bzr. Cheers, -Barry From richard at NFSNet.org Wed Jan 9 16:28:51 2013 From: richard at NFSNet.org (Richard Wackerbarth) Date: Wed, 9 Jan 2013 09:28:51 -0600 Subject: [Mailman-Developers] HyperKitty : VCS change In-Reply-To: <20130109102019.1bb6c56e@anarchist.wooz.org> References: <20130109102019.1bb6c56e@anarchist.wooz.org> Message-ID: I understand that. However, your intentions do not keep me from having a different desire. Perhaps, at some time in the future, circumstances will be different and you might reconsider. Richard On Jan 9, 2013, at 9:20 AM, Barry Warsaw wrote: > On Jan 09, 2013, at 09:11 AM, Richard Wackerbarth wrote: > >> I would like to see all of the MM related development migrate. > > I have no plans to migrate the core off of Launchpad and bzr. > > Cheers, > -Barry From f at state-of-mind.de Wed Jan 9 18:08:52 2013 From: f at state-of-mind.de (Florian Fuchs) Date: Wed, 09 Jan 2013 18:08:52 +0100 Subject: [Mailman-Developers] HyperKitty : VCS change In-Reply-To: References: Message-ID: <50EDA424.4050209@state-of-mind.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Aur?lien, On 01/09/2013 03:46 PM, Aurelien Bompard wrote: > We're concerned however by the uncomfortableness it may cause you, > the Mailman community, if/when you want to contribute to > HyperKitty. Barry, Terry, Florian, would that be a problem ? Others > ? Of course I'm ready to merge patches sent by email or bugtracker, > but that's a little more friction. No uncomfortableness on my side. I'm used to the occasional "Not a branch" / "Not a repository" error when when switching between projects. ;-) I guess for the most basic use cases it's not that hard to get up to speed with either bzr or git. And a world where there's only one VCS to rule them all that everyone's fluent in is probably far away (and maybe not even desirable?). Cheers Florian > > It's not a "speak now or forever hold your peace" moment, but this > unnecessary complexity is tiring day-to-day, so I'd rather sort > that out quickly-ish. > > Thanks ! > > Aur?lien _______________________________________________ > Mailman-Developers mailing list Mailman-Developers at python.org > http://mail.python.org/mailman/listinfo/mailman-developers Mailman > FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: > http://www.mail-archive.com/mailman-developers%40python.org/ > Unsubscribe: > http://mail.python.org/mailman/options/mailman-developers/f%40state-of-mind.de > > Security Policy: http://wiki.list.org/x/QIA9 > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBAgAGBQJQ7aQkAAoJEAszfsgOAINuzWwIAJGwQGxc+BLFhVAkbCtEi8gM iOTiqEp3gkKN/zxACP8I8LLESSTHWCj5tWBFmvyBFYb04wANPv1YhTB7elNX8zZj /xZnbB/XQzdY/7Fvv0QKJQHFFS5hEwpbF8osxlyA4NrbdEXIvSveWhI8Gf4h2re/ LUQJsWOOmGgBHSKGcdA0dxBD0j1KPs2dvSEH8Z0YG1t5XpHwZLqvL/rxupgXVQwT Aau3g0LESeioQenZJKzCGNAOS8tF3A7JputDssGTgWYP3yqLpe0UdPZFEjtvSTRg JEw8ikWZc5YAvtHth4YJCA+5/qC2uq4ye0A4gaX527AzOUqAHwKziycrggfut2U= =a6a9 -----END PGP SIGNATURE----- From terri at zone12.com Wed Jan 9 21:09:25 2013 From: terri at zone12.com (Terri Oda) Date: Wed, 09 Jan 2013 13:09:25 -0700 Subject: [Mailman-Developers] Starting prep for GSoC 2013 Message-ID: <50EDCE75.7010309@zone12.com> Happy new year, all! Although this year's GSoC hasn't actually been announced yet, now's a good time for us to start figuring out what we as an organization want to do. So here's some questions to get us started: (a) Who would like to mentor for GSoC 2013? I'm hoping all of you who participated last year are interested in doing it again, and I'm happy to take on a few more mentors if there's anyone new who'd like to help out. (b) What projects do we have that would be appropriate for students? Generally we give students new features and wishlist items -- if someone has time to do a quick scan of the bug queues for Mailman/postorius/hyperkitty and suggest a list that would totally be awesome. (c) What intro documentation do we need to make it easy for students to get ramped up? I'd like to see: - overview architecture documentation (probably drawn from Barry's book chapter/pycon talk) - an updated "getting started" (basically the 5-minute guide expanded for less experienced developers) - a VM image with everything set up for people to try (preferably Ubuntu) Anything else you'd like to see? Anyone want to offer to start on any of these? The VM image shouldn't be to hard to set up. (d) What do we want student proposals to look like? We talked last year about how we'd like to have a more consistent proposal format for students to follow; can one of our more experienced admins write a proposal template & guidelines that we can have ready? Terri From sakuag333 at gmail.com Thu Jan 10 01:25:53 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Thu, 10 Jan 2013 05:55:53 +0530 Subject: [Mailman-Developers] (no subject) In-Reply-To: <20130102152751.06ae26a2@resist.wooz.org> References: <20130102152751.06ae26a2@resist.wooz.org> Message-ID: While using this command : ./bin/mailman inject abc at xyz.com -f tempfile -q lmtp I got to know that in /mailman/commands/inject.py , config.switchboards[lmtp].enqueue(msg, **msgdata) is being called, which in turn starts executing /mailman/app/config.py file. mailman.cfg tell config.py that lmtp runner is in mailman/runners/lmptp.py [runner.lmtp] class: mailman.runners.lmtp.LMTPRunner Hence at some point , lmtp.py __init__(self, slice=None, numslices=1): should be called. But i tried putting print("12345") inside __init__() but nothing got printed on the terminal. This may mean lmtp.py is not being executed, but still the following shows a new message in the lmtp queue. >>>> from mailman.testing.helpers import get_queue_messages > >>> items = get_queue_messages('lmtp') > >>> len(items) So if lmtp.py is not executed, which file is being executed for injecting message int lmtp runner , if not lmtp.py ? From terri at zone12.com Thu Jan 10 01:51:17 2013 From: terri at zone12.com (Terri Oda) Date: Wed, 09 Jan 2013 17:51:17 -0700 Subject: [Mailman-Developers] HyperKitty : VCS change In-Reply-To: References: Message-ID: <50EE1085.4010208@zone12.com> On 01/09/2013 07:46 AM, Aurelien Bompard wrote: > I'm trying to bring back some coherence into this, and considering > switching all the components to Git on fedorahosted.org. > The reason for this choice is that me and the other two most frequent > contributors are much more skilled with git than with bzr. That sounds much like the reason we're using bzr for Mailman! Go with what's comfy -- I have to use git for other projects anyhow, and as Florian says, the odd error message 'cause I used the wrong command isn't exactly a dealbreaker. Just make sure we've got the right links in the wiki for people who want to know where the archiver went! Terri From sakuag333 at gmail.com Thu Jan 10 03:01:58 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Thu, 10 Jan 2013 07:31:58 +0530 Subject: [Mailman-Developers] Non-queue runners should not create var/queue/* directories Message-ID: I have proposed a bug fix for the following bug: https://bugs.launchpad.net/mailman/+bug/1095422 My unofficial branch is: lp:~sakuag333/mailman/my_branch How can i know if i have done it correctly, is there some kind of review ? Also please tell me how to merge the bug to official branches of mailman 3 Thanks From barry at list.org Thu Jan 10 04:18:36 2013 From: barry at list.org (Barry Warsaw) Date: Wed, 9 Jan 2013 22:18:36 -0500 Subject: [Mailman-Developers] Non-queue runners should not create var/queue/* directories In-Reply-To: References: Message-ID: <20130109221836.0adea12a@anarchist.wooz.org> On Jan 10, 2013, at 07:31 AM, Sandesh Agrawal wrote: >I have proposed a bug fix for the following bug: >https://bugs.launchpad.net/mailman/+bug/1095422 Great! >My unofficial branch is: >lp:~sakuag333/mailman/my_branch > >How can i know if i have done it correctly, is there some kind of review ? >Also please tell me how to merge the bug to official branches of mailman 3 The think to do is to link the branch to the bug, and then do a merge proposal. You can do the former by using $ bzr commit --fixes=lp:1095422 but you may also need the --unchanged option if you have no other commits to make. Or you can link the two via the Launchpad website, by going to either the bug or the branch and finding the right link. Once you've done that, go to the branch page and propose to merge your branch into lp:mailman. This will create a diff, putting that both in the web page for the merge proposal, and sending an email to the mailman-coders mailing list. I'll try to review it tomorrow and you should get all replies with my comments. Once we're all happy with the branch, I will merge it into lp:mailman. Would you be willing to assign copyright in your changes to the FSF? Cheers, -Barry From richard at NFSNet.org Thu Jan 10 14:57:22 2013 From: richard at NFSNet.org (Richard Wackerbarth) Date: Thu, 10 Jan 2013 07:57:22 -0600 Subject: [Mailman-Developers] Starting prep for GSoC 2013 In-Reply-To: <50EDCE75.7010309@zone12.com> References: <50EDCE75.7010309@zone12.com> Message-ID: <45208BA4-815C-48B9-936D-58DE2D000215@NFSNet.org> Terri, In reference to your questions below, I offer these comments: (a) I enjoyed mentoring last summer and would like to do so again. (b) We need to give this serious thought, particularly if we were to propose direct participation (rather than under the PSF umbrella). One of the weaknesses of MM3 as a GSoC project is a lack of design maturity in terms of the intercommunication structure between components of a distributed implementation. This causes the student to need to be more involved in design aspects rather than just coding. Some students would be up to the task, but others might be overwhelmed by the lack of a complete design structure. We need to identify (1) some "trivial" introductory tasks, (2) projects appropriate for GSoC that are already clearly designed, and perhaps (3) projects that still need design. If we consider a student for this third category, we need to not only make sure that the student understands to complexity of the task, but establish metrics that can be used to evaluate student performance. (d) As a part of the student "proposal", I think that we need to have the students submit a "portfolio" of prior work which we can evaluate for aspects such as clear and consistent coding, unit testing, etc. At least some of this code should be written in Python (unless the student proposal would be implemented in another language). Potential applicants could be directed to the "trivial" tasks that I mention above as a source of material to augment their portfolio if they do not already have an adequate presentation. Richard On Jan 9, 2013, at 2:09 PM, Terri Oda wrote: > Happy new year, all! > > Although this year's GSoC hasn't actually been announced yet, now's a good time for us to start figuring out what we as an organization want to do. > > So here's some questions to get us started: > > (a) Who would like to mentor for GSoC 2013? > > I'm hoping all of you who participated last year are interested in doing it again, and I'm happy to take on a few more mentors if there's anyone new who'd like to help out. > > (b) What projects do we have that would be appropriate for students? > > Generally we give students new features and wishlist items -- if someone has time to do a quick scan of the bug queues for Mailman/postorius/hyperkitty and suggest a list that would totally be awesome. > > (c) What intro documentation do we need to make it easy for students to get ramped up? > > I'd like to see: > - overview architecture documentation (probably drawn from Barry's book chapter/pycon talk) > - an updated "getting started" (basically the 5-minute guide expanded for less experienced developers) > - a VM image with everything set up for people to try (preferably Ubuntu) > > Anything else you'd like to see? Anyone want to offer to start on any of these? The VM image shouldn't be to hard to set up. > > (d) What do we want student proposals to look like? > > We talked last year about how we'd like to have a more consistent proposal format for students to follow; can one of our more experienced admins write a proposal template & guidelines that we can have ready? > > > Terri > _______________________________________________ > Mailman-Developers mailing list > Mailman-Developers at python.org > http://mail.python.org/mailman/listinfo/mailman-developers > Mailman FAQ: http://wiki.list.org/x/AgA3 > Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ > Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/richard%40nfsnet.org > > Security Policy: http://wiki.list.org/x/QIA9 From sakuag333 at gmail.com Thu Jan 10 18:36:05 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Thu, 10 Jan 2013 23:06:05 +0530 Subject: [Mailman-Developers] Non-queue runners should not create var/queue/* directories Message-ID: enqueue() in switchboard.py create a .pck file for each injected message in var/queue/* directory. Say a message injected in incoming queue will have a .pck file in var/queue/in But for 'lmtp' and 'rest' runners , if we do not need the creation of var/queue/lmtp and var/queue/rest directories, is there a need for calling enqueue() ? From sakuag333 at gmail.com Fri Jan 11 11:34:31 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Fri, 11 Jan 2013 16:04:31 +0530 Subject: [Mailman-Developers] problem with bazaar Message-ID: I have been trying to create a new branch for a bug fix using : bzr checkout lp~sakuag333/mailman/bug-fix but continuously getting the following error: bzr: ERROR: Not a branch: "bzr+ssh://bazaar.launchpad.net/~sakuag333/mailman/bug-fix/". Although i have been able to push changes to my earlier checked out branch, but i want to create a new branch so that i can raise a merge propsal. Please help me with this error. Thanks. From sakuag333 at gmail.com Fri Jan 11 15:08:50 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Fri, 11 Jan 2013 19:38:50 +0530 Subject: [Mailman-Developers] problem with bazaar In-Reply-To: References: Message-ID: bzr: ERROR: Not a branch: "bzr+ssh://bazaar.launchpad.net/~sakuag333/mailman/bug-fix/". Got this issue resolved. Replaced push with checkout, and got it working. From sakuag333 at gmail.com Fri Jan 11 21:41:06 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Sat, 12 Jan 2013 02:11:06 +0530 Subject: [Mailman-Developers] Bug fixes Message-ID: Hi After giving much time to understanding mailman's framework , i have come up with my first two bug fixes. These are my branches on launchpad: lp:~sakuag333/mailman/lmtp-duplicate-id lp:~sakuag333/mailman/non-queue-runner I have submitted a merge proposal. I would really welcome any comments and would be really happy to know any mistakes i might have done. Cheers, Sandesh From barry at list.org Fri Jan 11 22:40:33 2013 From: barry at list.org (Barry Warsaw) Date: Fri, 11 Jan 2013 16:40:33 -0500 Subject: [Mailman-Developers] Bug fixes In-Reply-To: References: Message-ID: <20130111164033.48b73281@anarchist.wooz.org> On Jan 12, 2013, at 02:11 AM, Sandesh Agrawal wrote: >After giving much time to understanding mailman's framework , i have >come up with my first two bug fixes. These are my branches on >launchpad: > >lp:~sakuag333/mailman/lmtp-duplicate-id >lp:~sakuag333/mailman/non-queue-runner > >I have submitted a merge proposal. >I would really welcome any comments and would be really happy to know >any mistakes i might have done. Awesome, thanks very much Sandesh. I've been a bit swamped lately, but I'll review these this weekend. Cheers, -Barry From barry at list.org Tue Jan 15 00:16:15 2013 From: barry at list.org (Barry Warsaw) Date: Mon, 14 Jan 2013 18:16:15 -0500 Subject: [Mailman-Developers] Non-queue runners should not create var/queue/* directories In-Reply-To: References: Message-ID: <20130114181615.42dd0d86@anarchist.wooz.org> On Jan 10, 2013, at 11:06 PM, Sandesh Agrawal wrote: >enqueue() in switchboard.py create a .pck file for each injected >message in var/queue/* directory. >Say a message injected in incoming queue will have a .pck file in var/queue/in > >But for 'lmtp' and 'rest' runners , if we do not need the creation of >var/queue/lmtp and var/queue/rest directories, is there a need for >calling enqueue() ? No. Where does the lmtp and rest runners switchboard get called? In fact, those runners should probably not even have switchboard instances. Cheers, -Barry From sakuag333 at gmail.com Tue Jan 15 23:36:40 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Wed, 16 Jan 2013 04:06:40 +0530 Subject: [Mailman-Developers] (no subject) In-Reply-To: <20130115151638.5eefa899@anarchist.wooz.org> References: <20130114182834.1996ffb7@anarchist.wooz.org> <20130115145656.5f832e4e@anarchist.wooz.org> <20130115151638.5eefa899@anarchist.wooz.org> Message-ID: I looked into ConfigurationUpdatedEvent and mailman.cfg and got the bug corrected :) Now coming to creation of test , i am unsure about how to create a test for the bug and what all things to include in it. I would really like to know more about it so that i can create the required test and send a merge proposal. Cheers, Sandesh From barry at list.org Wed Jan 16 17:55:15 2013 From: barry at list.org (Barry Warsaw) Date: Wed, 16 Jan 2013 11:55:15 -0500 Subject: [Mailman-Developers] (no subject) In-Reply-To: References: <20130114182834.1996ffb7@anarchist.wooz.org> <20130115145656.5f832e4e@anarchist.wooz.org> <20130115151638.5eefa899@anarchist.wooz.org> Message-ID: <20130116115515.71ac245b@anarchist.wooz.org> On Jan 16, 2013, at 04:06 AM, Sandesh Agrawal wrote: >I looked into ConfigurationUpdatedEvent and mailman.cfg and got the bug >corrected :) > >Now coming to creation of test , i am unsure about how to create a test for >the bug and what all things to include in it. >I would really like to know more about it so that i can create the required >test and send a merge proposal. I think the tests can be fairly simple, since all you care about is that the queue directories don't get created. As long as the rest of the test suite runs without failures, that should be enough. (I'm still working on getting coverage into the test suite.) I would suggest adding a test to mailman/runners/tests/test_lmtp.py that asserts there's no lmtp queue directory. For the RESTRunner, there's no equivalent mailman/runners/tests/test_rest.py. You *could* add one, but I'm not sure it's worth it for this one check. Maybe you could add such a test to mailman/rest/tests/test_root.py? Cheers, -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From sakuag333 at gmail.com Wed Jan 16 22:30:49 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Thu, 17 Jan 2013 03:00:49 +0530 Subject: [Mailman-Developers] (no subject) In-Reply-To: <20130116115515.71ac245b@anarchist.wooz.org> References: <20130114182834.1996ffb7@anarchist.wooz.org> <20130115145656.5f832e4e@anarchist.wooz.org> <20130115151638.5eefa899@anarchist.wooz.org> <20130116115515.71ac245b@anarchist.wooz.org> Message-ID: I tried running ./bin/test and saw the following erro coming up : Failure in test /home/sandesh/mail_man/mailman-3.0.0b2/src/mailman/commands/docs/inject.rst Failed doctest test for inject.rst File "/home/sandesh/mail_man/mailman-3.0.0b2/src/mailman/commands/docs/inject.rst", line 0 ---------------------------------------------------------------------- File "/home/sandesh/mail_man/mailman-3.0.0b2/src/mailman/commands/docs/inject.rst", line 29, in inject.rst Failed example: command.process(args) Differences (ndiff with -expected +actual): Available queues: archive bad bounces command digest in - lmtp nntp out pipeline - rest retry shunt virgin The reason for this was , in mailman/commands/cli_inject.py , when arg.show = True , it tries to fetch the available queues using : if args.show: print('Available queues:') for switchboard in sorted(config.switchboards): print(' ', switchboard) return But since , is_non_queue_runner is set True for lmtp and rest runner, switchboard instance is not created for them , hence config.switchboards does not have an entry for lmtp and rest. Is this another bug in the way of fetching available queues ? From barry at list.org Wed Jan 16 22:36:27 2013 From: barry at list.org (Barry Warsaw) Date: Wed, 16 Jan 2013 16:36:27 -0500 Subject: [Mailman-Developers] (no subject) In-Reply-To: References: <20130114182834.1996ffb7@anarchist.wooz.org> <20130115145656.5f832e4e@anarchist.wooz.org> <20130115151638.5eefa899@anarchist.wooz.org> <20130116115515.71ac245b@anarchist.wooz.org> Message-ID: <20130116163627.4bf36ca9@anarchist.wooz.org> On Jan 17, 2013, at 03:00 AM, Sandesh Agrawal wrote: >But since , is_non_queue_runner is set True for lmtp and rest runner, >switchboard instance is not created for them , hence config.switchboards does >not have an entry for lmtp and rest. Is this another bug in the way of >fetching available queues ? No, it's just an expected failure with the elimination of the lmtp and rest queues. The code is doing the right thing, but the doctest needs updating. Was that the only failure? If so, that's a good sign! Cheers, -Barry From sakuag333 at gmail.com Wed Jan 16 22:38:06 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Thu, 17 Jan 2013 03:08:06 +0530 Subject: [Mailman-Developers] (no subject) In-Reply-To: References: <20130114182834.1996ffb7@anarchist.wooz.org> <20130115145656.5f832e4e@anarchist.wooz.org> <20130115151638.5eefa899@anarchist.wooz.org> <20130116115515.71ac245b@anarchist.wooz.org> <20130116163627.4bf36ca9@anarchist.wooz.org> Message-ID: On Thu, Jan 17, 2013 at 3:07 AM, Sandesh Agrawal wrote: > Yes, that was the only failure :) From sakuag333 at gmail.com Wed Jan 16 22:44:15 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Thu, 17 Jan 2013 03:14:15 +0530 Subject: [Mailman-Developers] (no subject) In-Reply-To: References: <20130114182834.1996ffb7@anarchist.wooz.org> <20130115145656.5f832e4e@anarchist.wooz.org> <20130115151638.5eefa899@anarchist.wooz.org> <20130116115515.71ac245b@anarchist.wooz.org> <20130116163627.4bf36ca9@anarchist.wooz.org> Message-ID: Is there a way of unning only test_lmtp.py to test lmtp runner or do i need to do the full test using ./bin/test . I tried runnign both of the below ./bin/test ./src/mailman/runners/tests/test_lmtp.py/ ./bin/py ./src/mailman/runners/tests/test_lmtp.py with this added in test_lmtp.py if __name__ == '__main__': unittest.main() But it did not ran as desired. What is the correct way of running the unit test for lmtp runner ? From barry at list.org Wed Jan 16 23:07:28 2013 From: barry at list.org (Barry Warsaw) Date: Wed, 16 Jan 2013 17:07:28 -0500 Subject: [Mailman-Developers] (no subject) In-Reply-To: References: <20130114182834.1996ffb7@anarchist.wooz.org> <20130115145656.5f832e4e@anarchist.wooz.org> <20130115151638.5eefa899@anarchist.wooz.org> <20130116115515.71ac245b@anarchist.wooz.org> <20130116163627.4bf36ca9@anarchist.wooz.org> Message-ID: <20130116170728.2697e7ff@anarchist.wooz.org> On Jan 17, 2013, at 03:14 AM, Sandesh Agrawal wrote: >Is there a way of unning only test_lmtp.py to test lmtp runner or do i >need to do the full test using ./bin/test . Yes, you can run various subsets of tests by using the -t option. MM3 currently uses zope.testrunner. All the gory details: http://pypi.python.org/pypi/zope.testrunner >I tried runnign both of the below >./bin/test ./src/mailman/runners/tests/test_lmtp.py/ >./bin/py ./src/mailman/runners/tests/test_lmtp.py >What is the correct way of running the unit test for lmtp runner ? `bin/test -t TestLMTP` would run all the tests in that class. Or, e.g. `bin/test -t test_message_id_required` to run an individual test. -t accepts other patterns, and I always add -vv to get more verbosity. Cheers, -Barry From sakuag333 at gmail.com Wed Jan 16 23:40:50 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Thu, 17 Jan 2013 04:10:50 +0530 Subject: [Mailman-Developers] (no subject) In-Reply-To: <20130116170728.2697e7ff@anarchist.wooz.org> References: <20130114182834.1996ffb7@anarchist.wooz.org> <20130115145656.5f832e4e@anarchist.wooz.org> <20130115151638.5eefa899@anarchist.wooz.org> <20130116115515.71ac245b@anarchist.wooz.org> <20130116163627.4bf36ca9@anarchist.wooz.org> <20130116170728.2697e7ff@anarchist.wooz.org> Message-ID: I think that the new test function that i need to add to test_lmtp.py has to be added to some configuration file or some base class because while running ./bin/test -vv -t TestLMTP , it runs only 4 tests (for the functions originally defined in test_lmtp.py) and my new function added is ignored. I could not figure out the process of adding a new test function to it. From barry at list.org Wed Jan 16 23:46:16 2013 From: barry at list.org (Barry Warsaw) Date: Wed, 16 Jan 2013 17:46:16 -0500 Subject: [Mailman-Developers] (no subject) In-Reply-To: References: <20130115145656.5f832e4e@anarchist.wooz.org> <20130115151638.5eefa899@anarchist.wooz.org> <20130116115515.71ac245b@anarchist.wooz.org> <20130116163627.4bf36ca9@anarchist.wooz.org> <20130116170728.2697e7ff@anarchist.wooz.org> Message-ID: <20130116174616.5c5c55e3@anarchist.wooz.org> On Jan 17, 2013, at 04:10 AM, Sandesh Agrawal wrote: >I think that the new test function that i need to add to test_lmtp.py >has to be added to some configuration file or some base class because >while running ./bin/test -vv -t TestLMTP , it runs only 4 tests (for >the functions originally defined in test_lmtp.py) and my new function >added is ignored. I could not figure out the process of adding a new >test function to it. You shouldn't have to. Name the method `test_` and testrunner should find it automatically. If that's not happening, push what you have and I'll look at it. -Barry From sakuag333 at gmail.com Wed Jan 16 23:49:56 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Thu, 17 Jan 2013 04:19:56 +0530 Subject: [Mailman-Developers] (no subject) In-Reply-To: <20130116174616.5c5c55e3@anarchist.wooz.org> References: <20130115145656.5f832e4e@anarchist.wooz.org> <20130115151638.5eefa899@anarchist.wooz.org> <20130116115515.71ac245b@anarchist.wooz.org> <20130116163627.4bf36ca9@anarchist.wooz.org> <20130116170728.2697e7ff@anarchist.wooz.org> <20130116174616.5c5c55e3@anarchist.wooz.org> Message-ID: > You shouldn't have to. Name the method `test_` and testrunner > should find it automatically. If that's not happening, push what you have and > I'll look at it. I got the error, i was not aware of the fact that name has to begin with test_ It worked now. From sakuag333 at gmail.com Mon Jan 21 04:05:39 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Mon, 21 Jan 2013 08:35:39 +0530 Subject: [Mailman-Developers] [Merge] lp:~sakuag333/mailman/BUG_non_queue_runner into lp:mailman In-Reply-To: <20130120155726.1dc71ab1@anarchist.wooz.org> References: <20130117074525.27781.43023.launchpad@ackee.canonical.com> <20130120155726.1dc71ab1@anarchist.wooz.org> Message-ID: > PEP 8 has a line length limit of 79 characters, so this line needs to be > wrapped. > PEP 8 requires a single space both before and after the = sign. > Thanks for pointing this out. I will get myself familial with PEP 8. > > === modified file 'src/mailman/core/switchboard.py' > --- src/mailman/core/switchboard.py 2013-01-01 14:05:42 +0000 > +++ src/mailman/core/switchboard.py 2013-01-17 07:44:42 +0000 >> @@ -90,9 +90,10 @@ >> 'Not a power of 2: {0}'.format(numslices)) >> self.name = name >> self.queue_directory = queue_directory >> + self.non_queue_runner={'lmtp','rest'} > > This should no longer be necessary, right? (I hope it's not! :) >> # Fast track for no slices >> self._lower = None >> self._upper = None >> @@ -143,11 +144,11 @@ >> data['_parsemsg'] = (protocol == 0) >> # Write to the pickle file the message object and metadata. >> with open(tmpfile, 'w') as fp: >> - fp.write(msgsave) >> - cPickle.dump(data, fp, protocol) >> - fp.flush() >> - os.fsync(fp.fileno()) >> - os.rename(tmpfile, filename) >> + fp.write(msgsave) >> + cPickle.dump(data, fp, protocol) >> + fp.flush() >> + os.fsync(fp.fileno()) >> + os.rename(tmpfile, filename) > > Why were these lines changed? The tabs are not allowed in Mailman code. > These lines were changed in my earlier commit, which required certain fixing. So i re-changed these lines to the original one in my recent commit to the branch. Hence bazaar was showing all that in the commit history. > Be careful about trailing whitespace! You might want to set your editor to > warn you about these, or display such whitespace. > At present i am using jus gedit to do all my coding, which edtor is best to be used so that i do not run into these problems ? Thanks for the feedback :) Cheers, Sandesh From sakuag333 at gmail.com Mon Jan 21 06:10:07 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Mon, 21 Jan 2013 10:40:07 +0530 Subject: [Mailman-Developers] (no subject) Message-ID: I am writing a test for lmtp runner as follows: def test_function(self): self._lmtp.sendmail(.........) messages = get_queue_messages('in') self.assertEqual(len(messages), 1) self._lmtp.sendmail(.........) messages = get_queue_messages('in') self.assertEqual(len(messages), 1) and the test passes successfully , but shouldn't the second self.assertEqual( ) fail because number of messages in 'in' should now be 2 . Might be, self._lmtp is creating new lmtp instance each time it executes sendmail( ) , or is there something else ? Cheers, Sandesh From sakuag333 at gmail.com Mon Jan 21 06:16:51 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Mon, 21 Jan 2013 10:46:51 +0530 Subject: [Mailman-Developers] (no subject) In-Reply-To: References: Message-ID: > Might be, self._lmtp is creating new lmtp instance each time it > executes sendmail( ) , or is there something else ? by lmtp instace, i meant a new smtp.LMTP( ) instance is being made each time we call self._lmtp.sendmail( ) From barry at list.org Tue Jan 22 21:32:17 2013 From: barry at list.org (Barry Warsaw) Date: Tue, 22 Jan 2013 15:32:17 -0500 Subject: [Mailman-Developers] [Merge] lp:~sakuag333/mailman/BUG_non_queue_runner into lp:mailman In-Reply-To: References: <20130117074525.27781.43023.launchpad@ackee.canonical.com> <20130120155726.1dc71ab1@anarchist.wooz.org> Message-ID: <20130122153217.3185faa2@anarchist.wooz.org> On Jan 21, 2013, at 08:35 AM, Sandesh Agrawal wrote: >These lines were changed in my earlier commit, which required certain >fixing. So i re-changed these lines to the original one in my recent >commit to the branch. Hence bazaar was showing all that in the commit >history. It's important to learn how to work with feature/bug branches in Bazaar. It's not that difficult really, you just want to create a new branch per bug or feature that you're working on. If you have one feature branch that depends on another feature branch, you can use something like looms or pipelines to stack your branches. But in general, you want to make sure it's one-branch-per-bug-or-feature. >At present i am using jus gedit to do all my coding, which edtor is >best to be used so that i do not run into these problems ? I'm biased about Emacs because I've used it for a bazillion years. With the python-mode here plus tools like global-whitespace-mode, pyflakes, and bzr-tools-grep, I think Emacs is a wonderful development environment. By default, this will use only spaces for indentation. Other editors are good too if you can configure them correctly, but others will have to chime in about them. Cheers, -Barry From barry at list.org Tue Jan 22 21:35:48 2013 From: barry at list.org (Barry Warsaw) Date: Tue, 22 Jan 2013 15:35:48 -0500 Subject: [Mailman-Developers] (no subject) In-Reply-To: References: Message-ID: <20130122153548.0c371e92@anarchist.wooz.org> On Jan 21, 2013, at 10:40 AM, Sandesh Agrawal wrote: >I am writing a test for lmtp runner as follows: > >def test_function(self): > self._lmtp.sendmail(.........) > messages = get_queue_messages('in') > self.assertEqual(len(messages), 1) > > self._lmtp.sendmail(.........) > messages = get_queue_messages('in') > self.assertEqual(len(messages), 1) > > >and the test passes successfully , but shouldn't the second >self.assertEqual( ) fail because number of messages in 'in' should now >be 2 . One thing you can do when running tests that use runners in subprocesses (e.g. spawned by TestableMaster), is pass in the -e option to bin/test so that logging in the subprocesses is enabled. Such logging is suppressed by default because of the noise, but enabling it lets you see if an exception occurs in a runner that might only show up in the logs. >Might be, self._lmtp is creating new lmtp instance each time it >executes sendmail( ) , or is there something else ? I don't think it does. My first guess is that there's an exception getting masked. Cheers, -Barry From sakuag333 at gmail.com Wed Jan 23 06:29:13 2013 From: sakuag333 at gmail.com (Sandesh Agrawal) Date: Wed, 23 Jan 2013 10:59:13 +0530 Subject: [Mailman-Developers] (no subject) In-Reply-To: <20130122153548.0c371e92@anarchist.wooz.org> References: <20130122153548.0c371e92@anarchist.wooz.org> Message-ID: >>Might be, self._lmtp is creating new lmtp instance each time it >>executes sendmail( ) , or is there something else ? > > I don't think it does. My first guess is that there's an exception getting > masked. > I tried ./bin/test along with -e option , and did not see any of the exceptions being masked in lmtp runner process. >def test_function(self): > self._lmtp.sendmail(.........) > messages = get_queue_messages('in') > self.assertEqual(len(messages), 1) > > self._lmtp.sendmail(.........) > messages = get_queue_messages('in') > self.assertEqual(len(messages), 1) > I tried verifying the header of both the messages using self.assertEqual(messages[0].msg['Message-ID'], '') and found out that both the messages sent from the test_func(self) are being recieved by the lmtp runner, but at any moment of time, there is only one message in the queue that is the latest one received. I tried sending multiple message by attaching smtplib.LMTP() instance to the lmtp runner and was successful, as there were multiple messages that i sent were present in the queue. But doing the same thing in test_func() leads to only the latest message being left in the queue thus showing len(messages)=1 always. I have fixed the bug regarding lmtp runner should reject messages with duplcate Message-ID, and just want to write a test for it by sending two messages with same ID. Cheers, Sandesh