[issue8865] select.poll is not thread safe

2010-06-01 Thread Christian Schubert

Christian Schubert b...@apexo.de added the comment:

okay, I've managed to put together a script that fairly consistently reproduces 
the problem on my (core2 duo 2,something GHz) machine

some parameters (sleep times) are randomized in each iteration, the script runs 
for 30 iterations, each for 1 second, and counts the number of events where the 
fd looks bogus (max 1 per iteration); some other events (fd correct, revents 
bogus are also reported, but not counted)

example output:
poll returned [(-3, 65535)], we were looking for fd 3
poll returned [(-3, 65535)], we were looking for fd 3
poll returned [(-3, 65535)], we were looking for fd 3
poll returned [(-3, 65535)], we were looking for fd 3
poll returned [(-3, 65535)], we were looking for fd 3
poll returned [(-1, 65535)], we were looking for fd 3
poll returned [(-1, 65535)], we were looking for fd 3
poll returned [(-1627358347, 60497)], we were looking for fd 3
should not get here; poll returned [(3, 0)]
poll returned [(-3, 65535)], we were looking for fd 3
9 events in 30 iterations

--
Added file: http://bugs.python.org/file17510/select_threads.py

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



[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-06-01 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

The accumulated error doesn't need to exceed 1;  it just needs to be enough to 
make (e.g.) leftover appear to be = 0.5 when it's actually just less than 0.5. 
 It shouldn't be too hard to find examples where this happens, but I haven't 
thought about it.

 I wonder if it would be justified to expose something like
 int _PyLong_IsOdd(PyObject *self) {...}

Yes, that could work.  I'd be happier with this if there are other uses (even 
within longobject.c);  there might well be, but I haven't looked.  I also have 
a mild preference for _PyLong_IsEven over _PyLong_IsOdd.  :)

--

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



[issue8865] select.poll is not thread safe

2010-06-01 Thread Christian Schubert

Christian Schubert b...@apexo.de added the comment:

the other issue (poll_register freeing data structures that poll_poll currently 
uses) can be reproduced by the attached script (at least I can)

depending on the parameters/circumstances it either segfaults or prints garbage 
results from poll, e.g. [(1684955474, 28192)]; the expected result would be 
[(3, 1)]

--
Added file: http://bugs.python.org/file17511/concurrent_poll_and_register.py

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



[issue5023] Segfault in datetime.time.strftime(%z)

2010-06-01 Thread Philipp Gortan

Philipp Gortan mephi...@gmx.net added the comment:

Unfortunately, I'm no longer able to reproduce this issue as I upgraded to gcc 
4.3 sometime within the last nine months...
With 4.3, I don't see this segfault any longer.

--

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



[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-06-01 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

An example where getting correct rounding is awkward: the following rounds up, 
with or without the patch:

 datetime.timedelta(seconds=0.6112295)
datetime.timedelta(0, 0, 611230)

But in this case, the result should actually be rounded down (with either 
rounding mode), since the exact value of float('0.6112295') is a little less 
than 0.6112295:

 print(Decimal(0.6112295))
0.611229498116351207499974407255649566650390625

The problem is that leftover_us ends up being exactly 0.5 in this case.  Again, 
this could be worked around if we really care, but I'm not convinced it's worth 
it.

--

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



[issue8867] serve.py (using wsgiref) cannot serve Python docs under Python3 due to encoding issues

2010-06-01 Thread Ezio Melotti

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


--
nosy: +ezio.melotti

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



[issue8853] getaddrinfo should accept port of type long

2010-06-01 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

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



[issue4769] b64decode should accept strings or bytes

2010-06-01 Thread R. David Murray

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

The patch appears to be fixing the wrong functions.  It is decode that needs to 
accept unicode.  Encode should still be restricted to bytes.

--
nosy: +r.david.murray

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



[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-06-01 Thread John Levon

John Levon movem...@users.sourceforge.net added the comment:

Right, it should be one of the official ways of enabling that.

--

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



[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

2010-06-01 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

This is fixed in r81636, r81637, r81638, r81637.
Just like the Digest Authentication, the urllib2 will try for 5 times before 
failing for any authentication failure ( It won't lead to recursion).

I had a thought that Basic Authentication need not be retried (no where in the 
RFC it mentions about it), but I found some references that clients do present 
the dialog a couple of times for retry on wrong authentication, so we are going 
for the same.

This is tested with actual resource setup. Closing this issue as this bug is 
fixed.

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

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



[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-06-01 Thread R. David Murray

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

I don't think either of the previous patches are correct.  I found a note in 
Issue1685453 that Barry would like for this to work, and after poking around in 
the code for a bit I think it can be done without breaking anything.

Attached is a patch that adds unicode support to MIMEText, including unit tests 
and docs updates.  Note that it is necessary to specify a charset if you have 
non-ASCII text in your unicode string, since the default charset is us-ascii.  
The unit tests confirm this behavior.

Now the question is, is this a bug-fix or an enhancement?  I *think* it is safe 
to apply and backport, since I think the only behavior it changes is to make 
unicode input work, whereas before it would give a traceback.  But I've been 
wrong before :(

--
resolution: invalid - fixed
stage: committed/rejected - patch review
versions: +Python 3.2 -Python 3.0
Added file: http://bugs.python.org/file17512/mimetext_unicode_input.patch

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



[issue8618] test_winsound fails when no playback devices configured

2010-06-01 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Committed in r81640 through r81643

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

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



[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-06-01 Thread R. David Murray

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


Removed file: http://bugs.python.org/file17512/mimetext_unicode_input.patch

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



[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-06-01 Thread R. David Murray

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


Added file: http://bugs.python.org/file17513/mimetext_unicode_input.patch

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



[issue1368247] unicode in email.MIMEText and email/Charset.py

2010-06-01 Thread R. David Murray

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

Ah, it's not 100% true that it doesn't change working behavior.  Before the 
patch, the first example in this ticket doesn't raise an error until the 
as_string call.  After this patch, the error is raised as soon as MIMEText is 
called without the charset parameter.  Since without the patch the code still 
fails eventually, I think this is an acceptable behavior change for a bug fix, 
but it does make me a little nervous :)

Updated patch with doc change to Message.set_charset attached.

--
Added file: http://bugs.python.org/file17514/mimetext_unicode_input.patch

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



[issue8868] Framework install does not behave as a framework

2010-06-01 Thread Michiel de Hoon

New submission from Michiel de Hoon mdeh...@users.sourceforge.net:

(The discussion for this bug started on the pythonmac-sig mailing list; see 
http://mail.python.org/pipermail/pythonmac-sig/2010-May/022362.html)

When I try to install Python as a framework:

./configure --enable-framework
make
make install

then Python gets installed under 
/Library/Frameworks/Python.framework/Versions/2.7, but it doesn't seem to 
function as a framework:

 import MacOS
 MacOS.WMAvailable()
False
 

Python 2.6.5 returns True here. This is important for GUI extension modules; 
such modules do not interact correctly with the window manager if Python is not 
installed as a framework.

I see the same behavior with the current Python in trunk with Mac OS X 10.4 and 
10.5 both with Python installed from source and the precompiled python 2.7b2. 
Python revision 77030 seems to be the last revision without this problem. In 
revision 77031, posix_spawn() was introduced instead of execv() in pythonw.c to 
start the Python executable.

--
assignee: ronaldoussoren
components: Macintosh
messages: 106838
nosy: mdehoon, ronaldoussoren
priority: normal
severity: normal
status: open
title: Framework install does not behave as a framework
type: behavior
versions: Python 2.7

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



[issue8868] Framework install does not behave as a framework

2010-06-01 Thread Ronald Oussoren

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

The pythonw executable always uses execv on OSX 10.4 because posix_spawnv isn't 
available there.

A possibly significant change is the value of argv[0] as passed to the 
Python.app executable.

Could you check if this patch fixes the issue?


Index: Mac/Tools/pythonw.c
===
--- Mac/Tools/pythonw.c (revision 81605)
+++ Mac/Tools/pythonw.c (working copy)
@@ -149,6 +149,8 @@
 main(int argc, char **argv) {
 char* exec_path = get_python_path();
 
+argv[0] = exec_path;
+
 #ifdef HAVE_SPAWN_H
 
 /* We're weak-linking to posix-spawnv to ensure that

--

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



[issue8868] Framework install does not behave as a framework

2010-06-01 Thread Ronald Oussoren

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

Note that the subject is not entirely correct: the framework install is a 
framework install, but the python commandline doesn't behave like an 
application bundle.

--
priority: normal - high
stage:  - needs patch

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



[issue8869] execfile does not work with UNC paths

2010-06-01 Thread stier08

New submission from stier08 stie...@gmail.com:

execfile() builtin function does not work with UNC paths on Windows platform 
(Windows 7 x64 has been tested, python 2.6.5)

Since standard IO operations successfully process UNC paths, therefore this 
behavior of execfile() seems to be a bug.

Code to reproduce (assuming drive c: is present and you have rw permissions)
 a=u'?\\c:\\a.py'
 open(a,w).write(print 'hellow') # successful write to UNC file 
 file(a).read() # successful read from UNC file 
print 'hellow'
 execfile(a) # ERROR
Traceback (most recent call last):
  File stdin, line 1, in module
IOError: [Errno 2] No such file or directory: '?\\c:\\a.py'

See description of UNC naming convention
at msdn http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx
at wikipedia 
http://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention

--
components: Unicode, Windows
messages: 106841
nosy: stier08
priority: normal
severity: normal
status: open
title: execfile does not work with UNC paths
type: behavior
versions: Python 2.6

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



[issue8869] execfile does not work with UNC paths

2010-06-01 Thread Tim Golden

Tim Golden m...@timgolden.me.uk added the comment:

Since execfile is basically shorthand for exec (open (filename).read ()),
and since open (filename) *does* support the full range of filepath
syntax on Windows, and since execfile has been removed in py3k in favour
of exec (open ...)), and since Python 2.x is nearing its end-of-life,
I doubt this issue will garner much sympathy.

I haven't actually looked at the code to discover just *why* execfile
doesn't support that style of filename. But is there any reason you
can't use exec (open (...))?

--
nosy: +tim.golden

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



[issue8868] Framework install does not behave as a framework

2010-06-01 Thread Michiel de Hoon

Michiel de Hoon mdeh...@users.sourceforge.net added the comment:

The patch fixes the problem on Mac OS X 10.4. I'll try on 10.5 tomorrow.
Thanks!

--

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



[issue8869] execfile does not work with UNC paths

2010-06-01 Thread Amaury Forgeot d'Arc

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

Reproduced on WinXP.
execfile() does not work because it calls the system function stat(); 
this function does accept UNC paths (like \\machine\share\file), but not paths 
which contain a wildcard character ('?' or '*')

I suggest to remove the leading '?\\'.

--
nosy: +amaury.forgeotdarc

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



[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-06-01 Thread Sridhar Ratnakumar

Sridhar Ratnakumar sridh...@activestate.com added the comment:

On 2010-05-31, at 4:54 PM, John Levon wrote:

 In terms of getting Python building again, it should be sufficient to define 
 _XPG4_2 for the multiprocessing module compile only.

I can verify that the following patch works around this issue (for now);

--- python.org/Modules/_multiprocessing/multiprocessing.c   2010-05-31 
17:04:08.499559243 -0700
+++ python/Modules/_multiprocessing/multiprocessing.c   2010-05-31 
17:04:28.568723434 -0700
@@ -6,6 +6,11 @@
  * Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt
  */

+/* 
+ * Workaround for http://bugs.python.org/issue8864#msg106820
+ */
+#define _XPG4_2
+
 #include multiprocessing.h

 #ifdef SCM_RIGHTS

On 2010-06-01, at 5:25 AM, John Levon wrote:

 Right, it should be one of the official ways of enabling that.

So I presume this should be the right way to fix this bug?

--

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



[issue5434] datetime.monthdelta

2010-06-01 Thread Jess Austin

Jess Austin jess.aus...@gmail.com added the comment:

Yeah, the masses have spoken, and their silence is deafening.  I was going to 
downplay the health of the package based on the number of downloads, but then 
I looked at the futures page.  b^)  Seriously, getting this in would require 
a core developer wanting it in, and at this point it seems none do.

On the subject of float operations, while there may be some question about the 
integerness or floatness of timedelta, monthdelta is definitely an integer.  As 
monthdelta already supports multiplication by integers and floor division by 
integers or monthdeltas, I don't see anything missing.  To use monthdeltas with 
floats is to miss the point entirely.

--
status: pending - open

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



[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-06-01 Thread John Levon

John Levon movem...@users.sourceforge.net added the comment:

defining _XOPEN_SOURCE=600 or similar is better, as Martin pointed out.

--

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



[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-06-01 Thread Antoine Pitrou

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

Would such a workaround also be necessary if we want to add support for 
recvmsg() to the socket module (as in issue6560), or is it totally unrelated?

--
nosy: +pitrou

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



[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-06-01 Thread John Levon

John Levon movem...@users.sourceforge.net added the comment:

Yes, we would almost certainly want something similar.

--

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



[issue8869] execfile does not work with UNC paths

2010-06-01 Thread stier08

stier08 stie...@gmail.com added the comment:

yep exec (open (...)) is OK here thanks

--

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



[issue8591] update mkpkg to latest coding standards

2010-06-01 Thread Éric Araujo

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

I’ve started to review your patch but I find it a bid unwieldy to read. Would 
you mind exporting changesets to patches? I tried to look at your repo, but 
didn’t know which branch to look at.

So, thanks for giving us the occasion of thinking about the patch workflow. 
Using changesets seems more natural since we use Bitbucket, while OTOH using 
regular diffs can streamline the history and remove unnecessary details (e.g. 
I’m not sure we want branch names to clutter the history forever (see 
http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/ for more 
info)). Would it be too much of a hassle to provide links or a Mercurial bundle 
of a set of small changesets? Having different patches would help us separate 
the non-controversial stuff (whitespace) from the refactoring and improvements.

That said, I can offer a few remarks on the patch.

- Don’t put editor settings in the files.

- Changing “if s in 'yn'” to “if s in ('y', 'n')” is not really an improvement. 
It’s not more readable to always use tuples or frozensets for membership 
testing; str has __contains__ for a reason :)

- Not sure how your print_ indirection is helpful.

- I don’t know how much reST we want in the docstrings: None, some constructs, 
Sphinx extensions?

Don’t worry if there are no replies in a few days, people are pretty busy. I’ll 
ask about the meta-issues (workflow, reST) on the ML if Tarek doesn’t answer 
here. Cheers :)

--

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



[issue8870] --user-access-control=force produces invalid installer on Vista

2010-06-01 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

Running `python setup.py bdist_wininst --user-access-control=force` produces 
invalid installer that fails to install with the error message:

Failed to start elevated process (ShellExecute returned 5)

--
assignee: tarek
components: Distutils
messages: 106852
nosy: tarek, techtonik
priority: normal
severity: normal
status: open
title: --user-access-control=force produces invalid installer on Vista
type: crash
versions: Python 2.6, Python 2.7

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



[issue6641] strptime doesn't support %z format ?

2010-06-01 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +merwok

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



[issue8867] serve.py (using wsgiref) cannot serve Python docs under Python3 due to encoding issues

2010-06-01 Thread anatoly techtonik

Changes by anatoly techtonik techto...@gmail.com:


--
nosy: +techtonik

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



[issue5434] datetime.monthdelta

2010-06-01 Thread Jess Austin

Changes by Jess Austin jess.aus...@gmail.com:


--
status: open - pending

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



[issue8871] --user-access-control=auto has no effect

2010-06-01 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

Seems like `--user-access-control=auto` option [1] introduced in Python 2.6 for 
to bdist_wininst has no effect on Vista. 

Test.
1. Get a Vista.
2. `hg clone http://bitbucket.org/techtonik/python-wget/`
3. Add
{{{
scripts=['wget.py'],
}}}
to setup.py
4. `python setup.py bdist_wininst --user-access-control=auto`
5. Execute wget-0.6.win32.exe
6. Watch the error
{{{
Access is denied.
CreateFile (C:\Python27\Scripts\wget.py)
}}}
7. Python is always installed for All users on Vista

[1] 
http://docs.python.org/distutils/builtdist.html#vista-user-access-control-uac

--
assignee: tarek
components: Distutils
messages: 106853
nosy: tarek, techtonik
priority: normal
severity: normal
status: open
title: --user-access-control=auto has no effect
type: crash
versions: Python 2.6, Python 2.7

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



[issue2581] Vista UAC/elevation support for bdist_wininst

2010-06-01 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Doesn't seem to work anymore. Please, see:
http://bugs.python.org/issue8870
http://bugs.python.org/issue8871

--
nosy: +techtonik

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



[issue7833] Bdist_wininst installers fail to load extensions built with Issue4120 patch

2010-06-01 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

I see that this issue mentions --user-access-control option. Can somebody also 
check if issue8870 and issue8871 are related to this one?

--
nosy: +techtonik

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



[issue8870] --user-access-control=force produces invalid installer on Vista

2010-06-01 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

See also issue8871 and original report 
http://scons.tigris.org/issues/show_bug.cgi?id=2533

--

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



[issue8872] if/else stament bug?

2010-06-01 Thread Chris

New submission from Chris chrit...@gmx.com:

i am trying to learn to program in Python from a book on programming that says 
to use Python 3 

i downloaded the Python 3.1.2 Windows x86 MSI installer for my machine aka an 
HP DV2500 running Win 7

it runs fine, but when i try to write the test program from my book i can't get 
past the if/else statement aka it gives me a syntax error when i get to the 
point of an if/else statement aka i program to ask the user to guess the number 
.. and then i try to create an if/else statement to print a you lose type 
statement if the input guess is not equal to the number specified by the 
program. for example i program the game to = 777 and print the you lose type 
message if the user's guess is not equal to 777, however i use the check module 
command from the run window in IDLE and it gave me a syntax error when i typed 
it the way the book said ... I've tried to figure this out myself but have had 
no success .. so i looked up if statements in the Python tutorials on 
python.org and tried that format and am still getting a syntax error

--
components: IDLE, Windows
files: hash.py
messages: 106857
nosy: chrits55
priority: normal
severity: normal
status: open
title: if/else stament bug?
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file17515/hash.py

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



[issue8872] if/else stament bug?

2010-06-01 Thread R. David Murray

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

The bug tracker is not the place to get help on learning python.  Please try 
python-list or python-help (see mail.python.org).

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue8870] --user-access-control=force produces invalid installer on Vista

2010-06-01 Thread Mark Hammond

Mark Hammond mhamm...@users.sourceforge.net added the comment:

Is it possible the installer is being run from a network share?  A comment from 
PC/bdist_wininst/install.c:

// interesting failure scenario that has been seen: initial executable
// runs from a network drive - but once elevated, that network share
// isn't seen, and ShellExecute fails with SE_ERR_ACCESSDENIED.

SE_ERR_ACCESSDENIED is 5, so googling for that might offer more insights.

--
nosy: +mhammond

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



[issue8857] socket.getaddrinfo needs tests

2010-06-01 Thread Giampaolo Rodola'

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

A patch which adds some basic tests is in attachment.
It basically tests what told in the documentation without going too deeper.

--
Added file: http://bugs.python.org/file17516/getaddrinfotest.patch

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



[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-06-01 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Most likely, we wouldn't be able to support recvmsg on Solaris. We would need 
to run configure tests to determine whether the APIs are available, and that 
would require defining _XOPEN_SOURCE in pyconfig.h.in, which (according to 
#1759169) we must not do.

--

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



[issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X

2010-06-01 Thread Hugh Secker-Walker

New submission from Hugh Secker-Walker hug...@users.sourceforge.net:

Popen seems to be *very* costly, CPU wise, on Mac OS X.

I need to read and process bytes from the stdout of another process that 
outputs bytes in a rate-limited fashion, e.g. 8 bytes per second.  If I use 
a shell pipeline and a simple Python script to read the bytes and log some 
details then top and time both agree that the Python script is using roughly 1 
second of CPU time for every 2000 seconds of elapsed time.

If I change the script to use Popen to start the first process and to read from 
proc.stdout, then top and time both agree that the Python script uses roughly 1 
second of CPU time for every 6 seconds of elapsed time.  That is, using Popen 
uses 333 times as much CPU as using a shell pipeline.

In practice, this means that using a shell pipeline has no measureable impact 
on system performance, and I can run 300 concurrent pipeline jobs, whereas 
using Popen limits me to running 6 such concurrent jobs.

This is on an up-to-date Mac OS X 10.5.8 system.  The behavior happens with 
both the stock Python 2.5 from Apple and with Python 2.6 from Macports.

On Ubuntu Linux the Popen solution is perhaps 2% slower than using a shell 
pipeline.

I'll attach three scripts:
bytestream -- simple program that sends bytes to its stdout
pull0 -- Python script that reads its stdin and logs a couple of stats
pull1 -- Python script that uses Popen to start bytestream and pulls from 
proc.stdout and runs abysmally slowly.

Use this with a concurrent top to see the shell pipeline behavior:
$ ./bytestream 8 4 | time ./pull0 11000

Use this with a concurrent top to see the Popen behavior:
$ time ./pull1 ./bytestream 8 4 11000

In both cases you'll see that system and user time are approximately equal, but 
that they're roughly 333 times higher for pull1.  Is there a clue in the fact 
that both times go up by about the same huge factor?

-Hugh

--
components: Library (Lib)
files: bytestream
messages: 106862
nosy: hughsw
priority: normal
severity: normal
status: open
title: Popen uses 333 times as much CPU as a shell pipe on Mac OS X
type: behavior
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file17517/bytestream

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



[issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X

2010-06-01 Thread Hugh Secker-Walker

Changes by Hugh Secker-Walker hug...@users.sourceforge.net:


Added file: http://bugs.python.org/file17518/pull0

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



[issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X

2010-06-01 Thread Hugh Secker-Walker

Changes by Hugh Secker-Walker hug...@users.sourceforge.net:


Added file: http://bugs.python.org/file17519/pull1

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



[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-06-01 Thread John Levon

John Levon movem...@users.sourceforge.net added the comment:

It's not clear why you'd need configure tests, but you could easily add the 
define in the body of the autoconf test AFAIK - is there a reason this is 
difficult?

--

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



[issue8870] --user-access-control=force produces invalid installer on Vista

2010-06-01 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

It is local Ext2 partition system accessible through http://www.fs-driver.org/ 
on the same HDD as primary system partition. But there is definitely issue with 
difference between drives.

There is no problem if the package is executed from the NTFS system drive - 
permissions asked as expected, no errors. On the Ext2 partition VLC and other 
installers that require elevated privileges fail. I do not remember any such 
problems last year, but it just can be that most applications on this drive are 
not windows specific or do not require elevated privileges.

I still doesn't explain why this drive is threatened as network. It would be 
nice to see how Windows treats other partition types - FAT32 or FAT16.

--

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



[issue8870] --user-access-control=force produces invalid installer on Vista

2010-06-01 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Attaching installer file for testing.

--
Added file: http://bugs.python.org/file17520/wget-0.6.win32.exe

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



[issue8669] lack of bdist_rpm module raises error on 'setup.py --help-commands'

2010-06-01 Thread Éric Araujo

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

Can you still reproduce it? I think it’s fixed by 
http://bitbucket.org/tarek/distutils2/changeset/19f1965a304d

--
nosy: +merwok

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



[issue7833] Bdist_wininst installers fail to load extensions built with Issue4120 patch

2010-06-01 Thread Koen van de Sande

Koen van de Sande k...@tibed.net added the comment:

issue8870 and issue8871 are not related to this one. There, the UAC elevation 
fails, here the issue is with the MS runtimes, elevation is working fine.

--

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



[issue8870] --user-access-control=force produces invalid installer on Vista

2010-06-01 Thread Koen van de Sande

Koen van de Sande k...@tibed.net added the comment:

This is listed as a known limitation of the Ext2 FS driver. From 
http://www.fs-driver.org/relnotes.html :

===
Running programs on an Ext2/Ext3 volume on Windows Vista 

Currently it is not possible to start a program on Vista if UAC is enabled and 
the program's executable is stored on an Ex2/Ext3 volume. An invalid 
parameter message box appears, but the program does not start. 

UAC is the feature of Vista that prompts the user to elevate the user 
privileges to administrator level when necessary. UAC is enabled by default. It 
is not recommended to disable it. 

The problem is caused by Vista's internals: There is some code that compares 
whether the name of the file system type is one of the following: NTFS, 
FAT, FAT32, CDFS, NPFS, MSFS or UDF. If there is a match, it is one 
of Microsoft's file system types and a lot of code is skipped in the Multiple 
UNC Provider (MUP) implementation of Vista. If the file system type is a 
third-party type, for example Ext2, some code runs in the MUP of Vista that 
always generates an ERROR_INVALID_PARAMETER error status code due to a bug of 
Vista.
===

So the bug is in that FS (or in Windows if you will). It is not something 
Python can fix.

--
nosy: +koen

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



[issue8874] py3k documentation mentions deprecated opcode LOAD_LOCALS

2010-06-01 Thread Yaniv Aknin

New submission from Yaniv Aknin yaniv.ak...@gmail.com:

The documentation of the dis module mentions LOAD_LOCALS, which used to exist 
in Python 2.x and I believe was removed from py3k (doesn't appear in recent 
Include/opcode.h).

The exact offending section is: 
http://docs.python.org/py3k/library/dis.html#opcode-LOAD_LOCALS
I think it should just be edited out.

--
assignee: d...@python
components: Documentation
messages: 106869
nosy: Yaniv.Aknin, d...@python
priority: normal
severity: normal
status: open
title: py3k documentation mentions deprecated opcode LOAD_LOCALS
versions: Python 3.1, Python 3.2, Python 3.3

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



[issue8591] update mkpkg to latest coding standards

2010-06-01 Thread Dan Buch

Dan Buch daniel.b...@gmail.com added the comment:

@merwok much thanks for the feedback.  After seeing how you're working via 
bitbucket I've decided to create a fresh fork from tarek and recreate my patch 
in multiple changesets all within the default branch.  I'll update the issue 
when finished.

--

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



[issue6521] Contradictory documentation for email.mime.text.MIMEText

2010-06-01 Thread R. David Murray

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

This is not quite a duplicate of issue 1368247, but in the patch for that issue 
the doc changes should clarify the ambiguity.

--
resolution:  - duplicate
stage: needs patch - committed/rejected
status: open - closed
type:  - behavior

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



[issue8868] Framework install does not behave as a framework

2010-06-01 Thread Michiel de Hoon

Michiel de Hoon mdeh...@users.sourceforge.net added the comment:

The patch solves the problem also on Mac OS X 10.5 (I tried 32-bits and 64-bits 
with the current python in trunk, after applying the patch).
Thanks again!

--

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



[issue1555842] email package and Unicode strings handling

2010-06-01 Thread R. David Murray

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

It took me a while to figure out why latin-1 works.  I turns out to be an 
accident: latin-1 uses quoted-printable encoding, and the email quoprimime 
module accidentally manages to quote unicode characters in the latin-1 range.

The Header example, as noted by the OP, is working as documented.  This 
confusing interface isn't going to get fixed in the current email package.  The 
equivalent email6 API will be cleaner.

The MIMEText portion is a duplicate of issue 1368247.

--
resolution:  - duplicate
stage: unit test needed - committed/rejected
status: open - closed

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



[issue8788] urllib.urlencode documentation unclear on doseq

2010-06-01 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Agree to your concern that doseq parameter is not properly explained.
Fixed in r81645, r81646, r81647 and r81648.

--
nosy: +orsenthil
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue8875] XML-RPC improvement is described twice.

2010-06-01 Thread INADA Naoki

New submission from INADA Naoki songofaca...@gmail.com:

http://docs.python.org/dev/whatsnew/2.7.html#new-and-improved-modules

The XML-RPC client and server, provided by... appears twice.

--
assignee: d...@python
components: Documentation
messages: 106875
nosy: d...@python, naoki
priority: normal
severity: normal
status: open
title: XML-RPC improvement is described twice.
versions: Python 2.7

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



[issue8875] XML-RPC improvement is described twice.

2010-06-01 Thread Ezio Melotti

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


--
nosy: +akuchling, ezio.melotti
stage:  - needs patch

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



[issue8868] Framework install does not behave as a framework

2010-06-01 Thread Ronald Oussoren

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

Thanks for testing.

I've applied the patch (with some additional documentation) in r81649 (2.7) and 
r81650 (3.2).  Other versions are not affected.

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed
versions: +Python 3.2

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



[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

2010-06-01 Thread Ionut Turturica

Ionut Turturica jono...@yahoo.com added the comment:

Why would you waste the time and resources to test 5 times for a known to be 
wrong credential ?!

This is not like in a browser where the user is presented with a dialog box 5 
times and he/she can try different credentials.

I don't see the point...

--

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



[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

2010-06-01 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

The point of retry is for auth failure, which can happen due to any reason. It 
is not just for a wrong password.

I was thinking just doing a single verification and failing, but did find some 
resources (not just browsers) which adopt this approach of retry.

BTW, Basic auth is gone now and Digest auth has some recommendations so I found 
its fine to do the same way as Digest auth does.

--

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