[issue17389] Optimize Event.wait()

2013-03-10 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-10 Thread Mark Dickinson

Mark Dickinson added the comment:

I think there's a race condition in the patched version:  'self._flag' could be 
set in between if 'if not signaled:' and the 'self._cond.acquire()', and in 
that case you'll end up waiting for an event that's already occurred.  Do you 
need to recheck 'self._flag' after acquiring the condition?

--

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-10 Thread Mark Dickinson

Mark Dickinson added the comment:

How about the attached simpler patch?

--
Added file: http://bugs.python.org/file29364/event_wait_metd.patch

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> How about the attached simpler patch?

Looks better indeed! I had completely overlooked the possible race
condition.

--

___
Python tracker 

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



[issue17390] display python version on idle title bar

2013-03-10 Thread bagrat lazaryan

New submission from bagrat lazaryan:

useful for those who routinely use different versions of python on idle. as it 
ships, idle displays "python shell" on its title bar. it would be useful to 
have there the version displayed as well.

see 
http://bagratte.blogspot.it/2013/03/display-python-version-on-idle-title-bar_10.html

--
components: IDLE
messages: 183874
nosy: bagratte
priority: normal
severity: normal
status: open
title: display python version on idle title bar
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.4, Python 3.5

___
Python tracker 

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



[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Actually, wait() calls self._waiters.remove() without holding the lock. But I 
think it could easily do so after taking the lock (since it takes it anyway 
before returning).

Also, _waiters should better be a set, since wait() needs the associative 
behaviour when unregistering a waiter.

notify() would then look like:

for i in range(n):
try:
waiter = self._waiters.pop()
except KeyError:
break
waiter.release()

and wait() would look like:

waiter = _allocate_lock()
waiter.acquire()
self._waiters.add(waiter)
self._release_save()
try:
return waiter.acquire(timeout)
finally:
self._acquire_restore()
self._waiters.discard(waiter)

--

___
Python tracker 

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



[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

That said, I seem to remember a discussion of Condition's fairness.
Right now, waiters are notified in the order of wait() calls. This wouldn't be 
the case anymore if using a set instead of a list or deque.

Also, I can't remember a situation where I made an intensive use of a Condition 
(say, hundreds of calls per second), as opposed to Lock and RLock which can be 
heavily invoked to protect the integrity of critical data structures.

--

___
Python tracker 

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



[issue17391] _cursesmodule Fails to Build on GCC 2.95 (static)

2013-03-10 Thread Jeffrey Armstrong

New submission from Jeffrey Armstrong:

When compiling Modules/_cursesmodule.c as a static module with GCC 2.95.3, an 
error is encountered on line 2260 in PyCurses_GetWin.  The error occurs because 
the PyCursesInitialised macro appears prior _Py_IDENTIFIER(read), which is 
actually a variable declaration.  Switching the order of the statements fixes 
the issue.

In all other functions within Modules/_cursesmodule.c, PyCursesInitialised 
always appears after all variable declarations.

This bug was encountered on the platform m68k-atari-mint using Python 3.3.0 and 
GCC 2.95.3.

--
components: Build
files: curses.patch
keywords: patch
messages: 183877
nosy: Jeffrey.Armstrong
priority: normal
severity: normal
status: open
title: _cursesmodule Fails to Build on GCC 2.95 (static)
type: compile error
versions: Python 3.3
Added file: http://bugs.python.org/file29365/curses.patch

___
Python tracker 

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



[issue16895] Batch file to mimic 'make' on Windows

2013-03-10 Thread Richard Oudkerk

Richard Oudkerk added the comment:

+1

To use Tools/builbot/*.bat doesn't the current directory have to be the main 
directory of the repository?  Then I see no point in the "-C" argument: just 
set the correct directory automatically.

I think make.bat should also support creation of non-debug builds.  (Maybe have 
targets "release" and "debug"?)

Tools/buildbot/build*.bat already calls external.bat and clean.bat.  This 
currently makes the "ready" target unnecessary.  However, I don't think build 
should be calling clean.bat (or external.bat).  Perhaps you should just inline 
the necessary parts of Tools/buildbot/build*.bat.

--
nosy: +sbt

___
Python tracker 

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



[issue17317] Benchmark driver should calculate actual benchmark count in -h

2013-03-10 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the patch, Anuj! The solution looks fine. While reviewing I 
discovered the test suite didn't work anymore and so I fixed that plus added a 
test to the name expansion to make sure it would always work properly. All of 
that is included in the patch I uploaded.

Could you sign the CLA at http://www.python.org/psf/contrib/contrib-form/ and 
then ping this bug once you have? When that is done then I can commit our 
combined patch.

--
assignee:  -> brett.cannon
components: +Benchmarks
stage:  -> commit review
Added file: http://bugs.python.org/file29366/count_benchmarks.diff

___
Python tracker 

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



[issue17251] LWPCookieJar load() set domain_specifed wrong

2013-03-10 Thread B. Kyven

B. Kyven added the comment:

@Demian Brecht
Um, I do realize the lack of popularity of this module, now.

What I try to achieve is simple. store persistent cookies in a way, that's told 
to be standard in python ?

Actually, I was trying to sync QtCookiesJar to CookieJar to make urllib2 works 
with cookie sessions opened in QtWebKit to skip the heavy javascript powered 
login process.(now it works either way not both) And I need a way to save 
persistent cookie. Maybe I need to rethink my strategy. Any thoughts?

--

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-10 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue17317] Benchmark driver should calculate actual benchmark count in -h

2013-03-10 Thread Anuj Gupta

Anuj Gupta added the comment:

I've already signed that. I was contemplating adding my name to the Misc/ACK 
file but I'd like to know if it's appropriate. Certainly gives one a confidence 
boost, but I'm not aware whether this fix qualifies me for it.

I'd like to contribute a lot more code to Python. Could you guide me a little 
for that please?

Thanks

--

___
Python tracker 

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



[issue3329] API for setting the memory allocator used by Python

2013-03-10 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue17323] Disable [X refs, Y blocks] ouput in debug builds

2013-03-10 Thread Gregory P. Smith

Gregory P. Smith added the comment:

If this is done, it should probably be on by default on all --with-pydebug 
buildbots.  Otherwise I suspect nobody will _ever_ look at its output and we 
should just remove the feature all together.

Being off in the main process on the build bots would still make 
test_subprocess.py happier though as that test's own child processes wouldn't 
pass the command line flag to enable it so they wouldn't see it in child 
process stderr.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue17317] Benchmark driver should calculate actual benchmark count in -h

2013-03-10 Thread Anuj Gupta

Anuj Gupta added the comment:

Improved wording of the comment

--
Added file: http://bugs.python.org/file29367/benchmark_count.patch

___
Python tracker 

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



[issue17351] Fixed python3 descriptor documentation example + removal of explicit "object" inheritance in docs

2013-03-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 513c4aaf70d7 by Raymond Hettinger in branch '2.7':
Issue #17351: Modernize the pure Python property() example.
http://hg.python.org/cpython/rev/513c4aaf70d7

--
nosy: +python-dev

___
Python tracker 

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



[issue17351] Fixed python3 descriptor documentation example + removal of explicit "object" inheritance in docs

2013-03-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bb7e01b5d362 by Raymond Hettinger in branch '3.3':
Issue #17351: Modernize the pure Python property() example.
http://hg.python.org/cpython/rev/bb7e01b5d362

--

___
Python tracker 

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



[issue17351] Remove explicit "object" inheritance in Python 3 docs

2013-03-10 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
title: Fixed python3 descriptor documentation example + removal of explicit 
"object" inheritance in docs -> Remove explicit "object" inheritance in Python 
3 docs

___
Python tracker 

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



[issue16895] Batch file to mimic 'make' on Windows

2013-03-10 Thread Zachary Ware

Zachary Ware added the comment:

> Richard Oudkerk added the comment:
>
> +1
Thank you :)

> To use Tools/builbot/*.bat doesn't the current directory have to be the main 
> directory of the repository?  Then I see no point in the "-C" argument: just 
> set the correct directory automatically.

That is true, and it does already automatically set the correct
directory.  The point of the -C option is for Doc/make.bat--from the
root dir, call "make -C Doc html", and make cd's into Doc, and there
calls "make.bat html", and the html docs are made.  I didn't just
hardwire the option to "-C Doc" even though that's the only place that
can use -C, just in case there is someday another make.bat floating
around the repository.  The original version I posted just had a "doc"
target that called Doc/make.bat with supplied arguments, but forcing
the use of the UNIXy command makes documenting how to do things
easier: just one command on all platforms.

> I think make.bat should also support creation of non-debug builds.  (Maybe 
> have targets "release" and "debug"?)

I agree.  I've had a thought for this; what about adding a
"configure.bat" that takes a few of the applicable options from the
UNIX "configure" script, and sets some environment variables (and/or
writes out a "win-config.dat") for make.bat's use?

> Tools/buildbot/build*.bat already calls external.bat and clean.bat.  This 
> currently makes the "ready" target unnecessary.

I thought the same initially, but I realized that it is useful for
building using the VS GUI--clone the repo, call "make ready", then
open pcbuild.sln in Visual Studio and you're ready to build everything
there.

> However, I don't think build should be calling clean.bat (or external.bat).  
> Perhaps you should just inline the necessary parts of 
> Tools/buildbot/build*.bat.

I've thought about this too, and am thinking that it would make a
certain amount of sense to inline the entirety of Tools/buildbot.
Make everything possible from just make.bat, and eventually migrate
the buildbots to use it, and then the Tools/buildbot directory can go
away alltogether.  This would also make doing release vs debug easier.

--

___
Python tracker 

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



[issue17317] Benchmark driver should calculate actual benchmark count in -h

2013-03-10 Thread Brett Cannon

Brett Cannon added the comment:

How and when did you sign the CLA? It has not been registered yet that you 
have, else your username would have an asterisk next to it.

As for Misc/ACKS, that's in Python itself and not the benchmark suite so this 
wouldn't get you in that file.

To contribute more, make sure to read the devguide at 
http://docs.python.org/devguide/

--

___
Python tracker 

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



[issue17317] Benchmark driver should calculate actual benchmark count in -h

2013-03-10 Thread Anuj Gupta

Anuj Gupta added the comment:

I did it yesterday while studying the devguide and "how to get started" 
articles. Just did it again, and received an email with the subject "The Python 
Contributor Agreement Form (between Anuj Gupta and Python Software Foundation) 
is Signed and Filed!".

Still no asterisk :(

--

___
Python tracker 

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



[issue17317] Benchmark driver should calculate actual benchmark count in -h

2013-03-10 Thread Brett Cannon

Brett Cannon added the comment:

The asterisk is added manually by a person, so by virtue of it being a weekend 
no one has gotten to it yet. As soon as it has been processed and I have time I 
will commit the patch.

--

___
Python tracker 

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



[issue16895] Batch file to mimic 'make' on Windows

2013-03-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

One must run external.bat if one is to subsequently build from the vs gui with 
*most* of the external dependencies. I think the command to run it should be 
'external', not 'ready'. 'External' means get the external dependencies and 
anyone who has run external.bat will know what it means. 'Ready' does not mean 
anything in particular.

Just curious:
Why do the buildbots run make clean before re-compiling? I seems like lots of 
extra work to re-compile things that are up to date?

What does running 'kill-python before re-building python do? I have not seen it 
mentioned in the in the devguide or pcbuild/readme.

--

___
Python tracker 

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



[issue17016] _sre: avoid relying on pointer overflow

2013-03-10 Thread Nickolai Zeldovich

Nickolai Zeldovich added the comment:

Sorry for the delay.  Attached is an updated patch that should fix all of the 
issues mentioned in this bug report.

--
Added file: http://bugs.python.org/file29368/pp-2.patch

___
Python tracker 

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



[issue17392] Python installer for Windows packages wrong zipfile.py

2013-03-10 Thread Simon Wagner

New submission from Simon Wagner:

Wrong version of zipfile.py is packaged with the Windows installer for Python 
3.2 and 3.3. It seems to be the version from 3.1.

Other files might also be wrong, I did not check.

--
components: Installation, Windows
messages: 183892
nosy: Simon.Wagner
priority: normal
severity: normal
status: open
title: Python installer for Windows packages wrong zipfile.py
type: behavior
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue763043] unable to specify another compiler

2013-03-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Is this still relevant, or should it be closed?

I no 0 idea what either of you think should be changed in the docs and where, 
and I suspect the same would be true of any other non-disutils expert, so if a 
patch is needed, it should come from one you two (Matthias?).

Meththias, you are not marked as having a Contributor Agreement on file. Paper 
forms were lost some years ago. I had to re-submit too. It is even easier now. 
http://www.python.org/psf/contrib/

--
nosy: +terry.reedy
versions:  -Python 3.1

___
Python tracker 

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



[issue8318] Deprecation of multifile inappropriate or incomplete

2013-03-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue8318] Deprecation of multifile inappropriate or incomplete

2013-03-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage: needs patch -> committed/rejected

___
Python tracker 

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



[issue17393] stdlib import mistaken for local by import_fixer

2013-03-10 Thread Lennart Regebro

New submission from Lennart Regebro:

If you have a local folder (without an __init__.py, hence just a normal folder) 
with the same name as a non local module, the import statements of that module 
will assumed to be local and transformed from for example ``import datetime`` 
to ``from . import datetime``.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 183894
nosy: lregebro
priority: normal
severity: normal
status: open
title: stdlib import mistaken for local by import_fixer
versions: Python 3.3

___
Python tracker 

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



[issue17393] stdlib import mistaken for local by import_fixer

2013-03-10 Thread Lennart Regebro

Changes by Lennart Regebro :


--
type:  -> behavior

___
Python tracker 

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



[issue17066] Fix test discovery for test_robotparser.py

2013-03-10 Thread Ezio Melotti

Ezio Melotti added the comment:

Do you think doing something like:

class BaseRobotTest:
def setUp(self):
lines = io.StringIO(robots_txt).readlines()
self.parser = urllib.robotparser.RobotFileParser()
parser.parse(lines)

def test_good(self):
 for url in good:
 self.assertTrue(self.parser.can_fetch(...))

def test_bad(self):
 for url in bad:
 self.assertFalse(self.parser.can_fetch(...))

class RobotTestX(BaseRobotTest, unittest.TestCase):
doc = "..."
good = [...]
bad = [...]

...

would be a better approach?

On one hand is a bit more verbose and doesn't create a separate test for each 
URL (I don't think that's important though), but on the other hand it gets rid 
of lot of magic and makes the test more understandable.

--

___
Python tracker 

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



[issue1076515] shutil.move clobbers read-only files.

2013-03-10 Thread Brett Cannon

Brett Cannon added the comment:

Closing since everyone seems to agree that the current behaviour is fine and 
Tarek has not said anything since being assigned the bug.

--
nosy: +brett.cannon
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue1076515] shutil.move clobbers read-only files.

2013-03-10 Thread R. David Murray

R. David Murray added the comment:

Since I spent some time thinking about this, I want to leave some notes:

The linux 'mv' command issues the following prompt:

  > mv t2/myfile t1
  mv: try to overwrite ‘t1/myfile’, overriding mode  (-)?

So modern linux, at least, will not overwrite the file unless the '-f' flag is 
given explicitly (or you answer yes to the prompt, but that's not relevant to 
shutil.move).

However, shutil.move does not claim to implement 'mv'.  The release note in 3.3 
indicates we've adapted its symlink handling to mimic mv, but the rest of the 
text is explicit about the implementation *in terms of other stdlib functions*.

So really the only way to understand the behavior of shutil.move is to 
understand what those other functions do on your platform.  The OP's confusion 
had to do with the behavior of *the Unix file system* in the face of a rename 
operation, not with the definition of shutil.move itself (which says that it 
uses rename, and links to its description).

Someone could think through the description of 'rename' and open an issue to 
improve *its* documentation if that seems warranted, but I think that "has 
permission" is somewhat platform dependent and so it probably isn't appropriate 
to change that doc, either.

Thus, I agree that this should be closed.

--
nosy: +r.david.murray
resolution: rejected -> invalid
stage:  -> committed/rejected

___
Python tracker 

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



[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing

2013-03-10 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue17330] Stop checking for directory cache invalidation in importlib

2013-03-10 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue17351] Remove explicit "object" inheritance in Python 3 docs

2013-03-10 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue17365] Remove Python 2 code from test_print

2013-03-10 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Agree with Terry.
The patch LGTM except unicode literals part.

--
nosy: +asvetlov

___
Python tracker 

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



[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-10 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks Antoine.  Since the calls are made without a lock, I'll go for a minimal 
patch and keep the existing fairness logic.

Adding Guido to the nosy list since this is his code.

FWIW, the heaviest load for condition variables likely arises with use of the 
Queue module which implements substantially all of its logic around three 
condition variables and a single lock.

--
assignee:  -> rhettinger
nosy: +gvanrossum
Added file: http://bugs.python.org/file29369/condition2.diff

___
Python tracker 

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



[issue17373] Add inspect.Signature.from_callable()

2013-03-10 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Agree in general, but you need to update the docs also.

--
nosy: +asvetlov

___
Python tracker 

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



[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-10 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue17374] Remove restriction against Semaphore having a negative value

2013-03-10 Thread Raymond Hettinger

Raymond Hettinger added the comment:

[Antoine]
> multiprocessing.Semaphore should be kept compatible 
> with threading.Semaphore.

I just looked at the C code implementing multiprocessing Semaphore.  Removing 
the negative count restriction there looks straight-forward.  I'll include it 
in the patch or will open a separate tracker item for it.

[Charles-François]
> POSIX semaphore don't support negative initial value.

It was an early design decision to go with the Java threading model rather than 
the POSIX model.  The Java API supports negative initial values -- the same 
Dijkstra's original P() and V().

--

___
Python tracker 

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



[issue11963] Remove human verification from test suite (test_parser and test_subprocess)

2013-03-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d25749c32bb4 by Ezio Melotti in branch '2.7':
#11963: remove human verification from test_subprocess.
http://hg.python.org/cpython/rev/d25749c32bb4

--

___
Python tracker 

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



[issue16895] Batch file to mimic 'make' on Windows

2013-03-10 Thread Zachary Ware

Zachary Ware added the comment:

>Terry J. Reedy added the comment:
>
>One must run external.bat if one is to subsequently build from the vs
>gui with *most* of the external dependencies. I think the command to
>run it should be 'external', not 'ready'. 'External' means get the
>external dependencies and anyone who has run external.bat will know
>what it means. 'Ready' does not mean anything in particular.

Fair point. Thinking about it again after some sleep, I agree. Next version 
will revert to 'external' rather than 'ready'.

>Just curious:
>Why do the buildbots run make clean before re-compiling? I seems like
>lots of extra work to re-compile things that are up to date?

I think the idea is to make sure everything is fresh, and avoid phantom 
problems from things that shouldn't cause problems, but do.

>What does running 'kill-python before re-building python do? I have not
>seen it mentioned in the in the devguide or pcbuild/readme.

I believe it's what actually performs the cleaning process. 
Tools/buildbot/clean.bat builds kill_python.exe and then runs it.

--

___
Python tracker 

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



[issue16895] Batch file to mimic 'make' on Windows

2013-03-10 Thread Richard Oudkerk

Richard Oudkerk added the comment:

> What does running 'kill-python before re-building python do? I have not 
> seen it mentioned in the in the devguide or pcbuild/readme.

It kills any currently running python(_d).exe processes.  This is because 
Windows does not allow program or library files to be removed or overwritten 
while they are being used, potentially causing compilation failures.

--

___
Python tracker 

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



[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0f86b51f8f8b by Raymond Hettinger in branch 'default':
Issue #17385: Fix quadratic behavior in threading.Condition
http://hg.python.org/cpython/rev/0f86b51f8f8b

--
nosy: +python-dev

___
Python tracker 

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



[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-10 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue11963] Remove human verification from test suite (test_parser and test_subprocess)

2013-03-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3e14aafeca04 by Ezio Melotti in branch '2.7':
#11963: fix Windows buildbots.
http://hg.python.org/cpython/rev/3e14aafeca04

--

___
Python tracker 

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



[issue16895] Batch file to mimic 'make' on Windows

2013-03-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks, clean and kill make sense for unattended build-bots. For interactive 
use, when 2 minutes rebuilding is a big deal, clean is a last resort. Let's 
just make sure we do not somehow suggest that it needs to be done routinely. Or 
to put it another way, do document that 'build' is intended for fail-safer 
unattended buildbots and not necessarily for interactive human use. And also 
that kill does what a human would normally do by closing windows on the task 
bar, or, as a last resort, with task manager.

--

___
Python tracker 

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



[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Looks fine. I'd say that it would be great to add slicing to deque!

There's one oddity in the code, but it was there before the patch -- the local 
variable name __waiters is pretty silly. It appears to be a micro-optimization 
to avoid using self._waiters more than once; even if that is worth it (I kind 
of doubt it), the __private name is wrong and misguided.

--

___
Python tracker 

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



[issue17391] _cursesmodule Fails to Build on GCC 2.95 (static)

2013-03-10 Thread Jeffrey Armstrong

Changes by Jeffrey Armstrong :


--
components: +Extension Modules -Build

___
Python tracker 

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



[issue17120] Mishandled _POSIX_C_SOURCE and _XOPEN_SOURCE in pyconfig.h

2013-03-10 Thread RAW

RAW added the comment:

Any response?

--
status: open -> languishing

___
Python tracker 

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



[issue16278] os.rename documentation slightly inaccurate

2013-03-10 Thread Todd Rovito

Todd Rovito added the comment:

V3 added which includes much shorter variable names and a cleanup of the patch. 
 I still need to test on Windows.

--
Added file: http://bugs.python.org/file29370/16278OSRenameDocsTestV3.patch

___
Python tracker 

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



[issue16278] os.rename documentation slightly inaccurate

2013-03-10 Thread Todd Rovito

Todd Rovito added the comment:

Thanks for the feedback Vitaliy Stepanov that helped alot with the version 3 
patch.

--

___
Python tracker 

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



[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2013-03-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Raymond's plan sounds good to me.

We may also want to tweak the 3.3 lru_cache docs to note the trade-offs 
involved in using it. Perhaps something like:

"As a general purpose cache, lru_cache needs to be quite pessimistic in 
deriving non-conflicting keys from the supplied arguments. When caching the 
results of CPU-bound calculations, the cost of deriving non-conflicting keys 
may need be assessed against the typical cost of the underlying calculation."

Which does give me a thought - perhaps lru_cache in 3.4 could accept a "key" 
argument that is called as "key(*args, **kwds)" to derive the cache key? (that 
would be a separate issue, of course)

--

___
Python tracker 

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



[issue16651] Find out what stdlib modules lack a pure Python implementation

2013-03-10 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I don't think itertools or collections.deque should go on this list.  The other 
implementations already have these and a pure python versions miss the point of 
these being high performance tools.  AFAICT, there is zero benefit to adding a 
bunch of extra code that will never get used.  It will only complicate my 
maintenance of those modules.

--
nosy: +rhettinger

___
Python tracker 

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



[issue16278] os.rename documentation slightly inaccurate

2013-03-10 Thread Todd Rovito

Todd Rovito added the comment:

Made some very minor changes to get patch to work on Windows.  Had issues with 
line ending differences between Unix and Windows. I fixed it so line endings 
won't be an issue and tested patch on Windows, Linux, and OS X.  

Please feel free to supply feedback or commit.  Thanks.

--
Added file: http://bugs.python.org/file29371/16278OSRenameDocsTestV4.patch

___
Python tracker 

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



[issue16659] Pure Python implementation of random

2013-03-10 Thread Raymond Hettinger

Raymond Hettinger added the comment:

[Serhiy Storchaka]
> I don't want to make a decision on the inclusion of this code.

It was a tough call, but I don't want to add this code.  You've a great job 
with it, but I don't think it is a worthwhile endeavor.  

* The algorithm was designed with C level operations in mind and is awkward in 
Python. 

* The code we use for MT has been widely distributed and tested by others.  We 
would just be getting away from the canonical reference version.

* The other implementations already have an MT, so this code won't end-up being 
used and would just add to the maintenance burden.  If anyone ever did use it, 
it would be dog slow.

---

P.S. I did have a question about the patch.  

The code uses an RLock.  Where are the places that can trigger reentracy?

With in a single method, successive calls to _genrand_int32() are ordered and 
can't be interleaved with reentrancy while still keeping the original order of 
generated random numbers.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2013-03-10 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Serhiy, please go ahead an apply your patch.  Be sure to restore the re cache 
tests that existed in Py3.2 as well.

Thank you.

--
assignee: rhettinger -> serhiy.storchaka
priority: normal -> high
stage: needs patch -> test needed

___
Python tracker 

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



[issue17394] Add slicing support to collections.deque

2013-03-10 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Once added, use it in threading.Condition().

--
assignee: rhettinger
components: Library (Lib)
messages: 183918
nosy: rhettinger
priority: low
severity: normal
status: open
title: Add slicing support to collections.deque
versions: Python 3.4

___
Python tracker 

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



[issue17394] Add slicing support to collections.deque

2013-03-10 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue11963] Remove human verification from test suite (test_parser and test_subprocess)

2013-03-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 222505a5aeac by Ezio Melotti in branch '3.2':
#11963: remove human verification from test_parser and test_subprocess.
http://hg.python.org/cpython/rev/222505a5aeac

New changeset cc08036b37a4 by Ezio Melotti in branch '3.3':
#11963: merge with 3.2.
http://hg.python.org/cpython/rev/cc08036b37a4

New changeset 629dba9f6746 by Ezio Melotti in branch 'default':
#11963: merge with 3.3.
http://hg.python.org/cpython/rev/629dba9f6746

--

___
Python tracker 

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



[issue11963] Remove human verification from test suite (test_parser and test_subprocess)

2013-03-10 Thread Ezio Melotti

Ezio Melotti added the comment:

This should be fixed now.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

John listed four modules with issues in the first message, and now we have 
proposals for two more modules.  Could you work together to make a unified 
patch?

Alexander, do you think there is a need to check python-ideas or python-dev 
before working on this?

(I changed the title to clarify scope: ISO 8601 is huge and not easily 
accessible whereas W3CDTF/RFC 3339 is narrower in scope and freely accessible.)

--
title: "datetime" cannot parse ISO 8601 dates and times -> datetime: add 
ability to parse RFC 3339 dates and times

___
Python tracker 

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



[issue17365] Remove Python 2 code from test_print

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

The cosmetic changes to whitespace and parens seem like diff noise to me.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue17351] Remove explicit "object" inheritance in Python 3 docs

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

Note that removing the unnecessary '(object)' may make it worse for e.g. 
beginners going from 3.x to 2.x, and slightly complicate porting patches.  
Raymond approves the removal, yet added '(object)' in a 3.3 doc file in 
5eca56b68840

--
nosy: +eric.araujo

___
Python tracker 

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



[issue17351] Remove explicit "object" inheritance in Python 3 docs

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

The changeset redirector seems broken, here’s the full link: 
http://hg.python.org/cpython/rev/5eca56b68840

FTR I am still in favor of removal regardless of the possible issues I noted in 
my previous comment.

--

___
Python tracker 

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



[issue17393] stdlib import mistaken for local by import_fixer

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

This is the cause for #13317

--
nosy: +eric.araujo

___
Python tracker 

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



[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

For the record this is caused by #17393

--

___
Python tracker 

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



[issue763043] unable to specify another compiler

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

Starting with Python 2.3, environment variables like CC (familiar to people 
compiling C projects on unix) are respected.  That’s what I think should be 
added to the distutils docs, maybe in the reference doc for build_ext, or in 
the narrative doc talking about extension modules.

--

___
Python tracker 

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



[issue17392] Python installer for Windows packages wrong zipfile.py

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

Could you explain what makes you say this?  Installers are built from the 
source code repository, not assembled by human copy-pasting, so such an error 
seems highly unlikely to me.  Please tell what Python versions you checked 
(i.e. versions from python.org or ActiveState or another distributor) and what 
is wrong with zipfile.py.  Thanks in advance.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue17390] display python version on idle title bar

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

Sounds like a good idea to me.  Would you like to propose a patch?  The 
devguide contains information to do that.

Hint: sys.version is not meant to be parsed, there is sys.version_info for that 
(no regex needed! :)

--
keywords: +easy
nosy: +eric.araujo, terry.reedy
stage:  -> needs patch
versions:  -Python 2.6, Python 3.1, Python 3.5

___
Python tracker 

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



[issue17351] Remove explicit "object" inheritance in Python 3 docs

2013-03-10 Thread Éric Araujo

Éric Araujo added the comment:

Disregard my comments, I reread only the start of the thread and missed the 
discussion about the descriptor tutorial.

--

___
Python tracker 

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



[issue17351] Remove explicit "object" inheritance in Python 3 docs

2013-03-10 Thread Éric Araujo

Changes by Éric Araujo :


--
Removed message: http://bugs.python.org/msg183923

___
Python tracker 

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



[issue17351] Remove explicit "object" inheritance in Python 3 docs

2013-03-10 Thread Éric Araujo

Changes by Éric Araujo :


--
Removed message: http://bugs.python.org/msg183930

___
Python tracker 

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



[issue17351] Remove explicit "object" inheritance in Python 3 docs

2013-03-10 Thread Éric Araujo

Changes by Éric Araujo :


--
Removed message: http://bugs.python.org/msg183924

___
Python tracker 

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



[issue17359] python modules.zip is not documented

2013-03-10 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo, ncoghlan
versions: +Python 3.2 -Python 3.5

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2013-03-10 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Éric> do you think there is a need to check python-ideas or python-dev before 
working on this?

Yes, I think this is python-ideas material.  IMHO, what should be added to 
datetime module in 3.4 is ability to construct date/time objects from their 
str() representation:

assert time(str(t)) == t
assert date(str(d)) == d
assert datetime(str(dt)) == dt

I am not sure the same is needed for timedelta, but this can be discussed.

Implementation of any external to python standard should be wetted at PyPI 
first.  There may be a reason why there is no rfc3339.py module on PyPI.

--

___
Python tracker 

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



[issue17390] display python version on idle title bar

2013-03-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree. Sometimes when I have multiple IDLE windows open I have to scroll back 
to the top to make sure which one I am in.  I suggest:
Python x.y Shell for shell window
I am not sure, for edit window: currently xxx.py -- /xxx.py
I am not sure the redundancy is needed, but I do tended to look at the isolated 
file name. Maybe "xxx.py -- in /" without filename at end.
Add 'Python x.y', 'Py x.y' 'x.y', beginning or end of line?

--
nosy: +serwy

___
Python tracker 

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



[issue17351] Remove explicit "object" inheritance in Python 3 docs

2013-03-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

My rationale for supporting removal is this: People beginning with Py3, which 
is most beginners in the next decade, seeing (object), might think it necessary 
in certain cases or that it does something. The descriptor how-to is a) 
advanced and b) can have a note if needed. People who know Py2 might get a 
wrong idea either way, but should read some 2 to 3 guide and then will know. If 
a choice be needed, I would rather cater to future Python learners.

Anyway, we only need Michael's word to know for sure which to patch, or can go 
ahead without touching mock-examples.

--

___
Python tracker 

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



[issue15806] Add context manager for the "try: ... except: pass" pattern

2013-03-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 406b47c64480 by Raymond Hettinger in branch 'default':
Issue #15806: Add contextlib.ignored().
http://hg.python.org/cpython/rev/406b47c64480

--
nosy: +python-dev

___
Python tracker 

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



[issue15806] Add context manager for the "try: ... except: pass" pattern

2013-03-10 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue17395] Wait for live children in test_multiprocessing

2013-03-10 Thread Ezio Melotti

New submission from Ezio Melotti:

While running test_multiprocessing I get:
[...]
test_wait_return (test.test_multiprocessing.WithManagerTestBarrier) ... ok
Shared objects which still exist at manager shutdown:
  b6b802d4:   refcount=1

  b6b80ea4:   refcount=1

  b6b83264:   refcount=1
[True, True, True, True]
  b6b836fc:   refcount=1
[16092, 16094, 16091, 16096]
  b6b89884:   refcount=2

  b6b89ea4:   refcount=1
[]
  b6b8b7dc:   refcount=1

  b6b8bc3c:   refcount=1
[16092, 16094, 16096, 16091]
test_notify (test.test_multiprocessing.WithManagerTestCondition) ... ok
[...]
test_event (test.test_multiprocessing.WithManagerTestEvent) ... ok
Shared objects which still exist at manager shutdown:
  b6dcc7a4:   refcount=1

test_lock (test.test_multiprocessing.WithManagerTestLock) ... ok
[...]

This seems to be caused by the fact that when multiprocessing.active_children() 
is called in test_multiprocessing.ManagerMixin.tearDownClass(), some of them 
are still marked as active.
I tried to add a sleep before the active_children() call and the output 
disappeared.  On my machine it takes about half second.

The attached patch checks in loop that there no active children left, waiting 
up to 5s in increasing time intervals starting from 0.01s (so in the best case 
scenario it won't wait at all, and in the worst it will wait ~5s and possibly 
report the shared objects that still exists).

--
components: Tests
files: slowmulti.diff
keywords: patch
messages: 183935
nosy: ezio.melotti, jnoller, pitrou, sbt, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Wait for live children in test_multiprocessing
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file29372/slowmulti.diff

___
Python tracker 

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



[issue17393] stdlib import mistaken for local by import_fixer

2013-03-10 Thread Lennart Regebro

Lennart Regebro added the comment:

Not really, but they are related. The fixer looks for a local module, and if it 
finds it it will assume the import is local. 

#13317 is caused by it not finding the module, since it's not built and hence 
assuming it's a global import.

This bug, contrariwise, is cause by the fixer finding a folder, and therefore 
assuming it is a local import when it's not.

The fix for this is to check that the folder has an __init__.py. The fix for 
#13317 is to build extensions before running 2to3.

Neither of them are huge problems since you can avoid both bugs but not using 
relative imports. :-)

--

___
Python tracker 

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



[issue16004] Add `make touch` to 2.7 Makefile

2013-03-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Yep, that should be fine for 2.7.

3.3+ adds more due to the importlib bootstrapping.

--

___
Python tracker 

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