Re: [ZWeb] zope.org domain expired

2015-12-02 Thread Jim Fulton
Thanks. It's been renewed.

Jim

On Wed, Dec 2, 2015 at 9:58 AM, Sascha Welter <zopel...@betabug.ch> wrote:
> Hi!
>
> No idea if this mail will make it anywhere...
>
> Apparently the domain zope.org expired on 11/27/2015.
>
> Regards,
> Sascha
>
> ___
> Zope-web maillist  -  Zope-web@zope.org
> https://mail.zope.org/mailman/listinfo/zope-web



-- 
Jim Fulton
http://jimfulton.info
___
Zope-web maillist  -  Zope-web@zope.org
https://mail.zope.org/mailman/listinfo/zope-web


Re: [Zope-dev] github etiquette

2013-09-17 Thread Jim Fulton
On Tue, Sep 17, 2013 at 7:00 AM, Marius Gedminas mar...@gedmin.as wrote:
...
 2) fork the repository, make a branch in the fork, do my work, push
 the changes to my fork, and issue a pull request.

 The latter is what I did, without explicitly asking for feedback.
 Luckily someone did give me feedback (thanks!) :-)

 I think a pull request is right.

Yup.

 It doesn't matter much if the branch you're asking to pull is in the
 main repository or in a private fork.

Yup.

(Apparently, number of forks is a way some people keep score
 on github, so I'll cynically say a fork is better.)

 Now that I mended the pull request, should I merge the pull request
 myself? Or is the current etiquette that someone else should merge
 the pull request?

 I think it's fine to merge own pull requests, provided that somebody
 +1'd it.  (Or if nobody cared for a couple of weeks, even after asking
 for feedback on the list.)

I strongly prefer that the reviewer do the merge.

I'd also really like reviewers to take their responsibility
seriously, making comments and suggestions where appropriate.

Software review, done well, improves the software, and, more
importantly, improves the developers.


 My apologies in case I missed an obvious document or reference
 somewhere that describes the way we should work with the
 zopefoundation's codebase...

 Can we please get the http://foundation.zope.org/ website source on
 GitHub, so it becomes maintainable by the community?

Oh yes, please! Unfortunately, this will require moving from
silva to sphinx.  It will also entail separating the public
sites from private documents.

(The above isn't meant to dis silva, it's just not a good
fit for zopefoundation.org.)

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] github etiquette

2013-09-17 Thread Jim Fulton
On Tue, Sep 17, 2013 at 8:32 AM, Jan-Wijbrand Kolman
janwijbr...@gmail.com wrote:
 On 9/17/13 1:47 PM, Jim Fulton wrote:

 I strongly prefer that the reviewer do the merge.

 I'd also really like reviewers to take their responsibility
 seriously, making comments and suggestions where appropriate.

 Software review, done well, improves the software, and, more
 importantly, improves the developers.


 I agree - I know I get better from recieving feedback :-)

 Is this reviewer role something someone takes upon himself? I mean, if I
 see a pull request for a code base that I know, I could review the request?

These are good questions.  I probably don't have satisfying answers.

The short answer is that I think people who contribute to a project
should view review as one of their duties.  For better or worse, this is
somewhat informal.

If you don't get a review in a timely manner, try posting to the
appropriate mailing list to request a review.

 Or do we acknowledge a group of people that generally do reviews (again
 formally of informally, I don't mind, I'm not looking for official
 procedures)?

No.

 p.s. Another thing I noticed: some of the discussion about changes and
 patches and fixes now shift from the mailinglist to github. This is fine, I
 guess.

Yes, IMO.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] github etiquette

2013-09-17 Thread Jim Fulton
On Tue, Sep 17, 2013 at 8:58 AM, Marius Gedminas mar...@gedmin.as wrote:
 On Tue, Sep 17, 2013 at 07:47:42AM -0400, Jim Fulton wrote:
 On Tue, Sep 17, 2013 at 7:00 AM, Marius Gedminas mar...@gedmin.as wrote:
  Now that I mended the pull request, should I merge the pull request
  myself? Or is the current etiquette that someone else should merge
  the pull request?
 
  I think it's fine to merge own pull requests, provided that somebody
  +1'd it.  (Or if nobody cared for a couple of weeks, even after asking
  for feedback on the list.)

 I strongly prefer that the reviewer do the merge.

 FWIW the only reason I'm in favour of self-merges is that this
 short-circuits the have you signed the ZF committer agreement? dance.
 Only people who have can merge.

Sorry, I don't understand the point you're making.

 I also feel silly when I ask this question from people with very
 familiar names.  (I feel that I have to do when I don't see ZF
 membership on their GitHub profile.)

So are you saying you don't merge other people's code because
you don't want to ask if they're contributors?

I can understand this, but I'd still try to encourage a more review-centric
workflow.

Also, if a change is trivial, the PR doesn't have to be from a contributor.
I understand that triviality isn't always clear.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Important! buildout 2.1.1 released, prepare for distribute 0.7 and buildout 2.2

2013-06-26 Thread Jim Fulton
Distribute/setuptools 0.7 bring some big changes.  These changes can't be
handled by buildout's normal automatic upgrade mechanism.  For this reason,
it's important to do one of the following if you're using buildout 2:

- Pin your distribute version to 0.7dev or to some other 0.6 version.

- Upgrade to buildout 2.1.1, which was just released.  This will prevent
  automatic upgrade to distribute 0.7 or buildout 2.2.  To upgrade,
  imply rerun your existing buildout scripts.

- Be prepared to re-bootstrap your buildouts with the the new buildout 2.2
  bootstrap script, which will be released soon after the release of
distribute 0.7.

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] download.zope.org down

2013-06-11 Thread Jim Fulton
Looks OK now. Maybe someone fixed it.

Jim

On Tue, Jun 11, 2013 at 7:24 AM, Andreas Jung li...@zopyx.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi there,

 download.zope.org seems to be.

 Bad because there is Plone hotfix release scheduled
 for toda 15h UTC...

 Andreas
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (Darwin)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iQGUBAEBAgAGBQJRtwjYAAoJEADcfz7u4AZjoncLvRE3dS0RrWZmHmQvQ8WMAOxc
 09JwPY9HkcD4ghblZv/jaLIHVpcSs3H6RU+bf+vGLiw6zEnYphKu7oZI9avjlY7Q
 NEfRiC1QLlyE8L/m45PL9nH8MzF+LhidOGRIxp989ME/ol8dOBmxoF4Fp7st5TZ5
 nyidwjC+rKlywaoInvFVwgizezLxyt8ljBLHwOVS7T8Tr+xrYmMC9H4ifdWQvj/T
 +H/cF9byGWrne8tJIqCYzIvXC7vAMYk9qOfD38lCx4+F/v1xYG4EtYyGTHLSJXFV
 KS8j14PY248ZF0N/6OgNnw9EXz3WrNNehPz3h8iyzhnZgu/TvNXzSjqoKPAI+7z5
 ZdcHkvM3HXdUZstMUy2qPa62J0T0MH7Sjo3N4Hn49+1ILo5r7fI1oZcg3/b9F8IT
 wFuWibMN3G7YUMgqFeDqkF1gb9+rWz5b17CzO9AgzMuvK/B3WZLJCGGB28Wsk74e
 /0dvKUjjb58LBooXNoDFIgVxrPEoQnI=
 =8HlV
 -END PGP SIGNATURE-

 ___
 Zope-Dev maillist  -  Zope-Dev@zope.org
 https://mail.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  https://mail.zope.org/mailman/listinfo/zope-announce
  https://mail.zope.org/mailman/listinfo/zope )




-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Forcing buildout to download sdist packages only

2013-05-30 Thread Jim Fulton
On Thu, May 30, 2013 at 7:26 AM, Andreas Jung li...@zopyx.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi there,

 I have a buildout where I am using the 'pyamp' module.

 https://pypi.python.org/pypi/pyamp

 zc.buildout on my Raspberry PI tries to download and install
 the binary release package for Linux. Is there a way to
 force buildout to use source code distros only?

No, although a prefer-source option has been discussed.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ZCA for javascript

2013-05-22 Thread Jim Fulton
On Wed, May 22, 2013 at 12:32 AM, Andreas Jung li...@zopyx.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Like always: you're thoughtd and reasoning are years behind of what
 people actually do today or using nowadays. I remember your pointless
 discussions on ZClasses - years ago, years after we kicked ZClasses
 completely.

We (I) dropped the ball on ZClasses. They were for an audience that
was important in the early days of Zope and that we turned our
backs on.  IMO, he was right to champion them.  I think if we'd paid
attention, Zope would be more relevant today than it is now.

 I suggest to move on to a Javascript community and continue
 do discuss there. Nowaday we have framework like backbone.js, angular.js
 on the client for doing state-of-the-art client-side JS implementations.
 Or stuff like Obviel (from Martijn Faasen, a long time contributor of
 Zope). Don't take it personally but all your questions and communication
 over the last decade it based on very little technical insight and
 experience. Application design and decisions should be left
 to other persons.

How can he not take it personally when you start and end by
insulting him.  Your response is inappropriate and mostly
non-technical.

If you're uninterested in his proposal, just be quiet.  Maybe others
are or it will die out.  If you want to help by respectfully providing
technical arguments, then that's fine too.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Fwd: Patch for zc.zk

2013-05-14 Thread Jim Fulton
On Tue, May 14, 2013 at 6:02 AM, Dave Cahill dcah...@midokura.com wrote:
 Hi,

 Reposting to the zope-dev list - does anyone know if zc.zk is still active?

Yes, but I have lots of other projects. Don't expect instant responses.


 I have another patch to fix importing nodes with spaces in the name, but
 maybe
 I should just fork it instead and apply my fixes there. :)

Maybe.  Not sure nodes with spaces in the names is a good idea.

In terms of plans:

- You should only use zc.zk for it's original use cases of
  service registry and discovery.  For anything else, you
  should use kazoo.

- I plan to port zc.zk to kazoo.  This hasn't been an urgent priority
  up to now (although it's been getting more so).  I was hoping to get a
  student to work on it, but that didn't work out.

  If someone is looking for a project, I'd be happy to have volunteers. :)

  There are two projects waiting for work:

  https://github.com/python-zk/zk.fauxzoo

This is a replaceable mock, similar to what zc.zk
provides.  It should allow application tests with or without
connection to a ZooKeeper server.

  https://github.com/python-zk/zk.service

This is a port of the functionality in zc,zk that's absent from
kazoo, including the high-level data model and service registry
and discovery.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Github tip to get less github spam:

2013-03-13 Thread Jim Fulton
Visit: https://github.com/watching

Either unwatch all or selectively unwatch repositories you're not interested in.

(If you stop watching all, there's a lot of clicking to then watch
repositories again.)

Uncheck autowatch (I wish I'd done this a couple of weekes ago :)

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [zopefoundation/zope.security] 82fd54: Changed strategy to hide wrapped to not use the se...

2013-03-12 Thread Jim Fulton
On Tue, Mar 12, 2013 at 8:30 AM, Stephan Richter
stephan.rich...@gmail.com wrote:
 On Monday, March 11, 2013 10:33:30 PM Tres Seaver wrote:
  Yep, saw that. There are some uncovered lines for which I have to add
  tests left. Also, I just noticed while prorting zope.publisher to PyPy
  that proxies cannot be adapted, which is a big issue for any view
  libraries.

 Ouch.  That lying about my type bit is hard to get over.

 I was thinking about dynamically creating proxy classes. Something along the
 lines of:

 class PyProxy(object):

 def __new__(cls, orig):
 ProxyForOrig = type('ProxyForOrig', (cls, orig.__class__))
 return ProxyForOrig(orig)

 That should also help us with our 3-arg pow() call

 What do you think?

Sorry, why do you want to adapt proxies?  The lying about class,
which is arguably not lying, is intentional and facilitates adapting proxied
objects.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] windows egg/exe packages on PyPI?

2013-03-06 Thread Jim Fulton
On Wed, Mar 6, 2013 at 7:10 AM, Adam GROSZER agros...@gmail.com wrote:
 Hello,

 Just got a request that winbot should prepare .exe's for windows.

 My question is, do we want exe AND egg or just exe for windows binary
 packages?

 I think setuptools/distribute should work with an exe too,

I doubt it. Have you tested it?

 but veto me here
 and now.

Unless you prove that they're equivalent, both please.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Moving to Github: authors.txt (and svn12git.py)

2013-03-01 Thread Jim Fulton
I've created a private subversion repository containing the
authors.txt file needed when converting subversion repository to git.

  svn+ssh://svn.zope.org/repos/2git

It's a small repository that you can check out directly:

  svn co svn+ssh://svn.zope.org/repos/2git

I've also included a small python script, svn2git.py.  It:

- builds on the git svn plugin, which you must have installed.

- doesn't require that you have a local copy of the subversion repository.

- is more reliable than the ruby version

- It usually does it's work in a few minutes.

- It has run into difficulty with one project, ZEO, where it got into
some look and didn't finish.

This is the script I use and I recommend it for individual repositories.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Temporary write access to moved SVN packages needed

2013-02-19 Thread Jim Fulton
On Tue, Feb 19, 2013 at 12:52 PM, Stephan Richter
stephan.rich...@gmail.com wrote:
 Hi Jim,

 I temporarily need access to the following packages to remove the trunk code
 and add a MOVED_TO_GITHUB file:

 * zope.deprecation
 * zope.event
 * zope.exceptions
 * zope.hookable
 * zope.i18nmessageid
 * zope.interface
 * zope.location
 * zope.proxy
 * zope.schema
 * zope.testing

Done

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zdaemon test dependencies

2013-02-13 Thread Jim Fulton
On Tue, Feb 12, 2013 at 11:10 PM, Stephan Richter
stephan.rich...@gmail.com wrote:
 Hi Jim,

 I am trying to get closer to get zope.site ported to Python 3. This requires
 porting of ZODB, which in turn requires zdaemon to be ported. So far so good.
 But then zdaemon has zc.customdoctests as a test requirement, which then needs
 python-spidermonkey.

That sounds like a bug.


 Since we do not control python-spidermonkey, I would like to break the
 dependency path somewhere.

+1

 I was thinking about having the zdaemon tests that
 require zc.customdoctests only run in Python 2. Does this sound good?

No.

I would make a javascript extra for customdoctests that requires spidermonkey.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Style guide update?

2013-02-13 Thread Jim Fulton
On Wed, Feb 13, 2013 at 1:53 AM, Marius Gedminas mar...@gedmin.as wrote:
 On Tue, Feb 12, 2013 at 05:20:14PM -0500, Fred Drake wrote:
 At one point, we had a style guide that recommended simple import
 module import statements for Zope code:

   http://wiki.zope.org/zope3/ZopePythonStyleGuide

 That page only mentions 'from whatever import *' which everyone will
 agree ought to be avoided.  It doesn't say anything about 'from whatever
 import somename' (except that you shouldn't import somename if you're
 not going to use it).

 Today, I'm noticing a lot of commits with the change note Normalize
 imports that change all imports to from module import whatever,
 like this one:

   
 https://github.com/zopefoundation/zope.security/commit/115691fce9c80a340f271410eec2964c92fbace4

 Do we still have an agreed-upon style guide, or are we moving to a
 last-touched-by approach?

I agree that Tres' changes don't seem to violate the style guide, such as it is.

I strongly prefer Fred's style of imports -- avoiding from imports except
for things that are used a whole lot.  I think it makes the code easier to
read because you don't have to wonder where names are coming from.

However, it's hard to object when someone's doing something that
needs to be done, porting to Python 3,  that I don't want to spend my
time on.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zdaemon test dependencies

2013-02-13 Thread Jim Fulton
On Wed, Feb 13, 2013 at 8:36 AM, Stephan Richter
stephan.rich...@gmail.com wrote:
 On Wednesday, February 13, 2013 07:16:03 AM Jim Fulton wrote:
 I would make a javascript extra for customdoctests that requires
 spidermonkey.

 Okay, and then have two test runners, one running without spidermonkey and one
 with and conditionalize the tests?

I wouldn't bother.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zdaemon test dependencies

2013-02-13 Thread Jim Fulton
On Wed, Feb 13, 2013 at 9:21 AM, Stephan Richter
stephan.rich...@gmail.com wrote:
 On Wednesday, February 13, 2013 09:13:52 AM Jim Fulton wrote:
 On Wed, Feb 13, 2013 at 8:36 AM, Stephan Richter

 stephan.rich...@gmail.com wrote:
  On Wednesday, February 13, 2013 07:16:03 AM Jim Fulton wrote:
  I would make a javascript extra for customdoctests that requires
  spidermonkey.
 
  Okay, and then have two test runners, one running without spidermonkey and
  one with and conditionalize the tests?

 I wouldn't bother.

 But in order to test zc.customdoctests' Py3 compatibility I need to run its
 tests. So I have 2 choices:

 1. Remove all spidermonkey integration tests.
 2. Run all spidermonkey integration tests only on Python 2.

 Both options are fine with me. Your choice. :-)

Ah.  For now, I'd skip the JS-integration tests for Python 3.

OT, will you volunteer for the ZF board?

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zdaemon test dependencies

2013-02-13 Thread Jim Fulton
On Wed, Feb 13, 2013 at 9:39 AM, Stephan Richter
stephan.rich...@gmail.com wrote:
 On Wednesday, February 13, 2013 09:27:46 AM Jim Fulton wrote:
 OT, will you volunteer for the ZF board?

 I would.

Thanks!

 Feel free to nominate me,

Done.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zdaemon test dependencies

2013-02-13 Thread Jim Fulton
On Wed, Feb 13, 2013 at 12:16 PM, Stephan Richter
stephan.rich...@gmail.com wrote:
 On Wednesday, February 13, 2013 09:27:46 AM Jim Fulton wrote:
  Both options are fine with me. Your choice. :-)

 Ah.  For now, I'd skip the JS-integration tests for Python 3.

 Okay, all done. Can you make me an PyPI owner of zc.customdoctests? My
 username is 'srichter'.

Done. Thanks.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] PyPI access to zc.lockfile

2013-02-12 Thread Jim Fulton
On Tue, Feb 12, 2013 at 12:35 PM, Stephan Richter
stephan.rich...@gmail.com wrote:
 Hi Jim,

 can you give me access to zc.lockfile, so I can upload a new release?

PyPI id?

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] PyPI access to zc.lockfile

2013-02-12 Thread Jim Fulton
On Tue, Feb 12, 2013 at 3:35 PM, Stephan Richter
stephan.rich...@gmail.com wrote:
 On Tuesday, February 12, 2013 01:29:43 PM Jim Fulton wrote:
  can you give me access to zc.lockfile, so I can upload a new release?

 PyPI id?

 srichter

Done.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Examples of ZODB.event

2013-02-11 Thread Jim Fulton
On Mon, Feb 11, 2013 at 11:45 AM, Jean-Daniel
jeandaniel.bro...@gmail.com wrote:
 Hello,

 I would like to build a config repository on the ZODB for an appliance where
 many processes would boot and talk to at boot to load their configuration.

 Some processes might modify or add new conf, and some different component
 should take this change of configuration into account.

 Is there any ZODB.event example app that I could read from? ZODB.event is a
 little too low level for me.

 I wish the subscribers would get a notification message like:

 - property modified. Ex: '(VideoComponent', 'server_port')
 - original value, new value. Ex: '8080', '1234'

This isn't a feature in ZODB yet.  Sorry.

When there is such a feature, it will be lower-level than that.
You'll be able to find out that an object changed, but not what
part of the object changed.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope.security on github?

2013-02-11 Thread Jim Fulton
On Mon, Feb 11, 2013 at 3:14 PM, Stephan Richter
stephan.rich...@gmail.com wrote:
 Hi everyone,

 I was just about to start porting zope.security using the SVN version, when I
 noticed it is already on Github and Tres has even worked on it today. So 2
 things:

 1. Can we delete the contents of zope.security on svn.zope.org?

Please remove the contents of trunk and add a MOVED_TO_GITHUB file in
trunk and in the project root with the git repo url.

When that's done, I'll make the project read only.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope.security on github?

2013-02-11 Thread Jim Fulton
On Mon, Feb 11, 2013 at 3:29 PM, Stephan Richter
stephan.rich...@gmail.com wrote:
 On Monday, February 11, 2013 03:19:54 PM Jim Fulton wrote:
  1. Can we delete the contents of zope.security on svn.zope.org?

 Please remove the contents of trunk and add a MOVED_TO_GITHUB file in
 trunk and in the project root with the git repo url.

 When that's done, I'll make the project read only.

 It seems to be readonly already, so I cannot remove the files.

Sorry. Fixed. Can you try again please?

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope.security on github?

2013-02-11 Thread Jim Fulton
On Mon, Feb 11, 2013 at 3:39 PM, Stephan Richter
stephan.rich...@gmail.com wrote:
 On Monday, February 11, 2013 03:37:17 PM Jim Fulton wrote:
  It seems to be readonly already, so I cannot remove the files.

 Sorry. Fixed. Can you try again please?

 All done.

Thanks. Back to read only.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] git migration: Here's the script I use to convert subversion projects to git

2013-01-31 Thread Jim Fulton
I've been holding off making it more public until I polish it further
but there's really no reason to hold off, since I'm unlikely to do more with it
soon:

https://gist.github.com/4683891

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.ssl ca chain

2013-01-25 Thread Jim Fulton
On Fri, Jan 25, 2013 at 11:22 AM, Senner, Talin sen...@wildcardcorp.com wrote:
 Would someone that has access be able to update zc.ssl and release a new
 version:

 http://svn.zope.org/zc.ssl/trunk/src/zc/ssl/certs.pem

 with a new version of ca root certificates (something say from a latest
 linux release from /etc/ssl ). The current cert chain is over 5 years  old.

I'll take care of this.  Note that we (ZC) will likely move to requests and
stop maintaining zc.ssl.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.ssl ca chain

2013-01-25 Thread Jim Fulton
On Fri, Jan 25, 2013 at 12:00 PM, Jim Fulton j...@zope.com wrote:
 On Fri, Jan 25, 2013 at 11:22 AM, Senner, Talin sen...@wildcardcorp.com 
 wrote:
 Would someone that has access be able to update zc.ssl and release a new
 version:

 http://svn.zope.org/zc.ssl/trunk/src/zc/ssl/certs.pem

 with a new version of ca root certificates (something say from a latest
 linux release from /etc/ssl ). The current cert chain is over 5 years  old.

The certificates in zc.ssl haven't changed.

 I'll take care of this.  Note that we (ZC) will likely move to requests and
 stop maintaining zc.ssl.

There's nothing to do at this point.  If you want more root CAs, I suggest
using requests, or forking zc.ssl and adding certs to your fork.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Status of github migration

2013-01-11 Thread Jim Fulton
On Fri, Jan 11, 2013 at 10:34 AM, Tres Seaver tsea...@palladion.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 01/10/2013 06:10 PM, Matthew Wilkes wrote:

 Tres Seaver wrote:
 What is needed is not scripts, but eyeballs:  we need people who
 know the various packages and*care*  about getting them migrated to
 github to step up.  Softwward which doesn't have a champion willing
 to do the work should stay behind on SVN.

 The community as a whole cares about having them all migrated to
 github. I'm sure this will happen the next time there's a sprint, just
 like lots of them got migrated (and subsequently deleted) at the zope4
 sprint in San Francisco a few years back.

 The communite as-a-whole demonstrably does *not* care about many of the
 projects on svn.zope.org.  E.g.:

  https://mail.zope.org/pipermail/zope-tests/2013-January/070977.html

 We need man-hours, sure, but not champions. Being blocked on working
 on the code because you're the first one to care about a package and
 subsequently have to learn how to do the migration is a crazy way of
 doing things.

 The foundation agreed to support moving projects to github, but that
 isn't a blank check.  For instance, if there is substantial interest in
 having the projects pulled in by the current Plone buildout moved, make a
 list of them, and recruit the folks to step up and help with the
 migration for them.  The effort requires includes doing the conversion,
 checking the results *by hand*, landing the repository, and fixing
 anything that breaks once you do (including stuff that breaks in projects
 you otherwise don't care about).

 Any project that can't find somebody willing to do that work (that is
 what I meant by a champion) is better off staying on SVN:  we don't do
 ourselves favors by carrying all the unmaintained baggage of fifteen
 years worth of development forward, just for purity / completeness /
 whatever.

+1

BTW (speaking of cruft), as someone who used/abused svn.zope.org as a
generic open-source hosting service (when I should have used something
like code.google.com, or bitbucket, or whatever), I wonder if there
should be a process for petitioning to remove projects from the ZF
repositories. (Maybe this only applies to me :)

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Building/Testing persistent package with tox

2013-01-11 Thread Jim Fulton
On Fri, Jan 11, 2013 at 10:54 AM, Stephan Richter
stephan.rich...@gmail.com wrote:
 Hi guys,

 I have just tried to build/test persistent with tox and it fails with the
 following error message::

 IOError: [Errno 2] No such file or directory: '/tmp/pip-u7jE1n-
 build/CHANGES.txt'
 Complete output from command python setup.py egg_info:
 Traceback (most recent call last):

   File string, line 16, in module

   File /tmp/pip-u7jE1n-build/setup.py, line 29, in module

 open(os.path.join(here, 'CHANGES.txt')).read())

 IOError: [Errno 2] No such file or directory: '/tmp/pip-u7jE1n-
 build/CHANGES.txt

 This is indeed correct, since the ZIP package archive created by tox in
 ./.tox/dist does not include any txt files.

 I use the following command to run tox:

 $ tox -e py27,py32

 How do others run tox?

The project needs to be updated with a manifest that causes .txt files
to be included in builds. (Look at zc.buildout for an example.) I
planned to do this, but hadn't gotten to it yet.  I can probably do
that this weekend.

This is needed because persistent has moved to git and
setuptools/distribute, **thankfully**, don't support git without a
plugin. **Please**, no one fix this by adding the plugin, at least not
for any projects I'm heavily involved it. I far prefer the explicit
approach afforded by a lack of VCS integration.

IMO, avoiding the setuptools/distribute VCS magic is a major
advantage of moving to git. :)

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Becoming a zopefoundation member on GitHub

2013-01-11 Thread Jim Fulton
On Fri, Jan 11, 2013 at 10:55 AM, Stephan Richter
stephan.rich...@gmail.com wrote:
 Hi everyone,

 what are the necessary steps to become a Zope Foundation organization member
 on GitHub? I would like to try moving a small product there to test the
 migration.

You should have gotten an email from me a a few weeks ago requesting
your github email. (It turns out I needed your id too.)  Perhaps we
didn't have an up-to-date email address for you in our database, or
maybe it got files as spam. :)

Please send me (privately) your github email and id.

If any other contributors didn't get an email from me and want write
access to the github repositories, please send me your github id and
email.

WRT moving or creating repositories, an unfortunate miss-feature of
github is that developers with push access can't also create
repositories.  (This is one of the reasons that ZC uses bitbucket.)
You'll have to ask someone (like me) to do that for you.  I don't
think we've formalized the process for this.

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Building/Testing persistent package with tox

2013-01-11 Thread Jim Fulton
On Fri, Jan 11, 2013 at 11:05 AM, Stephan Richter
stephan.rich...@gmail.com wrote:
...
 BTW, the current bootstrap.py file does not work with Python 3. Are we not
 going to support buildout with Python 3 or what's the goal/story here?

Buildout 2, which is still in alpha, but all I use works with Python 3.

Use: http://downloads.buildout.org/2/bootstrap.py

and don't forget to use -t, since buildout 2 isn't final.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Status of github migration

2013-01-10 Thread Jim Fulton
On Thu, Jan 10, 2013 at 5:48 AM, Jens Vagelpohl j...@dataflake.org wrote:

 On Jan 10, 2013, at 11:23 , Patrick Gerken do3cc...@googlemail.com wrote:

 I wanted to fix some logging in Products.SiteErrorLog, but I am confused 
 where to go to.

 zopefoundation on github has a small number of repos but not 
 Products.SiteErrorLog.
 http://svn.zope.org shows me a web view of our old cvs server.

 There is something wrong. Can I help with something?


 Going to http://svn.zope.org works fine for me. I see the expected SVN 
 repositories.

 The GitHub migration happens on an as-needed basis. Package maintainers may 
 request to have packages migrated or, like Jim and Tres are already doing, 
 migrate packages themselves. There is no full migration of all svn.zope.org 
 content.

 For those packages that are fully migrated you will have obvious markers on 
 the package in svn.zope.org, such as the package being read-only.

I don't think being read only is enough.  Are people supposed to
attempt commits to find out if a project is read-only?

We should at least leave something like a MOVED_TO_GITHUB file in the
project, in addition to making it read only.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] How to signal that projects have moved to github

2013-01-10 Thread Jim Fulton
I'd like us to agree on how we're going to indicate in SVN
that projects have been moved to github.

Here's an opening bid:

- Replace contents of trunk with a single file MOVED_TO_GITHUB
  containing the URL if the project page in github

- Copy above file to root of project.

- Make project read only

An argument against cleaning out trunk will break
CI tools.  This is also an argument *for* cleaning
out trunk. :)

Thoughts?

There are a lot of other details of the migration that need
to be worked out, like how folks should request migration and
automating the conversion further.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Status of github migration

2013-01-10 Thread Jim Fulton
On Thu, Jan 10, 2013 at 9:50 AM, Jens Vagelpohl j...@dataflake.org wrote:

 On Jan 10, 2013, at 15:40 , Leonardo Rochael Almeida leoroch...@gmail.com 
 wrote:
 I took a quick look at the Zope migration now and I think it's
 excellent. The only thing I'd add is that I'd also migrate branches
 2.12 and 2.13 branches since they're all active, even if just for
 bug/security fixes.

 I did not choose to include or exclude any branch. The test migration uses 
 the package used to migrate most Plone packages from SVN to GitHub, which 
 uses svn2git underneath. If there's whole branches missing the migration has 
 obviously failed.

I had a bunch of problems with ZODB and the ruby svn2git.  That's why
I wrote my own based on seeing what the ruby version was trying
to do. Note that most of the heavy lifting is actually done by the git
svn plugin.


 If you want to help you could try a migration with the attached Python script 
 that Jim wrote as a result of finding bugs in svn2git. I can provide you with 
 a suitable authors mapping file.

I've been waiting to make the script more publicly available in a saner fashion
until I've worked with it some more.  I should just make it a gist.

Jim


-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Status of github migration

2013-01-10 Thread Jim Fulton
On Thu, Jan 10, 2013 at 10:54 AM, Hanno Schlichting ha...@hannosch.eu wrote:
 On Thu, Jan 10, 2013 at 3:59 PM, Jim Fulton j...@zope.com wrote:

 On Thu, Jan 10, 2013 at 9:50 AM, Jens Vagelpohl j...@dataflake.org
 wrote:
  I did not choose to include or exclude any branch. The test migration
  uses the package used to migrate most Plone packages from SVN to GitHub,
  which uses svn2git underneath. If there's whole branches missing the
  migration has obviously failed.

 I had a bunch of problems with ZODB and the ruby svn2git.


 If you used a ruby tool, then you didn't use the same one as the Plone
 migrations. Unfortunately there's at least two different tools named
 svn2git. The one used by the Plone migrations is from the KDE community and
 written in Qt. Some of the more useful info is at
 http://techbase.kde.org/Projects/MoveToGit/UsingSvn2Git

 That tool doesn't really use git-svn. Instead it scan through all SVN
 revisions, looks at the changed paths and matches those against a ruleset.
 So you can tell it that both /foo/bar/trunk and /bar/trunk contain code that
 goes into the final bar.git repo. Since you can manually influence these
 rules, this tool tends to work better on projects which have moved their
 location in SVN a lot. It also does a single scan through the entire SVN
 repo and is able to generate many resulting git projects at once. Which made
 it perfect for a mass-migration.

 git-svn or tools based on it, tend to work well on small projects that
 always stayed in the same place, with the same structure.

That's interesting.  Not sure what I think about it (now that I have
something mostly working and don't want to figure out something
else :), but definitely worth thinking about. Thanks.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] How to signal that projects have moved to github

2013-01-10 Thread Jim Fulton
On Thu, Jan 10, 2013 at 12:02 PM, Tres Seaver tsea...@palladion.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 01/10/2013 10:42 AM, Patrick Gerken wrote:
 I am in favor of removing the trunks. People who do not want to switch
 to git can still get the trunk by pinning to a specific revision. I
 run a CI tool and it is broken already because apparently a trunk has
 been deleted already. Thats not a bug, thats why I run the CI Tool.
 Would be stupid if I continue to test a trunk not in use.

 It isn't just CI:  people may have projects running from SVN checkouts,
 which we break without warning (the Plone devs have been notorious for
 causing such breakage for years).

I still think breakage is better.  If they're using trunk, without
pinning a revision, it must be because they want the latest code.
They won't get that from svn.  This is a case where I think it's
better to fail in an obvious way.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope-tests - FAILED: 34, OK: 17

2013-01-06 Thread Jim Fulton
On Sun, Jan 6, 2013 at 11:00 AM, Tres Seaver tsea...@palladion.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 01/05/2013 08:00 PM, Zope tests summarizer wrote:
 [3]FAILED  winbot / ZODB_dev py_265_win32
 https://mail.zope.org/pipermail/zope-tests/2013-January/070946.html


 [4]FAILED  winbot / ZODB_dev py_265_win64
 https://mail.zope.org/pipermail/zope-tests/2013-January/070947.html


 [5]FAILED  winbot / ZODB_dev py_270_win32
 https://mail.zope.org/pipermail/zope-tests/2013-January/070948.html


 [6]FAILED  winbot / ZODB_dev py_270_win64
 https://mail.zope.org/pipermail/zope-tests/2013-January/070949.html


 [7]FAILED  winbot / persistent_py_265_32
 https://mail.zope.org/pipermail/zope-tests/2013-January/070961.html


 [8]FAILED  winbot / persistent_py_265_32
 https://mail.zope.org/pipermail/zope-tests/2013-January/070936.html


 [9]FAILED  winbot / transaction_py_265_32
 https://mail.zope.org/pipermail/zope-tests/2013-January/070953.html


 [10]   FAILED  winbot / transaction_py_265_32
 https://mail.zope.org/pipermail/zope-tests/2013-January/070935.html

 Something is wedged on the winbot:  these errors are all failures in the
 buildout phase which look like::

   c:\buildslave\transaction\buildcall \
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCVARSALL.bat \
x86
   Setting environment for using Microsoft Visual Studio 2008 x86 tools.
   The system cannot find the path specified.
   program finished with exit code 1

Winbot needs to get these packages from github now. :)

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/README.txt typo

2012-12-10 Thread jim
Log message for revision 128562:
  typo
  

Changed:
  U   zdaemon/trunk/src/zdaemon/README.txt

-=-
Modified: zdaemon/trunk/src/zdaemon/README.txt
===
--- zdaemon/trunk/src/zdaemon/README.txt2012-12-10 18:38:54 UTC (rev 
128561)
+++ zdaemon/trunk/src/zdaemon/README.txt2012-12-10 18:46:07 UTC (rev 
128562)
@@ -424,7 +424,7 @@
 exit with a non-zero exit status.
 
 stop-timeout
-This defaults to 500 seconds (5 minutes).
+This defaults to 300 seconds (5 minutes).
 
 When a stop command is issued, a SIGTERM signal is sent to the
 process.  zdaemon waits for stop-timeout seconds for the

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


Re: [Zope-dev] zope-tests - FAILED: 6, OK: 17

2012-12-03 Thread Jim Fulton
On Mon, Dec 3, 2012 at 3:15 AM, Adam GROSZER agroszer...@gmail.com wrote:
 Hello,


 On 12/02/2012 02:55 PM, Jim Fulton wrote:

 On Sat, Dec 1, 2012 at 8:00 PM, Zope tests summarizer nore...@zope.org
 wrote:

 ...

 [1]FAILED  winbot / ZODB_dev py_265_win32

 https://mail.zope.org/pipermail/zope-tests/2012-December/069693.html


 [2]FAILED  winbot / ZODB_dev py_265_win64

 https://mail.zope.org/pipermail/zope-tests/2012-December/069694.html


 [3]FAILED  winbot / ZODB_dev py_270_win32

 https://mail.zope.org/pipermail/zope-tests/2012-December/069695.html


 [4]FAILED  winbot / ZODB_dev py_270_win64

 https://mail.zope.org/pipermail/zope-tests/2012-December/069696.html


 This is due to the release yesterday.

 I can and will fix this, by providing a test extra, but this will only
 cause no tests to run.  The fix may be needed for test of third-party
 packages that depend on ZODB3 [test].

 The winbot needs to be modified to run the tests for persistent,
 BTrees, ZODB and ZEO separately.


 I think the winbot does the right job.
 Those tests are running against

 svn://svn.zope.org/repos/main/ZODB/trunk

 Now the tests pass as you added [test] back:

Ah, there was a bug in the buildout config, which I just fixed.
There's no way that ZODB should be depending on ZODB3,
even in the buildout.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope-tests - FAILED: 6, OK: 17

2012-12-02 Thread Jim Fulton
On Sat, Dec 1, 2012 at 8:00 PM, Zope tests summarizer nore...@zope.org wrote:

...

 [1]FAILED  winbot / ZODB_dev py_265_win32
https://mail.zope.org/pipermail/zope-tests/2012-December/069693.html


 [2]FAILED  winbot / ZODB_dev py_265_win64
https://mail.zope.org/pipermail/zope-tests/2012-December/069694.html


 [3]FAILED  winbot / ZODB_dev py_270_win32
https://mail.zope.org/pipermail/zope-tests/2012-December/069695.html


 [4]FAILED  winbot / ZODB_dev py_270_win64
https://mail.zope.org/pipermail/zope-tests/2012-December/069696.html

This is due to the release yesterday.

I can and will fix this, by providing a test extra, but this will only
cause no tests to run.  The fix may be needed for test of third-party
packages that depend on ZODB3 [test].

The winbot needs to be modified to run the tests for persistent,
BTrees, ZODB and ZEO separately.


 [5]FAILED  winbot / zc.lockfile_py_265_32
https://mail.zope.org/pipermail/zope-tests/2012-December/069675.html

I'll look at this today.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope-tests - FAILED: 6, OK: 17

2012-12-02 Thread Jim Fulton
On Sun, Dec 2, 2012 at 11:32 AM, Tres Seaver tsea...@palladion.com wrote:
...
 If ZODB3 no longer has tests (as a pure meta-package), then dropping the
 'test' dependency and changing the buldout.cfg accordingly seems correct.
  If you want to allow thrid-party pacakges to use the '[test]' extra, you
 could have it depend on the corresponding extras (if any) for the
 underlying real packages.

Yup, in the long run, bit in the short run, I don't want to break packages that
depend on ZODB3 [test]. I released a2 which ads back this extra.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-Checkins] SVN: zdaemon/trunk/ Fixed: the status command didn't return a non-zero exit status when

2012-11-27 Thread jim
Log message for revision 128449:
  Fixed: the status command didn't return a non-zero exit status when
  the program wasn't running. This made it impossible for other
  software (e.g. Puppet) to tell if a process was running.
  
  

Changed:
  U   zdaemon/trunk/CHANGES.txt
  U   zdaemon/trunk/src/zdaemon/README.txt
  U   zdaemon/trunk/src/zdaemon/tests/tests.py
  U   zdaemon/trunk/src/zdaemon/zdctl.py

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2012-11-27 18:10:32 UTC (rev 128448)
+++ zdaemon/trunk/CHANGES.txt   2012-11-27 22:37:20 UTC (rev 128449)
@@ -2,6 +2,13 @@
 Change log
 ==
 
+3.0.5 (2012-11-27)
+==
+
+- Fixed: the status command didn't return a non-zero exit status when
+  the program wasn't running. This made it impossible for other
+  software (e.g. Puppet) to tell if a process was running.
+
 3.0.4 (2012-07-30)
 ==
 

Modified: zdaemon/trunk/src/zdaemon/README.txt
===
--- zdaemon/trunk/src/zdaemon/README.txt2012-11-27 18:10:32 UTC (rev 
128448)
+++ zdaemon/trunk/src/zdaemon/README.txt2012-11-27 22:37:20 UTC (rev 
128449)
@@ -72,6 +72,7 @@
 
 sh ./zdaemon -p 'sleep 100' status
 daemon manager not running
+Failed: 3
 
 Normally, we control zdaemon using a configuration file.  Let's create
 a typical configuration file::

Modified: zdaemon/trunk/src/zdaemon/tests/tests.py
===
--- zdaemon/trunk/src/zdaemon/tests/tests.py2012-11-27 18:10:32 UTC (rev 
128448)
+++ zdaemon/trunk/src/zdaemon/tests/tests.py2012-11-27 22:37:20 UTC (rev 
128449)
@@ -143,6 +143,7 @@
 
  system(./zdaemon -Cconf status)
 daemon manager not running
+Failed: 3
 
 
 

Modified: zdaemon/trunk/src/zdaemon/zdctl.py
===
--- zdaemon/trunk/src/zdaemon/zdctl.py  2012-11-27 18:10:32 UTC (rev 128448)
+++ zdaemon/trunk/src/zdaemon/zdctl.py  2012-11-27 22:37:20 UTC (rev 128449)
@@ -420,18 +420,21 @@
 print wait -- Wait for the daemon process to exit.
 
 def do_status(self, arg=):
+status = 0
 if arg not in [, -l]:
 print status argument must be absent or -l
-return
+return 1
 self.get_status()
 if not self.zd_up:
 print daemon manager not running
+status = 3
 elif not self.zd_pid:
 print daemon manager running; daemon process not running
 else:
 print program running; pid=%d % self.zd_pid
 if arg == -l and self.zd_status:
 print self.zd_status
+return status
 
 def help_status(self):
 print status [-l] -- Print status for the daemon process.

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.5/ tag

2012-11-27 Thread jim
Log message for revision 128450:
  tag

Changed:
  A   zdaemon/tags/3.0.5/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.5/setup.py version

2012-11-27 Thread jim
Log message for revision 128451:
  version
  

Changed:
  U   zdaemon/tags/3.0.5/setup.py

-=-
Modified: zdaemon/tags/3.0.5/setup.py
===
--- zdaemon/tags/3.0.5/setup.py 2012-11-27 22:37:58 UTC (rev 128450)
+++ zdaemon/tags/3.0.5/setup.py 2012-11-27 22:38:29 UTC (rev 128451)
@@ -12,7 +12,7 @@
 #
 ##
 
-version = '0.0.0'
+version = '3.0.5'
 
 import os
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


Re: [Zope-dev] WebSockets API

2012-11-27 Thread Jim Fulton
On Tue, Nov 27, 2012 at 3:04 AM, Wolfgang Schnerring w...@gocept.com wrote:
...
 I'm not too familiar with WebSocket internals, but one thing that stuck
 with me is that you'll need to keep *lots* of open connections, which is
 only feasible with an eventloop-based server (which zope.server, for
 one, isn't).

Actually, it is. zope.server is based on asyncore.

Having said that, my impression is that web sockets is largely (or completely)
orthogonal to WSGI and the HTTP-based publishing infrastructure.

ZTK is only relevant to the extent that it's a bag of useful libraries
maintained
by the Zope community.

Jim


-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope-tests - FAILED: 1, OK: 21

2012-11-21 Thread Jim Fulton
On Wed, Nov 21, 2012 at 8:56 AM, Patrick Gerken do3cc...@googlemail.com wrote:



 On Wed, Nov 21, 2012 at 2:00 AM, Zope tests summarizer nore...@zope.org
 wrote:

 This is the summary for test reports received on the
 zope-tests list between 2012-11-19 00:00:00 UTC and 2012-11-20 00:00:00
 UTC:

 See the footnotes for test reports of unsuccessful builds.

 An up-to date view of the builders is also available in our
 buildbot documentation:
 http://docs.zope.org/zopetoolkit/process/buildbots.html#the-nightly-builds

 Reports received
 

Successful - zopetoolkit_trunk - Build # 82
Successful - zopetoolkit_trunk_app - Build # 66
Zope-2.10 Python-2.4.6 : Linux
Zope-2.11 Python-2.4.6 : Linux
Zope-2.12 Python-2.6.8 : Linux
Zope-2.13 Python-2.6.8 : Linux
Zope-2.13 Python-2.7.3 : Linux
Zope-trunk Python-2.6.8 : Linux
Zope-trunk Python-2.7.3 : Linux
winbot / ZODB_dev py_265_win32
winbot / ZODB_dev py_265_win64
winbot / ZODB_dev py_270_win32
winbot / ZODB_dev py_270_win64
 [1]winbot / zc.lockfile_py_265_32
winbot / ztk_10 py_254_win32
winbot / ztk_10 py_265_win32
winbot / ztk_10 py_265_win64
winbot / ztk_11 py_254_win32
winbot / ztk_11 py_265_win32
winbot / ztk_11 py_265_win64
winbot / ztk_11 py_270_win32
winbot / ztk_11 py_270_win64

 Non-OK results
 --

 [1]FAILED  winbot / zc.lockfile_py_265_32

 https://mail.zope.org/pipermail/zope-tests/2012-November/069449.html


 Some problem with mandatory file locking on windows. Could be a transient
 error. Else somebody might need to get into action on winbot.

This is my fault.  I updated zc.lockfile to fix a bug and didn't check
it on windows.

I'll look at this.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zope-tests - FAILED: 19, OK: 19

2012-09-04 Thread Jim Fulton
On Tue, Sep 4, 2012 at 9:50 AM, Adam GROSZER agroszer...@gmail.com wrote:
 On 09/04/2012 03:43 PM, Tres Seaver wrote:

 Who are the developers responsible for maintining the z3c.* packages?
 These failures have been running too long.


 I'll get to them, I'm just a bit busy.



 Alex, Jim, you guys have moved zc.buildout out of our normal workflow.  I
 think that makes this set of test failures your respondibility.


 I can stop the winbot sending those mails or send them to anywhere/anyone
 you want.

For now, you can send them to me.  We have a travis-ci setup, but I think that's
only for buildout2 atm.

 I personally would care about zc.buildout tests/failures, because it's sorta
 basic ZTK/zope infrastructure.

Yup.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] [announce] NEO 1.0 - scalable and redundant storage for ZODB

2012-08-29 Thread Jim Fulton
On Wed, Aug 29, 2012 at 2:29 AM, Marius Gedminas mar...@gedmin.as wrote:
 On Tue, Aug 28, 2012 at 06:31:05PM +0200, Vincent Pelletier wrote:
 On Tue, 28 Aug 2012 16:31:20 +0200,
 Martijn Pieters m...@zopatista.com wrote :
  Anything else different? Did you make any performance comparisons
  between RelStorage and NEO?

 I believe the main difference compared to all other ZODB Storage
 implementation is the finer-grained locking scheme: in all storage
 implementations I know, there is a database-level lock during the
 entire second phase of 2PC, whereas in NEO transactions are serialised
 only when they alter a common set of objects.

 This could be a compelling point.  I've seen deadlocks in an app that
 tried to use both ZEO and PostgreSQL via the Storm ORM.  (The thread
 holding the ZEO commit lock was blocked waiting for the PostgreSQL
 commit to finish, while the PostgreSQL server was waiting for some other
 transaction to either commit or abort -- and that other transaction
 couldn't proceed because it was waiting for the ZEO lock.)

This sounds like an application/transaction configuration problem.
To avoid this sort of deadlock, you need to always commit in a
a consistent order.  You also need to configure ZEO (or NEO)
to time-out transactions that take too long to finish the second phase.

I don't think NEO's locking strategy mitigates the deadlock problem
much, if at all.

The strategy should provide greater transaction throughput and
reduce latency.  It's a strategy I'd like to implement for ZEO at some
point.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [ZODB-Dev] [announce] NEO 1.0 - scalable and redundant storage for ZODB

2012-08-29 Thread Jim Fulton
On Tue, Aug 28, 2012 at 12:31 PM, Vincent Pelletier vinc...@nexedi.com wrote:
...
 I forgot in the original mail to mention that NEO does all conflict
 resolutions on client side rather than server side. The same happens in
 relStorage, but this is different from ZEO.

That's good.  I'd like to move ZEO in this direction.  I'd also
like to stop hanging conflict-resolution on classes and have
some kind of registry, so that people can set CR policies
independent of class implementation.

I didn't realize that relstorage did client side CR, but thinking
about it, it has to work that way, since there's no relstorage
server.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] We need to change how code ownership works.

2012-08-20 Thread Jim Fulton
On Sun, Aug 19, 2012 at 7:01 AM, Lennart Regebro rege...@gmail.com wrote:
 On Sun, Aug 19, 2012 at 10:30 AM, Jens Vagelpohl j...@dataflake.org wrote:

 On Aug 19, 2012, at 10:17 , Lennart Regebro rege...@gmail.com wrote:

 And since it becomes ever easier to accept code from unknown sources (e.g. 
 pull requests) legal code ownership becomes an issue again.

 And that returns me to my first question: Is it really legally
 different for a contributor to accept a pull request from a
 non-contributor compared with a contributor merging a patch from a
 non-contributor?

 Legally, both are disallowed unless there's some proof (written statement 
 etc) from the code author that he assigns ownership of the patch or the 
 contents of that pull request to the contributor who is doing the checkin.

 In the past we haven't done a good job of enforcing this clear ownership 
 assignment chain. There are always code patches from non-contributors in the 
 bug tracker that may make it into the code base with the help of a 
 contributor. There's a grey area: Is the act of submitting a patch into the 
 Zope bug tracker enough to signal I am giving you ownership of this code? 
 I am not sure.

 GitHub makes this pulling in of outside code even easier. I'm afraid it 
 will become even harder to really maintain this chain of custody.

 This is then, IMO a problem that we should fix. What you are in fact
 saying is that the current system are violating people's copyright
 everytime we merge a non-contributors patch. It is unfeasible to not
 merge peoples patches, and I think it is also a big problem that the
 way the ownership of the code works now inhibits the increased
 simplicity of making and merging fixes for non-core contributors.

 In other words, we have had an ownership situation which is terrible,
 and nobody seems to have realized this until now. Well, now we know.

 As such, the discussion must now shift from don't do this to how do
 we do this. Poeple want to contribute and we should not say don't do
 that, we have to figure out *how* to make it possible to do that, and
 pretty pronto as well.

IANAL and I'm not even very interested in this discussion, however, I
thought I should point out how the pylons project handles this.
(Apologies, of someone beat me to it and I didn't see it) I think
their solution is rather ingenious.

IIUC, their repositories have CONTRIBUTORS.txt files:

  https://github.com/Pylons/pyramid/blob/master/CONTRIBUTORS.txt

Committing your name to this file constitutes signing the
contributor's agreement.

A pull request from a new contributor would presumably have to contain
an update to this file.

Because pull requests are not just patches but retain commit history,
there is a record that a person with a github (or bitbucket, my
current preference) account made the update.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] We need to change how code ownership works.

2012-08-20 Thread Jim Fulton
On Mon, Aug 20, 2012 at 6:39 AM, Charlie Clark
charlie.cl...@clark-consulting.eu wrote:
...
 Again, as Jens has repeatedly said we should not conflate the separate items
 of toolchain and service provider.

+1

 Zope Foundation has hardware and a proven
 track record in hosting. Is anyone actually criticising this?

FTR, in the case of svn.zope.org, it's ZC hardware and hosting with a
lot of much appreciated help from Jens.

We're doing a pretty ok job (if you ignore a near catastrophe) in
providing what is, by today's standards, a bare-bones service.  User
management is awkward.  We lack any automated support for review, and
a number of other services provides by github and bitbucket.

svn.zope.org doesn't take much of my time most of the time, but it's
still a potential (and occasional real) time suck for me that I'd
love to jettison.

Life is short, why do this ourselves when there are excellent services
available?

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] zc.buildout in github foul

2012-08-20 Thread Jim Fulton
On Mon, Aug 20, 2012 at 11:48 AM, Jim Fulton j...@zope.com wrote:
...
 I also committed a foul by unilaterally moving buildout development to
 github. This was originally just a fork for buildout 2, but helpers wanted
 to move 1 development there too and, well ... helpers. :)
 Anyway, the move of buildout to github wasn't a secret.

My foul was even greater than I thought.  I didn't change the license
(and don't particularly want to except...) and yet I carelessly let a
non-zope-contributor become a buildout developer.

   https://github.com/buildout

Honestly, I wasn't even thinking in these terms and should have been.

I probably should have truly forked buildout if I wanted to be free
from the restriction of having only zope contributors. Maybe I still
should.  buildout probably shouldn't have been in the zope repo to
begin with.

It so happens that the one non-zope-contributor is planning to become a
zope contributor, we'll soon be in the state that all of the buildout
developers are contributors again.

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-Checkins] SVN: zdaemon/trunk/ Fixed: The start command exited with a zero exit status even when

2012-07-30 Thread jim
Log message for revision 127404:
  Fixed: The start command exited with a zero exit status even when
  the program being started failed to start (or exited imediately).
  

Changed:
  U   zdaemon/trunk/CHANGES.txt
  U   zdaemon/trunk/src/zdaemon/tests/tests.py
  U   zdaemon/trunk/src/zdaemon/tests/testuser.py
  U   zdaemon/trunk/src/zdaemon/zdctl.py

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2012-07-30 13:59:51 UTC (rev 127403)
+++ zdaemon/trunk/CHANGES.txt   2012-07-30 17:47:14 UTC (rev 127404)
@@ -2,6 +2,12 @@
 Change log
 ==
 
+3.0.4 (2012-07-30)
+==
+
+- Fixed: The start command exited with a zero exit status even when
+  the program being started failed to start (or exited imediately).
+
 3.0.3 (2012-07-10)
 ==
 

Modified: zdaemon/trunk/src/zdaemon/tests/tests.py
===
--- zdaemon/trunk/src/zdaemon/tests/tests.py2012-07-30 13:59:51 UTC (rev 
127403)
+++ zdaemon/trunk/src/zdaemon/tests/tests.py2012-07-30 17:47:14 UTC (rev 
127404)
@@ -78,6 +78,7 @@
  system(./zdaemon -Cconf start)
 . .
 daemon manager not running
+Failed: 1
 
 
 
@@ -267,7 +268,49 @@
 True
 
 
+def nonzeo_exit_on_program_failure():
+
+ write('conf',
+... '''
+... runner
+...   backoff-limit 1
+...   program nosuch
+... /runner
+... ''')
 
+ system(./zdaemon -Cconf start, echo=True) # doctest: +ELLIPSIS
+./zdaemon...
+daemon manager not running
+Failed: 1
+
+ write('conf',
+... '''
+... runner
+...   backoff-limit 1
+...   program cat nosuch
+... /runner
+... ''')
+
+ system(./zdaemon -Cconf start, echo=True) # doctest: +ELLIPSIS
+./zdaemon...
+daemon manager not running
+Failed: 1
+
+ write('conf',
+... '''
+... runner
+...   backoff-limit 1
+...   program pwd
+... /runner
+... ''')
+
+ system(./zdaemon -Cconf start, echo=True) # doctest: +ELLIPSIS
+./zdaemon...
+daemon manager not running
+Failed: 1
+
+
+
 def setUp(test):
 test.globs['_td'] = td = []
 here = os.getcwd()
@@ -292,7 +335,9 @@
 for f in test.globs['_td']:
 f()
 
-def system(command, input='', quiet=False):
+def system(command, input='', quiet=False, echo=False):
+if echo:
+print command
 p = subprocess.Popen(
 command, shell=True,
 stdin=subprocess.PIPE,

Modified: zdaemon/trunk/src/zdaemon/tests/testuser.py
===
--- zdaemon/trunk/src/zdaemon/tests/testuser.py 2012-07-30 13:59:51 UTC (rev 
127403)
+++ zdaemon/trunk/src/zdaemon/tests/testuser.py 2012-07-30 17:47:14 UTC (rev 
127404)
@@ -83,7 +83,8 @@
 ...   O(gr_gid=7, gr_mem =['h', ]),
 ... ]
 
- zdaemon.zdctl.main(['-C', 'conf', 'status'])
+ with mock.patch('sys.exit'):
+... zdaemon.zdctl.main(['-C', 'conf', 'status'])
 daemon manager not running
 
  import pwd, os
@@ -108,6 +109,7 @@
 ... ''')
 
  with mock.patch('os.geteuid') as geteuid:
+...   with mock.patch('sys.exit'):
 ... geteuid.return_value = 99
 ... zdaemon.zdctl.main(['-C', 'conf', 'status'])
 ... os.geteuid.assert_called_with()

Modified: zdaemon/trunk/src/zdaemon/zdctl.py
===
--- zdaemon/trunk/src/zdaemon/zdctl.py  2012-07-30 13:59:51 UTC (rev 127403)
+++ zdaemon/trunk/src/zdaemon/zdctl.py  2012-07-30 17:47:14 UTC (rev 127404)
@@ -267,7 +267,7 @@
 was_running = True
 elif (was_running or n  10) and not cond(n):
 print \ndaemon manager not running
-return
+return 1
 
 except KeyboardInterrupt:
 print ^C
@@ -318,9 +318,8 @@
 print daemon process already running; pid=%d % self.zd_pid
 return
 if self.options.daemon:
-self.awhile(self._start_cond,
-daemon process started, pid=%(zd_pid)d,
-)
+return self.awhile(
+self._start_cond, daemon process started, pid=%(zd_pid)d)
 
 def _get_override(self, opt, name, svalue=None, flag=0):
 value = getattr(self.options, name)
@@ -611,7 +610,7 @@
 options = ZDCtlOptions()
 options.realize(args)
 c = cmdclass(options)
-c.onecmd( .join(options.args))
+sys.exit(c.onecmd( .join(options.args)))
 
 if __name__ == __main__:
 main()

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.4/ tag

2012-07-30 Thread jim
Log message for revision 127405:
  tag

Changed:
  A   zdaemon/tags/3.0.4/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.4/setup.py *** empty log message ***

2012-07-30 Thread jim
Log message for revision 127406:
  *** empty log message ***

Changed:
  U   zdaemon/tags/3.0.4/setup.py

-=-
Modified: zdaemon/tags/3.0.4/setup.py
===
--- zdaemon/tags/3.0.4/setup.py 2012-07-30 17:48:04 UTC (rev 127405)
+++ zdaemon/tags/3.0.4/setup.py 2012-07-30 17:48:55 UTC (rev 127406)
@@ -12,7 +12,7 @@
 #
 ##
 
-version = '0.0.0'
+version = '3.0.4'
 
 import os
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/CHANGES.txt *** empty log message ***

2012-07-10 Thread jim
Log message for revision 127306:
  *** empty log message ***

Changed:
  U   zdaemon/trunk/CHANGES.txt

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2012-07-10 15:48:33 UTC (rev 127305)
+++ zdaemon/trunk/CHANGES.txt   2012-07-10 16:44:47 UTC (rev 127306)
@@ -2,6 +2,12 @@
 Change log
 ==
 
+3.0.2 (2012-07-10)
+==
+
+- Fixed: programs started with zdaemon couldn't, themselves, invoke
+  zdaemon.
+
 3.0.1 (2012-06-08)
 ==
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.2/ tag

2012-07-10 Thread jim
Log message for revision 127307:
  tag

Changed:
  A   zdaemon/tags/3.0.2/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.2/setup.py version

2012-07-10 Thread jim
Log message for revision 127308:
  version
  

Changed:
  U   zdaemon/tags/3.0.2/setup.py

-=-
Modified: zdaemon/tags/3.0.2/setup.py
===
--- zdaemon/tags/3.0.2/setup.py 2012-07-10 16:45:20 UTC (rev 127307)
+++ zdaemon/tags/3.0.2/setup.py 2012-07-10 16:46:05 UTC (rev 127308)
@@ -12,7 +12,7 @@
 #
 ##
 
-version = '0.0.0'
+version = '3.0.2'
 
 import os
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/ - Fixed: programs started with zdaemon couldn't, themselves, invoke

2012-07-10 Thread jim
Log message for revision 127309:
  - Fixed: programs started with zdaemon couldn't, themselves, invoke
zdaemon.
  
  really
  

Changed:
  U   zdaemon/trunk/CHANGES.txt
  U   zdaemon/trunk/src/zdaemon/tests/tests.py
  U   zdaemon/trunk/src/zdaemon/zdctl.py

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2012-07-10 16:46:05 UTC (rev 127308)
+++ zdaemon/trunk/CHANGES.txt   2012-07-10 18:05:19 UTC (rev 127309)
@@ -2,12 +2,17 @@
 Change log
 ==
 
-3.0.2 (2012-07-10)
+3.0.3 (2012-07-10)
 ==
 
 - Fixed: programs started with zdaemon couldn't, themselves, invoke
   zdaemon.
 
+3.0.2 (2012-07-10)
+==
+
+Fail :(
+
 3.0.1 (2012-06-08)
 ==
 

Modified: zdaemon/trunk/src/zdaemon/tests/tests.py
===
--- zdaemon/trunk/src/zdaemon/tests/tests.py2012-07-10 16:46:05 UTC (rev 
127308)
+++ zdaemon/trunk/src/zdaemon/tests/tests.py2012-07-10 18:05:19 UTC (rev 
127309)
@@ -42,6 +42,10 @@
 with open(name, 'w') as f:
 f.write(text)
 
+def read(name):
+with open(name) as f:
+return f.read()
+
 def make_sure_non_daemon_mode_doesnt_hang_when_program_exits():
 
 The whole awhile bit that waits for a program to start
@@ -243,6 +247,27 @@
 daemon process stopped
 
 
+def DAEMON_MANAGER_MODE_leak():
+
+Zdaemon used an environment variable to flag that it's running in
+daemon-manager mode, as opposed to UI mode.  If this environment
+variable is allowed to leak to the program, them the program will
+be unable to invoke zdaemon correctly.
+
+ write('c', '''
+... runner
+...   program env
+...   transcript t
+... /runner
+... ''')
+
+ system('./zdaemon -b0 -T1 -Cc start', quiet=True)
+Failed: 1
+ 'DAEMON_MANAGER_MODE' not in read('t')
+True
+
+
+
 def setUp(test):
 test.globs['_td'] = td = []
 here = os.getcwd()

Modified: zdaemon/trunk/src/zdaemon/zdctl.py
===
--- zdaemon/trunk/src/zdaemon/zdctl.py  2012-07-10 16:46:05 UTC (rev 127308)
+++ zdaemon/trunk/src/zdaemon/zdctl.py  2012-07-10 18:05:19 UTC (rev 127309)
@@ -603,6 +603,7 @@
 args = sys.argv[1:]
 
 if os.environ.get('DAEMON_MANAGER_MODE'):
+del os.environ['DAEMON_MANAGER_MODE']
 import zdaemon.zdrun
 return zdaemon.zdrun.main(args)
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.3/ tag

2012-07-10 Thread jim
Log message for revision 127310:
  tag

Changed:
  A   zdaemon/tags/3.0.3/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.3/setup.py version

2012-07-10 Thread jim
Log message for revision 127311:
  version
  

Changed:
  U   zdaemon/tags/3.0.3/setup.py

-=-
Modified: zdaemon/tags/3.0.3/setup.py
===
--- zdaemon/tags/3.0.3/setup.py 2012-07-10 18:14:18 UTC (rev 127310)
+++ zdaemon/tags/3.0.3/setup.py 2012-07-10 18:15:07 UTC (rev 127311)
@@ -12,7 +12,7 @@
 #
 ##
 
-version = '0.0.0'
+version = '3.0.3'
 
 import os
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


Re: [Zope-dev] zope-tests - FAILED: 7, OK: 38

2012-06-25 Thread Jim Fulton
On Sun, Jun 24, 2012 at 10:27 PM, Tres Seaver tsea...@palladion.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 06/24/2012 09:00 PM, Zope tests summarizer wrote:
 [1]    FAILED  Repository policy check found errors in 273 projects
 https://mail.zope.org/pipermail/zope-tests/2012-June/064767.html

 I think I got nearly all the ZTK pacakge branches finally clean here:
 the exceptions are

 - - zope.app.twisted pulls in TwistedCore 2.0.5 as an external from the
  twisted SVN server

 - - zope.html includes non-ZPL code (the ckeditor code).

 I think it would be preferable to replace the svn:externals bit in
 zope.app.twisted with a download of an eg::  however, twiseted 2.0.5
 fails to install cleanly under setuptools / buildout, which likely means
 a custom recipe. :(  As for the ckeditor bits:  they may actually be in
 violation of our policy for checking in code not owned by the
 contributor. :(  Can somebody who uses / depends on zope.html comment?
 Maybe we wuold be better off pulling in the code from a CDN?

My recollection is that zope.app.twisted included Twisted because, at the
time, Twisted wasn't installable by setuptools.  This changed a long time
ago. zope.app.twisted should just stop trying to include Twisted.  In the
unlikely event that it doesn't work with current versions of Twisted, it should
simply be fixed or removed from the ZTK.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] ssh access to svn.zope.org not working

2012-06-25 Thread Jim Fulton
On Mon, Jun 25, 2012 at 7:50 AM, Maurits van Rees
m.van.r...@zestsoftware.nl wrote:
 Hi,

 I can access svn.zope.org over normal http just fine, but svn+ssh does not
 work for me today. This has worked fine until last week.

 $ svn ls svn+ssh://svn.zope.org/repos/main/zopetoolkit/doc
 svn: E170001: Unable to connect to a repository at URL
 'svn+ssh://svn.zope.org/repos/main/zopetoolkit/doc'
 svn: E170001: Could not create SASL context: generic failure: No such file
 or directory

 That is with subversion 1.7.  I tried 1.6 too, but this just says svn:
 generic failure.

 This is with the ssh key that I use for userid mauritsvanrees.  I did not
 change anything in my setup recently that I remember.

 Anyone else having problems with this?

Works fine for me:

jim@sb14:~$ svn ls svn+ssh://svn.zope.org/repos/main/zopetoolkit/doc
Makefile
bootstrap.py
buildout.cfg
scripts/
source/
src/

jim@sb14:~$ svn --version
svn, version 1.6.6 (r40053)
   compiled Jun  5 2011, 14:51:47

...

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-Checkins] SVN: zdaemon/trunk/CHANGES.txt tweaks

2012-06-08 Thread jim
Log message for revision 126689:
  tweaks
  

Changed:
  U   zdaemon/trunk/CHANGES.txt

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2012-06-08 13:50:52 UTC (rev 126688)
+++ zdaemon/trunk/CHANGES.txt   2012-06-08 13:54:59 UTC (rev 126689)
@@ -1,5 +1,5 @@
 ===
- Changelog
+ Change log
 ===
 
 3.0.0 (unreleased)
@@ -16,13 +16,13 @@
   start. This is especially useful in combination with the
   ``start-test-program`` option.
 
-- Added a separate option, stop-timout, to control how long to wait
+- Added an option, stop-timeout, to control how long to wait
   for a graceful shutdown.
 
   Previously, this was controlled by backoff-limit, which didn't make
   much sense.
 
-- Several undocunented, untested, and presumeably unused features were removed.
+- Several undocumented, untested, and presumably unused features were removed.
 
 2.0.6 (2012-06-07)
 ==
@@ -61,7 +61,7 @@
 Bugs Fixed
 --
 
-- No longer uses a hardcoded filename (/tmp/demo.zdsock) in unit tests.
+- No longer uses a hard-coded file name (/tmp/demo.zdsock) in unit tests.
   This lets you run the tests on Python 2.4 and 2.5 simultaneously without
   spurious errors.
 
@@ -132,7 +132,7 @@
 - In non-daemon mode, start hung, producing annoying dots
   when the program exited.
 
-- The start command hung producing annoying dots if the deamon failed
+- The start command hung producing annoying dots if the daemon failed
   to start.
 
 - foreground and start had different semantics because one used
@@ -149,10 +149,10 @@
 - zdctl now invokes itself to run zdrun.  This means that it's
   no-longer necessary to generate a separate zdrun script.  This
   especially when the magic techniques to find and run zdrun using
-  directory sniffing fail to set the path corrrectly.
+  directory sniffing fail to set the path correctly.
 
-- The daemon mode is now enabled by default.  To get non-deamon mode,
-  you have to use a configuration file and set deamon to off
+- The daemon mode is now enabled by default.  To get non-daemon mode,
+  you have to use a configuration file and set daemon to off
   there. The old -d option is kept for backward compatibility, but is
   a no-op.
 
@@ -183,7 +183,7 @@
has a path so long that the test socket can't be created.
 
  o Changed management of 'donothing.sh'.  This script is now created by
-   the test in the temporarary directory with the necessary
+   the test in the temporarily directory with the necessary
permissions. This is to avoids possible mangling of permissions
leading to spurious test failures.  It also avoids management of a
file in the source tree, which is a bonus.

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.0/ tag

2012-06-08 Thread jim
Log message for revision 126690:
  tag

Changed:
  A   zdaemon/tags/3.0.0/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.0/setup.py Version.

2012-06-08 Thread jim
Log message for revision 126691:
  Version.
  

Changed:
  U   zdaemon/tags/3.0.0/setup.py

-=-
Modified: zdaemon/tags/3.0.0/setup.py
===
--- zdaemon/tags/3.0.0/setup.py 2012-06-08 13:59:00 UTC (rev 126690)
+++ zdaemon/tags/3.0.0/setup.py 2012-06-08 13:59:49 UTC (rev 126691)
@@ -39,7 +39,7 @@
 name = zdaemon
 setup(
 name=name,
-version = '2.0.5dev',
+version = '3.0.0',
 url=http://www.python.org/pypi/zdaemon;,
 license=ZPL 2.1,
 description=

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/setup.py Version.

2012-06-08 Thread jim
Log message for revision 126692:
  Version.
  

Changed:
  U   zdaemon/trunk/setup.py

-=-
Modified: zdaemon/trunk/setup.py
===
--- zdaemon/trunk/setup.py  2012-06-08 13:59:49 UTC (rev 126691)
+++ zdaemon/trunk/setup.py  2012-06-08 14:00:27 UTC (rev 126692)
@@ -12,6 +12,8 @@
 #
 ##
 
+version = '0.0.0'
+
 import os
 
 entry_points = 
@@ -39,7 +41,7 @@
 name = zdaemon
 setup(
 name=name,
-version = '2.0.5dev',
+version = version,
 url=http://www.python.org/pypi/zdaemon;,
 license=ZPL 2.1,
 description=

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/2.0.7/ tag

2012-06-08 Thread jim
Log message for revision 126693:
  tag

Changed:
  A   zdaemon/tags/2.0.7/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/2.0.7/ oops

2012-06-08 Thread jim
Log message for revision 126694:
  oops

Changed:
  D   zdaemon/tags/2.0.7/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/branches/2/setup.py version

2012-06-08 Thread jim
Log message for revision 126695:
  version
  

Changed:
  U   zdaemon/branches/2/setup.py

-=-
Modified: zdaemon/branches/2/setup.py
===
--- zdaemon/branches/2/setup.py 2012-06-08 17:17:10 UTC (rev 126694)
+++ zdaemon/branches/2/setup.py 2012-06-08 17:19:06 UTC (rev 126695)
@@ -12,6 +12,8 @@
 #
 ##
 
+version = '0.0.0'
+
 import os
 
 entry_points = 
@@ -38,7 +40,7 @@
 name = zdaemon
 setup(
 name=name,
-version = '2.0.4',
+version = version,
 url=http://www.python.org/pypi/zdaemon;,
 license=ZPL 2.1,
 description=

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/branches/2/ Fixed:

2012-06-08 Thread jim
Log message for revision 126696:
  Fixed:
  
  The change in 2.0.6 to set a user's supplemental groups broke common
  configurations in which the effective user was set via ``su`` or
  ``sudo -u`` prior to invoking zdaemon.
  
  Now, zdaemon doesn't set groups or the effective user if the
  effective user is already set to the configured user.
  

Changed:
  U   zdaemon/branches/2/CHANGES.txt
  U   zdaemon/branches/2/src/zdaemon/tests/testuser.py
  U   zdaemon/branches/2/src/zdaemon/zdctl.py
  U   zdaemon/branches/2/src/zdaemon/zdoptions.py

-=-
Modified: zdaemon/branches/2/CHANGES.txt
===
--- zdaemon/branches/2/CHANGES.txt  2012-06-08 17:19:06 UTC (rev 126695)
+++ zdaemon/branches/2/CHANGES.txt  2012-06-08 17:19:44 UTC (rev 126696)
@@ -2,6 +2,18 @@
  Changelog
 ===
 
+2.0.7 (2012-06-08)
+==
+
+- Fixed:
+
+  The change in 2.0.6 to set a user's supplemental groups broke common
+  configurations in which the effective user was set via ``su`` or
+  ``sudo -u`` prior to invoking zdaemon.
+
+  Now, zdaemon doesn't set groups or the effective user if the
+  effective user is already set to the configured user.
+
 2.0.6 (2012-06-07)
 ==
 

Modified: zdaemon/branches/2/src/zdaemon/tests/testuser.py
===
--- zdaemon/branches/2/src/zdaemon/tests/testuser.py2012-06-08 17:19:06 UTC 
(rev 126695)
+++ zdaemon/branches/2/src/zdaemon/tests/testuser.py2012-06-08 17:19:44 UTC 
(rev 126696)
@@ -96,10 +96,36 @@
 
 
 
+def test_do_nothing_if_effective_user_is_configured_user():
+
+
+ write('conf',
+... '''
+... runner
+...   program sleep 9
+...   user zope
+... /runner
+... ''')
+
+ with mock.patch('os.geteuid') as geteuid:
+... geteuid.return_value = 99
+... zdaemon.zdctl.main(['-C', 'conf', 'status'])
+... os.geteuid.assert_called_with()
+daemon manager not running
+
+ import pwd, os, grp
+ pwd.getpwnam.assert_called_with('zope')
+ _ = grp.getgrall.assert_not_called()
+ _ = os.setuid.assert_not_called()
+ _ = os.setgid.assert_not_called()
+ _ = os.setgroups.assert_not_called()
+
+
+
 def setUp(test):
 setupstack.setUpDirectory(test)
 getpwname = setupstack.context_manager(test, mock.patch('pwd.getpwnam'))
-getpwname.return_value = O(pw_gid=5, pw_uid=99)
+getpwname.return_value = O(pw_gid=5, pw_uid=99, pw_name='zope')
 setupstack.context_manager(test, mock.patch('os.geteuid')).return_value = 0
 setupstack.context_manager(test, mock.patch('grp.getgrall'))
 setupstack.context_manager(test, mock.patch('os.setgroups'))

Modified: zdaemon/branches/2/src/zdaemon/zdctl.py
===
--- zdaemon/branches/2/src/zdaemon/zdctl.py 2012-06-08 17:19:06 UTC (rev 
126695)
+++ zdaemon/branches/2/src/zdaemon/zdctl.py 2012-06-08 17:19:44 UTC (rev 
126696)
@@ -173,15 +173,43 @@
 os.chown(directory, self.options.uid, self.options.gid)
 
 def set_uid(self):
-if self.options.uid is None:
+user = self.options.user
+if user is None:
 return
-uid = os.geteuid()
-if uid != 0 and uid != self.options.uid:
-self.options.usage(only root can use -u USER to change users)
-os.setgid(self.options.gid)
-os.setgroups(self.options.groups)
-os.setuid(self.options.uid)
 
+import pwd
+try:
+uid = int(user)
+except ValueError:
+try:
+pwrec = pwd.getpwnam(user)
+except KeyError:
+self.options.usage(username %r not found % user)
+uid = pwrec.pw_uid
+else:
+try:
+pwrec = pwd.getpwuid(uid)
+except KeyError:
+self.options.usage(uid %r not found % user)
+
+# See if we're already that user:
+euid = os.geteuid()
+if euid != 0:
+if euid != uid:
+self.options.usage(only root can use -u USER to change users)
+return
+
+# OK, we have to set user and groups:
+os.setgid(pwrec.pw_gid)
+
+import grp
+user = pwrec.pw_name
+os.setgroups(
+sorted(g.gr_gid for g in grp.getgrall() # sort for tests
+   if user in g.gr_mem)
+)
+os.setuid(uid)
+
 def emptyline(self):
 # We don't want a blank line to repeat the last command.
 # Showing status is a nice alternative.

Modified: zdaemon/branches/2/src/zdaemon/zdoptions.py
===
--- zdaemon/branches/2/src/zdaemon/zdoptions.py 2012-06-08 17:19:06 UTC (rev 
126695)
+++ zdaemon/branches/2/src/zdaemon/zdoptions.py 2012-06-08 17:19:44 UTC (rev 
126696)
@@ -400,31 +400,7 @@
   

[Zope-Checkins] SVN: zdaemon/tags/2.0.7/ tag

2012-06-08 Thread jim
Log message for revision 126697:
  tag

Changed:
  A   zdaemon/tags/2.0.7/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/2.0.7/setup.py version

2012-06-08 Thread jim
Log message for revision 126698:
  version
  

Changed:
  U   zdaemon/tags/2.0.7/setup.py

-=-
Modified: zdaemon/tags/2.0.7/setup.py
===
--- zdaemon/tags/2.0.7/setup.py 2012-06-08 17:20:12 UTC (rev 126697)
+++ zdaemon/tags/2.0.7/setup.py 2012-06-08 17:20:55 UTC (rev 126698)
@@ -12,7 +12,7 @@
 #
 ##
 
-version = '0.0.0'
+version = '2.0.7'
 
 import os
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/ Fixed:

2012-06-08 Thread jim
Log message for revision 126699:
  Fixed:
  
  The change in 2.0.6 to set a user's supplemental groups broke common
  configurations in which the effective user was set via ``su`` or
  ``sudo -u`` prior to invoking zdaemon.
  
  Now, zdaemon doesn't set groups or the effective user if the
  effective user is already set to the configured user.
  

Changed:
  U   zdaemon/trunk/CHANGES.txt
  U   zdaemon/trunk/src/zdaemon/tests/testuser.py
  U   zdaemon/trunk/src/zdaemon/zdctl.py
  U   zdaemon/trunk/src/zdaemon/zdoptions.py

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2012-06-08 17:20:55 UTC (rev 126698)
+++ zdaemon/trunk/CHANGES.txt   2012-06-08 17:52:02 UTC (rev 126699)
@@ -1,10 +1,22 @@
-===
- Change log
-===
+==
+Change log
+==
 
-3.0.0 (unreleased)
+3.0.1 (2012-06-08)
 ==
 
+- Fixed:
+
+  The change in 2.0.6 to set a user's supplemental groups broke common
+  configurations in which the effective user was set via ``su`` or
+  ``sudo -u`` prior to invoking zdaemon.
+
+  Now, zdaemon doesn't set groups or the effective user if the
+  effective user is already set to the configured user.
+
+3.0.0 (2012-06-08)
+==
+
 - Added an option, ``start-test-program`` to supply a test command to
   test whether the program managed by zdaemon is up and operational,
   rather than just running.  When starting a program, the start

Modified: zdaemon/trunk/src/zdaemon/tests/testuser.py
===
--- zdaemon/trunk/src/zdaemon/tests/testuser.py 2012-06-08 17:20:55 UTC (rev 
126698)
+++ zdaemon/trunk/src/zdaemon/tests/testuser.py 2012-06-08 17:52:02 UTC (rev 
126699)
@@ -96,10 +96,36 @@
 
 
 
+def test_do_nothing_if_effective_user_is_configured_user():
+
+
+ write('conf',
+... '''
+... runner
+...   program sleep 9
+...   user zope
+... /runner
+... ''')
+
+ with mock.patch('os.geteuid') as geteuid:
+... geteuid.return_value = 99
+... zdaemon.zdctl.main(['-C', 'conf', 'status'])
+... os.geteuid.assert_called_with()
+daemon manager not running
+
+ import pwd, os, grp
+ pwd.getpwnam.assert_called_with('zope')
+ _ = grp.getgrall.assert_not_called()
+ _ = os.setuid.assert_not_called()
+ _ = os.setgid.assert_not_called()
+ _ = os.setgroups.assert_not_called()
+
+
+
 def setUp(test):
 setupstack.setUpDirectory(test)
 getpwname = setupstack.context_manager(test, mock.patch('pwd.getpwnam'))
-getpwname.return_value = O(pw_gid=5, pw_uid=99)
+getpwname.return_value = O(pw_gid=5, pw_uid=99, pw_name='zope')
 setupstack.context_manager(test, mock.patch('os.geteuid')).return_value = 0
 setupstack.context_manager(test, mock.patch('grp.getgrall'))
 setupstack.context_manager(test, mock.patch('os.setgroups'))

Modified: zdaemon/trunk/src/zdaemon/zdctl.py
===
--- zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-08 17:20:55 UTC (rev 126698)
+++ zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-08 17:52:02 UTC (rev 126699)
@@ -166,15 +166,43 @@
 os.chown(directory, self.options.uid, self.options.gid)
 
 def set_uid(self):
-if self.options.uid is None:
+user = self.options.user
+if user is None:
 return
-uid = os.geteuid()
-if uid != 0 and uid != self.options.uid:
-self.options.usage(only root can use -u USER to change users)
-os.setgid(self.options.gid)
-os.setgroups(self.options.groups)
-os.setuid(self.options.uid)
 
+import pwd
+try:
+uid = int(user)
+except ValueError:
+try:
+pwrec = pwd.getpwnam(user)
+except KeyError:
+self.options.usage(username %r not found % user)
+uid = pwrec.pw_uid
+else:
+try:
+pwrec = pwd.getpwuid(uid)
+except KeyError:
+self.options.usage(uid %r not found % user)
+
+# See if we're already that user:
+euid = os.geteuid()
+if euid != 0:
+if euid != uid:
+self.options.usage(only root can use -u USER to change users)
+return
+
+# OK, we have to set user and groups:
+os.setgid(pwrec.pw_gid)
+
+import grp
+user = pwrec.pw_name
+os.setgroups(
+sorted(g.gr_gid for g in grp.getgrall() # sort for tests
+   if user in g.gr_mem)
+)
+os.setuid(uid)
+
 def emptyline(self):
 # We don't want a blank line to repeat the last command.
 # Showing status is a nice alternative.

Modified: zdaemon/trunk/src/zdaemon/zdoptions.py
===
--- 

[Zope-Checkins] SVN: zdaemon/tags/3.0.1/ tag

2012-06-08 Thread jim
Log message for revision 126700:
  tag

Changed:
  A   zdaemon/tags/3.0.1/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/3.0.1/setup.py version

2012-06-08 Thread jim
Log message for revision 126701:
  version
  

Changed:
  U   zdaemon/tags/3.0.1/setup.py

-=-
Modified: zdaemon/tags/3.0.1/setup.py
===
--- zdaemon/tags/3.0.1/setup.py 2012-06-08 17:55:58 UTC (rev 126700)
+++ zdaemon/tags/3.0.1/setup.py 2012-06-08 17:56:42 UTC (rev 126701)
@@ -12,7 +12,7 @@
 #
 ##
 
-version = '0.0.0'
+version = '3.0.1'
 
 import os
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/2.0.5/ tag

2012-06-07 Thread jim
Log message for revision 126673:
  tag

Changed:
  A   zdaemon/tags/2.0.5/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/2.0.5/setup.py version

2012-06-07 Thread jim
Log message for revision 126674:
  version
  

Changed:
  U   zdaemon/tags/2.0.5/setup.py

-=-
Modified: zdaemon/tags/2.0.5/setup.py
===
--- zdaemon/tags/2.0.5/setup.py 2012-06-07 19:57:05 UTC (rev 126673)
+++ zdaemon/tags/2.0.5/setup.py 2012-06-07 19:57:50 UTC (rev 126674)
@@ -39,7 +39,7 @@
 name = zdaemon
 setup(
 name=name,
-version = '2.0.5dev',
+version = '2.0.5',
 url=http://www.python.org/pypi/zdaemon;,
 license=ZPL 2.1,
 description=

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/branches/2/CHANGES.txt Gaaaaaa, released trunk as 2.0.5.

2012-06-07 Thread jim
Log message for revision 126675:
  Gaa, released trunk as 2.0.5.
  

Changed:
  U   zdaemon/branches/2/CHANGES.txt

-=-
Modified: zdaemon/branches/2/CHANGES.txt
===
--- zdaemon/branches/2/CHANGES.txt  2012-06-07 19:57:50 UTC (rev 126674)
+++ zdaemon/branches/2/CHANGES.txt  2012-06-07 19:59:42 UTC (rev 126675)
@@ -2,7 +2,7 @@
  Changelog
 ===
 
-2.0.5 (2012-06-07)
+2.0.6 (2012-06-07)
 ==
 
 - Fixed: When the ``user`` option was used to run as a particular

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/2.0.6/ tag

2012-06-07 Thread jim
Log message for revision 126676:
  tag

Changed:
  A   zdaemon/tags/2.0.6/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/2.0.6/2/ tag

2012-06-07 Thread jim
Log message for revision 126677:
  tag

Changed:
  A   zdaemon/tags/2.0.6/2/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/2.0.6/2/ oops

2012-06-07 Thread jim
Log message for revision 126678:
  oops

Changed:
  D   zdaemon/tags/2.0.6/2/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/tags/2.0.6/setup.py version

2012-06-07 Thread jim
Log message for revision 126679:
  version
  

Changed:
  U   zdaemon/tags/2.0.6/setup.py

-=-
Modified: zdaemon/tags/2.0.6/setup.py
===
--- zdaemon/tags/2.0.6/setup.py 2012-06-07 20:02:46 UTC (rev 126678)
+++ zdaemon/tags/2.0.6/setup.py 2012-06-07 20:03:24 UTC (rev 126679)
@@ -38,7 +38,7 @@
 name = zdaemon
 setup(
 name=name,
-version = '2.0.4',
+version = '2.0.6',
 url=http://www.python.org/pypi/zdaemon;,
 license=ZPL 2.1,
 description=

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/ Fixed: When the ``user`` option was used to run as a particular

2012-06-07 Thread jim
Log message for revision 126681:
  Fixed: When the ``user`` option was used to run as a particular
  user, supplemental groups weren't set to the user's supplemental
  groups.
  

Changed:
  U   zdaemon/trunk/CHANGES.txt
  U   zdaemon/trunk/README.txt
  U   zdaemon/trunk/setup.py
  A   zdaemon/trunk/src/zdaemon/tests/testuser.py
  U   zdaemon/trunk/src/zdaemon/zdctl.py
  U   zdaemon/trunk/src/zdaemon/zdoptions.py

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2012-06-07 20:34:56 UTC (rev 126680)
+++ zdaemon/trunk/CHANGES.txt   2012-06-07 20:52:43 UTC (rev 126681)
@@ -22,7 +22,18 @@
   Previously, this was controlled by backoff-limit, which didn't make
   much sense.
 
+2.0.6 (2012-06-07)
+==
 
+- Fixed: When the ``user`` option was used to run as a particular
+  user, supplemental groups weren't set to the user's supplemental
+  groups.
+
+2.0.5 (2012-06-07)
+==
+
+(Accidental release. Please ignore.)
+
 2.0.4 (2009-04-20)
 ==
 

Modified: zdaemon/trunk/README.txt
===
--- zdaemon/trunk/README.txt2012-06-07 20:34:56 UTC (rev 126680)
+++ zdaemon/trunk/README.txt2012-06-07 20:52:43 UTC (rev 126681)
@@ -2,10 +2,7 @@
 ``zdaemon`` process controller for Unix-based systems
 *
 
-`zdaemon` is a Python package which provides APIs for managing applications
-run as daemons.  Its principal use to date has been to manage the application
-server and storage server daemons for Zope / ZEO, although it is not limited
-to running Python-based applications (for instance, it has been used to
-manage the 'spread' daemon).
+``zdaemon`` is a Unix (Unix, Linux, Mac OS X) Python program that wraps
+commands to make them behave as proper daemons.
 
 .. contents::

Modified: zdaemon/trunk/setup.py
===
--- zdaemon/trunk/setup.py  2012-06-07 20:34:56 UTC (rev 126680)
+++ zdaemon/trunk/setup.py  2012-06-07 20:52:43 UTC (rev 126681)
@@ -30,7 +30,7 @@
 include_package_data = True,
 install_requires=[ZConfig],
 extras_require=dict(
-test=['zope.testing', 'manuel', 'zc.customdoctests']),
+test=['zope.testing', 'manuel', 'zc.customdoctests', 'mock']),
 )
 except ImportError:
 from distutils.core import setup

Copied: zdaemon/trunk/src/zdaemon/tests/testuser.py (from rev 126680, 
zdaemon/branches/2/src/zdaemon/tests/testuser.py)
===
--- zdaemon/trunk/src/zdaemon/tests/testuser.py (rev 0)
+++ zdaemon/trunk/src/zdaemon/tests/testuser.py 2012-06-07 20:52:43 UTC (rev 
126681)
@@ -0,0 +1,111 @@
+##
+#
+# Copyright (c) 2010 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##
+
+# Test user and groups options
+
+from zope.testing import setupstack
+import doctest
+import mock
+import os
+import sys
+import unittest
+import zdaemon.zdctl
+
+def write(name, text):
+with open(name, 'w') as f:
+f.write(text)
+
+class O:
+def __init__(self, **kw):
+self.__dict__.update(kw)
+
+def test_user_fails_when_not_root():
+
+
+ write('conf',
+... '''
+... runner
+...   program sleep 9
+...   user zope
+... /runner
+... ''')
+
+ with mock.patch('os.geteuid') as geteuid:
+...   with mock.patch('sys.stderr'):
+... sys.stderr = sys.stdout
+... geteuid.return_value = 42
+... try:
+... zdaemon.zdctl.main(['-C', 'conf', 'status'])
+... except SystemExit:
+... pass
+... else:
+... print 'oops'
+... # doctest: +ELLIPSIS
+Error: only root can use -u USER to change users
+For help, use ... -h
+
+ import pwd
+ pwd.getpwnam.assert_called_with('zope')
+
+
+
+def test_user_sets_supplemtary_groups():
+
+
+ write('conf',
+... '''
+... runner
+...   program sleep 9
+...   user zope
+... /runner
+... ''')
+
+ import grp
+ grp.getgrall.return_value = [
+...   O(gr_gid=8, gr_mem =['g', 'zope', ]),
+...   O(gr_gid=1, gr_mem =['a', 'x', ]),
+...   O(gr_gid=2, gr_mem =['b', 'x', 'zope']),
+...   O(gr_gid=5, gr_mem =['c', 'x', ]),
+... 

[Zope-Checkins] SVN: zdaemon/trunk/ Several undocunented, untested, and presumeably unused features were removed.

2012-06-07 Thread jim
Log message for revision 126682:
  Several undocunented, untested, and presumeably unused features were removed.
  
  (I suspect that some of the remaining features are untested, :(, but I
  can imagine using them.)
  

Changed:
  U   zdaemon/trunk/CHANGES.txt
  U   zdaemon/trunk/src/zdaemon/tests/testzdrun.py
  U   zdaemon/trunk/src/zdaemon/zdctl.py

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2012-06-07 20:52:43 UTC (rev 126681)
+++ zdaemon/trunk/CHANGES.txt   2012-06-07 21:34:23 UTC (rev 126682)
@@ -22,6 +22,8 @@
   Previously, this was controlled by backoff-limit, which didn't make
   much sense.
 
+- Several undocunented, untested, and presumeably unused features were removed.
+
 2.0.6 (2012-06-07)
 ==
 

Modified: zdaemon/trunk/src/zdaemon/tests/testzdrun.py
===
--- zdaemon/trunk/src/zdaemon/tests/testzdrun.py2012-06-07 20:52:43 UTC 
(rev 126681)
+++ zdaemon/trunk/src/zdaemon/tests/testzdrun.py2012-06-07 21:34:23 UTC 
(rev 126682)
@@ -385,7 +385,7 @@
 def testDirectoryChown(self):
 path = os.path.join(self.root, 'foodir')
 options = zdctl.ZDCtlOptions()
-options.realize(['-p', self.cmd])
+options.realize(['-p', self.cmd, 'status'])
 cmd = zdctl.ZDCmd(options)
 options.uid = 27
 options.gid = 28

Modified: zdaemon/trunk/src/zdaemon/zdctl.py
===
--- zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-07 20:52:43 UTC (rev 126681)
+++ zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-07 21:34:23 UTC (rev 126682)
@@ -23,7 +23,6 @@
 -d/--daemon -- run as a proper daemon; fork a subprocess, close files etc.
 -f/--forever -- run forever (by default, exit when backoff limit is exceeded)
 -h/--help -- print this usage message and exit
--i/--interactive -- start an interactive shell after executing commands
 -l/--logfile -- log file to be read by logtail command
 -p/--program PROGRAM -- the program to run
 -S/--schema XML Schema -- XML schema for configuration file
@@ -35,10 +34,7 @@
 -z/--directory DIRECTORY -- directory to chdir to when using -d (default off)
 action [arguments] -- see below
 
-Actions are commands like start, stop and status.  If -i is
-specified or no action is specified on the command line, a shell
-interpreting actions typed interactively is started (unless the
-configuration option default_to_interactive is set to false).  Use the
+Actions are commands like start, stop and status.  Use the
 action help to find out about available actions.
 
 
@@ -86,11 +82,6 @@
 self.add(schemafile, short=S:, long=schema=,
  default=schema.xml,
  handler=self.set_schemafile)
-self.add(interactive, None, i, interactive, flag=1)
-self.add(default_to_interactive, runner.default_to_interactive,
- default=1)
-self.add(default_to_interactive, runner.default_to_interactive,
- default=1)
 self.add(program, runner.program, p:, program=,
  handler=string_list,
  required=no program specified; use -p or -C)
@@ -110,10 +101,8 @@
 RunnerOptions.realize(self, *args, **kwds)
 
 # Maybe the config file requires -i or positional args
-if not self.args and not self.interactive:
-if not self.default_to_interactive:
-self.usage(either -i or an action argument is required)
-self.interactive = 1
+if not self.args:
+self.usage(an action argument is required)
 
 # Where's python?
 if not self.python:
@@ -261,14 +250,6 @@
 print help  -- Print a list of available actions.
 print help action -- Print help for action.
 
-def do_EOF(self, arg):
-print
-return 1
-
-def help_EOF(self):
-print To quit, type ^D or use the quit command.
-
-
 def _start_cond(self, n):
 if (n  self.options.start_timeout):
 print '\nProgram took too long to start'
@@ -444,9 +425,6 @@
 print zdctl/zdrun options:
 print schemafile:  , repr(self.options.schemafile)
 print configfile:  , repr(self.options.configfile)
-print interactive: , repr(self.options.interactive)
-print default_to_interactive:,
-print  repr(self.options.default_to_interactive)
 print zdrun:   , repr(self.options.zdrun)
 print python:  , repr(self.options.python)
 print program: , repr(self.options.program)
@@ -487,17 +465,6 @@
 print show python -- show Python version and details
 print show all -- show all of the above
 
-def complete_show(self, text, *ignored):
-options = [options, python, all]
-return [x for x in options if x.startswith(text)]

[Zope-Checkins] SVN: zdaemon/branches/2/ make a v2 release branch, as trunk is viverging somewhat

2012-06-06 Thread jim
Log message for revision 126632:
  make a v2 release branch, as trunk is viverging somewhat

Changed:
  A   zdaemon/branches/2/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/zd Cleaned up plumbing of stop-timeout

2012-06-05 Thread jim
Log message for revision 126591:
  Cleaned up plumbing of stop-timeout

Changed:
  U   zdaemon/trunk/src/zdaemon/zdoptions.py
  U   zdaemon/trunk/src/zdaemon/zdrun.py

-=-
Modified: zdaemon/trunk/src/zdaemon/zdoptions.py
===
--- zdaemon/trunk/src/zdaemon/zdoptions.py  2012-06-04 21:28:54 UTC (rev 
126590)
+++ zdaemon/trunk/src/zdaemon/zdoptions.py  2012-06-05 13:28:57 UTC (rev 
126591)
@@ -389,8 +389,6 @@
 ZDOptions.__init__(self)
 self.add(backofflimit, runner.backoff_limit,
  b:, backoff-limit=, int, default=10)
-self.add(stoptimeut, runner.stop_timeout,
- T:, stop-timeout=, int, default=300)
 self.add(daemon, runner.daemon, d, daemon, flag=1, default=1)
 self.add(forever, runner.forever, f, forever,
  flag=1, default=0)

Modified: zdaemon/trunk/src/zdaemon/zdrun.py
===
--- zdaemon/trunk/src/zdaemon/zdrun.py  2012-06-04 21:28:54 UTC (rev 126590)
+++ zdaemon/trunk/src/zdaemon/zdrun.py  2012-06-05 13:28:57 UTC (rev 126591)
@@ -99,6 +99,7 @@
  handler=self.set_schemafile)
 self.add(transcript, runner.transcript, t:, transcript=,
  default=/dev/null)
+self.add(stoptimeut, runner.stop_timeout)
 
 def set_schemafile(self, file):
 self.schemafile = file

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/zdrun.py Removed confusing usage info that humans never see and that was a

2012-06-05 Thread jim
Log message for revision 126592:
  Removed confusing usage info that humans never see and that was a
  massive DRY violation.
  

Changed:
  U   zdaemon/trunk/src/zdaemon/zdrun.py

-=-
Modified: zdaemon/trunk/src/zdaemon/zdrun.py
===
--- zdaemon/trunk/src/zdaemon/zdrun.py  2012-06-05 13:28:57 UTC (rev 126591)
+++ zdaemon/trunk/src/zdaemon/zdrun.py  2012-06-05 13:32:14 UTC (rev 126592)
@@ -15,43 +15,6 @@
 zrdun -- run an application as a daemon.
 
 Usage: python zrdun.py [zrdun-options] program [program-arguments]
-
-Options:
--C/--configure URL -- configuration file or URL
--S/--schema XML Schema -- XML schema for configuration file
--b/--backoff-limit SECONDS -- set backoff limit to SECONDS (default 10)
--d/--daemon -- run as a proper daemon; fork a subprocess, setsid(), etc.
--f/--forever -- run forever (by default, exit when backoff limit is exceeded)
--h/--help -- print this usage message and exit
--s/--socket-name SOCKET -- Unix socket name for client (default zdsock)
--u/--user USER -- run as this user (or numeric uid)
--m/--umask UMASK -- use this umask for daemon subprocess (default is 022)
--t/--transcript FILE -- transript of output from daemon-mode program
--x/--exit-codes LIST -- list of fatal exit codes (default 0,2)
--z/--directory DIRECTORY -- directory to chdir to when using -d (default off)
-program [program-arguments] -- an arbitrary application to run
-
-This daemon manager has two purposes: it restarts the application when
-it dies, and (when requested to do so with the -d option) it runs the
-application in the background, detached from the foreground tty
-session that started it (if any).
-
-Exit codes: if at any point the application exits with an exit status
-listed by the -x option, it is not restarted.  Any other form of
-termination (either being killed by a signal or exiting with an exit
-status not listed in the -x option) causes it to be restarted.
-
-Backoff limit: when the application exits (nearly) immediately after a
-restart, the daemon manager starts slowing down by delaying between
-restarts.  The delay starts at 1 second and is increased by one on
-each restart up to the backoff limit given by the -b option; it is
-reset when the application runs for more than the backoff limit
-seconds.  By default, when the delay reaches the backoff limit, the
-daemon manager exits (under the assumption that the application has a
-persistent fault).  The -f (forever) option prevents this exit; use it
-when you expect that a temporary external problem (such as a network
-outage or an overfull disk) may prevent the application from starting
-but you want the daemon manager to keep trying.
 
 
 from stat import ST_MODE

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/zdctl.py Organized usage a little, including removing a dup.

2012-06-05 Thread jim
Log message for revision 126594:
  Organized usage a little, including removing a dup.
  

Changed:
  U   zdaemon/trunk/src/zdaemon/zdctl.py

-=-
Modified: zdaemon/trunk/src/zdaemon/zdctl.py
===
--- zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-05 13:38:15 UTC (rev 126593)
+++ zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-05 13:43:53 UTC (rev 126594)
@@ -18,16 +18,15 @@
[zdrun-options] [action [arguments]]
 
 Options:
--C/--configure URL -- configuration file or URL
--S/--schema XML Schema -- XML schema for configuration file
--h/--help -- print usage message and exit
 -b/--backoff-limit SECONDS -- set backoff limit to SECONDS (default 10)
+-C/--configure URL -- configuration file or URL
 -d/--daemon -- run as a proper daemon; fork a subprocess, close files etc.
 -f/--forever -- run forever (by default, exit when backoff limit is exceeded)
 -h/--help -- print this usage message and exit
 -i/--interactive -- start an interactive shell after executing commands
 -l/--logfile -- log file to be read by logtail command
 -p/--program PROGRAM -- the program to run
+-S/--schema XML Schema -- XML schema for configuration file
 -s/--socket-name SOCKET -- Unix socket name for client (default zdsock)
 -u/--user USER -- run as this user (or numeric uid)
 -m/--umask UMASK -- use this umask for daemon subprocess (default is 022)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/zdctl.py Made an untested fix to the untested interactive quit command,

2012-06-05 Thread jim
Log message for revision 126597:
  Made an untested fix to the untested interactive quit command,
  which I hope to remove soon.
  
  It previously send an exit command, which has the same semantics as
  stop and was removed recently.
  

Changed:
  U   zdaemon/trunk/src/zdaemon/zdctl.py

-=-
Modified: zdaemon/trunk/src/zdaemon/zdctl.py
===
--- zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-05 15:03:56 UTC (rev 126596)
+++ zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-05 15:39:33 UTC (rev 126597)
@@ -569,7 +569,7 @@
 print daemon manager not running
 elif not self.zd_pid:
 print daemon process not running; stopping daemon manager
-self.send_action(exit)
+self.send_action(stop)
 self.awhile(lambda: not self.zd_up, daemon manager stopped)
 else:
 print daemon process and daemon manager still running

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/ - Added an option, ``start-test-program`` to supply a test command to

2012-06-05 Thread jim
Log message for revision 126598:
  - Added an option, ``start-test-program`` to supply a test command to
test whether the program managed by zdaemon is up and operational,
rather than just running.  When starting a program, the start
command doesn't return until the test passes. You could, for
example, use this to wait until a web server is actually accepting
connections.
  
  - Added a ``start-timeout`` option to error if a program takes too long to
start. This is especially useful in combination with the
``start-test-program`` option.
  

Changed:
  U   zdaemon/trunk/CHANGES.txt
  U   zdaemon/trunk/src/zdaemon/README.txt
  U   zdaemon/trunk/src/zdaemon/component.xml
  U   zdaemon/trunk/src/zdaemon/tests/tests.py
  U   zdaemon/trunk/src/zdaemon/zdctl.py
  U   zdaemon/trunk/src/zdaemon/zdrun.py

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2012-06-05 15:39:33 UTC (rev 126597)
+++ zdaemon/trunk/CHANGES.txt   2012-06-05 16:37:12 UTC (rev 126598)
@@ -5,6 +5,17 @@
 3.0.0 (unreleased)
 ==
 
+- Added an option, ``start-test-program`` to supply a test command to
+  test whether the program managed by zdaemon is up and operational,
+  rather than just running.  When starting a program, the start
+  command doesn't return until the test passes. You could, for
+  example, use this to wait until a web server is actually accepting
+  connections.
+
+- Added a ``start-timeout`` option to error if a program takes too long to
+  start. This is especially useful in combination with the
+  ``start-test-program`` option.
+
 - Added a separate option, stop-timout, to control how long to wait
   for a graceful shutdown.
 

Modified: zdaemon/trunk/src/zdaemon/README.txt
===
--- zdaemon/trunk/src/zdaemon/README.txt2012-06-05 15:39:33 UTC (rev 
126597)
+++ zdaemon/trunk/src/zdaemon/README.txt2012-06-05 16:37:12 UTC (rev 
126598)
@@ -285,6 +285,18 @@
  open('log.1').read()
 'rec 1\nrec 2\n'
 
+Start test program and timeout
+==
+
+Normally, zdaemon considers a process to have started when the process
+itself has been created.  A process may take a while before it is
+truly up and running.  For example, a database server or a web server
+may take time before they're ready to accept requests.
+
+You can optionally supply a test program, via the ``start-test-program``
+configuration option, that is called repeatedly until it returns a 0
+exit status or until a time limit, ``start-timeout``, has been reached.
+
 Reference Documentation
 ===
 
@@ -398,9 +410,19 @@
 status code in this list makes zdaemon give up.  To disable
 this, change the value to an empty list.
 
+start-test-program
+A command that tests whether the program is up and running.
+The command should exit with a zero exit statis if the program
+is running and with a non-zero status otherwise.
+
+start-timeout
+Command-line option: -T or --start-timeout.
+
+If the program takes more than ``start-timeout`` seconds to
+start, then an error is printed and the control script will
+exit with a non-zero exit status.
+
 stop-timeout
-Command-line option: -T or --stop-timeout SECONDS
-
 This defaults to 500 seconds (5 minutes).
 
 When a stop command is issued, a SIGTERM signal is sent to the

Modified: zdaemon/trunk/src/zdaemon/component.xml
===
--- zdaemon/trunk/src/zdaemon/component.xml 2012-06-05 15:39:33 UTC (rev 
126597)
+++ zdaemon/trunk/src/zdaemon/component.xml 2012-06-05 16:37:12 UTC (rev 
126598)
@@ -185,6 +185,39 @@
   /description
 /key
 
+key name=start-test-program datatype=string-list
+ required=no
+  description
+Command-line option: -p or --program (zdctl.py only).
+
+This option gives the command used to start the subprocess
+managed by zdrun.py.  This is currently a simple list of
+whitespace-delimited words. The first word is the program
+file, subsequent words are its command line arguments.  If the
+program file contains no slashes, it is searched using $PATH.
+(XXX There is no way to to include whitespace in the program
+file or an argument, and under certain circumstances other
+shell metacharacters are also a problem, e.g. the foreground
+command of zdctl.py.)
+
+NOTE: zdrun.py doesn't use this option; it uses its positional
+arguments.  Rather, zdctl.py uses this option to determine the
+positional argument with which to invoke zdrun.py.  (XXX This
+could be better.)
+  /description
+/key
+
+key name=start-timeout datatype=integer required=no
+ default=300
+  

[Zope-dev] RFC: drop interactive feature of zdaemon

2012-06-05 Thread Jim Fulton
I (and many people I know) find the interactive feature of
zdaemon annoying.  I'd like to drop it, both to reduce annoyance
and to reduce the amount of code to maintain.

Any objections?

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://www.dublinstore.com/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-Checkins] SVN: zdaemon/trunk/ Added a separate option, stop-timout, to control how long to wait

2012-06-04 Thread jim
Log message for revision 126562:
  Added a separate option, stop-timout, to control how long to wait
  for a graceful shutdown.
  
  Previously, this was controlled by backoff-limit, which didn't make
  much sense.
  

Changed:
  U   zdaemon/trunk/CHANGES.txt
  U   zdaemon/trunk/src/zdaemon/README.txt
  U   zdaemon/trunk/src/zdaemon/component.xml
  U   zdaemon/trunk/src/zdaemon/tests/tests.py
  U   zdaemon/trunk/src/zdaemon/zdoptions.py
  U   zdaemon/trunk/src/zdaemon/zdrun.py

-=-
Modified: zdaemon/trunk/CHANGES.txt
===
--- zdaemon/trunk/CHANGES.txt   2012-06-04 13:06:20 UTC (rev 126561)
+++ zdaemon/trunk/CHANGES.txt   2012-06-04 14:17:09 UTC (rev 126562)
@@ -2,13 +2,16 @@
  Changelog
 ===
 
-
-2.0.5 (unreleased)
+3.0.0 (unreleased)
 ==
 
-- Nothing changed yet.
+- Added a separate option, stop-timout, to control how long to wait
+  for a graceful shutdown.
 
+  Previously, this was controlled by backoff-limit, which didn't make
+  much sense.
 
+
 2.0.4 (2009-04-20)
 ==
 

Modified: zdaemon/trunk/src/zdaemon/README.txt
===
--- zdaemon/trunk/src/zdaemon/README.txt2012-06-04 13:06:20 UTC (rev 
126561)
+++ zdaemon/trunk/src/zdaemon/README.txt2012-06-04 14:17:09 UTC (rev 
126562)
@@ -398,6 +398,16 @@
 status code in this list makes zdaemon give up.  To disable
 this, change the value to an empty list.
 
+stop-timeout
+Command-line option: -T or --stop-timeout SECONDS
+
+This defaults to 500 seconds (5 minutes).
+
+When a stop command is issued, a SIGTERM signal is sent to the
+process.  zdaemon waits for stop-timeout seconds for the
+process to gracefully exit. If the process doesn't exit in
+that time, a SIGKILL signal is sent.
+
 user
 Command-line option: -u or --user.
 

Modified: zdaemon/trunk/src/zdaemon/component.xml
===
--- zdaemon/trunk/src/zdaemon/component.xml 2012-06-04 13:06:20 UTC (rev 
126561)
+++ zdaemon/trunk/src/zdaemon/component.xml 2012-06-04 14:17:09 UTC (rev 
126562)
@@ -185,6 +185,17 @@
   /description
 /key
 
+key name=stop-timeout datatype=integer required=no default=300
+  description
+When a stop command is issued, a SIGTERM signal is sent to the
+process.  zdaemon waits for stop-timeout seconds for the
+process to gracefully exit. If the process doesn't exit in
+that time, a SIGKILL signal is sent.
+
+This defaults to 500 seconds (5 minutes).
+  /description
+/key
+
 key name=user datatype=string
  required=no
   description

Modified: zdaemon/trunk/src/zdaemon/tests/tests.py
===
--- zdaemon/trunk/src/zdaemon/tests/tests.py2012-06-04 13:06:20 UTC (rev 
126561)
+++ zdaemon/trunk/src/zdaemon/tests/tests.py2012-06-04 14:17:09 UTC (rev 
126562)
@@ -38,13 +38,16 @@
 zdaemon_loc = os.path.dirname(os.path.dirname(zdaemon.__file__))
 zconfig_loc = os.path.dirname(os.path.dirname(ZConfig.__file__))
 
+def write(name, text):
+with open(name, 'w') as f:
+f.write(text)
 
 def make_sure_non_daemon_mode_doesnt_hang_when_program_exits():
 
 The whole awhile bit that waits for a program to start
 whouldn't be used on non-daemon mode.
 
- open('conf', 'w').write(
+ write('conf',
 ... '''
 ... runner
 ...   program sleep 1
@@ -60,7 +63,7 @@
 
 If a program doesn't start, we don't want to wait for ever.
 
- open('conf', 'w').write(
+ write('conf',
 ... '''
 ... runner
 ...   program sleep
@@ -82,7 +85,7 @@
 configuration arguments.  To deal with this, we'll allow duplicate
 arguments that have the same values.
 
- open('conf', 'w').write(
+ write('conf',
 ... '''
 ... runner
 ...   program sleep 10
@@ -99,6 +102,45 @@
 
 
 
+def test_stop_timeout():
+r
+
+ write('t.py',
+... '''
+... import time, signal
+... signal.signal(signal.SIGTERM, lambda *a: None)
+... while 1: time.sleep(9)
+... ''')
+
+ write('conf',
+... '''
+... runner
+...   program %s t.py
+...   stop-timeout 1
+... /runner
+... ''' % sys.executable)
+
+ system(./zdaemon -Cconf start)
+. .
+daemon process started, pid=21446
+
+ import threading, time
+ thread = threading.Thread(
+... target=system, args=(./zdaemon -Cconf stop,),
+... kwargs=dict(quiet=True))
+ thread.start()
+ time.sleep(.2)
+
+ system(./zdaemon -Cconf status)
+program running; pid=15372
+
+ thread.join(2)
+
+ system(./zdaemon -Cconf status)
+daemon manager not running
+
+
+
 def setUp(test):
 test.globs['_td'] = td = []
 here = os.getcwd()
@@ -123,7 +165,7 @@
 for f 

[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/zd Simplified runner state management.

2012-06-04 Thread jim
Log message for revision 126588:
  Simplified runner state management.
  

Changed:
  U   zdaemon/trunk/src/zdaemon/zdctl.py
  U   zdaemon/trunk/src/zdaemon/zdoptions.py
  U   zdaemon/trunk/src/zdaemon/zdrun.py

-=-
Modified: zdaemon/trunk/src/zdaemon/zdctl.py
===
--- zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-04 17:01:22 UTC (rev 126587)
+++ zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-04 19:11:00 UTC (rev 126588)
@@ -444,7 +444,6 @@
 print umask:   , oct(umask)
 print directory:   , repr(self.options.directory)
 print logfile: , repr(self.options.logfile)
-print hang_around: , repr(self.options.hang_around)
 
 def show_python(self):
 print Python info:

Modified: zdaemon/trunk/src/zdaemon/zdoptions.py
===
--- zdaemon/trunk/src/zdaemon/zdoptions.py  2012-06-04 17:01:22 UTC (rev 
126587)
+++ zdaemon/trunk/src/zdaemon/zdoptions.py  2012-06-04 19:11:00 UTC (rev 
126588)
@@ -403,7 +403,6 @@
  default=022)
 self.add(directory, runner.directory, z:, directory=,
  existing_parent_directory)
-self.add(hang_around, runner.hang_around, default=0)
 
 def realize(self, *args, **kwds):
 ZDOptions.realize(self, *args, **kwds)

Modified: zdaemon/trunk/src/zdaemon/zdrun.py
===
--- zdaemon/trunk/src/zdaemon/zdrun.py  2012-06-04 17:01:22 UTC (rev 126587)
+++ zdaemon/trunk/src/zdaemon/zdrun.py  2012-06-04 19:11:00 UTC (rev 126588)
@@ -382,16 +382,15 @@
 # additionally recommends ignoring SIGHUP and forking again
 # after the setsid() call, for obscure SVR4 reasons.
 
-mood = 1 # 1: up, 0: down, -1: suicidal
+should_be_up = True
 delay = 0 # If nonzero, delay starting or killing until this time
 killing = 0 # If true, send SIGKILL when delay expires
 proc = None # Subprocess instance
 
 def runforever(self):
 self.logger.info(daemon manager started)
-min_mood = not self.options.hang_around
-while self.mood = min_mood or self.proc.pid:
-if self.mood  0 and not self.proc.pid and not self.delay:
+while self.should_be_up or self.proc.pid:
+if self.should_be_up and not self.proc.pid and not self.delay:
 pid = self.proc.spawn()
 if not pid:
 # Can't fork.  Try again later...
@@ -519,7 +518,7 @@
 self.sendreply(Unknown command %r; 'help' for a list % args[0])
 
 def cmd_start(self, args):
-self.mood = 1 # Up
+self.should_be_up = True
 self.backoff = 0
 self.delay = 0
 self.killing = 0
@@ -530,7 +529,7 @@
 self.sendreply(Application already started)
 
 def cmd_stop(self, args):
-self.mood = 0 # Down
+self.should_be_up = False
 self.backoff = 0
 self.delay = 0
 self.killing = 0
@@ -543,7 +542,7 @@
 self.sendreply(Application already stopped)
 
 def cmd_restart(self, args):
-self.mood = 1 # Up
+self.should_be_up = True
 self.backoff = 0
 self.delay = 0
 self.killing = 0
@@ -556,21 +555,6 @@
 self.proc.spawn()
 self.sendreply(Application started)
 
-def cmd_exit(self, args):
-self.mood = -1 # Suicidal
-self.backoff = 0
-self.delay = 0
-self.killing = 0
-if self.proc.pid:
-self.proc.kill(signal.SIGTERM)
-self.sendreply(Sent SIGTERM; will exit later)
-self.killing = 1
-self.delay = time.time() + self.options.backofflimit
-else:
-self.sendreply(Exiting now)
-self.logger.info(Exiting)
-sys.exit(0)
-
 def cmd_kill(self, args):
 if args[1:]:
 try:
@@ -596,7 +580,7 @@
 status = running
 self.sendreply(status=%s\n % status +
now=%r\n % time.time() +
-   mood=%d\n % self.mood +
+   should_be_up=%d\n % self.should_be_up +
delay=%r\n % self.delay +
backoff=%r\n % self.backoff +
lasttime=%r\n % self.proc.lasttime +

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/zdrun.py sorted imports :)

2012-06-04 Thread jim
Log message for revision 126589:
  sorted imports :)
  

Changed:
  U   zdaemon/trunk/src/zdaemon/zdrun.py

-=-
Modified: zdaemon/trunk/src/zdaemon/zdrun.py
===
--- zdaemon/trunk/src/zdaemon/zdrun.py  2012-06-04 19:11:00 UTC (rev 126588)
+++ zdaemon/trunk/src/zdaemon/zdrun.py  2012-06-04 20:54:58 UTC (rev 126589)
@@ -54,16 +54,16 @@
 but you want the daemon manager to keep trying.
 
 
-import os
-import sys
-import time
+from stat import ST_MODE
 import errno
 import logging
-import socket
+import os
 import select
 import signal
+import socket
+import sys
 import threading
-from stat import ST_MODE
+import time
 
 if __name__ == __main__:
 # Add the parent of the script directory to the module search path

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/src/zdaemon/zdctl.py whitespace

2012-06-04 Thread jim
Log message for revision 126590:
  whitespace
  

Changed:
  U   zdaemon/trunk/src/zdaemon/zdctl.py

-=-
Modified: zdaemon/trunk/src/zdaemon/zdctl.py
===
--- zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-04 20:54:58 UTC (rev 126589)
+++ zdaemon/trunk/src/zdaemon/zdctl.py  2012-06-04 21:28:54 UTC (rev 126590)
@@ -16,7 +16,7 @@
 
 Usage: python zdctl.py [-C URL] [-S schema.xml] [-h] [-p PROGRAM]
[zdrun-options] [action [arguments]]
- 
+
 Options:
 -C/--configure URL -- configuration file or URL
 -S/--schema XML Schema -- XML schema for configuration file
@@ -76,9 +76,9 @@
 
 
 class ZDCtlOptions(RunnerOptions):
-
+
 __doc__ = __doc__
-
+
 positional_args_allowed = True
 
 def __init__(self):
@@ -102,7 +102,7 @@
 self.add(prompt, runner.prompt, default=(programname + ))
 
 def realize(self, *args, **kwds):
-
+
 RunnerOptions.realize(self, *args, **kwds)
 
 # Maybe the config file requires -i or positional args

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/ Updated to reflect split of zope.testrunner and zope.testing.

2012-05-25 Thread jim
Log message for revision 126501:
  Updated to reflect split of zope.testrunner and zope.testing.
  
  Addressed deprecation warnings.
  

Changed:
  U   zdaemon/trunk/buildout.cfg
  U   zdaemon/trunk/setup.py
  U   zdaemon/trunk/src/zdaemon/tests/tests.py

-=-
Modified: zdaemon/trunk/buildout.cfg
===
--- zdaemon/trunk/buildout.cfg  2012-05-25 19:10:43 UTC (rev 126500)
+++ zdaemon/trunk/buildout.cfg  2012-05-25 20:28:10 UTC (rev 126501)
@@ -5,7 +5,7 @@
 
 [test]
 recipe = zc.recipe.testrunner
-eggs = zdaemon
+eggs = zdaemon [test]
 
 [coverage-test]
 recipe = zc.recipe.testrunner

Modified: zdaemon/trunk/setup.py
===
--- zdaemon/trunk/setup.py  2012-05-25 19:10:43 UTC (rev 126500)
+++ zdaemon/trunk/setup.py  2012-05-25 20:28:10 UTC (rev 126501)
@@ -29,6 +29,7 @@
 entry_points=entry_points,
 include_package_data = True,
 install_requires=[ZConfig],
+extras_require=dict(test=['zope.testing']),
 )
 except ImportError:
 from distutils.core import setup

Modified: zdaemon/trunk/src/zdaemon/tests/tests.py
===
--- zdaemon/trunk/src/zdaemon/tests/tests.py2012-05-25 19:10:43 UTC (rev 
126500)
+++ zdaemon/trunk/src/zdaemon/tests/tests.py2012-05-25 20:28:10 UTC (rev 
126501)
@@ -12,9 +12,17 @@
 #
 ##
 
-import os, re, shutil, sys, tempfile, unittest
-import ZConfig, zdaemon
-from zope.testing import doctest, renormalizing
+import doctest
+import os
+import re
+import shutil
+import subprocess
+import sys
+import tempfile
+import unittest
+import ZConfig
+import zdaemon
+from zope.testing import renormalizing
 
 try:
 import pkg_resources
@@ -112,13 +120,17 @@
 f()
 
 def system(command, input=''):
-i, o = os.popen4(command)
+p = subprocess.Popen(
+command, shell=True,
+stdin=subprocess.PIPE,
+stdout=subprocess.PIPE,
+stderr=subprocess.STDOUT)
 if input:
-i.write(input)
-i.close()
-print o.read(),
+p.stdin.write(input)
+p.stdin.close()
+print p.stdout.read(),
+p.wait()
 
-
 def checkenv(match):
 match = [a for a in match.group(1).split('\n')[:-1]
  if a.split('=')[0] in ('HOME', 'LD_LIBRARY_PATH')]

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: zdaemon/trunk/s Used manuel to make the documentation more documenty

2012-05-25 Thread jim
 sleep
-...   socket-name /tmp/demo.zdsock
-... /runner
-... '''.replace('/tmp', tmpdir))
+runner
+  program sleep
+  socket-name /tmp/demo.zdsock
+/runner
 
- system(./zdaemon -Cconf start 100)
+.. - text
+
+ open('conf', 'w').write(text.replace('/tmp', tmpdir))
+
+Then we can pass the program argument on the command line:
+
+sh ./zdaemon -Cconf start 100
 . .
 daemon process started, pid=1149
 
- system(./zdaemon -Cconf status)
+sh ./zdaemon -Cconf status
 program running; pid=1149
 
- system(./zdaemon -Cconf stop)
+sh ./zdaemon -Cconf stop
 . .
 daemon process stopped
 
@@ -157,19 +170,24 @@
 a program.  Perhaps the most common case for this is setting
 LD_LIBRARY_PATH so that dynamically loaded libraries can be found.
 
- open('conf', 'w').write(
-... '''
-... runner
-...   program env
-...   socket-name /tmp/demo.zdsock
-... /runner
-... environment
-...   LD_LIBRARY_PATH /home/foo/lib
-...   HOME /home/foo
-... /environment
-... '''.replace('/tmp', tmpdir))
+::
 
- system(./zdaemon -Cconf fg)
+runner
+  program env
+  socket-name /tmp/demo.zdsock
+/runner
+environment
+  LD_LIBRARY_PATH /home/foo/lib
+  HOME /home/foo
+/environment
+
+.. - text
+
+ open('conf', 'w').write(text.replace('/tmp', tmpdir))
+
+Now, when we run the command, we'll see out environment settings reflected:
+
+sh ./zdaemon -Cconf fg
 env
 USER=jim
 HOME=/home/foo
@@ -200,15 +218,20 @@
  import os
  f.write('rec 1\n'); os.fsync(f.fileno())
 
- open('conf', 'w').write(
-... '''
-... runner
-...   program tail -f data
-...   transcript log
-... /runner
-... ''')
+Now, here's out zdaemon configuration::
 
- system(./zdaemon -Cconf start)
+runner
+  program tail -f data
+  transcript log
+/runner
+
+.. - text
+
+ open('conf', 'w').write(text)
+
+Now we'll start:
+
+sh ./zdaemon -Cconf start
 . .
 daemon process started, pid=7963
 
@@ -217,7 +240,7 @@
  import time
  time.sleep(0.1)
 
-Now, if we look at the log file, it contains the tail output:
+After waiting a bit, if we look at the log file, it contains the tail output:
 
  open('log').read()
 'rec 1\n'
@@ -244,7 +267,7 @@
 
 Now, if we tell zdaemon to reopen the file:
 
- system(./zdaemon -Cconf reopen_transcript)
+sh ./zdaemon -Cconf reopen_transcript
 
 and generate some output:
 

Modified: zdaemon/trunk/src/zdaemon/tests/tests.py
===
--- zdaemon/trunk/src/zdaemon/tests/tests.py2012-05-25 20:28:10 UTC (rev 
126501)
+++ zdaemon/trunk/src/zdaemon/tests/tests.py2012-05-25 21:43:35 UTC (rev 
126502)
@@ -13,6 +13,9 @@
 ##
 
 import doctest
+import manuel.capture
+import manuel.doctest
+import manuel.testing
 import os
 import re
 import shutil
@@ -21,6 +24,7 @@
 import tempfile
 import unittest
 import ZConfig
+import zc.customdoctests
 import zdaemon
 from zope.testing import renormalizing
 
@@ -137,7 +141,27 @@
 match.sort()
 return '\n'.join(match) + '\n'
 
+zdaemon_template = #!%(python)s
+
+import sys
+sys.path[0:0] = [
+  %(zdaemon)r,
+  %(ZConfig)r,
+  ]
+
+import zdaemon.zdctl
+
+if __name__ == '__main__':
+zdaemon.zdctl.main()
+
+
 def test_suite():
+README_checker = renormalizing.RENormalizing([
+(re.compile('pid=\d+'), 'pid=NNN'),
+(re.compile('(\. )+\.?'), 'BLANKLINE'),
+(re.compile('^env\n((?:.*\n)+)$'), checkenv),
+])
+
 return unittest.TestSuite((
 doctest.DocTestSuite(
 setUp=setUp, tearDown=tearDown,
@@ -146,28 +170,18 @@
 (re.compile('(\. )+\.?'), 'BLANKLINE'),
 ])
 ),
-doctest.DocFileSuite(
+manuel.testing.TestSuite(
+manuel.doctest.Manuel(
+parser=zc.customdoctests.DocTestParser(
+ps1='sh',
+transform=lambda s: 'system(%s)\n' % s.rstrip()
+),
+checker=README_checker,
+) +
+manuel.doctest.Manuel(checker=README_checker) +
+manuel.capture.Manuel(),
 '../README.txt',
 setUp=setUp, tearDown=tearDown,
-checker=renormalizing.RENormalizing([
-(re.compile('pid=\d+'), 'pid=NNN'),
-(re.compile('(\. )+\.?'), 'BLANKLINE'),
-(re.compile('^env\n((?:.*\n)+)$'), checkenv),
-])
-),
+),
 ))
 
-
-zdaemon_template = #!%(python)s
-
-import sys
-sys.path[0:0] = [
-  %(zdaemon)r,
-  %(ZConfig)r,
-  ]
-
-import zdaemon.zdctl
-
-if __name__ == '__main__':
-zdaemon.zdctl.main()
-

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https

  1   2   3   4   5   6   7   8   9   10   >