[Python-Dev] Survey on DVCS usage and experience

2009-05-28 Thread Brian de Alwis

Hello everybody.  I'm Brett's former lab-mate, and am part of a
team conducting a survey to understand the perceived benefits and
challenges of using a decentralized or distributed version control
systems (DVCS) in software development.

With Python having recently chosen to switch to Mercurial, I hoped
that any developers who've used a DVCS (and who are over 18 years
old) might like to participate in our survey and share your
experiences.  (We followed your extensive discussions on the switch
with great interest.)  Details on partcipating are below.  Thanks
for your time!

Brian.

--
An increasing number of software projects have or are considering
switching their code repositories to a decentralized or distributed
VCS (DVCS).  There are many such DVCS tools, including git, bzr,
mercurial, monotone, or bitkeeper.  We are conducting a survey to
assess the perceived benefits and challenges of using a DVCS.  We
would ask that any individuals who use or are comfortable using a
DVCS for managing the artifacts for a project to please consider
completing the survey.  The survey has several open-ended questions,
and may take up to 20 minutes to complete.

The data collected from this study will be used in articles for
publication in journals and conference proceedings.  The results
of this study will provide additional knowledge and guidance for
projects considering moving to using a DVCS.

This is an anonymous survey.  Any personal information divulged
in answering a question will be kept strictly confidential.

The survey is at:

   http://www.cs.usask.ca/~bsd178/research/dvcs-survey/

Please feel free to redistribute this to other interested groups.

If you would like more detail about the survey, or information not
included here, please contact us.

   Brian de Alwis
   Department of Computer Science
   University of Saskatchewan
   brian.de.al...@usask.ca

This research has the ethical approval of the Research Ethics Office
at the University of Saskatchewan.  If you have any concerns about your
treatment or rights as a research subject, please contact the office
at 306-966-2084.

--



-- Brian de Alwis | HCI Lab | University of Saskatchewan
On bike helmets: "If you think your hair is more important than your  
brain, you're probably right."  (B. J. Wawrykow)


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Making the GIL faster & lighter on Windows

2009-05-28 Thread Kristján Valur Jónsson
You are right, a small experiment confirmed that it is set to 0 (see 
SetCriticalSectionSpinCount())
I had assumed that a small non-zero value might be chosen on multiprocessor 
machines.

Do you think that the problem lies with the use of the "event" object as such?  
Have you tried using a "semaphore" or "mutex" instead?  Or do you think that 
all of the synchronizations primitives that rely on the 
WaitForMultipleObjects() api are subject to the same issue?

Cheers,

Kristján

-Original Message-
From: python-dev-bounces+kristjan=ccpgames@python.org 
[mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of 
Phillip Sitbon
Sent: 27. maí 2009 22:23
To: python-dev
Subject: Re: [Python-Dev] Making the GIL faster & lighter on Windows


If I'm not mistaken, calling InitializeCriticalSection rather than
InitializeCriticalSectionAndSpinCount (gotta love those long function
names) sets the spin count to zero. I could tell when the spin count
wasn't zero as far as performance is concerned - spinning is too much
of a gamble in most contention situations.

> I don't know what kernel primitive the Critical Section  uses, but if it uses 
> an Event object or something similar, we are in the same soup, so to say, 
> because the CriticalSection's spinlocking feature buys us nothing.

Judging from the increase in speed and CPU utilization I've seen, I
don't believe this is the case. My guess is that it's something
similar to a futex.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] question about docstring formatting

2009-05-28 Thread Jeremy Hylton
A question came up at work about docstring formatting.  It relates to
the description of the summary line in PEP 257.

http://www.python.org/dev/peps/pep-0257/
"""Multi-line docstrings consist of a summary line just like a
one-line docstring, followed by a blank line, followed by a more
elaborate description. The summary line may be used by automatic
indexing tools; it is important that it fits on one line and is
separated from the rest of the docstring by a blank line. The summary
line may be on the same line as the opening quotes or on the next
line. The entire docstring is indented the same as the quotes at its
first line (see example below)."""

It says that the summary line may be used by automatic indexing tools,
but is there any evidence that such a tool actually exists?  Or was
there once upon a time?  If there are no such tools, do we still think
that it is important that it fits on line line?

Jeremy
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] question about docstring formatting

2009-05-28 Thread glyph


On 01:06 pm, jer...@alum.mit.edu wrote:

It says that the summary line may be used by automatic indexing tools,
but is there any evidence that such a tool actually exists?  Or was
there once upon a time?  If there are no such tools, do we still think
that it is important that it fits on line line?


For what it's worth, https://launchpad.net/pydoctor appears to do this, 
as you can see from the numerous truncated sentences on 
.


I suspect a more reasonable approach for automatic documentation 
generators would be to try to identify the first complete sentence, 
rather than the first line... but, this is at least an accurate 
description of the status quo for some tools :).

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] question about docstring formatting

2009-05-28 Thread David Goodger
On Thu, May 28, 2009 at 09:06, Jeremy Hylton  wrote:
> A question came up at work about docstring formatting.  It relates to
> the description of the summary line in PEP 257.
>
> http://www.python.org/dev/peps/pep-0257/
> """Multi-line docstrings consist of a summary line just like a
> one-line docstring, followed by a blank line, followed by a more
> elaborate description. The summary line may be used by automatic
> indexing tools; it is important that it fits on one line and is
> separated from the rest of the docstring by a blank line. The summary
> line may be on the same line as the opening quotes or on the next
> line. The entire docstring is indented the same as the quotes at its
> first line (see example below)."""
>
> It says that the summary line may be used by automatic indexing tools,
> but is there any evidence that such a tool actually exists?  Or was
> there once upon a time?  If there are no such tools, do we still think
> that it is important that it fits on line line?

There are several auto-documentation tools out there, like Sphinx and
epydoc, and the stdlib's pydoc. Historically there were other tools,
like HappyDoc ad Pythondoc. I'm not up on these or other tools, so I
don't know if or how that part of PEP 257 applies.

The point of the one-line summary was to allow for tooltips and
compact tables of contents.

Even if there were no supporting tools, I think it is useful to
express the intent of a class/method/function in a single line. The
process of distilling the description down can, in itself, be
illuminating. To imitate the Zen: if the code can't be described in a
short sentence, it may be too complicated.

I'm not saying that this should be enforced in any way. It's just a
guideline. If a tool needs a short summary and the docstring doens't
have a one-liner, I'd expect the tool just to take the first line and
add ellipsis ("...").

-- 
David Goodger 
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] question about docstring formatting

2009-05-28 Thread Oleg Broytmann
On Thu, May 28, 2009 at 09:06:03AM -0400, Jeremy Hylton wrote:
> It says that the summary line may be used by automatic indexing tools,
> but is there any evidence that such a tool actually exists?

   epydoc, for one.

Oleg.
-- 
 Oleg Broytmannhttp://phd.pp.ru/p...@phd.pp.ru
   Programmers don't die, they just GOSUB without RETURN.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] [buildbot] some build slaves in bad shape

2009-05-28 Thread Tarek Ziadé
Hello,

I've noticed some problems since this morning with the trunk and 3.x
stable buildbots:

- x86 XP-4 (trunk and 3x) is throwing an "no space left on device"
error when it compiles the sqlite module in its temp dir

- amd64 gentoo 3.x  and ia64 Ubuntu 3.x buildbot versions seem to be
too old to run, they should be upgraded

- ppc Debian unstable trunk keeps on failing to connect to svn.python.org


Regards
Tarek

-- 
Tarek Ziadé | http://ziade.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] question about docstring formatting

2009-05-28 Thread Ron Adam



Jeremy Hylton wrote:

A question came up at work about docstring formatting.  It relates to
the description of the summary line in PEP 257.

http://www.python.org/dev/peps/pep-0257/
"""Multi-line docstrings consist of a summary line just like a
one-line docstring, followed by a blank line, followed by a more
elaborate description. The summary line may be used by automatic
indexing tools; it is important that it fits on one line and is
separated from the rest of the docstring by a blank line. The summary
line may be on the same line as the opening quotes or on the next
line. The entire docstring is indented the same as the quotes at its
first line (see example below)."""

It says that the summary line may be used by automatic indexing tools,
but is there any evidence that such a tool actually exists?  Or was
there once upon a time?  If there are no such tools, do we still think
that it is important that it fits on line line?

Jeremy


Python's own built in help utility, pydoc uses it.

At the help prompt in the python console window, type "modules searchkey" 
to get a list of modules that contain the searchkey in thier one line summary.


Running pydoc with the -g option opens a tkinter search window, that 
searches the summery lines.  Selecting from that list then opens the 
browser to that item.


Ron



___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Making the GIL faster & lighter on Windows

2009-05-28 Thread Phillip Sitbon
The testing patch I submitted to the tracker includes a semaphore as
well, and I did take some time to try it out. It seems that it's no
better than the event object, either for a single thread or scaled to
many threads... so this does appear to indicate that the WaitForXX
functions are costly (which is expected) and scale terribly (which is
unfortunate). I had always believed event objects to be "slower" but
I'm not seeing a difference here compared to semaphores. My guess is
that these results could be very different if I were to test on, say,
Windows 2000 instead of Vista.

- Phillip

2009/5/28 Kristján Valur Jónsson :
> You are right, a small experiment confirmed that it is set to 0 (see 
> SetCriticalSectionSpinCount())
> I had assumed that a small non-zero value might be chosen on multiprocessor 
> machines.
>
> Do you think that the problem lies with the use of the "event" object as 
> such?  Have you tried using a "semaphore" or "mutex" instead?  Or do you 
> think that all of the synchronizations primitives that rely on the 
> WaitForMultipleObjects() api are subject to the same issue?
>
> Cheers,
>
> Kristján
>
> -Original Message-
> From: python-dev-bounces+kristjan=ccpgames@python.org 
> [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of 
> Phillip Sitbon
> Sent: 27. maí 2009 22:23
> To: python-dev
> Subject: Re: [Python-Dev] Making the GIL faster & lighter on Windows
>
>
> If I'm not mistaken, calling InitializeCriticalSection rather than
> InitializeCriticalSectionAndSpinCount (gotta love those long function
> names) sets the spin count to zero. I could tell when the spin count
> wasn't zero as far as performance is concerned - spinning is too much
> of a gamble in most contention situations.
>
>> I don't know what kernel primitive the Critical Section  uses, but if it 
>> uses an Event object or something similar, we are in the same soup, so to 
>> say, because the CriticalSection's spinlocking feature buys us nothing.
>
> Judging from the increase in speed and CPU utilization I've seen, I
> don't believe this is the case. My guess is that it's something
> similar to a futex.
>
>
>
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [buildbot] some build slaves in bad shape

2009-05-28 Thread David Bolen
Tarek Ziadé  writes:

> - x86 XP-4 (trunk and 3x) is throwing an "no space left on device"
> error when it compiles the sqlite module in its temp dir

Ooops, that's mine.  Geez - it's a VM, but has a 10GB C: drive, and
the actual build slave has its working directory on a separate virtual
drive.  Wonder what the heck has filled up the system drive.  I'm
working on it now though.

-- David

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] r72995 - in python/branches/py3k: Doc/library/contextlib.rst Doc/whatsnew/3.1.rst Lib/contextlib.py Lib/test/test_contextlib.py Misc/NEWS

2009-05-28 Thread Eric Smith

raymond.hettinger wrote:

Author: raymond.hettinger
Date: Fri May 29 00:20:03 2009
New Revision: 72995

Log:
Deprecate contextlib.nested().  The with-statement now provides this 
functionality directly.

Modified:
   python/branches/py3k/Doc/library/contextlib.rst
   python/branches/py3k/Doc/whatsnew/3.1.rst
   python/branches/py3k/Lib/contextlib.py
   python/branches/py3k/Lib/test/test_contextlib.py
   python/branches/py3k/Misc/NEWS


Shouldn't the test cases exist as long as contextlib.nested still 
exists? We want to make sure it works, after all. I think they should be 
removed only when .nested is itself deleted.


Eric.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [buildbot] some build slaves in bad shape

2009-05-28 Thread David Bolen
David Bolen  writes:

> Ooops, that's mine.  Geez - it's a VM, but has a 10GB C: drive, and
> the actual build slave has its working directory on a separate virtual
> drive.  Wonder what the heck has filled up the system drive.  I'm
> working on it now though.

Well, looks like it was 5+GB of temporary files of some sort.  It's
cleaned up now and back online.

-- David

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [buildbot] some build slaves in bad shape

2009-05-28 Thread Tarek Ziadé
On Fri, May 29, 2009 at 12:39 AM, David Bolen  wrote:
> David Bolen  writes:
>
>> Ooops, that's mine.  Geez - it's a VM, but has a 10GB C: drive, and
>> the actual build slave has its working directory on a separate virtual
>> drive.  Wonder what the heck has filled up the system drive.  I'm
>> working on it now though.
>
> Well, looks like it was 5+GB of temporary files of some sort.  It's
> cleaned up now and back online.

Thanks that's great
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] question about docstring formatting

2009-05-28 Thread Ben Finney
David Goodger  writes:

> Even if there were no supporting tools, I think it is useful to
> express the intent of a class/method/function in a single line. The
> process of distilling the description down can, in itself, be
> illuminating. To imitate the Zen: if the code can't be described in a
> short sentence, it may be too complicated.

Absolutely. If you can't describe what the (function, class, module)
does succinctly in a single line, how on earth are you going to choose
an appropriate short-but-descriptive name for it?

This constraint is well worth keeping, for exactly the reasons David
says above.

> I'm not saying that this should be enforced in any way. It's just a
> guideline. If a tool needs a short summary and the docstring doens't
> have a one-liner, I'd expect the tool just to take the first line and
> add ellipsis ("...").

Which in itself would be annoying enough to apply social pressure from
others to get the synopsis into a single line — so again, I approve :-)

-- 
 \ “Men never do evil so completely and cheerfully as when they do |
  `\it from religious conviction.” —Blaise Pascal (1623-1662), |
_o__)   Pensées, #894. |
Ben Finney

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Possibility of binary configuration mismatch

2009-05-28 Thread David Abrahams

Hi All,

I'm not sure there's anything you can do about this, but I thought I
should alert the Python devs that it can happen...

http://allmydata.org/trac/tahoe/ticket/704#comment:7 describes a
situation where my macports-installed python25 had a pyOpenSSL egg
installed in it by something other than macports (possibly by
easy_install-2.5?) that was not compatible with the Python build.  My
hunch is that the pyOpenSSL had binaries compiled against a UCS4 Python,
but I don't know for sure.  Whatever did the installation of the bad egg
was almost certainly being executed by the macports python25 because
macports is installed in /opt/local, and nothing is likely to have
installed it under that prefix by chance.  In other words, this egg
probably couldn't have been left over from some non-macports python
installation.  In fact, I haven't had any other version of Python2.5
installed on this machine.  Very odd.

I wonder if it makes sense to enhance the extension module system to
record this kind of information so the problem can be diagnosed by the
system?

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Survey on DVCS usage and experience

2009-05-28 Thread Senthil Kumaran
On Wed, May 27, 2009 at 06:02:57PM -0600, Brian de Alwis wrote:

> With Python having recently chosen to switch to Mercurial, I hoped
> that any developers who've used a DVCS (and who are over 18 years
> old) might like to participate in our survey and share your

Just curious. Why is this age restriction?  You might miss out few
key developers...

-- 
Senthil

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] C/Python API Index removed?

2009-05-28 Thread Campbell Barton
This page used to give an index of the C/Python API functions too
http://docs.python.org/genindex-all.html

But a week or so ago I noticed all these functions are now missing (I
remember they existed in 2.6.1 docs)
Was this intentional?

Quite a while ago, ~2.5 the C/API docs had their own index which
personally I prefer.

http://docs.python.org/c-api/index.html
This page is called an index but Im looking for a page like
http://docs.python.org/genindex-all.html which includes all C/API
function names.

Is this the right place to mail such problems?

Thanks
-- 
- Campbell
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Warnings when no file exists.

2009-05-28 Thread Campbell Barton
Hi, there has been a problem in blender3d for 6~ years or so thats
eluded me, I decided to look into today.
- Whenever the a script raises a warnings python prints out binary
garbage in the console. Some users complain when they run python games
in blender they get beeps coming from the PC speaker.

It turns out that  _warning.c's setup_context() is taking the first
value of argv (line 534 in 2.6.2), which in our case is the blender
binary.
then some part of the binary is printed to the console.

Apart from the beeps and not being helpful this also can mess up the
console's state - a like "cat /dev/random" might.

But the real problem is that warnings expect a file to exist, in
blender we have our own internal text's that dont have a corresponding
file on disk, so setting __file__ in the global dict will just point
to a location that doesn't exist.
It surprises me that warnings do this since exceptions work as
expected, printing useful stack traces from our built in texts.

Incase this helps, the scripts are converted into a buffer and run like this...
 text->compiled = Py_CompileString( buf, text->id.name+2, Py_file_input );
 PyEval_EvalCode( text->compiled, globaldict, globaldict );

Does anyone know of a workaround for this? Im sure there are other
cases where you may want to run compiled code that isnt related to a
file.

-- 
- Campbell
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Survey on DVCS usage and experience

2009-05-28 Thread Ben Finney
Senthil Kumaran  writes:

> On Wed, May 27, 2009 at 06:02:57PM -0600, Brian de Alwis wrote:
> 
> > With Python having recently chosen to switch to Mercurial, I hoped
> > that any developers who've used a DVCS (and who are over 18 years
> > old) might like to participate in our survey and share your
> 
> Just curious. Why is this age restriction?  You might miss out few
> key developers...

I would guess because they need adult consent in order to legally use
the survey results as evidence in whatever psychological/sociological
study they perform.

-- 
 \ “No matter how far down the wrong road you've gone, turn back.” |
  `\  —Turkish proverb |
_o__)  |
Ben Finney

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com