[issue12415] Missing: How to checkout the Doc sources

2011-06-25 Thread Philip Olson

New submission from Philip Olson :

I was unable to determine how to download the Python documentation source files 
(for building via Sphinx) but did figure out the following:

   hg clone http://hg.python.org/cpython
   cd cpython/Doc
   make html

Where to get the Doc sources deserves a mention here:

   http://docs.python.org/dev/documenting/building.html

I don't know this topic so won't propose a patch, but building.txt should 
mention where/how to get 'Doc' before the 'cd Doc' example.

--
assignee: docs@python
components: Documentation
messages: 139147
nosy: docs@python, philip
priority: normal
severity: normal
status: open
title: Missing: How to checkout the Doc sources

___
Python tracker 

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



[issue12409] Moving "Documenting Python" to Devguide

2011-06-25 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I agree with Fred.

--
nosy: +rhettinger
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



[issue11682] PEP 380 reference implementation for 3.3

2011-06-25 Thread Nick Coghlan

Nick Coghlan  added the comment:

OK, this isn't going to be as simple as I thought it was. The big problem is 
that the test suite from [1] needs to be refactored into a format that is 
suitable for use in regrtest. That means porting them to either unittest or 
doctest, as "golden output" tests of the style that Greg used are no longer 
accepted as part of the regression test suite.

[1] 
http://www.cosc.canterbury.ac.nz/greg.ewing/python/yield-from/yield_from.html

--

___
Python tracker 

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



[issue10020] docs for sqlite3 describe functions not available without recompiling

2011-06-25 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Fixed in branch 2.7. Thanks Kristan. Eric, the documentation patch does not 
apply to 3.1 because those functions are not present in 3.1.

--
nosy: +orsenthil
status: open -> closed

___
Python tracker 

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



[issue12399] simplify cell var initialization by storing constant data on the code object

2011-06-25 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c5b0585624ef by Benjamin Peterson in branch 'default':
map cells to arg slots at code creation time (closes #12399)
http://hg.python.org/cpython/rev/c5b0585624ef

--
nosy: +python-dev
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



[issue12414] getsizeof() on code objects is wrong

2011-06-25 Thread Benjamin Peterson

New submission from Benjamin Peterson :

sys.getsizeof() on a code object returns on the size of the code struct, not 
the arrays and tuples which it references.

--
components: Interpreter Core
messages: 139142
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: getsizeof() on code objects is wrong
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



[issue10020] docs for sqlite3 describe functions not available without recompiling

2011-06-25 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 804a60029091 by Senthil Kumaran in branch '2.7':
Fix Issue10020 - Doc update to sqlite3 module in 2.7 branch.
http://hg.python.org/cpython/rev/804a60029091

--
nosy: +python-dev

___
Python tracker 

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



[issue11233] clarifying Availability: Unix

2011-06-25 Thread R. David Murray

R. David Murray  added the comment:

In another issue Georg came up with the idea of creating an availability 
directive that would auto link to the appropriate text.  This would then apply 
to all our different availability types.

--

___
Python tracker 

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



[issue10510] packaging upload/register should use CRLF in HTTP requests

2011-06-25 Thread R. David Murray

R. David Murray  added the comment:

I know this is closed so the comment may not be relevant, but the byte/string 
issues with email should be sorted out in the code that is in 3.2/3.3 at this 
point.  That is, it is possible once again to work with binary data, using the 
correct (new) classes.  If you have issues where things still don't work, 
please report them.  Note also that email now allows control of the generated 
linesep characters.  (That, unfortunately, won't help the python2 backport.)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue11682] PEP 380 reference implementation for 3.3

2011-06-25 Thread Nick Coghlan

Changes by Nick Coghlan :


--
assignee:  -> ncoghlan

___
Python tracker 

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



[issue12376] unittest.TextTestResult.__init__ does not pass on its init arguments in super call

2011-06-25 Thread R. David Murray

Changes by R. David Murray :


--
title: unittest.TextTestResult.__init__ breaks under complex __mro__ -> 
unittest.TextTestResult.__init__ does not pass on its init arguments in super 
call
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



[issue12376] unittest.TextTestResult.__init__ breaks under complex __mro__

2011-06-25 Thread R. David Murray

R. David Murray  added the comment:

I think we'll have to wait for Micheal to double check, but it looks to me like 
there is a bug in unittest.TextTestResult.  TestResult's init expects the three 
arguments the OP is talking about, but defaults them to None.  TextTestResult 
accepts those three arguments in its init with no defaults, but does not pass 
them to the base class in the super call.  If this is intentional, I would say 
that it needs to be documented, since it is not obvious why it would be done 
that way, since it does, in fact, break the "cooperating classes" model 
required to use super correctly.

(As an aside, I was quite surprised to find TextTestResult in the runner.py 
file rather than the result.py file within the unittest package.)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue12169] Factor out common code for d2 commands register, upload and upload_docs

2011-06-25 Thread John Edmonds

John Edmonds  added the comment:

Thanks for reviewing the patch.  I don't believe I received an email for the 
review.  I think I have addressed your comment about the usage of str(body) by 
removing the call to str() and changing the tests to use byte literals.

As for the content-length changing in the tests, that is because 
encode_multipart uses '\r\n' to end lines while the previous code only ended 
lines in '\n'.

--
Added file: http://bugs.python.org/file22478/patch.diff

___
Python tracker 

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



[issue12413] make faulthandler dump traceback of child processes

2011-06-25 Thread STINNER Victor

STINNER Victor  added the comment:

> since all the processes receive the signal at the same time,
> their outputs will be interleaved (we could maybe add a random
> sleep before dumping the traceback?)

If we have the pid list of the children, we can use an arbitrary sleep (e.g. 1 
second) before sending a signal to the next pid. Anyway, a sleep is the most 
reliable synchronization code after a crash/timeout.

--

___
Python tracker 

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



[issue12413] make faulthandler dump traceback of child processes

2011-06-25 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue12413] make faulthandler dump traceback of child processes

2011-06-25 Thread STINNER Victor

STINNER Victor  added the comment:

> since all the processes receive the signal at the same time,
> their outputs will be interleaved (we could maybe add a random
> sleep before dumping the traceback?)

And we have the pid list of the children, we can use an arbitrary sleep (e.g. 1 
second) before sending a signal to the next pid. Anyway, a sleep is the most 
reliable synchronization code after a crash/timeout.

--

___
Python tracker 

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



[issue12352] multiprocessing.Value() hangs

2011-06-25 Thread STINNER Victor

STINNER Victor  added the comment:

> _pending_free uses a lock internally to make it thread-safe, so I
> think this will have exactly the same problem

You are probably right. Can't we use a lock-less list? list.append is
atomic thanks to the GIL, isn't it? But I don't know how to implement
the lock-less list consumer. It would be nice to have a function to
remove and return the content of the list, an atomic "content=mylist[:];
del mylist[:]" function.

> (the trylock can fail in case of contention or free() from multiple
> threads, thus we can't be
> sure that the else clause is executed on behalf of the garbage
> collector and it won't run while we're adding the block to
> _pending_free)

If two threads call free at same time, the "second" (taking the GIL)
will add the block to pending_free.

> Anyway, this seems complicated and error-prone, disabling the gc seems
> the most straightforward way to handle that.

I don't like touching such global "variable", but you are right.

--

___
Python tracker 

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



[issue12413] make faulthandler dump traceback of child processes

2011-06-25 Thread STINNER Victor

STINNER Victor  added the comment:

Oh oh. I already thaugh to this feature, but its implementation is not trivial.

> As noted in issue #11870 ...

You mean that the tracebacks of children should be dumped on a timeout of the 
parent? Or do you also want them on a segfault of the parent? In my experience, 
the most common problem with the multiprocessing and subprocess modules is the 
hang.

The timeout is implemeted using a (C) thread in faulthandler. You can do more 
in a thread than in a signal handler ;-) A hook may be added to faulthandler to 
execute code specific to multiprocessing / subprocess.

> send a signal to its process group if the current process
> is the process group leader

In which case is Python the leader of the group? Is it the case by default? Can 
we do something to ensure that in regrtest, in multiprocessing tests or the 
multiprocessing module?

See also #5115 (for the subprocess module).

The subprocess maintains a list of the create subprocesses: subprocess.alive, 
but you need a reference a reference to this list (or you can access it using 
the Python namespace, but it requires the GIL and you cannot trust the GIL on a 
crash). 

subprocess can execute any program, not only Python. Send an arbitrary signal 
to a child process can cause issues.

Does multiprocessing maintain a list of child processes?

--

By the way, which signal do you want to send to the child processes? A test may 
replace the signal handler of your signal (most test use SIGALRM and SIGUSR1).

faulthandler.register() is not available on Windows.

--

crier ( https://gist.github.com/737056 ) is a tool similar to faulthandler, but 
it is implemented in Python and so is less reliable. It uses a different 
trigger: it checks if a file (e.g. /tmp/crier-) does exists.

A file (e.g. a pipe) can be used with a thread watching the file to send the 
"please dump your traceback" request to the child processes.

--

___
Python tracker 

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



[issue12413] make faulthandler dump traceback of child processes

2011-06-25 Thread Charles-François Natali

New submission from Charles-François Natali :

As noted in issue #11870, making faulthandler capable of dumping child 
processes' tracebacks could be a great aid in debugging tricky deadlocks 
involving for example multiprocessing and subprocess.
Since there's no portable way to find out child processes, a possible idea 
would be to make the handler send a signal to its process group if the current 
process is the process group leader.
Advantages:
- simple
- async-safe
Drawbacks:
- since all the processes receive the signal at the same time, their outputs 
will be interleaved (we could maybe add a random sleep before dumping the 
traceback?)
- children not part of the same process group (for example those who called 
setsid() or setpgrp()) won't be handled

I'm not sure how this would work out on Windows, but I don't event know if 
Windows has a notion of child processes or process groups...

--
components: Library (Lib)
messages: 139132
nosy: haypo, neologix
priority: normal
severity: normal
stage: needs patch
status: open
title: make faulthandler dump traceback of child processes
type: feature request

___
Python tracker 

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



[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on "x86 Ubuntu Shared 3.x"

2011-06-25 Thread Charles-François Natali

Charles-François Natali  added the comment:

> This skip gives very few information, and it is duplicated for each 
> function. I would prefer a constant of the "broken OSes" with your 
> following comment attached to the constant:

Ok, I'll try to write something along those lines.

> If the creation of a thread after a fork is reliable on some systems,
> we should not deny the creation of new threads after a fork.

Well, the problem is that it is not reliable on any platform, but happens to 
work "most of the time" on some platforms ;-)

--

___
Python tracker 

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



[issue12352] multiprocessing.Value() hangs

2011-06-25 Thread Charles-François Natali

Charles-François Natali  added the comment:

[...]
> def free(self, block):
>  if self._lock.acquire(False):
>     self._exec_pending_free()
>     self._free(block)
>  else:
>     # malloc holds the lock
>     self._pending_free.append(block)
>

_pending_free uses a lock internally to make it thread-safe, so I
think this will have exactly the same problem (the trylock can fail in
case of contention or free() from multiple threads, thus we can't be
sure that the else clause is executed on behalf of the garbage
collector and it won't run while we're adding the block to
_pending_free).

Anyway, this seems complicated and error-prone, disabling the gc seems
the most straightforward way to handle that.

--

___
Python tracker 

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



[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on "x86 Ubuntu Shared 3.x"

2011-06-25 Thread STINNER Victor

STINNER Victor  added the comment:

+@unittest.skipIf(sys.platform in ('freebsd4', 'freebsd5', 'freebsd6',
+ 'netbsd5', 'os2emx'), "due to known OS bug")

This skip gives very few information, and it is duplicated for each function. I 
would prefer a constant of the "broken OSes" with your following comment 
attached to the constant:

+# Between fork() and exec(), only async-safe functions are allowed (issues
+# #12316 and #11870), and fork() from a worker thread is known to trigger
+# problems with some operating systems: skip problematic tests on platforms
+# known to behave badly.

Or split the test case into two testcases: one using fork and skipped on broken 
platforms, one not using fork?

---

> As for test_3_join_in_forked_from_thread, well, it could be more
> or less the same problem. We're really doing something prohibited
> by POSIX, so things might break in unexpected ways.

If the creation of a thread after a fork is reliable on some systems, we should 
not deny the creation of new threads after a fork. You can replace "creation of 
new threads" by any other non async-safe function in my previous sentence. 
Therefore I agree that the good answer to this issue is to skip the test on 
"broken systems" (or should we call them "POSIX compliant systems?" :-)).

--

___
Python tracker 

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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread STINNER Victor

STINNER Victor  added the comment:

>Don't Try to use any fancy way to check if the join will hang,
> leave all the job to faulthandler.

> Victor, do you agree with the simpler method, depending
> on faulthandler to catch a hang in the test and fail it?
> Or is the explicit timeout better?

If the patch fixes the hang, there is no good reason to write code to handle a 
new hang.

We have generic "watchdogs":

 - buildbot timeout (any Python version)
 - regrtest timeout implemented using faulthandler (only in Python 3.x)

If you run directly the .py test file on a command line, you can still use 
CTRL+c or CTRL+z to interrupt / stop the process.

You may want to improve these generic watchdogs, but write a specific watchdog 
for one specific test function looks useless to me.

Remember that timeouts are not reliable: we have sometimes false failures 
because of very slow buildbots... For regrtest timeout, I tried 10, 15, 20 and 
30 minutes before choosing a timeout of 60 minutes. For lower values, we have 
many false failures.

--

___
Python tracker 

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



[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2011-06-25 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, there is another possible implementation: use a subprocess. But if the 
timeout is implemented using a subprocess, the syntax cannot be:

with timeout(5):
   do_something()

It should be something like:


timeout(5, """if 1:
   import os, sys
   ...
   do_something()
   ...
   sys.exit(0)
""")

Some tests are already doing that manually.

--

___
Python tracker 

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



[issue7365] grp and pwd should treat uid and gid as unsigned

2011-06-25 Thread Terry J. Reedy

Changes by Terry J. 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



[issue12352] multiprocessing.Value() hangs

2011-06-25 Thread STINNER Victor

STINNER Victor  added the comment:

Or you can combine your two ideas:

> in free(), perform a trylock of the mutex
> if the trylock fails, then create a new Finalizer to postpone the
freeing of the same block to a later time,...
> ... perform the freeing of pending blocks synchronously
> when malloc() is called

If free() is called indirectly from malloc() (by the garbage collector), free() 
adds the block to free in a "pending free" list. Pseudo code:

---
def __init__(self):
  ...
  self._pending_free = queue.Queue()

def _exec_pending_free(self):
  while True:
try:
  block = self._pending_free.get_nowait()
except queue.Empty:
  break
self._free(block)

def free(self, block):
  if self._lock.acquire(False):
 self._exec_pending_free()
 self._free(block)
  else:
 # malloc holds the lock
 self._pending_free.append(block)

def malloc():
  with self._lock:
self._malloc()
self._exec_pending_free()
---

Problem: if self._pending_free.append() appends whereas malloc() already 
exited, the free will have to wait until the next call to malloc() or free(). I 
don't know if this case (free() called while malloc() is running, but malloc() 
exits before free()) really occur: this issue is a deadlock because free() is 
"called" from malloc(), and so malloc() waits until the free() is done. It 
might occur if the garbage collector calls free after _exec_pending_free() but 
before releasing the lock.

--

___
Python tracker 

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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The patch to the multiprocessing code is trivial:
+del cache[self._job]

The difference in tests is
+with test.support.operation_timeout(5):
+p.join()
versus
+p.join()

Victor, do you agree with the simpler method, depending on faulthandler to 
catch a hang in the test and fail it? Or is the explicit timeout better?

--
stage: test needed -> patch review

___
Python tracker 

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



[issue11163] iter() documentation code doesn't work

2011-06-25 Thread Michael Grazebrook

Michael Grazebrook  added the comment:

Thank you.

On 25/06/2011 13:38, Raymond Hettinger wrote:
> Changes by Raymond Hettinger:
>
>
> --
> resolution:  ->  fixed
> status: open ->  closed
>
> ___
> Python tracker
> 
> ___
>
>
> -
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1388 / Virus Database: 1513/3725 - Release Date: 06/25/11
>
>
>

--

___
Python tracker 

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



[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2011-06-25 Thread STINNER Victor

STINNER Victor  added the comment:

alarm() is one possible implementation, but Charles-François listed some 
drawbacks.

You can also use resource.setrlimit(RLIMIT_CPU), but the timeout is the CPU 
time (e.g. you cannot stop a sleep) and it is not portable (e.g. resource is 
not available on Windows).

Another possible implementation is a thread. faulthandler uses an "hidden" 
thread (implemented in C): a thread ignoring all signals using pthread_sigmask. 
Python threads are not reliable for a timeout because of the GIL, and it is not 
easy to "interrupt" another thread from the "timeout" thread. For example, you 
cannot (easily) raise an exception in another thread.

> I'm not sure there's a reliable way to write such a general-purpose
> wrapper

I agree, but it doesn't mean that it is not possible :-)

I think that you should try to implement in C a thread ignoring all signals. It 
becomes more complex when you have to implement the "interrupt the current 
thread" (current thread, or maybe the thread using the operation_timeout 
context manager?) part.

I suppose that you will have to use low-level "tricks" and you will have to 
experiment your tool on different platform.

You should start this project outside CPython (as a third party module), and 
then ask for an integration when your work is well tested. You have to know 
that a module "dies" when it enters CPython: you have to wait something like 18 
months to modify it, so you have to be sure that your code is "correct" ;-)

--

___
Python tracker 

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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-25 Thread Vinay Sajip

Vinay Sajip  added the comment:

> If the code is compatible with 2.6+ only, the “2.5” Trove classifier should 
> not be used.  (Maybe I’m misunderstanding your point.)

I was referring to your comment about the X in X.Y.Z. We also need to bear in 
mind that you sometimes just get trove classifiers ending in ":: Python :: 2", 
with no more specific version information. (Of course, there can be a check for 
this, with perhaps an installation-time warning.)

--

___
Python tracker 

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



[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on "x86 Ubuntu Shared 3.x"

2011-06-25 Thread STINNER Victor

STINNER Victor  added the comment:

> Victor: to debug this kind of problem, it would be great
> if faulthandler could also dump tracebacks of children processes.
> Do you mind if I create a new issue?

Please open a new issue.

--

___
Python tracker 

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



[issue12296] Minor clarification in devguide

2011-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The parenthetical comment is a complete sentence, and no longer trivial. I 
would separate it and write it more simply as
"... their code. (This obviously does not apply to new classes, functions, or 
optional arguments.)"

--
nosy: +terry.reedy

___
Python tracker 

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



[issue5572] packaging should respect the LIBS configure env var

2011-06-25 Thread Roumen Petrov

Roumen Petrov  added the comment:

Collin, I'm sure that you could use LDFLAGS instead LIBS to boost python. If I 
remember well this require set_executables to be commented in setup.py.

--

___
Python tracker 

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



[issue12409] Moving "Documenting Python" to Devguide

2011-06-25 Thread Sandro Tosi

Sandro Tosi  added the comment:

Hi Fred, thanks for your input! Let's see what others think, but I think that 
at the very least, the "Building the documentation" section (that seams very 
specific to python) should be moved into the devguide.

--

___
Python tracker 

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



[issue12255] A few changes to .*ignore

2011-06-25 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Eric, sure go ahead. As I am not affected by remains of .rej and .orig (neither 
have I found their usefulness (yet)), so my concerns can be stepped over. Plus, 
I have found a way to ignore files via patterns in .hgrc.

I already see you and RDM proposing the change, so I am okay to follow. But if 
you think discussion in python-dev or python-committers would be helpful it 
would be a good idea, because it affects people's working environment and some 
might have some concerns or ideas (which might be helpful).

--

___
Python tracker 

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



[issue11898] Sending binary data with a POST request in httplib can cause Unicode exceptions

2011-06-25 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Hi Sorin,
On Sat, Jun 25, 2011 at 07:54:24PM +, sorin wrote:
> type(message_body) is str ... even if I tried to manually force
> Python for use bytes. It seams that in 2.7 bytes are alias to str.
> Due to this the code will fail to run only on 2.7 because it will
> try to convert  binary data to unicode string.

Bit confused here. You encode the string to bytes and decode it back
to str. One does not force bytes to str. And if you use, str or bytes
consistently in Python2.7 you wont face the problem.

--

___
Python tracker 

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



[issue5572] packaging should respect the LIBS configure env var

2011-06-25 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-25 Thread Éric Araujo

Éric Araujo  added the comment:

> Perhaps some mechanism needs to be provided to indicate additional
> processing options per script line:

Sure.  Higery will have to examine existing usage and think about 
setuptools→packaging transition.  We’ll start simple and easy (in other words, 
with something very similar to setuptools) and expand from that.

>> Version independence always means version independence in the same
>> major line of development (i.e. X number in X.Y.Z), or to put it
>> another way, version independence among the versions listed as
>> supported in the Trove classifiers.
> That can still be a problem with e.g. byte literals: 2.5 will raise
> SyntaxError where 2.6, 2.7 will not.

If the code is compatible with 2.6+ only, the “2.5” Trove classifier should not 
be used.  (Maybe I’m misunderstanding your point.)

--

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2011-06-25 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for your work.  I will make a final test and review and commit it in the 
coming days.  I’ll adapt the versionchanged text, since I won’t commit this in 
3.1 (in security mode now, not bugfix mode).

--
priority: normal -> high

___
Python tracker 

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



[issue10020] docs for sqlite3 describe functions not available without recompiling

2011-06-25 Thread Éric Araujo

Changes by Éric Araujo :


--
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



[issue12296] Minor clarification in devguide

2011-06-25 Thread Éric Araujo

Éric Araujo  added the comment:

Good idea.  So, any -1 on this:

(this obviously does not apply to new classes or functions, or new optional 
arguments)

--

___
Python tracker 

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



[issue5572] packaging should respect the LIBS configure env var

2011-06-25 Thread Éric Araujo

Éric Araujo  added the comment:

The distutils feature freeze doesn’t let us accept this patch, but there is 
definite value for packaging, so I will port it.  Thanks for the original patch!

--
resolution: wont fix -> 
status: closed -> open
title: distutils ignores the LIBS configure env var -> packaging should respect 
the LIBS configure env var

___
Python tracker 

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



[issue12169] Factor out common code for d2 commands register, upload and upload_docs

2011-06-25 Thread Éric Araujo

Éric Araujo  added the comment:

I made some comments on the code review site; maybe you didn’t get the email, 
there is a known bug about that.  You can follow the “review” link on the right 
of the patch file to see it.

I have closed #10510, which asked that HTTP request use CRLF for maximum 
compatibility.  The current patch does it.

--

___
Python tracker 

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



[issue11898] Sending binary data with a POST request in httplib can cause Unicode exceptions

2011-06-25 Thread sorin

sorin  added the comment:

I have to add some details here. First, this bug has nothing to do with the 
URL, it does reproduce for normal urls.


Still the problem with the line: "msg += message_body" is quite complex when 
combined with Python 2.7:

type(msg) is unicode
type(message_body) is str ... even if I tried to manually force Python for use 
bytes. It seams that in 2.7 bytes are alias to str. Due to this the code will 
fail to run only on 2.7 because it will try to convert  binary data to unicode 
string.

If I am not mistaken the code will work with Python 3.x, because there bytes() 
are not str().

--

___
Python tracker 

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



[issue10510] packaging upload/register should use CRLF in HTTP requests

2011-06-25 Thread Éric Araujo

Éric Araujo  added the comment:

> I'm having a look at this ticket now. It looks like this can be
> rewritten to use common code

Indeed!  As such, I’m folding this feature request into #12169, which has a 
patch under review.

--
resolution:  -> duplicate
stage: needs patch -> committed/rejected
status: open -> closed
superseder:  -> Factor out common code for d2 commands register, upload and 
upload_docs
title: distutils upload/register should use CRLF in HTTP requests -> packaging 
upload/register should use CRLF in HTTP requests

___
Python tracker 

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



[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions

2011-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

In 2.7, bytes is an alias for str to aid porting to 3.x.
>>> bytes is str
True
>>> type(bytes())


I suspect the doc uses 'bytes' rather than 'str' because it was backported from 
3.x. Perhaps it should be changed but I do not know the policy on using the 
alias in 2.6/7 docs.

I presume in 2.7 io.BytesIO is similar, if not equivalent to io.StringIO, but 
it is not an alias. Again, it was added so 2.7 code could use a bytes memory 
buffer that would remain bytes in 3.x and not become unicode text, like 
StringIO does.

--

___
Python tracker 

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



[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions

2011-06-25 Thread R. David Murray

R. David Murray  added the comment:

No, that's correct.  In python 2.x the 'bytes' stuff is just a portability aid. 
 In 2.x, bytes and string are the same type.  In Python 3 they aren't, so by 
using the 'fake' classes in python2 you can often make your code work correctly 
on both python2 and python3.

So, can this issue be closed, or do you think there is still might be a valid 
backward compatibility issue?

--

___
Python tracker 

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



[issue10510] distutils upload/register should use CRLF in HTTP requests

2011-06-25 Thread Stephen Thorne

Stephen Thorne  added the comment:

Okay, I looked at this, then I ran into str/byte type problems with the email 
module. Will wait until 'email' is sorted out before I consider a ticket like 
this one again.

--

___
Python tracker 

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



[issue12341] Some additions to .hgignore

2011-06-25 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset ee9eb4e05180 by Ezio Melotti in branch '2.7':
#12341: add coverage files/dirs to .hgignore. Patch by Sandro Tosi.
http://hg.python.org/cpython/rev/ee9eb4e05180

--

___
Python tracker 

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



[issue12352] multiprocessing.Value() hangs

2011-06-25 Thread Charles-François Natali

Changes by Charles-François Natali :


Added file: http://bugs.python.org/file22477/heap_gc_deadlock.diff

___
Python tracker 

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



[issue12352] multiprocessing.Value() hangs

2011-06-25 Thread Charles-François Natali

Changes by Charles-François Natali :


Removed file: http://bugs.python.org/file22476/heap_gc_deadlock.diff

___
Python tracker 

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



[issue12409] Moving "Documenting Python" to Devguide

2011-06-25 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr.  added the comment:

-1

> Hi! We have the devguide now, and it should be the place where to look
> for references and docs about contributing to Python, that means also
> for the documentation.

For information specific to the Python documentation itself, but not
relevant to users documenting their own projects, yes.

> In the official Python doc we have a section "Documenting Python"
> (http://docs.python.org/py3k/documenting/index.html) and I think it
> should be merged into the devguide - what's your opinion on that?

The scope of this document is much larger than Python's documentation,
but extends to all projects written in Python that use Sphinx as their
documentation tool.  With that, it makes sense to keep it as part of
the documentation for users of Python.

--
nosy: +fdrake

___
Python tracker 

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



[issue12352] multiprocessing.Value() hangs

2011-06-25 Thread Charles-François Natali

Changes by Charles-François Natali :


--
keywords: +patch
Added file: http://bugs.python.org/file22476/heap_gc_deadlock.diff

___
Python tracker 

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



[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions

2011-06-25 Thread sorin

sorin  added the comment:

You are right, I debugged the problem a little more and discovered at least one 
bug in PyAMF.

Still, I was surprised to find out something very strange, it look that 
BytesIO.getvalue() does return `str` even if the documentation says it does 
return `bytes`. Should I file another bug?

Python 2.7.1 (r271:86832, Jun 13 2011, 14:28:51) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import io
>>> a = io.BytesIO()
>>> a
<_io.BytesIO object at 0x10f9453b0>
>>> a.getvalue()
''
>>> print type(a.getvalue())

>>>

--

___
Python tracker 

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



[issue12352] multiprocessing.Value() hangs

2011-06-25 Thread Charles-François Natali

Charles-François Natali  added the comment:

Patch (with test) attached. It disables the garbage collector inside
critical sections.
Of course, if another thread re-enables the gc while the current
thread is inside a critical section, things can break (the probability
is really low, but who knows).
I can't think of any satisfying solution, since it's tricky, because
we don't want it to be thread-safe but reentrant, which is much more
difficult.
I've got another patch which does the following:
- in free(), perform a trylock of the mutex
- if the trylock fails, then create a new Finalizer to postpone the
freeing of the same block to a later time, when the gc is called
- the only problem is that I have to build a dummy reference cycle to
pass it to Finalize if I want free() to be called by the GC later (and
not when the object's reference count drops to 0, otherwise we would
get an infinite recursion).

Another solution would be to make the Finalizer callback run lockless,
maybe just set add the block number to a list/set, and perform the
freeing of pending blocks synchronously when malloc() is called (or
the heap is finalized). There are two drawbacks to that:
- adding an element to a set is not guaranteed to be thread-safe
(well, it is under cPython because of the GIL)
- freeing blocks synchronously means that the blocks won't be freed
until malloc() is called (which could be never)

Suggestions welcome.

--

___
Python tracker 

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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad

mouad  added the comment:

Here is a new patch that in the opposite of the first one, it don't try to 
check if the pool.join() will hang or no, after a discussion with neologix in 
issue #12410 .

--

___
Python tracker 

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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad

Changes by mouad :


Added file: http://bugs.python.org/file22475/issue-12157.patch

___
Python tracker 

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



[issue4608] urllib.request.urlopen does not return an iterable object

2011-06-25 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: flox -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue4608] urllib.request.urlopen does not return an iterable object

2011-06-25 Thread Stefan Schwarzer

Stefan Schwarzer  added the comment:

It turned out that although the addinfourl instance had the `__iter__` 
attribute in `addbase.__init__` correctly assigned, `__iter__` wasn't found by 
the `iter` builtin. It seems that `iter` always tries to use the `__iter__` 
method of the _class_ and doesn't look at the instance.

Riccardo Attilio Galli and I made the attached patch. The patch also fixes a 
corresponding `TypeError` for "file://" URLs, not just "ftp://"; URLs.

--
nosy: +sschwarzer
Added file: http://bugs.python.org/file22474/issue4608.diff

___
Python tracker 

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



[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2011-06-25 Thread mouad

mouad  added the comment:

Thanks for the instructive feedback :)

I totally agree i guess there is a lot of issues that i didn't think of :-(, my 
first thinking was to use "Pool.join" timeout argument but it was removed in 
3.2 (by the way i didn't find the issue or the rational that lead to this 
change).

And now that i know about "faulthandler" module i guess that will make also my 
life easier :), i will rewrite the patch in the issue #12157 to not use any 
*fancy* way to check if it will hang.

cheers,

--

___
Python tracker 

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



[issue975330] Inconsistent newline handling in email module

2011-06-25 Thread Dave King

Dave King  added the comment:

Added some tests against the patch provided by R. David Murray. See attached 
patch.

Tests pass against default.

--
nosy: +davbo
Added file: http://bugs.python.org/file22473/base_encode_tests.patch

___
Python tracker 

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



[issue12403] Mention sys.displayhook in code module docs and the compile builtin docs

2011-06-25 Thread R. David Murray

R. David Murray  added the comment:

Well, sys.stdout and sys.stderr don't have to be real file objects.  You could 
substitute a file-like object (one that implements the methods that get called 
during the interpretation loop) that does your multiplexing.  That kind of 
trick is one of the things that makes Python so much fun to work with :)

--

___
Python tracker 

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



[issue12374] Execution model should explain compile vs definition vs execution time

2011-06-25 Thread R. David Murray

R. David Murray  added the comment:

You could try the mentors list or Doug Hellman's volunteer group, too.

--

___
Python tracker 

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



[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-25 Thread engelbert gruber

engelbert gruber  added the comment:

patch to test_marshal.py that obviously fails in current implementation.

IMHO is file might not be seekable one can not cache so maybe do not do it.

--
nosy: +grubert
Added file: http://bugs.python.org/file22472/multiple_dump_load_test.patch

___
Python tracker 

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



[issue12412] non defined representation for pwd.struct_passwd

2011-06-25 Thread R. David Murray

R. David Murray  added the comment:

Looks like the difference between a regular tuple and a named tuple.  The 
correct test is to access the members using the names, and the test suite 
currently does this.  The repr shouldn't, I think, be required to be identical.

On the other hand, if pypy is implementing named tuples and the repr doesn't 
include the names, perhaps there is a missing test in the tests of named tuples.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue11669] Clarify Lang Ref "Compound statements" footnote

2011-06-25 Thread Sandro Tosi

Changes by Sandro Tosi :


--
keywords:  -needs review
Added file: http://bugs.python.org/file22471/issue11669-default.patch

___
Python tracker 

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



[issue11669] Clarify Lang Ref "Compound statements" footnote

2011-06-25 Thread Sandro Tosi

Sandro Tosi  added the comment:

Ok, I send it too soon... attached is a patch to fix this bug (it applies on 
default, 3.2 and 2.7).

--

___
Python tracker 

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



[issue11669] Clarify Lang Ref "Compound statements" footnote

2011-06-25 Thread Sandro Tosi

Sandro Tosi  added the comment:

Just to make explicit what's happening:


>>> try:
... try:
... raise TypeError()
... finally:
... raise ValueError()
... except TypeError as e:
... print('mmm')
... 
Traceback (most recent call last):
  File "", line 3, in 
TypeError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 5, in 
ValueError

while


>>> try:
... try:
... raise TypeError()
... finally:
... raise ValueError()
... except ValueError as e:
... print ('mmm')
... 
mmm

--
nosy: +sandro.tosi

___
Python tracker 

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



[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2011-06-25 Thread Charles-François Natali

Charles-François Natali  added the comment:

It's a little bit more complicated than that:
- signals and threads don't mix well together
- this will make syscalls fail with EINTR
- the old SIGALRM handler is lost
- etc

In short, don't use signals.
I'm not sure there's a reliable way to write such a general-purpose wrapper 
(usually one can use select() with a timeout or spawn a subprocess and use 
communicate's timeout to achieve this kind of things).
In your use case (issue #12157), I think that letting the test block is fine, 
since:
- there's no easy way to add a timeout (but you could spawn a new interpreter 
and use communicate with a timeout if you really wanted to)
- it will be caught by the faulthandler module
- a test killed by faulthandler's timeout is more interesting to fix that a 
"common" failed test ;-)

--
nosy: +neologix

___
Python tracker 

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



[issue12412] non defined representation for pwd.struct_passwd

2011-06-25 Thread Francisco Garcia

New submission from Francisco Garcia :

pwd.struct_passwd has different representations in cpython 2.7.2 and pypy 1.5

A unit test from cpython might enforce the same representation across 
interpreters:

>>> print pwd.getpwuid(os.getuid())

Current cpython output:

pwd.struct_passwd(pw_name='demo_user', pw_passwd='', pw_uid=1001, 
pw_gid=100, pw_gecos='demo_user', pw_dir='/Users/demo_user', 
pw_shell='/bin/bash')

Current pypy output
('demo_user', '', 1001, 100, 'demo_user', '/Users/demo_user', 
'/bin/bash')

--
messages: 139090
nosy: fgarciar
priority: normal
severity: normal
status: open
title: non defined representation for pwd.struct_passwd
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue12341] Some additions to .hgignore

2011-06-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

Fixed during the EuroPython sprint, thanks for the patch!

--
nosy: +ezio.melotti
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



[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2011-06-25 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +haypo

___
Python tracker 

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



[issue12341] Some additions to .hgignore

2011-06-25 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset ef306bd1d122 by Ezio Melotti in branch 'default':
#12341: add coverage files/dirs to .hgignore. Patch by Sandro Tosi.
http://hg.python.org/cpython/rev/ef306bd1d122

--

___
Python tracker 

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



[issue12341] Some additions to .hgignore

2011-06-25 Thread Éric Araujo

Éric Araujo  added the comment:

Please backport.

--
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-06-25 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Made a simple fix to keep the cache from growing without bound.
Leaving this open for 3.3 as a feature request to implement a more 
sophisticated strategy using file hashes or somesuch.

--

___
Python tracker 

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-06-25 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2bacaf6a80c4 by Raymond Hettinger in branch '3.2':
Issue 11802:  filecmp cache was growing without bound.
http://hg.python.org/cpython/rev/2bacaf6a80c4

New changeset 8f4466619e1c by Raymond Hettinger in branch 'default':
Issue 11802:  filecmp cache was growing without bound.
http://hg.python.org/cpython/rev/8f4466619e1c

--

___
Python tracker 

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



[issue6721] Locks in python standard library should be sanitized on fork

2011-06-25 Thread Tomaž Šolc

Changes by Tomaž Šolc :


--
nosy: +avian

___
Python tracker 

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



[issue12411] cgi.parse_multipart is broken on 3.x

2011-06-25 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +haypo

___
Python tracker 

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



[issue6721] Locks in python standard library should be sanitized on fork

2011-06-25 Thread Giovanni Bajo

Giovanni Bajo  added the comment:

If there's agreement that the general problem is unsolvable (so fork and 
threads just don't get along with each other), what we could attempt is trying 
to limit the side effects in the standard library, so that fewest users as 
possible are affected by this problem.

For instance, having deadlocks just because of print statements sounds like a 
bad QoI that we could attempt to improve. Is there a reason while BufferedIO 
needs to hold its internal data-structure lock (used to make it thread-safe) 
while it's doing I/O and releasing the GIL? I would think that it's feasible to 
patch it so that its internal lock is only used to synchronize accesses to the 
internal data structures, but it is never held while I/O is performed (and thus 
the GIL is released -- at which point, if another threads forks, the problem 
appears).

--
nosy: +Giovanni.Bajo

___
Python tracker 

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



[issue11233] clarifying Availability: Unix

2011-06-25 Thread Sandro Tosi

Changes by Sandro Tosi :


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

___
Python tracker 

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-06-25 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 11568c59d9d4 by Raymond Hettinger in branch '2.7':
Issue 11802:  filecmp cache was growing without bound.
http://hg.python.org/cpython/rev/11568c59d9d4

--
nosy: +python-dev

___
Python tracker 

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



[issue12411] cgi.parse_multipart is broken on 3.x

2011-06-25 Thread Jonas Wagner

New submission from Jonas Wagner :

While writing tests for the cgi module I came across what looks like a 
conversion bug.

cgi.parse_multipart is comparing values it reads from a binary file like with a 
string literal:
line = fp.readline()
...
if line.startswith("--"):

This patch adds fixes the issue and adds test for it.

--
components: Library (Lib)
files: cgi-coverage.diff
keywords: patch
messages: 139082
nosy: jonas.wagner
priority: normal
severity: normal
status: open
title: cgi.parse_multipart is broken on 3.x
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file22470/cgi-coverage.diff

___
Python tracker 

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



[issue11763] assertEqual memory issues with large text inputs

2011-06-25 Thread Michael Foord

Michael Foord  added the comment:

Sorry, ignore that. I see that the patch already passes maxDiff to truncate_str.

--

___
Python tracker 

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



[issue11763] assertEqual memory issues with large text inputs

2011-06-25 Thread Michael Foord

Michael Foord  added the comment:

The basic idea of the patch is good, but instead of introducing _MAX_LENGTH, 
maxDiff should be reused.

--

___
Python tracker 

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



[issue12296] Minor clarification in devguide

2011-06-25 Thread Sandro Tosi

Sandro Tosi  added the comment:

(this obviously does not apply to new classes, functions or *optional* 
arguments) ?

--
nosy: +sandro.tosi

___
Python tracker 

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



[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2011-06-25 Thread mouad

Changes by mouad :


Added file: http://bugs.python.org/file22469/operation_timeout.patch

___
Python tracker 

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



[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2011-06-25 Thread mouad

Changes by mouad :


Removed file: http://bugs.python.org/file22467/operation_timeout.patch

___
Python tracker 

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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad

mouad  added the comment:

The test case use a helper function in test/support.py that i have proposed in 
issue #12410.

I'm dropping this comment here because i don't have the rights to edit the 
issue dependency.

cheers;

--

___
Python tracker 

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



[issue12403] Mention sys.displayhook in code module docs and the compile builtin docs

2011-06-25 Thread Miki Tebeka

Miki Tebeka  added the comment:

Yeah, I though about using dup2 from stdout/stderr to the socket. However this 
means I can connect only one client at a time. Which was an issue I was trying 
to avoid. Didn't think about print statements though ...

Thanks.

--

___
Python tracker 

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



[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on "x86 Ubuntu Shared 3.x"

2011-06-25 Thread Charles-François Natali

Charles-François Natali  added the comment:

test_2_join_in_forked_process fails on FreeBSD 6.4 buildbot.
http://www.python.org/dev/buildbot/all/builders/x86 FreeBSD 6.4 
3.x/builds/1606/steps/test/logs/stdio

"""
==
FAIL: test_2_join_in_forked_process (test.test_threading.ThreadJoinOnShutdown)
--
Traceback (most recent call last):
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_threading.py", 
line 464, in test_2_join_in_forked_process
self._run_and_join(script)
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_threading.py", 
line 436, in _run_and_join
self.assertEqual(data, "end of main\nend of thread\n")
AssertionError: '' != 'end of main\nend of thread\n'
+ end of main
+ end of thread
"""

I think it's the same problem as issue #12316: in the child process, even 
calling pthread_create can segfault/abort on FreeBSD6 (async-safe blahblah...).
Tests creating a thread from a fork()ed process should be skipped on FreeBSD6.
Patch attached, along with some refactoring to use the skipIf idiom.

As for test_3_join_in_forked_from_thread, well, it could be more or less the 
same problem. We're really doing something prohibited by POSIX, so things might 
break in unexpected ways. For example, calling pthread_condition_destroy from 
the child process can deadlock (see http://bugs.python.org/issue6721#msg136047).

Victor: to debug this kind of problem, it would be great if faulthandler could 
also dump tracebacks of children processes. Do you mind if I create a new issue?

--
keywords: +patch
nosy: +neologix
Added file: http://bugs.python.org/file22468/test_threading_fork.diff

___
Python tracker 

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



[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2011-06-25 Thread mouad

New submission from mouad :

While working on issue #12157 [http://bugs.python.org/issue12157], I needed a 
function that make sure that an operation will not hang forever, for this 
reason i have create this helper function that support the context manager 
protocol and accept a timeout as an argument and raise an IOError if the 
operation didn't terminate before that timeout.

--
components: Tests
files: operation_timeout.patch
keywords: patch
messages: 139075
nosy: mouad
priority: normal
severity: normal
status: open
title: Create a new helper function that enable to test that an operation don't 
hang more than a given timeout.
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file22467/operation_timeout.patch

___
Python tracker 

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



[issue11869] Include information about the bug tracker Rietveld code review tool

2011-06-25 Thread Sandro Tosi

Changes by Sandro Tosi :


--
nosy: +sandro.tosi

___
Python tracker 

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



[issue12403] Mention sys.displayhook in code module docs and the compile builtin docs

2011-06-25 Thread R. David Murray

R. David Murray  added the comment:

Well, the code is being executed by an exec call on a code object that was 
compiled with the 'single' flag, which is what causes non-None values to get 
"printed".  The compile docs aren't clear on how "printed" is implemented, but 
the answer is that it calls sys.displayhook.  So the way to control that part 
of the output is to assign your own function to sys.displayhook.  None of this 
is documented, and it should be (it took me a while to figure it out, and I had 
a suspicions about how it worked), so I'm changing this to a documentation bug.

However, you mention in the other ticket that are trying to do the interactive 
interpreter trick through a socket.  For that application I think you want to 
ignore both the write method and sys.displayhook, and instead directly patch 
sys.stdout and sys.stderr. Otherwise you'd also miss output sent to those 
destinations via print statements or writing directly to the sys objects, which 
would confuse the user of your interface since the in the normal interactive 
prompt those show up on the console.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, r.david.murray
stage:  -> needs patch
title: Allow overriding of writing to stdout in code.InteractiveConsole -> 
Mention sys.displayhook in code module docs and the compile builtin docs
type: feature request -> behavior
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



[issue12086] Tutorial doesn't discourage name mangling

2011-06-25 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Added an example of how to use double underscores correctly.  

I agree with Ezio that the rest of the documentation is clear on the subject.

--
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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad

Changes by mouad :


Added file: http://bugs.python.org/file22466/issue-12157.patch

___
Python tracker 

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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad

Changes by mouad :


Removed file: http://bugs.python.org/file22461/support.patch

___
Python tracker 

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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad

Changes by mouad :


Removed file: http://bugs.python.org/file22460/test_multiprocess.patch

___
Python tracker 

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



[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad

Changes by mouad :


Removed file: http://bugs.python.org/file22459/pool.patch

___
Python tracker 

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



[issue12086] Tutorial doesn't discourage name mangling

2011-06-25 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 79f9698777b7 by Raymond Hettinger in branch '3.2':
Issue 12086: add example showing how to use name mangling.
http://hg.python.org/cpython/rev/79f9698777b7

New changeset fca745bc70be by Raymond Hettinger in branch 'default':
Issue 12086: add example showing how to use name mangling.
http://hg.python.org/cpython/rev/fca745bc70be

--

___
Python tracker 

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



  1   2   >