[issue12349] Typo in 3.2 What's New: WGSI / WSGI

2011-06-17 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

Fixed by Raymond (thanks!) with these commits:

http://hg.python.org/cpython/rev/0fe3b81c7c89
http://hg.python.org/cpython/rev/cf56abd14eef

--
nosy: +rhettinger
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue12346] Python 2.7.2 source code build (release) depends on mercurial

2011-06-17 Thread Ralf Schmitt

Ralf Schmitt python-b...@systemexit.de added the comment:

trunk configure.in contains code that checks for the existence of a .hg 
repository.
See rev 435eec7b41f0

--
nosy: +schmir

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



[issue12333] test_packaging failures under Solaris

2011-06-17 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 276530424350 by Victor Stinner in branch 'default':
Issue #12333: restore the previous dir before removing the current directory
http://hg.python.org/cpython/rev/276530424350

--
nosy: +python-dev

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



[issue12310] Segfault in test_multiprocessing

2011-06-17 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset e6e7e42efdc2 by Victor Stinner in branch '3.2':
Issue #12310: finalize the old process after _run_after_forkers()
http://hg.python.org/cpython/rev/e6e7e42efdc2

New changeset a73e5c1f57d7 by Victor Stinner in branch 'default':
(Merge 3.2) Issue #12310: finalize the old process after _run_after_forkers()
http://hg.python.org/cpython/rev/a73e5c1f57d7

--
nosy: +python-dev

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



[issue12310] Segfault in test_multiprocessing

2011-06-17 Thread STINNER Victor

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

Let's try on real buildbots. If the commit fixes the issue on 3.x, I will 
port the fix to Python 2.7.

--

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



[issue12333] test_packaging failures under Solaris

2011-06-17 Thread STINNER Victor

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

276530424350 fixed the failures on x86 OpenIndiana 3.x buildbot.

--
nosy: +haypo
resolution:  - fixed
status: open - closed

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



[issue12342] characters with ord above 65535 fail to display in IDLE

2011-06-17 Thread STINNER Victor

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

Instead of
  ValueError: unsupported character
I suggest:
  ValueError: unsupported character (U+1): Tcl doesn't support characters 
outside U+-U+ range

What do you think?

--

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



[issue12263] punycode codec ignores the error handler argument

2011-06-17 Thread STINNER Victor

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

@Martin: Can you review my patch?

--

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



[issue12333] test_packaging failures under Solaris

2011-06-17 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 6e5a9f16d831 by Victor Stinner in branch 'default':
Issue #12333: close files before removing the directory
http://hg.python.org/cpython/rev/6e5a9f16d831

New changeset 144cea8db9a5 by Victor Stinner in branch 'default':
Issue #12333: run tests on the new module in a subprocess
http://hg.python.org/cpython/rev/144cea8db9a5

--

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



[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset ad6bdfd7dd4b by Victor Stinner in branch '3.2':
Issue #12133: fix a ResourceWarning in urllib.request
http://hg.python.org/cpython/rev/ad6bdfd7dd4b

New changeset 57a98feb508e by Victor Stinner in branch 'default':
(Merge 3.2) Issue #12133: fix a ResourceWarning in urllib.request
http://hg.python.org/cpython/rev/57a98feb508e

--
nosy: +python-dev

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



[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 18e6ccc332d5 by Victor Stinner in branch '2.7':
Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP
http://hg.python.org/cpython/rev/18e6ccc332d5

--

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



[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread STINNER Victor

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

I tested the patch on Python 3.3: the full test suite pass on Linux. I applied 
your patch on Python 2.7, 3.2 and 3.3, thanks Ezio.

--
resolution:  - fixed
status: open - closed

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



[issue12309] os.environ was modified by test_packaging

2011-06-17 Thread STINNER Victor

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

A patch fixing os.environ warning for test_command_build_ext.py:

diff --git a/Lib/packaging/tests/test_command_build_ext.py 
b/Lib/packaging/tests/test_command_build_ext.py
--- a/Lib/packaging/tests/test_command_build_ext.py
+++ b/Lib/packaging/tests/test_command_build_ext.py
@@ -20,7 +20,10 @@ def _get_source_filename():
 
 class BuildExtTestCase(support.TempdirManager,
support.LoggingCatcher,
+   support.EnvironRestorer,
unittest.TestCase):
+restore_environ = ['LIB', 'INCLUDE', 'PATH']
+
 def setUp(self):
 # Create a simple test environment
 # Note that we're making changes to sys.path

It is not enough.

--

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



[issue10883] urllib: socket is not closed explicitly

2011-06-17 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset ca18f7f35c28 by Victor Stinner in branch '3.2':
Issue #10883: test_urllib2net closes socket explicitly
http://hg.python.org/cpython/rev/ca18f7f35c28

New changeset 6d38060f290c by Victor Stinner in branch 'default':
(Merge 3.2) Issue #10883: test_urllib2net closes socket explicitly
http://hg.python.org/cpython/rev/6d38060f290c

--

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



[issue10883] urllib: socket is not closed explicitly

2011-06-17 Thread STINNER Victor

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

ftp_close.patch:
 - (in passive mode) FTP.ntransfercmd() closes explicitly the socket on error: 
the caller has not access to the socket on error
 - OtherNetworkTests of test_urllib2net clears CacheFTPHandler cache: add a 
CacheFTPHandler.clear_cache() for that (I didn't document this new method 
because other methods are also not documented)
 - the last change is the worst one (ugly hack): FTPHandler.ftp_open() changes 
the close callback of the addclosehook object in ftpwrapper.retrfile(), but not 
in CacheFTPHandler.

I don't like the implementation of the last change:
 - it adds a protected class attribute
 - ftpwrapper.retrfile() requires an explicit close=True argument: it would be 
better to use a reference counter (or something like that), like 
socket._io_refs

--
keywords: +patch
Added file: http://bugs.python.org/file22392/ftp_close.patch

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



[issue12352] multiprocessing.Value() hangs

2011-06-17 Thread greg.ath

New submission from greg.ath gathan...@gmail.com:

Hi,

My multithreaded application uses multithreading.Value() to ensure thread-safe 
operations on shared data.
For unexpected reasons, after some change in my code, the function will 
consistently hang.

I did a gdb backtrace of the hanging process, and I discovered that the 
multiprocessing.head.py tries to acquire twice a same non recursive lock.
The first aquire is done in the malloc function:
#61 call_function (f=
Frame 0x13be190, for file /usr/lib/python2.6/multiprocessing/heap.py, line 
173, in malloc (self=Heap(_stop_to_block={}, _lengths=[], _lock=thread.lock 
at remote 0x7f00fc770eb8, _allocated_blocks=set([...

The second aquire is done in the free function:
#3  0x004a7c5e in call_function (f=
Frame 0x1662d50, for file /usr/lib/python2.6/multiprocessing/heap.py, line 
155, in free (self=Heap(_stop_to_block={}, _lengths=[], _lock=thread.lock at 
remote 0x7f00fc770eb8, _allocated_blocks=set([...

I don't understand the link between these two method calls, so I am unable to 
write an easy script to reproduce the problem. I would say that some garbage 
collection was done within the malloc, which called the free.


Python 2.6.5
Linux dev 2.6.32-25-server #45-Ubuntu SMP Sat Oct 16 20:06:58 UTC 2010 x86_64 
GNU/Linux

--
components: None
files: gdb_stack.txt
messages: 138506
nosy: greg.ath
priority: normal
severity: normal
status: open
title: multiprocessing.Value() hangs
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file22393/gdb_stack.txt

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



[issue12346] Python 2.7.2 source code build (release) depends on mercurial

2011-06-17 Thread R. David Murray

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

That needs to be ported to the other branches, then.

Ezio, on a completely unrelated note, notice what happened to Ralf's reference. 
 I think the regexes may need to be reordered.

--
nosy: +ezio.melotti

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



[issue9246] os.getcwd() hardcodes max path len

2011-06-17 Thread STINNER Victor

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

Simpler patch replacing 1026 constant by MAXPATHLEN. On my Linux box, 
MAXPATHLEN is 4096 and os.pathconf('/', 'PC_PATH_MAX') returns 4096. I am able 
to get a path of 4095 bytes using the patch.

--
Added file: http://bugs.python.org/file22394/os_getcwd_maxpathlen.patch

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



[issue9246] os.getcwd() hardcodes max path len

2011-06-17 Thread STINNER Victor

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

You may use get_current_dir_name() which allocates the memory for us.

I can adapt os_getcwd_buffer-2.patch to support Solaris/OpenBSD, but do we need 
a dynamic buffer? (do we need to support OS without PATH_MAX)

--

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



[issue9246] os.getcwd() hardcodes max path len

2011-06-17 Thread STINNER Victor

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

bigpath2.py: script to check the maximum path length of os.getcwd().

--
Added file: http://bugs.python.org/file22395/bigpath2.py

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



[issue12310] Segfault in test_multiprocessing

2011-06-17 Thread STINNER Victor

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

test_multiprocessing pass with success on PPC Tiger 3.x (and x86 Tiger 3.x, but 
the segfaults only occurred on PPC), but this issue is a sporadic issue. I 
close the issue because I hope that it is closed, but reopen it if you still 
see segfaults on PPC Tiger 3.x.

--
resolution:  - fixed
status: open - closed

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



[issue12320] test_packaging failures

2011-06-17 Thread STINNER Victor

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

I fixed the issue #12333. I don't see any test_packaging failure anymore, let's 
close this issue.

--
resolution:  - fixed
status: open - closed

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



[issue9246] os.getcwd() hardcodes max path len

2011-06-17 Thread Martin v . Löwis

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

 I can adapt os_getcwd_buffer-2.patch to support Solaris/OpenBSD, but
 do we need a dynamic buffer? (do we need to support OS without
 PATH_MAX)

From a practicality point of view, we need to make no change at all:
nobody sane ever has a current working directory path of more than
1000 characters. Even if people have very long path names, they
don't make them the current working directory.

So if anything is changed, it's for purity only. Then, for purity,
we should get it right and support any path that the operating system
supports.

--

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



[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python

2011-06-17 Thread R. David Murray

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

Bump, this failure is still happening on the ppc tiger buildbot periodically.

--
nosy: +ned.deily

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



[issue12353] argparse cannot handle empty arguments

2011-06-17 Thread Bryan Jacobs

New submission from Bryan Jacobs bjac...@woti.com:

Parsing arguments with argparse fails with an IndexError when one of the 
arguments is the empty string (''). This is caused by an access to the zero'th 
element of the argument value, without a preceding length check.

Fixed by the below patch:

Index: Lib/argparse.py
===
--- Lib/argparse.py
+++ Lib/argparse.py
@@ -1967,7 +1967,7 @@ class ArgumentParser(_AttributeHolder, _
 for arg_string in arg_strings:
 
 # for regular arguments, just add them back into the list
-if arg_string[0] not in self.fromfile_prefix_chars:
+if len(arg_string) == 0 or arg_string[0] not in 
self.fromfile_prefix_chars:
 new_arg_strings.append(arg_string)
 
 # replace arguments referencing files with the file content

--
components: Library (Lib)
messages: 138515
nosy: bjacobs
priority: normal
severity: normal
status: open
title: argparse cannot handle empty arguments
type: behavior
versions: Python 2.7

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



[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-06-17 Thread STINNER Victor

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

 What about something like .decode('mbcs', errors='windows')?

Yes, we can use an error handler specific to the mbcs codec, but I would prefer 
to not introduce special error handlers.

For os.fsencode(), we can keep it unchanged, or add an optional flags 
argument to codecs.mbcs_decode().

 I still don't see the advantage of codecs.code_page_encode().

codecs.code_page_encode() and codecs.code_page_decode() are required for unit 
tests. If you don't want to add new public (C and Python) functions, we may add 
them to _testcapi.

--

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



[issue12313] make install misses test dirs for packaging and email modules

2011-06-17 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset c9d27c63b45c by R David Murray in branch 'default':
#12313: update Makefile.pre.in to account for email tests moving to 'test' dir
http://hg.python.org/cpython/rev/c9d27c63b45c

--
nosy: +python-dev

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



[issue12313] make install misses test dirs for packaging and email modules

2011-06-17 Thread R. David Murray

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

Well, regardless of whether or not I understand what's going on, clearly those 
directories in the makefile needed updating, so I did it.

--

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



[issue4470] smtplib SMTP_SSL not working.

2011-06-17 Thread R. David Murray

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

Torsten, can you provide a clear, failing unittest for this?

--

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



[issue4470] smtplib SMTP_SSL not working.

2011-06-17 Thread Torsten Bronger

Torsten Bronger bron...@physik.rwth-aachen.de added the comment:

No, I don't know how to do that.  All I can provide is a minimal version of my 
code that triggers the above mentioned traceback.  It is:

import smtplib

s = smtplib.SMTP_SSL(relay-auth.rwth-aachen.de)
s.login(***, ***)
s.sendmail(bron...@physik.rwth-aachen.de, bronger.ran...@googlemail.com], 
Hello)

I hope it helps to understand what I mean.

--

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



[issue4470] smtplib SMTP_SSL not working.

2011-06-17 Thread Torsten Bronger

Torsten Bronger bron...@physik.rwth-aachen.de added the comment:

Sorry, it must be:

import smtplib

s = smtplib.SMTP_SSL(relay-auth.rwth-aachen.de)
s.login(***, ***)
s.sendmail(bron...@physik.rwth-aachen.de, [bronger.ran...@googlemail.com], 
Hello)

(A bracket was missing.)

--

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



[issue12353] argparse cannot handle empty arguments

2011-06-17 Thread R. David Murray

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

Thanks for the report and patch.  I'm setting this to test needed since the 
final patch will need a unit test.

The idiomatic way to do this kind of check is 'if not argstring or 
arg_string[0] not in self.fromfile_prefix_chars):'

--
nosy: +bethard, r.david.murray
stage:  - test needed
versions: +Python 3.2, Python 3.3

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



[issue4470] smtplib SMTP_SSL not working.

2011-06-17 Thread R. David Murray

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

According to your traceback you should be seeing the error in the first line 
(the creation of the SMTP_SSL object).  If I run that line at the python prompt 
of python2.7.1, I get your connection failure.  If I run it using 2.7 tip (or 
3.3 tip), the connection succeeds.  I know there have been other fixes in this 
area, but I don't know which one makes the difference.

Torsten, can you test with 2.7.2 and/or 2.7 tip?

I'm not sure what is left to do in this issue.  Do you have an opinion, Lorenzo?

--

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



[issue12328] multiprocessing's overlapped PipeConnection on Windows

2011-06-17 Thread sbt

sbt shibt...@gmail.com added the comment:

 You are right, we need a manual reset *or* we must ensure that every
 user of _PyOS_SigintEvent only does so from the main thread.

On second thoughts, even using an auto-reset event, resetting the event before 
waiting is unavoidable.  Otherwise you are liable to catch an event that was 
set a long time ago.

--

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



[issue11767] Maildir iterator leaks file descriptors by default

2011-06-17 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset fea1920ae75f by R David Murray in branch '3.2':
#11767: use context manager to close file in __getitem__ to prevent FD leak
http://hg.python.org/cpython/rev/fea1920ae75f

New changeset 1d7a91358517 by R David Murray in branch 'default':
merge #11767: use context manager to close file in __getitem__ to prevent FD 
leak
http://hg.python.org/cpython/rev/1d7a91358517

--
nosy: +python-dev

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



[issue11767] Maildir iterator leaks file descriptors by default

2011-06-17 Thread R. David Murray

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

The patch doesn't work on 2.7.  The failures are related to #11700, although 
that would seem to indicate that something *is* trying to close the file.  I 
have no idea what.

--
dependencies: +mailbox.py proxy updates

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



[issue12347] add an extras in packaging.pypi.simple.Crawler

2011-06-17 Thread Éric Araujo

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


--
assignee:  - tarek
components: +Distutils2
nosy: +eric.araujo

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



[issue12348] case sensitivity in packaging.pypi.simple.Crawler

2011-06-17 Thread Éric Araujo

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


--
assignee:  - tarek
components: +Distutils2
nosy: +eric.araujo
title: case sensitivness  in packaging.pypi.simple.Crawler - case sensitivity  
in packaging.pypi.simple.Crawler
versions: +Python 3.3

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



[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-17 Thread Éric Araujo

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

Martin’s sys.platform = 'linux' sounds good to me too.

--
nosy: +eric.araujo

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



[issue5572] distutils ignores the LIBS configure env var

2011-06-17 Thread Éric Araujo

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

 This wasn't so much a feature request as a request for review.
From a tracker process viewpoint, any report is a bug, a feature request or a 
doc bug.  A bug can be defined as a discrepancy between the doc and the code.  
Given that I found no mention of LIBS support in distutils, I tentatively took 
the conservative way and judged this a new feature.  However..

 We found this change necessary when working on Unladen Swallow.
This may change the situation.  Why was it necessary?  Would other projects 
need it?  Is it a standard in other build tools that’s an obvious oversight in 
distutils?

--

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



[issue12333] test_packaging failures under Solaris

2011-06-17 Thread Éric Araujo

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

Thanks for tackling this while I was offline.

--

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



[issue12167] test_packaging reference leak

2011-06-17 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 27a70dfc38cc by Éric Araujo in branch 'default':
Packaging tests: don’t let an internal cache grow indefinitely.
http://hg.python.org/cpython/rev/27a70dfc38cc

--

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



[issue12167] test_packaging reference leak

2011-06-17 Thread Éric Araujo

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

 I could not find any test in distutils/tests that imports extension modules.

test_build_ext builds and imports xx.

--

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



[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread Éric Araujo

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

Yay!

--
nosy: +alexis, eric.araujo

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



[issue12167] test_packaging reference leak

2011-06-17 Thread Éric Araujo

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

We’re down to 100 refleaks.  Thanks to the negative refleaks of test_pydoc, we 
now have a few refleaks to spare!  Seriously, what does a negative refleak mean?

--

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



[issue11767] Maildir iterator leaks file descriptors by default

2011-06-17 Thread Filip Gruszczyński

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

Should I try to do something about this right now or should I wait until #1170 
is finishedclosed and only then try to fix this issue too?

--

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



[issue5572] distutils ignores the LIBS configure env var

2011-06-17 Thread Collin Winter

Collin Winter coll...@gmail.com added the comment:

I have provided justification in the original patch submission. Without this 
patch, we were unable to cleanly apply gcc's feedback-directed optimization 
system to Python. FDO yields significant performance improvements.

--

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



[issue6584] gzip module has no custom exception

2011-06-17 Thread Filip Gruszczyński

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

Bump! Antoine, do you think the patch is acceptable and can be committed now?

--

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



[issue11767] Maildir iterator leaks file descriptors by default

2011-06-17 Thread R. David Murray

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

Well, if you want to you could investigate further, and try the patch from 
#11700 and see what is left to do here after it has been applied.  I'll try to 
get 11700 in soon, though.

--

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



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

2011-06-17 Thread Filip Gruszczyński

New submission from Filip Gruszczyński grusz...@gmail.com:

In documentation for packaging.pypi.simple in first code snippet crawler 
variable is created on which further operations will be performed. However in 
all next snippets there is client variable, which is a little confusing on 
first sight. This could be consistent throughout the whole page.

--
assignee: docs@python
components: Distutils2, Documentation
messages: 138538
nosy: alexis, docs@python, eric.araujo, gruszczy
priority: normal
severity: normal
status: open
title: packaging.pypi.simple docs use both client and crawler variable, which 
might be confusing
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12354
___
___
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

2011-06-17 Thread Filip Gruszczyński

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

And a small, quick patch to docs.

--
keywords: +patch
Added file: http://bugs.python.org/file22396/12354.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12354
___
___
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

2011-06-17 Thread Éric Araujo

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

Thanks for the report.  I’m editing the doc to fix all instances of client and 
also improve phrasing in the whole file.

--
assignee: docs@python - eric.araujo

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



[issue12342] characters with ord above 65535 fail to display in IDLE

2011-06-17 Thread Terry J. Reedy

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

ValueError: unsupported character (U+1): Tcl doesn't support characters 
outside U+-U+ range

Slightly shorter and without the double :s.

ValueError: character U+1 is above the range (U+-U+) allowed by 
Tcl/Tk.

I agree with a change like this. People are going to increasingly use non-BMP 
chars and need to find out that the problem is not our fault.

--
components: +Tkinter -IDLE, IO
versions: +Python 2.7, Python 3.3

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



[issue12350] Improve stat_result.st_blocks and st_blksize documentation

2011-06-17 Thread Lars Wirzenius

Lars Wirzenius l...@liw.fi added the comment:

Right. So I guess at least the following should be changed (I'll make an actual 
patch once there's consensus):

* st_blocks should say that the size of block is often 512 bytes, but that's 
not guaranteed, and there's no way to know for sure

* st_blksize should say it is size of efficient I/O, and is unrelated to 
st_blocks

Should there be something more? Ideally, there should be a way to find out the 
size of blocks for st_blocks, but I don't know how to figure that out (though 
probably code from GNU's du could be borrowed).

--

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



[issue12167] test_packaging reference leak

2011-06-17 Thread R. David Murray

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

It means that objects were garbage collected.  The refleak test runs the test 
multiple times, and ignores the first N runs to allow the object count to 
settle.  But sometimes it either doesn't settle, or later runs end up with 
objects getting garbage collected that were created in earlier runs.

--
nosy: +r.david.murray

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



[issue6584] gzip module has no custom exception

2011-06-17 Thread Terry J. Reedy

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

Your changes appear to address all three of Antoine's 'nits'.

--
stage: patch review - commit review

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



[issue12350] Improve stat_result.st_blocks and st_blksize documentation

2011-06-17 Thread R. David Murray

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

I think that wording is as good as we can do for now.  Providing a way to 
determine the size of st_blocks blocks should be a separate issue (a feature 
request).  That enhancement can include an update to these docs, but since it 
is an enhancement it will only go into the development version.  But your 
wording fix should go into all maintained versions.

I think your suggested rewording is reasonable.

--

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



[issue9246] os.getcwd() hardcodes max path len

2011-06-17 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
nosy: +santa4nt

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



[issue12346] Python 2.7.2 source code build (release) depends on mercurial

2011-06-17 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
nosy: +santa4nt

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



[issue12348] case sensitivity in packaging.pypi.simple.Crawler

2011-06-17 Thread Filip Gruszczyński

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

When I started looking at this I noticed following behaviour:

 from packaging.pypi.simple import Crawler
 client = Crawler()
 client.get_releases('webob')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/gruszczy/Projects/python/Lib/packaging/pypi/simple.py, line 192, 
in get_releases
self._process_index_page(predicate.name)
packaging.pypi.errors.ProjectNotFound
 client.search_projects('webob')
[Project WebOb, Project webob_view, Project yafowil.webob]
 client.get_releases('webob')
Project WebOb

Shouldn't this be made consistent?

--
nosy: +gruszczy

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



[issue12355] Crawler doesn't follow redirection

2011-06-17 Thread Filip Gruszczyński

New submission from Filip Gruszczyński grusz...@gmail.com:

When looking at issue #12348 I have noticed following behaviour:

from packaging.pypi.simple import Crawler
c = Crawler()
c.get_releases('webob')

Traceback (most recent call last):
  File test_crawl.py, line 3, in module
c.get_releases('webob')
  File /home/gruszczy/Projects/python/Lib/packaging/pypi/simple.py, line 192, 
in get_releases
raise ProjectNotFound
packaging.pypi.errors.ProjectNotFound

This is because when request for /simple/webob/ is made 301 is returned to 
/simple/WebOb/ and HttpError raised, which is silenced and returned:

except urllib.error.HTTPError as v:
return v

Wouldn't it be good to do something about? How about crawler following 
redirects?

--
assignee: tarek
components: Distutils2
messages: 138547
nosy: alexis, eric.araujo, gruszczy, tarek
priority: normal
severity: normal
status: open
title: Crawler doesn't follow redirection
type: crash
versions: Python 3.3

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



[issue12345] Add math.tau

2011-06-17 Thread Daniel Stutzbach

Daniel Stutzbach stutzb...@google.com added the comment:

On Wed, Jun 15, 2011 at 8:10 PM, Nick Coghlan rep...@bugs.python.orgwrote:

 I'd like to add a new constant to the math module:

  tau = 2*math.pi

 Rather than repeating all the reasons for why tau makes more sense than pi
 as the fundamental circle constant, I'll just refer interested readers to
 http://tauday.com/

(The following is best if read aloud using your best pirate impression)

I'd rather name the new constant matey.  Then we have:

The circumference of a circle is: r matey
The area of a circle is: one-quarter r r matey
etc.

--
nosy: +stutzbach
Added file: http://bugs.python.org/file22397/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12345
___div class=gmail_quoteOn Wed, Jun 15, 2011 at 8:10 PM, Nick Coghlan span 
dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span 
wrote:brblockquote class=gmail_quote style=margin:0 0 0 
.8ex;border-left:1px #ccc solid;padding-left:1ex;
I#39;d like to add a new constant to the math module:br
br
  tau = 2*math.pibr
br
Rather than repeating all the reasons for why tau makes more sense than pi as 
the fundamental circle constant, I#39;ll just refer interested readers to a 
href=http://tauday.com/; target=_blankhttp://tauday.com//a/blockquote
divbr/divdiv(The following is best if read aloud using your best pirate 
impression)/divdivbr/divdivI#39;d rather name the new constant 
quot;mateyquot;.  Then we have:/divdivbr/divdivThe 
circumference of a circle is: r matey/div
divThe area of a circle is: one-quarter r r 
matey/divdivetc./div/divbr-- brDaniel Stutzbachbr
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12355] Crawler doesn't follow redirection

2011-06-17 Thread Éric Araujo

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

Sure, let’s follow redirections (and log them).

--
stage:  - needs patch
type: crash - behavior

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



[issue12355] Crawler doesn't follow redirection

2011-06-17 Thread Filip Gruszczyński

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

OK, I'll try to come up with some patch.

--

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



[issue12345] Add math.tau

2011-06-17 Thread Mark Dickinson

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

Not to mention d(area of circle of radius r) = r dr matey.

--
nosy: +mark.dickinson

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



[issue4470] smtplib SMTP_SSL not working.

2011-06-17 Thread Lorenzo M. Catucci

Lorenzo M. Catucci lore...@sancho.ccd.uniroma2.it added the comment:

On Fri, 17 Jun 2011, R. David Murray wrote:

RDM 
RDM R. David Murray rdmur...@bitdance.com added the comment:
RDM 
RDM According to your traceback you should be seeing the error in the 
RDM first line (the creation of the SMTP_SSL object).  If I run that line 
RDM at the python prompt of python2.7.1, I get your connection failure.  
RDM If I run it using 2.7 tip (or 3.3 tip), the connection succeeds.  I 
RDM know there have been other fixes in this area, but I don't know which 
RDM one makes the difference.
RDM 
RDM Torsten, can you test with 2.7.2 and/or 2.7 tip?
RDM 
RDM I'm not sure what is left to do in this issue.  Do you have an 
RDM opinion, Lorenzo?
RDM 

Torsten, would you mind letting us know both the python and the .deb 
version by running 

$ python2.7 --version

and

$ dpkg -l python2.7

At least in debian's python2.7_2.7.1-8, default_port is still an instance 
attribute instead of a class attribute. 

If the ubuntu situation is the same, the missing patch is 
smtplib_01_default_port.diff , and you could work-around the problem by 
explicitly calling s = smtplib.SMTP_SSL(relay-auth.rwth-aachen.de, 465).

The patch got in with:

changeset:   69931:bcf04ced5ef1
branch:  2.7
parent:  69915:7c3a20b5943a
user:Antoine Pitrou solip...@pitrou.net
date:Sat May 07 19:59:33 2011 +0200
summary: Issue #11927: SMTP_SSL now uses port 465 by default as 
documented.  Patch by Kasun Herath.

The last hunk, which fixes LMTP is still missing.

@@ -776,8 +777,9 @@
 authentication, but your mileage might vary.

 ehlo_msg = lhlo
+default_port = LMTP_PORT

-def __init__(self, host = '', port = LMTP_PORT, local_hostname = 
None):
+def __init__(self, host = '', port = 0, local_hostname = None):
 Initialize a new instance.
 SMTP.__init__(self, host, port, local_hostname)

Have a nice week-end, yours

lorenzo

+-+--+
|   Lorenzo M.  Catucci   | Centro di Calcolo e Documentazione   |
| catu...@ccd.uniroma2.it | Università degli Studi di Roma Tor Vergata |
| | Via O. Raimondo 18 ** I-00173 ROMA  ** ITALY |
|  Tel. +39 06 7259 2255  | Fax. +39 06 7259 2125|
+-+--+

--

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



[issue12345] Add math.tau

2011-06-17 Thread Georg Brandl

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

 http://tauday.com/

And I thought putting dx directly next to the integral sign was audacious...

--
nosy: +georg.brandl

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



[issue12298] Sphinx glitch in library/functions

2011-06-17 Thread Terry J. Reedy

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

I agree that all table entries should link to the entry in the same file.

dict() and set() also jump to CH. 4, in addition to memoryview and frozenset. 
Others all work properly.

The entries for classes should generally have a link to their section in '4. 
Built-in Types'. All do other than these:

range() definitely needs a forward reference to 4.6 sequence types 

bool() lacks forward references; it could have one to 4.2 Bool ops and 4.11.9 
Bool values

object() -- no where to go.

slice() only has a reference to the glossary; it has no entry in Ch.4. Slice 
objects have read-only data attributes start, stop and step which merely return 
the argument values (or their default). They have no other explicit 
functionality is slightly wrong since there is the .indices method.

type(n,b,d) has no forward references as there is no where to go exactly

--
nosy: +terry.reedy

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



[issue4470] smtplib SMTP_SSL not working.

2011-06-17 Thread Catalin Iacob

Catalin Iacob iacobcata...@gmail.com added the comment:

Most of the problems in this issue were solved already so it could almost be 
closed:
* patch 1 was addressed in #11927
* patch 2 was addressed in #4066
* patches 3 and 4 were addressed in #11893

Torsten's problem was addressed by bcf04ced5ef1.

 I'm not sure what is left to do in this issue.

The only patch remaining is patch 5. I attached an updated version against tip 
of default branch. My patch mimics shutdown in imaplib.py in that it silences 
ENOTCONN. However I don't have a test that fails without the shutdown and I 
don't know if checking ENOTCONN is really needed. I tried to get shutdown to 
produce ENOTCONN by using Postfix as a server with smtpd_timeout=5s, connecting 
to it and waiting idle for more than 5 seconds before doing close(). In the 
Postfix logs I see that Postfix disconnects after 5 seconds of inactivity but 
doing shutdown afterwards doesn't trigger any exception so the ENOTCONN part 
remains unexercised.

My patch also adds shutdown method and SHUT_RDWR constant to mock_socket.py 
since otherwise test_smtplib fails.

(Added Antoine to nosy because he reviewed the patches for #11927 and #11893)

--
nosy: +catalin.iacob, pitrou
Added file: http://bugs.python.org/file22398/smtplib_05_shutdown_socket_v2.patch

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



[issue12315] Improve http.client.HTTPResponse.read documentation

2011-06-17 Thread Terry J. Reedy

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

The patch does 3 things:

1. clarify that 'amt' in 'the next amt bytes' means 'amount'.

I do not think this is necessary; 'the next blah bytes' is clear. Actually, 
'amt' really means 'number', not 'amount', which would imply that 'amt' is a 
float, not an int. 'amt' was a poor choice of parameter name and should have 
been 'n' or 'nbytes' I presume it has to be an int, not a float. Since it is 
passed on to the socket file wrapper, I suspect that io.rawiobase.read(n=-1) 
Read up to n bytes from the object and return them. As a convenience, if n is 
unspecified or -1, readall() is called. Otherwise, only one system call is ever 
made. Fewer than n bytes may be returned if the operating system call returns 
fewer than n bytes.

If 0 bytes are returned, and n was not 0, this indicates end of file. If the 
object is in non-blocking mode and no bytes are available, None is returned.
applies, but I am not really sure.

2. Add an example after the entry for .read().
This seems out of place since there is already a section for examples. All 
three of the existing examples use response.read. One of them could be enlarged 
slightly to read in chunks if an example is needed.

3. Document .closed
If it were mentioned that HTTPResponse is a subclass of RawIOBase, and perhaps 
it should be, the existence of .closed might be inferred. But since not 
everything is implemented, and since .closed is useful to iterate (as should be 
the example), I agree this should be added.

--
nosy: +terry.reedy

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



[issue9246] os.getcwd() hardcodes max path len

2011-06-17 Thread Antoine Pitrou

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

 From a practicality point of view, we need to make no change at all:
 nobody sane ever has a current working directory path of more than
 1000 characters. Even if people have very long path names, they
 don't make them the current working directory.

I don't see why that wouldn't be the case. They probably don't change to these 
directories *by hand*, but they can have scripts that cd into such a directory 
before doing stuff inside it. And these scripts can be written in Python.

--

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



[issue12317] inspect.getabsfile() is not documented

2011-06-17 Thread Terry J. Reedy

New submission from Terry J. Reedy tjre...@udel.edu:

 help(inspect.getabsfile) could be copied

getabsfile(object, _filename=None)
Return an absolute path to the source or compiled file for an object.

The idea is for each object to have a unique origin, so this routine
normalizes the result as much as possible.

--
components: +Documentation
nosy: +terry.reedy
stage:  - needs patch
versions:  -Python 2.6, Python 3.1

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



[issue12321] documentation of ElementTree.find

2011-06-17 Thread Terry J. Reedy

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

Are you requesting that the doc be changed or the code?
From the title, I would infer the doc (which is much easier ;-).
If so, can you suggest an actual revised text?

--
nosy: +terry.reedy
stage:  - needs patch
versions: +Python 3.3

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



[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-17 Thread Terry J. Reedy

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

WinXP, 3.2.0
 type(sys.stdin)
class 'idlelib.rpc.RPCProxy'
 sys.stdin.readline()
a
'a\n'

--
nosy: +terry.reedy

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



[issue4470] smtplib SMTP_SSL not working.

2011-06-17 Thread Torsten Bronger

Torsten Bronger bron...@physik.rwth-aachen.de added the comment:

My Python version is Python 2.7.1+ and the package is called python2.7 
2.7.1-5ubuntu2 (Ubuntu Natty).

--

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



[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-17 Thread R. David Murray

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

I'm not sure what the point of your example is, Terry.  Is it not fixed in 
3.2.1?

--
nosy: +r.david.murray

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



[issue12356] more argument error improving

2011-06-17 Thread Benjamin Peterson

New submission from Benjamin Peterson benja...@python.org:

After completing #12265, it was pointed out to me that the error message is 
still not perfect:

 def f(a, b, c=3, d=4, e=6, f=3, g=32): pass
... 
 f(1, f=4, d=90)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: f() takes from 2 to 7 positional arguments but 3 were given

Here is a new patch.

Some samples:

 def f(a): pass
... 
 f()
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: f() missing 1 required positional argument: 'a'
 def f(a, b): pass
... 
 f()
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: f() missing 2 required positional arguments: 'a' and 'b'

 def f(a, b, c): pass
... 
 f()
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: f() missing 3 required positional arguments: 'a', 'b', and 'c
 def f(a, b, c, d): pass
 f()
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: f() missing 4 required positional arguments: 'a', 'b', 'c', and 'd'

Same with kwonly:

 def f(*, w): pass
... 
 f()
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: f() missing 1 required keyword-only argument: 'w'
 def f(*, a, b, c, d, e): pass
... 
 f()
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: f() missing 5 required keyword-only arguments: 'a', 'b', 'c', 'd', 
and 'e'

For too many positional arguments, the old (new) error is retained:

 def f(a): pass
... 
 f(1, 2, 3)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: f() takes 1 positional argument but 3 were given
 f(3, 4, 5)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: f() takes from 1 to 2 positional arguments but 3 were given

--
components: Interpreter Core
files: argerror.patch
keywords: patch
messages: 138563
nosy: benjamin.peterson
priority: normal
severity: normal
stage: patch review
status: open
title: more argument error improving
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file22399/argerror.patch

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



[issue12346] Python 2.7.2 source code build (release) depends on mercurial

2011-06-17 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

The regexes are now in the right order.

--

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



[issue11700] mailbox.py proxy updates

2011-06-17 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset b89d193cbca5 by R David Murray in branch '2.7':
#11700: proxy object close methods can now be called multiple times
http://hg.python.org/cpython/rev/b89d193cbca5

New changeset 8319db2dd342 by R David Murray in branch '3.2':
#11700: proxy object close methods can now be called multiple times
http://hg.python.org/cpython/rev/8319db2dd342

New changeset 0705b9037b20 by R David Murray in branch 'default':
merge #11700: proxy object close methods can now be called multiple times
http://hg.python.org/cpython/rev/0705b9037b20

--
nosy: +python-dev

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



[issue11700] mailbox.py proxy close method cannot be called multiple times

2011-06-17 Thread R. David Murray

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


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
title: mailbox.py proxy updates - mailbox.py proxy close method cannot be 
called multiple times
type:  - behavior

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



[issue11767] Maildir iterator leaks file descriptors by default

2011-06-17 Thread R. David Murray

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

Well, it turns out I was totally wrong about the 11700 dependency.  I misread 
the errors that were produced by the test suite.  Even after fixing 11700 they 
are still there: the tests are reading from the closed files.  So something 
changed in the logic between 2.7 and 3.x.  It is possible that this is related 
to the addition of context manager support, and is almost certainly related to 
the general cleanup of unclosed files that was done after Antoine's 
ResourceWarning patch.

Filip, do you want to investigate this?  We always have the option of ignoring 
the problem in 2.7, but since you reported it against 2.7 I'm guessing you'd 
like to see it fixed there.

I'm attaching a version of the patch that applies cleanly to 2.7 tip.

--
dependencies:  -mailbox.py proxy close method cannot be called multiple times
Added file: http://bugs.python.org/file22400/mailbox_fd_loss.patch

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



[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-17 Thread Terry J. Reedy

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

That, like Antoine, I also could not reproduce, even in 3.2.0, when running 
under IDLE. However, with regular command line Python:
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)]
 import sys
 sys.stdin.readline()
a
'a\r\n'
so there really was a bug. If fixed in 3.2.1, this issue could be closed.

--

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