[issue11771] hashlib object cannot be pickled

2011-04-07 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

heh yeah.  while all hash functions do have internal state and someone
could conceivably want to store such a state (it basically amounts to
queued up partial block of input data if any and the current starting
IV) there are not consistent APIs to expose that and I really don't
see why it'd be worth trying to find them.

remember, hashlib doesn't have to be openssl.  there are non openssl
libtomcrypt based versions and someone nice should write a libnss
based version someday.

i'd mark this won't fix. :)

-Greg

On Tue, Apr 5, 2011 at 7:02 AM, Antoine Pitrou rep...@bugs.python.org wrote:

 Antoine Pitrou pit...@free.fr added the comment:

 Why on Earth would you want to serialize a hashlib object?
 It makes as much sense as serializing, say, a JSONEncoder.

 --
 nosy: +gregory.p.smith, pitrou

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue11771
 ___


--

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



[issue11771] hashlib object cannot be pickled

2011-04-07 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

I also recommend closing this one.

--
nosy: +rhettinger

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



[issue11715] Building Python on multiarch Debian and Ubuntu

2011-04-07 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

The FreeBSD and Solaris bots are failing:

dpkg-architecture: not found
error: build/temp.freebsd-8.2-RELEASE-amd64-3.3-pydebug/multiarch: No such file 
or directory
[62607 refs]
*** Error code 1


find_executable.patch should solve the problem.

--
Added file: http://bugs.python.org/file21558/find_executable.patch

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



[issue11791] python -m doctest has a -v flag that it ignores

2011-04-07 Thread Devin Jeanpierre

New submission from Devin Jeanpierre jeanpierr...@gmail.com:

The usage string details a -v option, but python -m doctest doesn't use a -v 
option.

The attached patch adds that.

--
files: doctest_verbosity.diff
keywords: patch
messages: 133195
nosy: Devin Jeanpierre
priority: normal
severity: normal
status: open
title: python -m doctest has a -v flag that it ignores
versions: Python 3.2
Added file: http://bugs.python.org/file21559/doctest_verbosity.diff

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



[issue11777] Executor.map does not submit futures until iter.next() is called

2011-04-07 Thread ysj.ray

ysj.ray ysj@gmail.com added the comment:

Got it. Seems the behavior is not consist with the Executor.map() function:

The returned iterator raises a TimeoutError if __next__() is called and the 
result isn't available after timeout seconds from ***the original call to 
map()***

--

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



[issue11777] Executor.map does not submit futures until iter.next() is called

2011-04-07 Thread Brian Quinlan

Brian Quinlan br...@sweetapp.com added the comment:

Nice catch. I hadn't noticed that the docs are lying :-)

--

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



[issue11771] hashlib object cannot be pickled

2011-04-07 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
resolution:  - wont fix
status: open - closed

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



[issue11792] asyncore module print to stdout

2011-04-07 Thread Samuele Kaplun

New submission from Samuele Kaplun samuele.kap...@cern.ch:

The method log_info of the dispatcher class of the asyncore.py module, uses 
print statement to print to stdout.

This lead to conflicts when asyncore is used within e.g. mod_wsgi, as writing 
to stdout is not supposed to be valid.

--
components: Library (Lib)
messages: 133198
nosy: kaplun
priority: normal
severity: normal
status: open
title: asyncore module print to stdout
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1

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



[issue11793] raw strings

2011-04-07 Thread chaos

New submission from chaos 846909...@qq.com:

 print(r'\')
  
SyntaxError: EOL while scanning string literal
 print(r'\'')
\'


--
messages: 133199
nosy: chaos
priority: normal
severity: normal
status: open
title: raw strings
type: compile error
versions: Python 3.2

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



[issue11794] Backport new logging docs to 2.7

2011-04-07 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

Vinay did some great work on the logging documentation for 3.2 
(http://docs.python.org/py3k/library/logging).

However, a lot of people will currently miss it, since they land on the 
existing 2.7 documentation (http://docs.python.org/library/logging) instead.

A backport would update the web site immediately, and then be incorporated in 
the bundled documentation when 2.7.2 is released (presumably later this year).

Backporting should be relatively straightforward (since logging hasn't changed 
*that* much between 2.7 and 3.2), but isn't completely trivial (since details 
of the Python 3 only items will need to be removed and the changed in and 
added in notices will need to be updated to reflect the information in the 
existing 2.x series documentation)

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 133200
nosy: docs@python, ncoghlan
priority: normal
severity: normal
status: open
title: Backport new logging docs to 2.7
versions: Python 2.7

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



[issue11793] raw strings

2011-04-07 Thread chaos

chaos 846909...@qq.com added the comment:

I think it should be

 print(r'\')
\
 print(r'\'')

SyntaxError: EOL while scanning string literal


--

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



[issue1690608] email.utils.formataddr() should be rfc2047 aware

2011-04-07 Thread Torsten Becker

Torsten Becker torsten.bec...@gmail.com added the comment:

Hi David, thank you for polishing up the patch and committing it. :)
I am glad I could help and I was actually about to ask you if you knew
any follow-up issues.  I'll definitely continue contributing as time
allows.  I did not submit the agreement yet, but I'll look into that
ASAP.

--

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



[issue11793] raw strings

2011-04-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

This is by design and documented:
http://docs.python.org/reference/lexical_analysis.html


String quotes can be escaped with a backslash, but the backslash remains in the 
string; for example, r\ is a valid string literal consisting of two 
characters: a backslash and a double quote; r\ is not a valid string literal 
(even a raw string cannot end in an odd number of backslashes).
Specifically, a raw string cannot end in a single backslash (since the 
backslash would escape the following quote character). Note also that a single 
backslash followed by a newline is interpreted as those two characters as part 
of the string, not as a line continuation.


--
nosy: +amaury.forgeotdarc
resolution:  - invalid
status: open - closed

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



[issue11762] Ast doc: warning and version number

2011-04-07 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Sounds good to me, except for Use *ast.__version__* to work across versions. 
which is not quite clear.

While talking about version numbers, we should probably also document *what 
changed* between those versions.

--
nosy: +georg.brandl

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



[issue11789] Extend upon metaclass/type class documentation, here: zope.interface and usage of instances of classes as base classes

2011-04-07 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

This doesn't work as you show.  What you probably meant was something like this:

class InterfaceBase(type):
...

Interface = InterfaceBase('Interface', (), {})

class IFoo(Interface):
...


which you can just as well do by using normal metaclass syntax.

--
nosy: +georg.brandl

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



[issue11792] asyncore module print to stdout

2011-04-07 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
assignee:  - giampaolo.rodola
nosy: +giampaolo.rodola
stage:  - needs patch
versions: +Python 3.2, Python 3.3 -Python 2.6

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



[issue11792] asyncore module print to stdout

2011-04-07 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

What change are you proposing exactly?
Btw, overriding log_info() in such cases seems reasonable to me, without 
changing anything in asyncore.

--

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



[issue2736] datetime needs an epoch method

2011-04-07 Thread Velko Ivanov

Velko Ivanov viva...@ivanov-nest.com added the comment:

On 04/05/2011 18:22, Alexander Belopolsky wrote:
 
 The datetime module intended to be an island of relative sanity.
 ...  - Tim Peters

Refusing to cooperate with the rest of the world is not sane by my books.

On 04/05/2011 21:06, Alexander Belopolsky wrote:
 Converting datetime values to float is easy.   If your dt is a naive instance 
 representing UTC time:

 timestamp = (dt - datetime(1970, 1, 1)) / timedelta(seconds=1)

 If your dt is an aware instance:

 timestamp = (dt - datetime(1970, 1, 1, tzinfo=timezone.utc)) / 
 timedelta(seconds=1)

Please add these lines to the datetime module's documentation. In some 
central, well lit place. I believe that if nothing else, the whole 
discussion should have proved to you that there are many people looking 
for them.

OTOH a sinceepoch(epoch=datetime(1970,1,1)) method of the datetime class 
should be equally easy. Would be especially useful if few of the more 
frequently used EPOCHs are provided as constants.

--

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



[issue11792] asyncore module print to stdout

2011-04-07 Thread Samuele Kaplun

Samuele Kaplun samuele.kap...@cern.ch added the comment:

Thanks for looking into it.

Indeed that's the workaround I implemented in our application. On the other 
hand it would be nice if either:

* the log_info method would print to stderr,
* would use warning.warn()
* would use the logging module to allow for fine grained configuration

The 1st solution would be already enough for mod_wsgi usage (also see: 
http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Writing_To_Standard_Output)

Cheers!

--

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



[issue11792] asyncore module print to stdout

2011-04-07 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

asyncore is a minimalistic and generic framework; as such it should not 
privilege a specific application such as mod_wsgi or make any other 
assumption.

I'd say it's fine to let user decide what to do in its own subclass.

Furthermore, log_info() is used by asyncore only to warn about events which are 
supposed to be handled by user via method overriding (e.g. handle_read()). It's 
not something you want wsgi or any other application except yours to be aware 
of.

--

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



[issue11793] raw strings

2011-04-07 Thread chaos

chaos 846909...@qq.com added the comment:

Sorry for my poor english and thank you for the answer.
Since I'm a perler, I think this is counterintuitive.
(In perl:
print '\';  #print \
print '\''; #error
print \; #print 
print \;  #error
)

--

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



[issue11792] asyncore module print to stdout

2011-04-07 Thread Samuele Kaplun

Samuele Kaplun samuele.kap...@cern.ch added the comment:

Hi Giampaolo,

shouldn't then the 2nd option I was proposing (i.e. to call warning.warn) the 
best behavior, given your explanation?

[...]
Warning messages are typically issued in situations where it is useful to alert 
the user of some condition in a program, where that condition (normally) 
doesn’t warrant raising an exception and terminating the program. For example, 
one might want to issue a warning when a program uses an obsolete module.

Python programmers issue warnings by calling the warn() function defined in 
this module. (C programmers use PyErr_WarnEx(); see Exception Handling for 
details).
[...]

In this case asyncore might want raise a warning, since the client code of 
asyncore was expected to handle the event.

If the semantic of log_info is to basically alert the developer is there any 
particular benefit in printing directly to stdout rather than raising a warning 
(or simply printing to stderr)?

Ciao!

--

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



[issue11795] Better core dev guidelines for committing submitted patches

2011-04-07 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

Based on a core-mentoring thread, a couple more points for:
http://docs.python.org/devguide/committing.html#handling-other-s-code

Attribution:
- add to Misc/ACKS if they aren't already there (and didn't add themselves in 
their patch)
- mention Patch by x in the NEWS entry and the checkin message*
- If I had to substantially change or fix a patch, I'll usually amend the 
acknowledgement to Initial patch by x

*(If I forget to say something in the checkin message, I generally don't worry 
about it - ACKS and NEWS are the important ones)

Contributor Licensing Agreements
- it's unlikely bug fixes will require a CLA unless they touch a *lot* of code
- new features often get into CLA-preferred territory, as the associated 
comments, docstrings and documentation are far more likely to reach a 
copyrightable standard
- for sprints, we now just collect CLAs as a matter of course, since there 
isn't any real inconvenience in doing so

--
assignee: ncoghlan
components: Devguide
messages: 133212
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Better core dev guidelines for committing submitted patches

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



[issue11796] list and generator expressions in a class definition fail if expression condition refers to a class variable

2011-04-07 Thread Menno Smits

New submission from Menno Smits me...@freshfoo.com:

A list comprehension or generator expression in a class definition fails with 
NameError if it has a condition that refers to another class variable. This 
doesn't occur if the class variable is used the in part of the expression.

The following works:

class Foo:
x = range(3)
y = [z for z in x]

but this doesn't:

class Foo:
x = 3
y = [z for z in range(5) if z  x]

The error reported is: NameError: global name 'x' is not defined

Both of these examples work in Python 2.

Issue3692 suggests that class variables can't be referred to inside list 
comprehensions and gen expressions inside class definitions and that this won't 
be fixed, but these examples show that it is possible to refer to an outside 
class variable depending on usage. This is inconsistent and confusing.

The Python 2 behaviour makes much more sense. I understand that we don't want 
list comprehensions to leak internal variables but they should still be able to 
pull names from outside scopes in a consistent way.

--
components: Interpreter Core
messages: 133213
nosy: mjs0
priority: normal
severity: normal
status: open
title: list and generator expressions in a class definition fail if expression 
condition refers to a class variable
type: behavior
versions: Python 3.2

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



[issue6715] xz compressor support

2011-04-07 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea -Christophe Simonis

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



[issue6715] xz compressor support

2011-04-07 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

Having Christophe Simonis in the nosy list is precluding NOSY changes. I 
guess the space is causing problems. Should we forbid spaces in usernames 
(maybe provided by OpenID, who knows)???

What do we need to progress in this issue?.

A rewrite to use Python 3 IO facilities?.

--

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



[issue11571] Turtle window pops under the terminal on OSX

2011-04-07 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

+1 on applying the patch. 

I can do so on Sunday but feel to apply the patch before that.

--

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



[issue6715] xz compressor support

2011-04-07 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Having Christophe Simonis in the nosy list is precluding NOSY
 changes. I guess the space is causing problems. Should we forbid
 spaces in usernames (maybe provided by OpenID, who knows)???

Please report this in the meta-tracker (link on the left).

 What do we need to progress in this issue?.
 
 A rewrite to use Python 3 IO facilities?.

See Nadeem's recent work on the bz2 module.

--

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



[issue9670] Exceed Recursion Limit in Thread

2011-04-07 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Running the test in a separate process is a good idea.

The patch should be fine and fixes a problem on OSX, if the buildbot for 
FreeBSD starts to complain we can always removing the #if that tests for that 
platform.

--

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



[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-04-07 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue10791] Wrapping TextIOWrapper around gzip files

2011-04-07 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue6715] xz compressor support

2011-04-07 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

Reported to metatracker. Thanks for the kick :-).

As a reference, I think you are refering to #5863 and #10791. Pretty fine job, 
I must say.

Nadeem, what do you think?. Is xz in your list?.

--

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



[issue11715] Building Python on multiarch Debian and Ubuntu

2011-04-07 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

Stefan, thanks for the patch.  The problem is that on FreeBSD and Solaris, if 
the command fails, I/O redirection does not create the file, whereas on Linux 
and OS X it does.  So I was going to wrap the os.remove() of the temp file in a 
try/except.  But I like your patch better because it avoids the 
dpkg-architecture call in the first place on systems that don't have it, albeit 
at the cost of traversing $PATH.

--

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



[issue11795] Better core dev guidelines for committing submitted patches

2011-04-07 Thread Nadeem Vawda

Changes by Nadeem Vawda nadeem.va...@gmail.com:


--
nosy: +nadeem.vawda

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



[issue11715] Building Python on multiarch Debian and Ubuntu

2011-04-07 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset c8738114b962 by Barry Warsaw in branch '3.1':
Refinement by Stefan Krah (see issue 11715, msg133194) to exit early if the
http://hg.python.org/cpython/rev/c8738114b962

New changeset 3d7c9b38fbfd by Barry Warsaw in branch '3.2':
Refinement by Stefan Krah (see issue 11715, msg133194) to exit early if the
http://hg.python.org/cpython/rev/3d7c9b38fbfd

New changeset bbfc65d05588 by Barry Warsaw in branch 'default':
Refinement by Stefan Krah (see issue 11715, msg133194) to exit early if the
http://hg.python.org/cpython/rev/bbfc65d05588

--

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



[issue11700] mailbox.py proxy updates

2011-04-07 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

On Thu, Apr 07, 2011 at 01:12:46AM +, R. David Murray wrote:
 [...] should be sufficient.

It is sufficient to fix the resource warning.
Having a completely dynamic language is a nice thing.
I would not do it like that.

Instead i would even consider to provide at least ProxyFile 
publically (i.e. in I/O), because it is a nifty thing which may 
be useful for a number of applications. 
(PartialFile is probably too complicated in respect to SMP and FD 
sharing to be public as a generic (non-abstract) class.) 

I don't want to come up with a C++ lib again, but there Device-s 
are doubly-linked (spinlock protected), and each has a list of 
attached Stream-s, and upon program exit the list(s) is/are 
walked:

open:
IO::Device::open(): already open!!%@
\tI'll fail with Errno::ebusy now.%@
close:
IO::Device::close(): device *not* open!!%@
\tThis may break non-debug enabled code...%@
\tI'll fail with Errno::enodev now.%@

IO::Device::close(): error occurred while closing one%@
\tof the still attached streams!%@
~Device:
IO::Device::~Device(): still isOpen()!%@
\tEither subclass::close() does not call Device::close(),%@
\tor it's destructor does not check the open state.%@
\tI'll clean up anyway. Expect crashes soon.%@

Stream somewhat likewhat.  The Issues #11767, #11466, #11701, to 
name a few, would never happen there if at least one test uses at 
least one of the involved classes once.

Now this is not true for Python's I/O, but i think that the 
interface should at least be complete and act as documented, 
so saying file-like object implies raising of ValueError if 
an object is closed etc. 
Even if the class is a somewhat hidden implementation detail. 

So of course hasattr() could be used instead of a special member 
to test for is_open().  (I hope it's slower than the latter.) 
There is no IOXY.open(), so, well, ok.

By the way, mailbox.py also has some other pitfalls as far as 
i remember; i think i've even seen calls to _lock_file() for 
a successful is_locked() (self._locked or so) state, which results 
in unlocking because of cleanup due to lock-taking failure; 
it was a shallow look only. 
(That is, because: rescue me from here!!!)

I'll attach 11700.yeah.diff, which inherits from RawIOBase; 
it's test adds some stuff naively. 
Note this is a few-hours hack in an area i haven't touched that 
much yet; it's a bit mysterious which I/O base class implements 
which functions or expects which function to be present in 
a subclass ...  And which raises what and when. 
That is - i would need to regulary review that at least once 
before i would ship that out for real. 
And i'll attach 11700.sigh.diff, which does only what is 
necessary, following your suggestions.

Now this: choose the right diff and i'll implement #11783. 
:)

--
Added file: http://bugs.python.org/file21560/11700.yeah.diff
Added file: http://bugs.python.org/file21561/11700.sigh.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11700
___diff --git a/Lib/mailbox.py b/Lib/mailbox.py
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -1864,40 +1864,125 @@
 Message with MMDF-specific properties.
 
 
-class _ProxyFile:
-A read-only wrapper of a file.
+class _ProxyFile(io.RawIOBase):
+A io.RawIOBase inheriting read-only wrapper for a seekable file.
+It supports __iter__() and the context-manager protocol.
+
+def __init__(self, file, pos=None):
+If pos is not None then the file will keep track of its position.
+self._file = file
+self._pos = pos
+self._trackpos = True if pos is not None else False
+self._close = True
+self._is_open = True
 
-def __init__(self, f, pos=None):
-Initialize a _ProxyFile.
-self._file = f
-if pos is None:
-self._pos = f.tell()
+def _set_noclose(self):
+Subclass hook - use to avoid closing internal file object.
+self._close = False
+
+def _closed_check(self):
+Raise ValueError if not open.
+if not self._is_open:
+raise ValueError('I/O operation on closed file')
+
+def close(self):
+if self._close:
+self._close = False
+self._file.close()
+del self._file
+self._is_open = False
+
+@property
+def closed(self):
+return not self._is_open
+
+def _write_check(self):
+Raises io.UnsupportedOperation.
+raise io.UnsupportedOperation('ProxyFile is readonly')
+
+#def fileno(self):
+def flush(self):
+self._closed_check()
+self._write_check()
+
+#def isatty(self):
+
+def _read(self, size, read_method, add_arg=None):
+if size  

[issue11715] Building Python on multiarch Debian and Ubuntu

2011-04-07 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset bd0f73a9538e by Barry Warsaw in branch '2.7':
Backport for Python 2.7 of issue 11715 support for building Python on
http://hg.python.org/cpython/rev/bd0f73a9538e

--

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



[issue11715] Building Python on multiarch Debian and Ubuntu

2011-04-07 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
resolution:  - fixed
status: open - closed

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



[issue11797] 2to3 does not correct reload

2011-04-07 Thread Miki Tebeka

New submission from Miki Tebeka miki.teb...@gmail.com:

The following code is not changed by 2to3::

import os
reload(os)

reload has moved to the imp module.

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 133223
nosy: tebeka
priority: normal
severity: normal
status: open
title: 2to3 does not correct reload

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



[issue11797] 2to3 does not correct reload

2011-04-07 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

This should get fixed, but I'm *really* curious about what kind of code 
actually needs to do this ;-)

--
keywords: +easy
nosy: +rhettinger
type:  - behavior

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Fabio Zadrozny

New submission from Fabio Zadrozny fab...@users.sourceforge.net:

Right now, when doing a test case, one must clear all the variables created in 
the test class, and I believe this shouldn't be needed...

E.g.:

class Test(TestCase):
  def setUp(self):
self.obj1 = MyObject()

  ...

  def tearDown(self):
del self.obj1

Ideally (in my view), right after running the test, it should be 
garbage-collected and the explicit tearDown wouldn't be needed (as the test 
would garbage-collected, that reference would automatically die), because this 
is currently very error prone... (and probably a source of leaks for any 
sufficiently big test suite).

If that's accepted, I can provide a patch.

--
components: Library (Lib)
messages: 133225
nosy: fabioz
priority: normal
severity: normal
status: open
title: Test cases not garbage collected after run
type: behavior
versions: Python 2.7, Python 3.2

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

You don't have to clear them; you just have to finalize them. Anyway, this is 
essentially impossible to do in a backward compatible way given that TestCases 
are expected to stay around.

--
nosy: +benjamin.peterson

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Jean-Paul Calderone

Jean-Paul Calderone invalid@example.invalid added the comment:

Trial lets test cases get garbaged collected.  When we noticed this wasn't 
happening, we treated it as a bug and fixed it.  No one ever complained about 
the change.  I don't see any obvious way in which an application would even be 
able to tell the difference (a user can tell the difference by looking at top). 
 In what case do you think this change would result in broken application code?

--
nosy: +exarkun

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Fabio Zadrozny

Fabio Zadrozny fab...@users.sourceforge.net added the comment:

I do get the idea of the backward incompatibility, although I think it's really 
minor in this case.

Just for some data, the pydev test runner has had a fix to clear those test 
cases for quite a while already and no one has complained about it (it actually 
makes each of the tests None after run, so, if someone tries to access it after 
that, it would be pretty clear that it's not there anymore).

--

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

2011/4/7 Jean-Paul Calderone rep...@bugs.python.org:

 Jean-Paul Calderone invalid@example.invalid added the comment:

 Trial lets test cases get garbaged collected.  When we noticed this wasn't 
 happening, we treated it as a bug and fixed it.  No one ever complained about 
 the change.  I don't see any obvious way in which an application would even 
 be able to tell the difference (a user can tell the difference by looking at 
 top).  In what case do you think this change would result in broken 
 application code?

I thought unittest was just handed a bunch of TestCase instances and
couldn't do much about insuring they were garbage collected.

--

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



[issue11700] mailbox.py proxy updates

2011-04-07 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I don't understand what you are saying about raising a ValueError on close.  f 
= open('x'); f.close(); f.close() does not raise any error, as Amaury pointed 
out.

So I still don't understand the motivation for a more complex fix.

--

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Jean-Paul Calderone

Jean-Paul Calderone invalid@example.invalid added the comment:

 I thought unittest was just handed a bunch of TestCase instances and couldn't 
 do much about insuring they were garbage collected.

True.  But unittest could ensure that it doesn't keep a reference to each 
TestCase instance after it finishes running it.  Then, if no one else has a 
reference either, it can be garbage collected.

--

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

A TestSuite (which is how tests are collected to run) holds all the tests and 
therefore keeps them all alive for the duration of the test run. (I presume 
this is the issue anyway.)

How would you solve this - by having calling a TestSuite (which is how a test 
run is executed) remove members from themselves after each test execution? (Any 
failure tracebacks etc stored by the TestResult would also have to not keep the 
test alive.)

My only concern would be backwards compatibility due to the change in behaviour.

--
assignee:  - michael.foord
nosy: +michael.foord

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



[issue11795] Better core dev guidelines for committing submitted patches

2011-04-07 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
nosy: +belopolsky

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



[issue11734] Add half-float (16-bit) support to struct module

2011-04-07 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
nosy: +belopolsky

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



[issue11492] email.header.Header doesn't fold headers at spaces if value contains '; 's

2011-04-07 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

OK, it looks like the wrapping problem arises when the line contains runs of 
blank delimited tokens longer than maxlinelen *and* the line also contains 
';'s.  The line is then split at the ';' and the remaining overlong pieces are 
not split.

I'll work on a fix.

--
stage: committed/rejected - needs patch
title: email.header.Header doesn't fold headers at spaces - 
email.header.Header doesn't fold headers at spaces if value contains ';'s

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



[issue11571] Turtle window pops under the terminal on OSX

2011-04-07 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

While you are at it, can you also fix the same issue with python -m tkinter?

--

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



[issue11571] Turtle window pops under the terminal on OSX

2011-04-07 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

.. and python -m turtledemo?

--

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Fabio Zadrozny

Fabio Zadrozny fab...@users.sourceforge.net added the comment:

The current code I use in PyDev is below -- another option could be not adding 
the None to the list of tests, but removing it, but I find that a bit worse 
because in the current way if someone tries to access it after it's ran, it'll 
become clear it was removed.

def run(self, result):
for index, test in enumerate(self._tests):
if result.shouldStop:
break
test(result)

# Let the memory be released! 
self._tests[index] = None

return result


I think the issue with the test result storing the test is much more difficult 
to deal with (because currently most unit test frameworks probably rely on 
having it there), so, that's probably not something I'd try to fix as it'd 
probably break many clients... in which case it should be expected that the 
test is kept alive if it fails -- but as the idea is that all has to turn green 
anyways, I don't see this as a big issue :)

--

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



[issue11571] Turtle window pops under the terminal on OSX

2011-04-07 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
nosy: +rhettinger

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Jean-Paul Calderone

Jean-Paul Calderone invalid@example.invalid added the comment:

Here's Trial's implementation: 
http://twistedmatrix.com/trac/browser/trunk/twisted/trial/runner.py#L138

--

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



[issue11751] Increase distutils.filelist test coverage

2011-04-07 Thread Justin Love

Justin Love pyt...@justinlove.name added the comment:

Removed NO COVER

Combined test_translate_pattern

Added on to some test names to make them more descriptive

--
Added file: 
http://bugs.python.org/file21562/increase_distutils_filelist_test_coverage_v2.patch

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Michael Foord

Michael Foord mich...@voidspace.org.uk added the comment:

Not keeping tests alive for the whole run seems like a good thing and either 
implementation seems fine to me. I'd be interested to hear if anyone else had 
any backwards compatibility concerns though.

--

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



[issue11795] Better core dev guidelines for committing submitted patches

2011-04-07 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I had some of the same questions, so I agree this would be a good addition.

--
nosy: +terry.reedy
stage:  - needs patch

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



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

 Not keeping tests alive for the whole run seems like a
 good thing 

+1

 and either implementation seems fine to me.

I slightly prefer Fabio;s assignment to None approach (for subtle reasons that 
I can't articulate at the moment).

--
nosy: +rhettinger

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



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Here is a patch containing three test cases that demonstrate three different 
failings of the header folding algorithm.  I'm working on the fix, but it is 
non-trivial.

--
components: +Library (Lib) -None
keywords: +patch
title: email.header.Header doesn't fold headers at spaces if value contains 
';'s - email.header.Header doesn't fold headers correctly
Added file: http://bugs.python.org/file21563/header_folding_tests.patch

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



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


Removed file: http://bugs.python.org/file21563/header_folding_tests.patch

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



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Note that 2.7 fails two of these tests as well, but for different reasons.  I'm 
not currently planning to fix 2.7, as its behavior at least (a) doesn't lose 
non-whitespace information and (b) doesn't exceed the maxheaderlen.

--
Added file: http://bugs.python.org/file21564/header_folding_tests.patch

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



[issue6040] bdist_msi does not deal with pre-release version

2011-04-07 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

To keep this focused, we should first try to make a test and patch for the 
stdlib, then discuss a recipe to work around the bug in unfixed versions.

--

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



[issue2736] datetime needs an epoch method

2011-04-07 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Thu, Apr 7, 2011 at 6:20 AM, Velko Ivanov rep...@bugs.python.org wrote:
..
 Converting datetime values to float is easy.   If your dt is a naive 
 instance representing UTC time:

     timestamp = (dt - datetime(1970, 1, 1)) / timedelta(seconds=1)

 If your dt is an aware instance:

     timestamp = (dt - datetime(1970, 1, 1, tzinfo=timezone.utc)) / 
 timedelta(seconds=1)

 Please add these lines to the datetime module's documentation. In some
 central, well lit place. I believe that if nothing else, the whole
 discussion should have proved to you that there are many people looking
 for them.

This is precisely what I suggested at the end of msg132697 above.  See
attached patch (issue2736-doc.diff) for a proposed documentation
enhancement.

--
Added file: http://bugs.python.org/file21565/issue2736-doc.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2736
___diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -720,6 +720,22 @@
out of the range of values supported by the platform C :c:func:`gmtime` 
function.
It's common for this to be restricted to years in 1970 through 2038. See 
also
:meth:`fromtimestamp`.
+
+   On the POSIX compliant platforms, ``utcfromtimestamp(timestamp)``
+   is equivalent to the following expression::
+
+ datetime(1970, 1, 1) + timedelta(seconds=timestamp)
+
+   There is no method to obtain the timestamp from a :class:`datetime`
+   instance, but POSIX timestamp corresponding to a :class:`datetime`
+   instance ``dt`` can be easily calculated as follows.  For a naive
+   ``dt``::
+
+  timestamp = (dt - datetime(1970, 1, 1)) / timedelta(seconds=1)
+
+   And for an aware ``dt``::
+
+  timestamp = (dt - datetime(1970, 1, 1, tzinfo=timezone.utc)) / 
timedelta(seconds=1)
 
 
 .. classmethod:: datetime.fromordinal(ordinal)
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11798] Test cases not garbage collected after run

2011-04-07 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue11757] test_subprocess.test_communicate_timeout_large_ouput failure on select(): negative timeout?

2011-04-07 Thread Charles-Francois Natali

Charles-Francois Natali neolo...@free.fr added the comment:

It seems to have fixed the failure, no ?
I don't know what's the policy regarding syscall parameters check, but
I think it'd be better to check that the timeout passed to select is
not negative, and raise an exception otherwise, instead of silently
storing it into struct timeval (with an overflow) before passing it to
select.
Attached is a patch + test that does just that.

--
keywords: +patch
Added file: http://bugs.python.org/file21566/select_negative_timeout.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11757
___diff -r bbfc65d05588 Lib/test/test_select.py
--- a/Lib/test/test_select.py   Thu Apr 07 10:48:29 2011 -0400
+++ b/Lib/test/test_select.py   Thu Apr 07 21:06:59 2011 +0200
@@ -20,6 +20,7 @@
 self.assertRaises(TypeError, select.select, [self.Nope()], [], [])
 self.assertRaises(TypeError, select.select, [self.Almost()], [], [])
 self.assertRaises(TypeError, select.select, [], [], [], not a number)
+self.assertRaises(ValueError, select.select, [], [], [], -1)
 
 def test_returned_list_identity(self):
 # See issue #8329
diff -r bbfc65d05588 Modules/selectmodule.c
--- a/Modules/selectmodule.cThu Apr 07 10:48:29 2011 -0400
+++ b/Modules/selectmodule.cThu Apr 07 21:06:59 2011 +0200
@@ -234,6 +234,11 @@
 timeout period too long);
 return NULL;
 }
+if (timeout  0) {
+PyErr_SetString(PyExc_ValueError,
+timeout must be non-negative);
+return NULL;
+}
 seconds = (long)timeout;
 timeout = timeout - (double)seconds;
 tv.tv_sec = seconds;
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7311] Bug on regexp of HTMLParser

2011-04-07 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 225400cb6e84 by Ezio Melotti in branch '3.2':
#7311: fix html.parser to accept non-ASCII attribute values.
http://hg.python.org/cpython/rev/225400cb6e84

New changeset a1dea7cde58f by Ezio Melotti in branch 'default':
#7311: merge with 3.2.
http://hg.python.org/cpython/rev/a1dea7cde58f

--

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



[issue7311] Bug on regexp of HTMLParser

2011-04-07 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


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

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



[issue11799] urllib HTTP authentication behavior with unrecognized auth method

2011-04-07 Thread Yuval Greenfield

New submission from Yuval Greenfield ubershme...@gmail.com:

When trying to use urllib to open a page from a server with NTLM authentication 
python raises urllib.error.HTTPError: HTTP Error 401: Unauthorized

A python 3 code example: http://codepad.org/axPomYHw

This was a bit confusing for me as I had to debug urllib to figure out python 
doesn't support NTLM. I'd expect python to tell me the authentication method 
isn't supported in such cases.

I didn't add a test for the attached patch as it doesn't seem test-worthy.

--
components: Library (Lib)
files: urllib.auth.patch
keywords: patch
messages: 133248
nosy: ubershmekel
priority: normal
severity: normal
status: open
title: urllib HTTP authentication behavior with unrecognized auth method
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file21567/urllib.auth.patch

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



[issue11797] 2to3 does not correct reload

2011-04-07 Thread Laurie Clark-Michalek

Laurie Clark-Michalek bluepepp...@archlinux.us added the comment:

Find a fixer for this attached. I really just did sed 's/intern/reload' 
fix_intern.py fix_reload.py, but it seems to work. I didn't write any tests (I 
couldn't seem to find any for any other fixers).

--
keywords: +patch
nosy: +BluePeppers
Added file: http://bugs.python.org/file21568/fix_reload.diff

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



[issue1475397] time.asctime_tz, time.strftime %z %C

2011-04-07 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
dependencies:  -Add aware local time support to datetime module
status: pending - closed

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



[issue11767] Maildir iterator leaks file descriptors by default

2011-04-07 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

Here is a new patch, that uses with in __getitem__. I wonder, if we shouldn't 
check for an AttributeError in case object returned by get_file doesn't have 
__exit__ method, but does have close and use close instead of with. But it's 
for you to decide, as I am very fresh to with statement.

--
Added file: http://bugs.python.org/file21569/11767_2.patch

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



[issue11791] python -m doctest has a -v flag that it ignores

2011-04-07 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Why do you say doctest doesn't use a -v option?

Compare

$ python -m doctest Lib/doctest.py 

and

$ python -m doctest -v Lib/doctest.py 
Trying:
runner = DebugRunner(verbose=False)
Expecting nothing
ok
...
66 tests in 112 items.
66 passed and 0 failed.
Test passed.

--
nosy: +belopolsky

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



[issue3754] cross-compilation support for python build

2011-04-07 Thread Roumen Petrov

Roumen Petrov bugtr...@roumenpetrov.info added the comment:

Uhh after some pseudo multiarch improvements previous patch fail. So new one is 
uploaded.
Also with this version cross-build won't build pgen$(EXEEXT).

--
Added file: http://bugs.python.org/file21570/python-py3k-20110407-CROSS.patch

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



[issue3871] cross and native build of python for mingw32 with distutils

2011-04-07 Thread Roumen Petrov

Roumen Petrov bugtr...@roumenpetrov.info added the comment:

Follow up updated patch to #3754

--
Added file: http://bugs.python.org/file21571/python-py3k-20110407-MINGW.patch

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



[issue11797] 2to3 does not correct reload

2011-04-07 Thread Miki Tebeka

Miki Tebeka miki.teb...@gmail.com added the comment:

Raymond: Sometimes I store configuration in Python files and would like to 
reload the configuration.

--

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



[issue11700] mailbox.py proxy updates

2011-04-07 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

On Thu, Apr 07, 2011 at 04:41:52PM +, R. David Murray wrote:
 
 R. David Murray rdmur...@bitdance.com added the comment:
 
 I don't understand what you are saying about raising a ValueError on close.
 f = open('x'); f.close(); f.close() does not raise any error, as Amaury 
 pointed out.
 
 So I still don't understand the motivation for a more complex fix.

Now i've indeed looked into io.rst and i've found this:

:class:`IOBase` provides these data attributes and methods:

.. method:: close()

  Flush and close this stream. This method has no effect if the file is
  [Mojo Risin', gotta Mojo Risin']
  already closed. Once the file is closed, any operation on the file
  (e.g. reading or writing) will raise a :exc:`ValueError`.
  [I gotta, wooo, yeah, risin']
  As a convenience, it is allowed to call this method more than once;
  only the first call, however, will have an effect.

And a minute ago i've also done this:

... def __init__(self):
... pass
... 
 dir(y)

and i've found out that i should have done that first, but i'm 
still surprised how easy Python is - 'am waiting for 
'as -o mb.o mailbox.py' to produce nice x86 pseudo machine code??

So i will reimplement yeah.diff even more fancy tomorrow, 
and (urgh!) add more tests for the new input functions. 
(I'll continue to discontinue support for read1().) 
That's what i will do.
Good night.

--

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



[issue11767] Maildir iterator leaks file descriptors by default

2011-04-07 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Ah, that's exactly why I suggested using the 'closing' context manager from 
contextlib.  That context manager returns the object passed to it, and then 
when its __exit__ method is called, calls the close method of that object that 
was passed to it.

--

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



[issue11768] test_signals() of test_threadsignals failure on Mac OS X

2011-04-07 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

The failure occurs also on Leopard:
--
[159/354] test_threadsignals
Thread 0x7fff7080f700:
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/test/test_threadsignals.py,
 line 53 in test_signals
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/unittest/case.py,
 line 387 in _executeTestPart
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/unittest/case.py,
 line 442 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/unittest/case.py,
 line 494 in __call__
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/unittest/suite.py,
 line 105 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/unittest/suite.py,
 line 67 in __call__
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/unittest/suite.py,
 line 105 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/unittest/suite.py,
 line 67 in __call__
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/test/support.py,
 line 1078 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/test/support.py,
 line 1166 in _run_suite
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/test/support.py,
 line 1192 in run_unittest
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/test/test_threadsignals.py,
 line 218 in test_main
  File ./Lib/test/regrtest.py, line 1032 in runtest_inner
  File ./Lib/test/regrtest.py, line 826 in runtest
  File ./Lib/test/regrtest.py, line 650 in main
  File ./Lib/test/regrtest.py, line 1607 in module
make: *** [buildbottest] Error 1
program finished with exit code 2
elapsedTime=3089.949146
--
http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.x/builds/1132/steps/test/logs/stdio

Even with d14eac872a46, this trace doesn't give more information :-/ Should I 
flush manually sys.stderr?

--
title: test_signals() of test_threadsignals failure on Mac OS X Tiger - 
test_signals() of test_threadsignals failure on Mac OS X

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



[issue11797] 2to3 does not correct reload

2011-04-07 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

Miki:  That's a really great use case.  Thanks.

--
priority: normal - high

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



[issue11791] python -m doctest has a -v flag that it ignores

2011-04-07 Thread Devin Jeanpierre

Devin Jeanpierre jeanpierr...@gmail.com added the comment:

*Sigh*, I'm just confused. Sorry, must have screwed up what I passed as verbose 
somewhere, so that it didn't check sys.argv.

--
resolution:  - invalid
status: open - closed
versions: +Python 3.3 -Python 3.2

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



[issue11767] Maildir iterator leaks file descriptors by default

2011-04-07 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

I am sorry. This is the first time I see contextlib and haven't understood, 
that I should use a function from it. Here is a version with mock object having 
close method and __getitem__ using contextlib.closing.

--
Added file: http://bugs.python.org/file21572/11767_3.patch

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



[issue11757] test_subprocess.test_communicate_timeout_large_ouput failure on select(): negative timeout?

2011-04-07 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

Adding that check with an exception to selectmodule.c is a good idea.
i like your patch.

--

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



[issue11797] 2to3 does not correct reload

2011-04-07 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue6715] xz compressor support

2011-04-07 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
nosy: +Christophe Simonis

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



[issue6715] xz compressor support

2011-04-07 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
nosy:  -georg.brandl

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



[issue6715] xz compressor support

2011-04-07 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
nosy: +georg.brandl

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-07 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

I added recently a --timeout option to regrtest.py: dump the traceback of all 
threads and exit if a test takes more than TIMEOUT seconds (issue #11727). But 
my implementation was not correct: the timeout is applied on the whole file, 
not on a single function. Attached patch fixes this issue.

--
components: Tests
files: regrtest_timeout.patch
keywords: patch
messages: 133262
nosy: haypo
priority: normal
severity: normal
status: open
title: regrtest --timeout: apply the timeout on a function, not on the whole 
file
versions: Python 3.3
Added file: http://bugs.python.org/file21573/regrtest_timeout.patch

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-07 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +michael.foord

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



[issue11799] urllib HTTP authentication behavior with unrecognized auth method

2011-04-07 Thread Yuval Greenfield

Yuval Greenfield ubershme...@gmail.com added the comment:

I noticed it's not only that python doesn't support NTLM, it's that I used 
Basic Auth which isn't NTLM. So I modified the patch to pertain to basic auth 
and digest as well.

--
Added file: http://bugs.python.org/file21574/urllib.auth2.patch

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



[issue11757] test_subprocess.test_communicate_timeout_large_ouput failure on select(): negative timeout?

2011-04-07 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

You may also patch poll_poll().

--

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-07 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I forgot to patch some calls to runtest(): new patch.

--
Added file: http://bugs.python.org/file21575/regrtest_timeout-2.patch

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-07 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


Removed file: http://bugs.python.org/file21573/regrtest_timeout.patch

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



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


Removed file: http://bugs.python.org/file21564/header_folding_tests.patch

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



[issue11492] email.header.Header doesn't fold headers correctly

2011-04-07 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Here is an updated test patch that brings the test coverage of the relevant 
code much closer to 100%.  There are still three lines and one branch 
uncovered, but it appears as though one of the bugs is preventing the test case 
that would produce full coverage from getting to the relevant code path.  This 
gives me enough coverage to feel safer mucking about with the algorithm.

--
Added file: http://bugs.python.org/file21576/header_folding_tests.patch

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



[issue11768] test_signals() of test_threadsignals failure on Mac OS X

2011-04-07 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

jseutter reproduced it after 112 and 49 runs on Snow Leopard using regrtest.py 
-F -v --timeout=60 test_threadsignals command:
---
[ 49] test_threadsignals
test_interrupted_timed_acquire (test.test_threadsignals.ThreadSignals) ... ok
test_lock_acquire_interruption (test.test_threadsignals.ThreadSignals) ... ok
test_lock_acquire_retries_on_intr (test.test_threadsignals.ThreadSignals) ... ok
test_rlock_acquire_interruption (test.test_threadsignals.ThreadSignals) ... ok
test_rlock_acquire_retries_on_intr (test.test_threadsignals.ThreadSignals) ... 
ok
test_signals (test.test_threadsignals.ThreadSignals) ... test_signals: acquire 
lock (thread 140735082572960)
test_signals: wait lock (thread 140735082572960)
Thread 0x7fff709aaca0:
  File /Users/jseutter/code/python/cpython/Lib/test/test_threadsignals.py, 
line 55 in test_signals
  File /Users/jseutter/code/python/cpython/Lib/unittest/case.py, line 387 in 
_executeTestPart
  File /Users/jseutter/code/python/cpython/Lib/unittest/case.py, line 442 in 
run
  File /Users/jseutter/code/python/cpython/Lib/unittest/case.py, line 494 in 
__call__
  File /Users/jseutter/code/python/cpython/Lib/unittest/suite.py, line 105 in 
run
  File /Users/jseutter/code/python/cpython/Lib/unittest/suite.py, line 67 in 
__call__
  File /Users/jseutter/code/python/cpython/Lib/unittest/suite.py, line 105 in 
run
  File /Users/jseutter/code/python/cpython/Lib/unittest/suite.py, line 67 in 
__call__
  File /Users/jseutter/code/python/cpython/Lib/unittest/runner.py, line 168 
in run
  File /Users/jseutter/code/python/cpython/Lib/test/support.py, line 1166 in 
_run_suite
  File /Users/jseutter/code/python/cpython/Lib/test/support.py, line 1192 in 
run_unittest
  File /Users/jseutter/code/python/cpython/Lib/test/test_threadsignals.py, 
line 221 in test_main
  File Lib/test/regrtest.py, line 1032 in runtest_inner
  File Lib/test/regrtest.py, line 826 in runtest
  File Lib/test/regrtest.py, line 650 in main
  File Lib/test/regrtest.py, line 1607 in module
---

So for an unknown reason, send_signals() thread was not created or doesn't 
start.

Example of the output of a success:
--
test_signals: acquire lock (thread 140735082572960)
test_signals: wait lock (thread 140735082572960)
send_signals: enter (thread 4326952960)
send_signals: raise SIGUSR1
send_signals: raise SIGUSR2
send_signals: release signalled_all
send_signals: exit (thread 4326952960)
test_signals: lock acquired
--

--

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



[issue11768] test_signals() of test_threadsignals failure on Mac OS X

2011-04-07 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Oh, the traceback only contains one thread, so send_signals() thread was not 
created or failed very quickly (before its first print instruction).

--

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



[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file

2011-04-07 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

The question is: what's the point? Having an individual test timeout is not 
more correct than having a timeout for a test file. Both are arbitrary. 
Therefore, I'd prefer we choose the simplest solution and this patch brings 
complication. I'm -0.5 on it.

--
nosy: +pitrou

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



[issue11777] Executor.map does not submit futures until iter.next() is called

2011-04-07 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 126353bc7e94 by Brian Quinlan in branch 'default':
Issue #11777: Executor.map does not submit futures until iter.next() is called
http://hg.python.org/cpython/rev/126353bc7e94

--
nosy: +python-dev

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



  1   2   >