[issue14983] [patch] email.generator should always add newlines after closing boundaries

2012-06-01 Thread Dmitry Shachnev

New submission from Dmitry Shachnev :

Trying to write a email-sending script with PGP-signing functionality, I 
stumbled upon a problem (see [1]): it was impossible to sign mutlipart emails 
(actually the signing was performed, but the verifying programs thought that 
the signature is bad).

After comparing messages produced by email.generator and popular mail clients 
(Evolution, KMail), I've found out that the mail clients always add line breaks 
after ending boundaries.

The attached patch makes email.generator behave like all email clients. After 
applying it, it's possible to sign even complicated mails like 
"multipart/alternate with attachments".

An illustration:

 --1== # Part 1 (base message) begin
 ...
 --2== # Part 1.1 begin
 ...
 --2== # Part 1.2 begin
 ...
 --2==--   # Part 1 end
   # There should be empty line here
 --1== # Part 2 (signature) begin
 ...
 --1==--   # End of the message

[1]: 
http://stackoverflow.com/questions/10496902/pgp-signing-multipart-e-mails-with-python

--
components: email
files: always_add_newlines.patch
keywords: patch
messages: 162126
nosy: barry, mitya57, r.david.murray
priority: normal
severity: normal
status: open
title: [patch] email.generator should always add newlines after closing 
boundaries
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file25798/always_add_newlines.patch

___
Python tracker 

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



[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow

Eric Snow  added the comment:

I've ironed out all 3 of my new tests that were still failing.

--
Added file: http://bugs.python.org/file25797/issue14673_full_3.diff

___
Python tracker 

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



[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Marc Abramowitz

Marc Abramowitz  added the comment:

[last: 0] marca@scml-marca:~/dev/git-repos/pip$ python3.3
Python 3.3.0a4 (v3.3.0a4:7c51388a3aa7, May 30 2012, 16:58:42) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pip import vcs
>>> from pkgutil import walk_packages, iter_modules
>>> print(list(iter_modules(path=vcs.__path__, prefix=vcs.__name__+'.')))
[]
>>> print(list(iter_modules(path=vcs.__path__)))
[]
>>> import pip.vcs.git
>>> pip.vcs.git

>>> import pip.vcs.mercurial
>>> pip.vcs.mercurial

>>> print(list(iter_modules(path=vcs.__path__, prefix=vcs.__name__+'.')))
[]
>>> print(list(iter_modules(path=vcs.__path__)))
[]

--

___
Python tracker 

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



[issue14965] super() and property inheritance behavior

2012-06-01 Thread Nick Coghlan

Changes by Nick Coghlan :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome

2012-06-01 Thread Alexandre Zani

Alexandre Zani  added the comment:

Here is my patch for it.

--
keywords: +patch
Added file: http://bugs.python.org/file25796/easier_element_init.patch

___
Python tracker 

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



[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Paul Nasrat

Paul Nasrat  added the comment:

I was pretty tired when debugging last night and just quickly looked at hg 
logs, so that may be misattributed.

I'll try come up with a clearer reproducer.

--

___
Python tracker 

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



[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Marc Abramowitz

Marc Abramowitz  added the comment:

Here's the pip issue: https://github.com/pypa/pip/issues/556

--

___
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

2012-06-01 Thread lesha

lesha  added the comment:

1) I'm totally in favor of making the standard library safe. For that purpose, 
I think we should do a combination of:

a) Use file locks in logging, whenever possible.

b) Introduce LockUnsafelyReinitializedAtFork, using a generation counter, or 
whatever else, which can be used by the few places in the standard library that 
can safely deal with lock reinitialization.

2) http://docs.python.org/library/subprocess.html#module-subprocess does not 
actually document that preexec_fn is unsafe and in need of deprecation. New 
users will continue to shoot themselves in the foot.

3) I think that in addition to making the standard library safe, all other 
locks need to be made sane (crash or deadlock), so that we at least always 
avoid the option "2) continue to execute the child despite it relying on an 
unsafe lock".

--

___
Python tracker 

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



[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow

Eric Snow  added the comment:

this time against TIP.

--
Added file: http://bugs.python.org/file25795/issue14673_full_2.diff

___
Python tracker 

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



[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow

Changes by Eric Snow :


Removed file: http://bugs.python.org/file25794/issue14673_full_2.diff

___
Python tracker 

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



[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow

Eric Snow  added the comment:

Applied all but one of the recommended changes.  Thanks, Barry!

--
Added file: http://bugs.python.org/file25794/issue14673_full_2.diff

___
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

2012-06-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

subprocess has nothing to do with this bug.  subprocess is safe as of Python 
3.2 (and the subprocess32 backport for 2.x).  Its preexec_fn argument is 
already documented as an unsafe legacy.  If you want to replace subprocess, go 
ahead, write something new and post it on pypi.  That is out of the scope of 
this issue.

Look at the original message I opened this bug with.  I *only* want to make the 
standard library use of locks not be a source of deadlocks as it is 
unacceptable for a standard library itself to force your code to adopt a 
threads only or a fork only programming style.  How we do that is irrelevant; I 
merely started the discussion with one suggestion.

Third party libraries are always free to hang their users however they see fit.

If you want to "log" something before deadlocking, writing directly to the 
stderr file descriptor is the best that can be done.  That is what exceptions 
that escape __del__ destructors do.

logging, http.cookiejar, _strptime  - all use locks that could be dealt with in 
a sane manner to avoid deadlocks after forking.

Queue, concurrent.futures & threading.Condition  - may not make sense to fix as 
these are pretty threading specific as is and should just carry the "don't 
fork" caveats in their documentation.


(My *real* preference would be to remove os.fork() from the standard library.  
Not going to happen.)

--

___
Python tracker 

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



[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 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



[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Eric V. Smith

Eric V. Smith  added the comment:

I don't think this is related to PEP 420. Adding Brett.

--
nosy: +brett.cannon, eric.smith

___
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

2012-06-01 Thread lesha

lesha  added the comment:

Actually, we might be able to automatically spawn a safe fork server _only_ 
when people start mixing threading and subprocess.

I'm not totally sure if this would allow us to salvage multiprocessing as 
well...

The tricky bit is that we'd need to proxy into the fork server all the calls 
having to do with file descriptors / sockets that we would want to pass into 
the child processes.

That suggests to me that it'll be really hard to do this in a 
backwards-compatible way.

Given that subprocess is a pretty broken library, this might be a good time to 
replace it anyway.

--

___
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

2012-06-01 Thread lesha

lesha  added the comment:

A slightly more ambitious solution than crashing / deadlocking always is to 
have Python automatically spawn a "fork server" whenever you start using 
threads.

Then, you would be able to have "subprocess" work cleanly, and not worry about 
any of this stuff.

I don't know if we want to take the perf hit on "import threading" though...

--

___
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

2012-06-01 Thread lesha

lesha  added the comment:

I feel like I'm failing to get my thesis across. I'll write it out fully:

== Thesis start ==

Basic fact: It is an error to use threading locks in _any_ way after a
fork. I think we mostly agree on this. The programs we discussing are
**inherently buggy**.

We disagree on the right action when such a bug happens. I see 3 possibilities:

1) deadlock (the current behavior, if the lock was held in the parent at the 
time of fork)

2) continue to execute:
 a) as if nothing happened (the current behavior, if the lock was not
held in the parent)
 b) throw an Exception (equivalent to a, see below)

3) crash hard.

I think both 1 and 3 are tolerable, while 2 is **completely unsafe**
because the resulting behavior of the program is unexpected and unpredictable 
(data corruption, deletion, random actions, etc).

== Thesis end ==



I will now address Gregory's, Richard's, and Vinay's comments in view
of this thesis:



1) Gregory suggests throwing an exception when the locks are used in a
child. He also discusses some cases, in which he believes one could
safely continue execution.

My responses:

a) Throwing an exception is tatamount to continuing execution.

Imagine that the parent has a tempfile RAII object that erases the
file after the object disappears, or in some exception handler.

The destructor / handler will now get called in the child... and the
parent's tempfile is gone. Good luck tracking that one down.

b) In general, is not safe to continue execution on release(). If you
release() and reinitialize, the lock could still later be reused by
both parent and child, and there would still be contention leading to
data corruption.

c) Re: deadlocks are unacceptable...

A deadlock is better than data corruption. Whether you prefer a
deadlock or a crash depends on whether your system is set up to dump
core. You can always debug a deadlock with gdb. A crash without a core
dump is impossible to diagnose. However, a crash is harder to ignore,
and it lets the process recover. So, in my book, though I'm not 100%
certain: hard crash > deadlock > corruption

d) However, we can certainly do better than today:

i) Right now, we sometimes deadlock, and sometimes continue execution.
It would be better to deadlock always (or crash always), no matter how
the child uses the lock.

ii) We can log before deadlocking (this is hard in general, because
it's unclear where to log to), but it would immensely speed up
debugging.

iii) We can hard-crash with an extra-verbose stack dump (i.e. dump the lock 
details in addition to the stack)



2) Richard explains how my buggy snippets are buggy, and how to fix them.

I respond: Richard, thanks for explaining how to avoid these bugs!

Nonetheless, people make bugs all the time, especially in areas like
this. I made these bugs. I now know better, mostly, but I wouldn't bet on it.

We should choose the safest way to handle these bugs: deadlocking
always, or crashing always. Reinitializing the locks is going to cost
Python users a lot more in the long run. Deadlocking _sometimes_, as we do now, 
is equally bad. 

Also, even your code is potentially unsafe: when you execute the
excepthook in the child, you could be running custom exception logic,
or even a custom excepthook. Those could well-intentionedly, but
stupidly, destroy some of the parent's valuable data.



3) Vinay essentially says "using logging after fork is user error". 

I respond: Yes, it is. In any other logging library, this error would only 
result in mangled log lines, but no lasting harm.

In Python, you sometimes get a deadlock, and other times, mangled lines.

> logging is not doing anything to protect things *outside* of a single process 

A file is very much outside a single process. If you are logging to a file, the 
only correct way is to use a file lock. Thus, I stand by my assertion that 
"logging" is buggy.

Windows programs generally have no problems with this. fork() on UNIX gives you 
both the rope and the gallows to hang yourself.

Specifically for logging, I think reasonable options include:

a) [The Right Way (TM)] Using a file lock + CLOEXEC when available; this lets 
multiple processes cooperate safely.

b) It's okay to deadlock & log with an explanation of why the deadlock is 
happening.

c) It's okay to crash with a similar explanation.

d) It's pretty okay even to reinitialize logs, although mangled log lines do 
prevent automated parsing.



I really hope that my compact thesis can help us get closer to a consensus, 
instead of arguing about the details of specific bugs.

--

___
Python tracker 

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



[issue14446] Remove deprecated tkinter functions

2012-06-01 Thread R. David Murray

R. David Murray  added the comment:

The doc changes should be part of the patch.  I forget, though, if we 
completely delete deprecated stuff from the docs or if we keep a deprecation 
stub in place.  

Note that it is possible (although in this case probably not too likely) that 
the code will drift before 3.4 and the patch need to be regenerated.

--

___
Python tracker 

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



[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Paul Nasrat

Paul Nasrat  added the comment:

I stepped through in pdb

(Pdb) p i
<_frozen_importlib.FileFinder object at 0x101066090>
(Pdb) iter_importer_modules(i, prefix)
[]

(Pdb) p hasattr(importer, 'iter_modules')
False

2.7 uses

[]
(Pdb) pp dir(myimp)
['__doc__', '__init__', '__module__', 'find_module', 'iter_modules', 'path']

This seems related to http://www.python.org/dev/peps/pep-0420/

--
nosy: +pnasrat

___
Python tracker 

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



[issue14982] pkgutil.walk_packages seems to not work properly on Python 3.3a

2012-06-01 Thread Marc Abramowitz

New submission from Marc Abramowitz :

I noticed that pip wasn't working properly on Python 3.3a - notably, it wasn't 
able to load any of its own VCS modules -- it does this by using 
pkgutil.walk_packages

I think the problem is that the behavior of pkgutil.walk_packages changed in 
some incompatible way in 3.3 -- take a look at the following:

[last: 0] marca@scml-marca:~/dev/git-repos/lexicon$ 
../lexicon/.tox/py32/bin/python
Python 3.2.3 (v3.2.3:3d0686d90f55, Apr 10 2012, 11:25:50) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkgutil import walk_packages
>>> list(walk_packages('/Users/marca/dev/git-repos/lexicon/.tox/py33/lib/python3.3/site-packages/pip-1.1-py3.3.egg/pip/vcs'))
[(, 'lexicon', True), 
(, 'lexicon.alias_dict', False), 
(, 'lexicon.attribute_dict', False), 
(, 'reg_settings', False), 
(, 'setup', False)]
>>> ^D

[last: 10] marca@scml-marca:~/dev/git-repos/lexicon$ 
../lexicon/.tox/py33/bin/python
Python 3.3.0a3 (v3.3.0a3:0b53b70a40a0, May  1 2012, 11:39:35) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkgutil import walk_packages
>>> list(walk_packages('/Users/marca/dev/git-repos/lexicon/.tox/py33/lib/python3.3/site-packages/pip-1.1-py3.3.egg/pip/vcs'))
[]

--
components: Library (Lib)
messages: 162110
nosy: Marc.Abramowitz
priority: normal
severity: normal
status: open
title: pkgutil.walk_packages seems to not work properly on Python 3.3a
versions: Python 3.3

___
Python tracker 

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



[issue14446] Remove deprecated tkinter functions

2012-06-01 Thread Michael Driscoll

Michael Driscoll  added the comment:

I just noticed that we'll need to update the Documentation for tkinter too as 
it mentions the AtEnd etc methods. Do you want me to create a patch for that or 
a new ticket + patch?

--

___
Python tracker 

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



[issue14446] Remove deprecated tkinter functions

2012-06-01 Thread Michael Driscoll

Michael Driscoll  added the comment:

After reading up on both issues, I think I found all the instances that were 
deprecated and removed them. A patch is attached that includes the edits for 
tkinter/__init__.py and the _tkinter.c files.

--
keywords: +patch
nosy: +michael.driscoll
Added file: http://bugs.python.org/file25793/tkinter.patch

___
Python tracker 

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



[issue14975] import unicodedata, DLL load failed on Python 2.7.3

2012-06-01 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



[issue14975] import unicodedata, DLL load failed on Python 2.7.3

2012-06-01 Thread Gavin Burnell

Gavin Burnell  added the comment:

I've had the same problem on a Win64 install of EPD 7.3 (Python 2.7.3). This 
was after installing over the top of a 2.7.2 install. Properly removing and 
re-installing from clean fixed the problem.

--
nosy: +Gavin.Burnell

___
Python tracker 

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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-06-01 Thread Ronan Lamy

Ronan Lamy  added the comment:

OK, that makes sense pragmatically.

Here's the patch then. I wasn't sure where to put the test, it doesn't actually 
have much in common with the rest of 
Lib/importlib/test/import_/test_packages.py but the name fits, so...

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

___
Python tracker 

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



[issue14957] Improve docs for str.splitlines

2012-06-01 Thread R. David Murray

R. David Murray  added the comment:

Thanks.  I added an example, too, since split has some.

--
nosy: +r.david.murray
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue14957] Improve docs for str.splitlines

2012-06-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 24572015e24f by R David Murray in branch '3.2':
#14957: clarify splitlines docs.
http://hg.python.org/cpython/rev/24572015e24f

New changeset 2a43088318ed by R David Murray in branch 'default':
#14957: clarify splitlines docs.
http://hg.python.org/cpython/rev/2a43088318ed

New changeset 0df7594e4ebd by R David Murray in branch '2.7':
#14957: clarify splitlines docs.
http://hg.python.org/cpython/rev/0df7594e4ebd

--
nosy: +python-dev

___
Python tracker 

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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-06-01 Thread Brett Cannon

Brett Cannon  added the comment:

I have yet to see anyone use a URL loader in serious code beyond people just 
using it as an example. What I do see is lots of custom zipfile importers and 
thus for the majority if people this will continue to make sense. And even with 
a URL loader, get_filename would return a URL who probably has something like 
http://example.com/pkg/__init__.py which would still work as expected. If 
someone chooses to break from expectations they can just overload is_package().

--
assignee:  -> brett.cannon
resolution: wont fix -> 
stage:  -> test needed
status: closed -> open

___
Python tracker 

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



[issue14957] Improve docs for str.splitlines

2012-06-01 Thread Michael Driscoll

Michael Driscoll  added the comment:

I'm assuming Nick is talking about the stdtypes.rst (in Doc/library) file, 
correct? If so, I went ahead and created a simple patch that almost uses his 
verbiage verbatim.

--
keywords: +patch
nosy: +michael.driscoll
Added file: http://bugs.python.org/file25791/stdtypes.patch

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2012-06-01 Thread R. David Murray

R. David Murray  added the comment:

I updated the tests to Python3, and attempted to replicate the fix using the 
new importlib qualname support.  Even if it had worked, this would not have 
finished the patch, since Michael wants to generate a failing test instead of 
raising the import error.

However, I'm running into weird problems and am shelving this for the moment.  
The issue is that if I run the tests like this:

   ./python -m unittest test.test_unittest

(or via regrtest) they fail with the wrong name in the error message.  If I run 
them like this:

./python -m unittest unittest.test.test_loader.TestLoader.

the right name is in the message.  I suspect the bug is in the tests, but I'm 
not spotting it.  Maybe someone else will see it.

--
Added file: http://bugs.python.org/file25790/unittest_loader_import_error.patch

___
Python tracker 

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



[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow

Eric Snow  added the comment:

I'll get a new patch up tonight.

--

___
Python tracker 

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



[issue14673] add sys.implementation

2012-06-01 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Jun 01, 2012, at 06:53 PM, Eric Snow wrote:

>sorry, I should have been more clear.  issue14673_full.diff is not simply a
>merging of the two previous patches, but rather their merger, plus
>SimpleNamespace, plus removing the "public" restriction from the repr.  I may
>have a small tweak or two as well.

Ah dang.  I'd say just double check both of my sets of comments, disregard the
ones that are no longer relevant and push an update for the _full.diff.  I'll
do one final review and/or just commit it for you.

--

___
Python tracker 

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



[issue14673] add sys.implementation

2012-06-01 Thread Eric Snow

Eric Snow  added the comment:

sorry, I should have been more clear.  issue14673_full.diff is not simply a 
merging of the two previous patches, but rather their merger, plus 
SimpleNamespace, plus removing the "public" restriction from the repr.  I may 
have a small tweak or two as well.

--

___
Python tracker 

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



[issue14926] random.seed docstring needs edit of "*a *is"

2012-06-01 Thread Christopher Smith

Christopher Smith  added the comment:

On Fri, Jun 1, 2012 at 11:47 PM, Éric Araujo  wrote:
>
> Éric Araujo  added the comment:
>
> Thanks.  Have you noticed similar typos in the rest of the module, or the 
> reST docs?

I grepped for orphaned asterisks, as I recall, and didn't find any others.

/c

--

___
Python tracker 

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



[issue14968] Section "Inplace Operators" of :mod:`operator` should be a subsection

2012-06-01 Thread Sandro Tosi

Sandro Tosi  added the comment:

Thanks Lars for the patch! Éric, why did you add 2.7 version? AFAISee 2.7 
doesn't have the "Inplace Operators" section.

--

___
Python tracker 

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



[issue14968] Section "Inplace Operators" of :mod:`operator` should be a subsection

2012-06-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset bf6305bce3af by Sandro Tosi in branch '3.2':
Issue #14968: set 'Inplace Operators' as subsection; patch by Lars Buitinck
http://hg.python.org/cpython/rev/bf6305bce3af

New changeset 7c9702b08bfb by Sandro Tosi in branch 'default':
Issue #14968: merge with 3.2
http://hg.python.org/cpython/rev/7c9702b08bfb

--
nosy: +python-dev

___
Python tracker 

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



[issue14814] Implement PEP 3144 (the ipaddress module)

2012-06-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 000cc4e0e1cd by Hynek Schlawack in branch 'default':
#14814: Fix errror message creation in ipaddress.collapse_addresses
http://hg.python.org/cpython/rev/000cc4e0e1cd

--

___
Python tracker 

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



[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-06-01 Thread Ned Deily

Ned Deily  added the comment:

Hynek: Thanks for the offer; I've got it.  I'll have a comprehensive update to 
support the new multiple dev environments for 10.6 and beyond prior to b1 (and 
for 2.7.x and 3.2.x).

--

___
Python tracker 

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



[issue14918] Incorrect TypeError message for wrong function arguments

2012-06-01 Thread R. David Murray

R. David Murray  added the comment:

It is fixed.  It was not backported.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> 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



[issue12354] packaging.pypi.simple docs use both client and crawler name, which might be confusing

2012-06-01 Thread Éric Araujo

Éric Araujo  added the comment:

Not yet; the commit was adding missing doc to the Crawler class, but I haven’t 
reviewed the use of client vs. crawler yet.

Alexis, you introduced the client/crawler naming after reading some book; what 
do you think now?

--
status: pending -> open
title: packaging.pypi.simple docs use both client and crawler variable, which 
might be confusing -> packaging.pypi.simple docs use both client and crawler 
name, which might be confusing

___
Python tracker 

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



[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2012-06-01 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
title: add "Do not supply int argument" to random.shuffle docstring -> add "Do 
not supply 'int' argument" to random.shuffle docstring

___
Python tracker 

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



[issue14973] restore python2 unicode literals in "ur" strings

2012-06-01 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-06-01 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

Ned, any progress/problems?

I've closed two dupes already in the last few days and we're still in the 
alphas. We really should get this fixed before beta1 or the tracker will be 
flooded.

Let me know if you need something. :)

--

___
Python tracker 

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



[issue14979] pdb doc: Add link to source

2012-06-01 Thread Éric Araujo

Éric Araujo  added the comment:

Sounds good to me.  Raymond, do you concur?

--
nosy: +eric.araujo, rhettinger
title: pdb: Link to source -> pdb doc: Add link to source
versions: +Python 2.7, 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



[issue14918] Incorrect TypeError message for wrong function arguments

2012-06-01 Thread Éric Araujo

Éric Araujo  added the comment:

I think this was fixed in 3.3, and maybe backported.  Could you test with the 
latest releases?

--
nosy: +benjamin.peterson, eric.araujo
title: Incorrect explanation of TypeError exception -> Incorrect TypeError 
message for wrong function arguments
versions: +Python 3.3

___
Python tracker 

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



[issue14926] random.seed docstring needs edit of "*a *is"

2012-06-01 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks.  Have you noticed similar typos in the rest of the module, or the reST 
docs?

--
nosy: +eric.araujo, sandro.tosi
versions: +Python 2.7, Python 3.3

___
Python tracker 

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



[issue14981] 3.3.0a4 compilation fails von MacOS Lion /10.7.4

2012-06-01 Thread Ned Deily

Ned Deily  added the comment:

This is a known issue with using Apple's llvm-gcc compiler.  Make sure you've 
installed either the latest version of Xcode for OS X 10.7 (currently Xcode 
4.3.x) and install the optional Command Line Tools component (Xcode -> 
Preferences -> Downloads -> Components) or download and install the latest 
version of the new standalone Command Line Tools package (late March) for 10.7 
and then configure the build to use clang as compiler.  

./configure CC=clang

The defaults ./configure uses will be updated prior to beta releases of 3.3.

--

___
Python tracker 

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



[issue14919] what disables one from adding self to the "nosy" list

2012-06-01 Thread Éric Araujo

Éric Araujo  added the comment:

I suggest just rephrasing to say something like “if you are logged in, you can 
add yourself to the nosy list and submit the form (a button fills in your user 
name if you have JavaScript activated”.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12932] filecmp.dircmp does not allow non-shallow comparisons

2012-06-01 Thread Éric Araujo

Changes by Éric Araujo :


--
stage: test needed -> needs patch
title: dircmp does not allow non-shallow comparisons -> filecmp.dircmp does not 
allow non-shallow comparisons

___
Python tracker 

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



[issue14981] 3.3.0a4 compilation fails von MacOS Lion /10.7.4

2012-06-01 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

Dupe of #13241. Apple's llvm-gcc is broken, please use clang instead (CC=clang 
./configure).

--
nosy: +hynek
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

___
Python tracker 

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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-06-01 Thread Ronan Lamy

Ronan Lamy  added the comment:

Your second solution is simple and solves the problem, so I guess that's it, 
then. 

Still, I don't really understand the purpose of SourceLoader, which makes me 
uneasy about the implementation of _LoaderBasics.is_package(). It seems to be 
meant to load an arbitrary resource yet it assumes that get_filename returns an 
actual file path, so I don't see how it could be used to import from a URL, for 
instance.

--

___
Python tracker 

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



[issue14981] 3.3.0a4 compilation fails von MacOS Lion /10.7.4

2012-06-01 Thread R. David Murray

Changes by R. David Murray :


--
assignee: ronaldoussoren -> nobody
nosy: +ned.deily, nobody

___
Python tracker 

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



[issue14981] 3.3.0a4 compilation fails von MacOS Lion /10.7.4

2012-06-01 Thread R. David Murray

Changes by R. David Murray :


--
assignee:  -> ronaldoussoren
components: +Macintosh
nosy: +ronaldoussoren
versions: +Python 3.3 -Python 3.4

___
Python tracker 

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



[issue14981] 3.3.0a4 compilation fails von MacOS Lion /10.7.4

2012-06-01 Thread Andreas Jung

Changes by Andreas Jung :


--
type:  -> compile error

___
Python tracker 

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



[issue14981] 3.3.0a4 compilation fails von MacOS Lion /10.7.4

2012-06-01 Thread Andreas Jung

New submission from Andreas Jung :

ranlib: file: libpython3.3m.a(dynamic_annotations.o) has no symbols
ranlib: file: libpython3.3m.a(pymath.o) has no symbols
gcc   -framework CoreFoundation -o python.exe Modules/python.o libpython3.3m.a 
-ldl  -framework CoreFoundation 
gcc   -framework CoreFoundation -o Modules/_testembed Modules/_testembed.o 
libpython3.3m.a -ldl  -framework CoreFoundation 
./python.exe -SE -m sysconfig --generate-posix-vars
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
python.exe(41191) malloc: *** mmap(size=7310873954244194304) failed (error 
code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Could not import runpy module
make: *** [Lib/_sysconfigdata.py] Segmentation fault: 11

--
components: Build
messages: 162082
nosy: ajung
priority: normal
severity: normal
status: open
title: 3.3.0a4 compilation fails von MacOS Lion /10.7.4
versions: Python 3.4

___
Python tracker 

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



[issue14673] add sys.implementation

2012-06-01 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Looking great, you're almost there!  I remviewed 
issue14673_as_simple_namespace_2.diff and issue14673_full.diff.  Reitveld makes 
it *so* much easier :)

--

___
Python tracker 

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



[issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome

2012-06-01 Thread Alexandre Zani

Alexandre Zani  added the comment:

I would tend to disagree with the use of **kwargs. It means the argument list 
would be implicit, not documented by the code and not checked at runtime. We 
could end up with anything in there. I'll try to propose a patch tonight that 
implements Jean-Paul's solution.

--

___
Python tracker 

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



[issue14980] OSX: ranlib: file: libpython2.7.a(pymath.o) has no symbols

2012-06-01 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

That's not a bug, the build prices unconditionally builds a file that contains 
optional definitions. On OSX none of these optional definitions are used, and 
hence pymath.o is empty.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue14980] OSX: ranlib: file: libpython2.7.a(pymath.o) has no symbols

2012-06-01 Thread Samuel John

Changes by Samuel John :


--
title: ranlib: file: libpython2.7.a(pymath.o) has no symbols -> OSX: ranlib: 
file: libpython2.7.a(pymath.o) has no symbols

___
Python tracker 

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



[issue11796] Comprehensions in a class definition mostly cannot access class variable

2012-06-01 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +anikom15, flox, josmiley

___
Python tracker 

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



[issue14980] ranlib: file: libpython2.7.a(pymath.o) has no symbols

2012-06-01 Thread Samuel John

New submission from Samuel John :

Building python on the Mac (10.7.4) with latest Xcode shows

```
[...]
ranlib: file: libpython2.7.a(pymath.o) has no symbols
```

Is that okay or a bug?

--
assignee: ronaldoussoren
components: Macintosh
messages: 162078
nosy: ronaldoussoren, samueljohn
priority: normal
severity: normal
status: open
title: ranlib: file: libpython2.7.a(pymath.o) has no symbols
type: compile error
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



[issue14972] listcomp with nested classes

2012-06-01 Thread Florent Xicluna

Florent Xicluna  added the comment:

This is a duplicate of issue 11796.

See also issue 13557:
http://bugs.python.org/issue13557#msg154174

For Python 3, a list comprehension defines a block pretty much like the method 
definition during the class creation:

class x:
x = 1
def incx():
return x + 1
print(incx())

 ==> raises NameError too

--
resolution:  -> duplicate
status: open -> closed
superseder:  -> Comprehensions in a class definition mostly cannot access class 
variable

___
Python tracker 

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



[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Johan Aires Rastén

Johan Aires Rastén  added the comment:

I did read some more on the subject and it seems like using locks with 
interrupts is in general a very difficult problem and not limited to Python.

Don't know if this is considered common knowledge among programmers or if it 
would be useful with at least a warning on the signal manual page.

--

___
Python tracker 

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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-06-01 Thread Brett Cannon

Brett Cannon  added the comment:

I think you misunderstood what I was suggesting as a solution: there is no 
conversion of module name to file name. It would simply be::

fullname.rpartition('.')[2] == os.path.splitext(os.path.split(self.path)[1])[0]

for path comparison. But honestly since __init__ is the only special case here, 
is_package() could just do its current check and ``fullname.rpartition('.')[2] 
!= '__init__'``.

And a problem with your patch is that it is only for FileLoader, which 
precludes SourceLoader from getting the beneficial fix for the issue and thus 
leaves out all other loaders which might use an alternative storage mechanism 
than files (e.g. zip files).

--

___
Python tracker 

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



[issue14979] pdb: Link to source

2012-06-01 Thread anatoly techtonik

New submission from anatoly techtonik :

http://docs.python.org/library/pdb.html#pdb.Pdb

Documentation for pdb says: "The debugger is extensible — it is actually 
defined as the class Pdb. This is currently undocumented but easily understood 
by reading the source."

There should a link to the source.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 162074
nosy: docs@python, techtonik
priority: normal
severity: normal
status: open
title: pdb: Link to source

___
Python tracker 

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



[issue14969] Exception context is not suppressed correctly in contextlib.ExitStack.__exit__

2012-06-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c108bc96aec6 by Nick Coghlan in branch 'default':
Close #14969: Improve the handling of exception chaining in contextlib.ExitStack
http://hg.python.org/cpython/rev/c108bc96aec6

--
nosy: +python-dev
resolution:  -> fixed
stage: needs patch -> 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



[issue14969] Exception context is not suppressed correctly in contextlib.ExitStack.__exit__

2012-06-01 Thread Nick Coghlan

Nick Coghlan  added the comment:

Ah, you're absolutely right. Interestingly though, the old recursive 
implementation appeared to have the same bug, and I'd deliberately used the 
recursive approach precisely so that suppressed exceptions *would* get cleared 
correctly. I must have managed to leave a loophole somewhere :(

I also realised simply overwriting the context isn't correct in all cases, and 
have adjusted the test cases accordingly.

--
title: Use __suppress_context__ in contextlib.ExitStack.__exit__ -> Exception 
context is not suppressed correctly in contextlib.ExitStack.__exit__
type: enhancement -> behavior

___
Python tracker 

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



[issue14975] import unicodedata, DLL load failed on Python 2.7.3

2012-06-01 Thread YF

YF  added the comment:

I compared downloaded python-2.7.3.msi file, it is consistent with the website 
published "MD5 checksums and sizes", and this time I disabled avast 7 and then 
reinstall Python 2.7.3, but this error still occurs.

After I installed Python 2.7.3 the MD5 signature of the 
C:\Python27\DLLs\unicodedata.pyd file is: AD7DFE789B1256F039406B640ACD9C0D

I have not found that I had any operational errors.

--

___
Python tracker 

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



[issue14977] mailcap does not respect precedence in the presence of wildcards

2012-06-01 Thread R. David Murray

R. David Murray  added the comment:

Hmm.  It seems to me this is an edge case as far as backward compatibility 
goes.  On the one hand it does seem like an RFC violation (ie: bug), on the 
other hand there could be user programs depending on the current behavior.  I'm 
inclined toward treating it as a bug, but I can see it being argued the other 
way.  The fact that the file is designed for interoperability and other tools 
do take the wildcard first argues in favor of treating it as a bug, I think.

--
components: +email -Library (Lib)
keywords: +easy
nosy: +barry, r.david.murray
versions: +Python 2.7, 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



[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Richard Oudkerk

Richard Oudkerk  added the comment:

I don't think there is anything special about PriorityQueue.

There is a similar concerning the use of the Python implementation of RLock in 
signal handlers -- see http://bugs.python.org/issue13697.

Maybe the signal handler should temporarily mask or ignore SIGINT while it runs.

--
nosy: +sbt

___
Python tracker 

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



[issue14938] 'import my_pkg.__init__' creates duplicate modules

2012-06-01 Thread Ronan Lamy

Ronan Lamy  added the comment:

Here's a preliminary patch, without tests or documentation, implementing my 
approach (adding an optional is_package=False to FileLoader.__init__()).

Next question (quite independent of the chosen implementation): how should this 
be tested?

--
keywords: +patch
Added file: http://bugs.python.org/file25789/1.patch

___
Python tracker 

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



[issue14978] distutils Extension fails to be created with unicode package names

2012-06-01 Thread guyomes

New submission from guyomes :

This issue appeared initially in:

http://groups.google.com/group/cython-users/browse_thread/thread/f9e7018bb12a66d2

Note that this is also an issue in distutils2/compiler/extension.py, where 
arguments of Extension are also tested against str only.

--
assignee: eric.araujo
components: Distutils
files: patch-distutils-extension_py.diff
keywords: patch
messages: 162067
nosy: eric.araujo, guyomes, patrick.andrew, tarek
priority: normal
severity: normal
status: open
title: distutils Extension fails to be created with unicode package names
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file25788/patch-distutils-extension_py.diff

___
Python tracker 

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



[issue14814] Implement PEP 3144 (the ipaddress module)

2012-06-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0eb63de72e96 by Hynek Schlawack in branch 'default':
#14814: Remove 2.x's new-style classes syntax from ipaddress
http://hg.python.org/cpython/rev/0eb63de72e96

--

___
Python tracker 

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



[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Johan Aires Rastén

Johan Aires Rastén  added the comment:

Start queue_deadlock.py in one terminal and note the PID it prints.

Compile queue_sendint.c in another terminal and execute it with previous PID as 
only argument.

If the bug is triggered, nothing will print in the python terminal window when 
you press Enter. To terminate the application you can press Ctrl-\

--

___
Python tracker 

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



[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Johan Aires Rastén

Changes by Johan Aires Rastén :


Added file: http://bugs.python.org/file25787/queue_sendint.c

___
Python tracker 

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



[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Johan Aires Rastén

Changes by Johan Aires Rastén :


Added file: http://bugs.python.org/file25786/queue_deadlock.py

___
Python tracker 

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



[issue14977] mailcap does not respect precedence in the presence of wildcards

2012-06-01 Thread Emmanuel Beffara

New submission from Emmanuel Beffara :

According to RFC 1542, the first matching entry in mailcap files should be used 
for handling a given type. The mailcap module does not respect this rule when 
wildcards are used in some rules, because the "lookup" function always checks 
entries for a specific type (say image/jpeg) before checking the generic ones 
(image/*). As a consequence, if a user overrides system defaults using a 
generic type, this choice is not satisfied, and the behaviour is inconsistent 
with other tools using mailcap (including the standard "run-mailcap").

--
components: Library (Lib)
messages: 162064
nosy: manu-beffara
priority: normal
severity: normal
status: open
title: mailcap does not respect precedence in the presence of wildcards
type: behavior

___
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

2012-06-01 Thread Vinay Sajip

Vinay Sajip  added the comment:

>> Re "threading locks cannot be used to protect things outside of a
>> single process":

> The Python standard library already violates this, in that the
> "logging" module uses such a lock to protect the file/socket/whatever,
> to which it is writing.

logging is not doing anything to protect things *outside* of a single process - 
the logging docs make that clear, and give specific recommendations for how to 
use logging in a multi-process scenario. Logging is just using locks to manage 
contention between multiple threads in a single process. In that sense, it is 
no different to any other Python code that uses locks.

--

___
Python tracker 

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



[issue12354] packaging.pypi.simple docs use both client and crawler variable, which might be confusing

2012-06-01 Thread Petri Lehtinen

Changes by Petri Lehtinen :


--
status: open -> pending

___
Python tracker 

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



[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Johan Aires Rastén

New submission from Johan Aires Rastén :

Python 2.7.3 (default, Apr 20 2012, 22:39:59) 
[GCC 4.6.3] on linux2

If a signal handler calls Queue.PriorityQueue.put and a second signal is 
received while one is already being processed, neither of the calls to put will 
terminate.

Highly dependent on timing so it might be difficult to reproduce.

--
components: Library (Lib)
messages: 162062
nosy: JohanAR
priority: normal
severity: normal
status: open
title: Queue.PriorityQueue() is not interrupt safe
type: crash
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



[issue14128] _elementtree should expose types and factory functions consistently with ElementTree

2012-06-01 Thread Eli Bendersky

Eli Bendersky  added the comment:

Done with the recent completion of #14007

--
resolution:  -> fixed
stage: needs patch -> 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



[issue14852] json and ElementTree parsers misbehave on streams containing more than a single object

2012-06-01 Thread Eli Bendersky

Eli Bendersky  added the comment:

I propose to close this issue. If the problem in json is real and someone 
thinks it has to be fixed, a separate issue specifically for json should be 
opened.

--

___
Python tracker 

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



[issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing

2012-06-01 Thread Eli Bendersky

Eli Bendersky  added the comment:

The latest commit completes this issue.

--
resolution:  -> fixed
stage: test needed -> 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



[issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing

2012-06-01 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 6f9bfcc1896f by Eli Bendersky in branch 'default':
Issue #14007: implement doctype() method calling in XMLParser of _elementtree.
http://hg.python.org/cpython/rev/6f9bfcc1896f

--

___
Python tracker 

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



[issue14974] rename packaging.pypi to packaging.index

2012-06-01 Thread Alexis Metaireau

Alexis Metaireau  added the comment:

We are all calling these indexes quite everywhere. We are talking about 
a Python Package Index and even the mirroring infrastructure is talking 
about indexes. Because that's under the "packaging" namespace, it's 
kind of obvious that this deals with indexes "like PyPI".

Of course, we also have the documentation which is a good starting 
point to make people realize what this is about; but I really don't 
think naming this "index" will be a blocker for anyone.

--

___
Python tracker 

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



[issue12354] packaging.pypi.simple docs use both client and crawler variable, which might be confusing

2012-06-01 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

Can this be closed?

--
nosy: +petri.lehtinen

___
Python tracker 

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



[issue9544] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2012-06-01 Thread Petri Lehtinen

Changes by Petri Lehtinen :


--
nosy: +petri.lehtinen

___
Python tracker 

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



[issue14969] Use __suppress_context__ in contextlib.ExitStack.__exit__

2012-06-01 Thread alon horev

alon horev  added the comment:

Ok, so turns out this was just a stupid bug: we set the __context__ attr only 
if an exception is raised, but not when an exception has been previously 
'cleared'. so the context is filled (by python) with the last exception raised 
which is the outer one.
deleting the 'if last context is an exception' solved it.

This is how I understood it:
the exception's __context__ is set when it's raised and not in its except 
clause, meaning there is no way the outer with is mutating our inner 
exceptions. using pdb I saw the outer exception being explicitly set.

--
keywords: +patch
Added file: http://bugs.python.org/file25785/14963.3.patch

___
Python tracker 

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