[issue11283] incorrect pattern in the re module docs for conditional regex

2011-02-22 Thread wesley chun

New submission from wesley chun wes...@gmail.com:

In the re docs, it states the following for the conditional regular expression 
syntax:

(?(id/name)yes-pattern|no-pattern)
Will try to match with yes-pattern if the group with given id or name exists, 
and with no-pattern if it doesn’t. no-pattern is optional and can be omitted. 
For example, ()?(\w+@\w+(?:\.\w+)+)(?(1)) is a poor email matching pattern, 
which will match with 'u...@host.com' as well as 'u...@host.com', but not 
with 'u...@host.com'.

this regex is incomplete as it allows for 'u...@host.com':

 bool(re.match(r'()?(\w+@\w+(?:\.\w+)+)(?(1))', 'u...@host.com'))
True
 bool(re.match(r'()?(\w+@\w+(?:\.\w+)+)(?(1))', 'u...@host.com'))
True
 bool(re.match(r'()?(\w+@\w+(?:\.\w+)+)(?(1))', 'u...@host.com'))
False
 bool(re.match(r'()?(\w+@\w+(?:\.\w+)+)(?(1))', 'u...@host.com'))
True

This error has existed since this feature was added in 2.4...
http://docs.python.org/release/2.4.4/lib/re-syntax.html

... through the 3.3. docs...
http://docs.python.org/dev/py3k/library/re.html#regular-expression-syntax

The fix is to add the end char '$' to the regex to get all 4 working:


 bool(re.match(r'()?(\w+@\w+(?:\.\w+)+)(?(1)|$)', 'u...@host.com'))
True
 bool(re.match(r'()?(\w+@\w+(?:\.\w+)+)(?(1)|$)', 'u...@host.com'))
True
 bool(re.match(r'()?(\w+@\w+(?:\.\w+)+)(?(1)|$)', 'u...@host.com'))
False
 bool(re.match(r'()?(\w+@\w+(?:\.\w+)+)(?(1)|$)', 'u...@host.com'))
False

If accepted, I propose this patch (also attached):

$ svn diff re.rst
Index: re.rst
===
--- re.rst  (revision 88499)
+++ re.rst  (working copy)
@@ -297,9 +297,9 @@
 ``(?(id/name)yes-pattern|no-pattern)``
Will try to match with ``yes-pattern`` if the group with given *id* or 
*name*
exists, and with ``no-pattern`` if it doesn't. ``no-pattern`` is optional 
and
-   can be omitted. For example,  ``()?(\w+@\w+(?:\.\w+)+)(?(1))`` is a poor 
email
+   can be omitted. For example,  ``()?(\w+@\w+(?:\.\w+)+)(?(1)|$)`` is a 
poor email
matching pattern, which will match with ``'u...@host.com'`` as well as
-   ``'u...@host.com'``, but not with ``'u...@host.com'``.
+   ``'u...@host.com'``, but not with ``'u...@host.com'`` nor 
``'u...@host.com'`` .

--
assignee: docs@python
components: Documentation, Regular Expressions
files: re.rst
messages: 129041
nosy: docs@python, wesley.chun
priority: normal
severity: normal
status: open
title: incorrect pattern in the re module docs for conditional regex
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file20833/re.rst

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



[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-02-22 Thread Xavier Morel

Xavier Morel xavier.mo...@masklinn.net added the comment:

 Do tests currently exist for smtpd run as a script?

I have to confess I didn't think to check.

 If not, our experience with converting compileall to argparse indicates a 
 thorough test suite is needed (and even so we missed some things we hadn't 
 thought to test).

OK, so if there is no test suite currently I should create one, and if there is 
one I should ensure it's complete? I guess I should use compileall as an 
example of how to test modules-as-scripts if the former? Overall, 
smtpd-as-a-script is really pretty simple, it totals 28 lines apart from the 
argument parsing itself (which is a bit under 60 lines ignoring the help 
text/pattern and gets a bit under 50 including it post-patch), and as I 
mentioned the only part which actually needed changing is the arguments 
parsing, which was very well factored out.

 In other words, if the current code works, is updating it a sufficient 
 reason to change it, considering the chances of introducing new bugs?

I'm not sure, but one of the ways I see standard libraries is not just as 
ready to use code, it's also as a repository of how to do things. And to that 
end, if argparse is now considered the canonical way to parse command-line 
arguments (which I would expect), there are very few examples of how to do 
things in the stdlib itself (though there are examples outside of it, due to 
the life argparse had pre-stdlib).

It also rose to the occasion as I was wondering about the numerous standard 
library modules-as-scripts which are either undocumented or under-documented: 
because it had a good command-line documentation and a clean separation between 
the configuration (options parsing) and the actual execution, but no module 
documentation (in Doc/) it seemed like a good starting point: if it's not 
feasible to correctly convert best cases (and smtpd is probably one, short of 
modules using optparse probably) then the whole idea is stillborn: I do not see 
how it would be possible to fare better on some of the fully undocumented 
modules using manual options parsing, yet it would have to be expected.

--

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



[issue11284] slow close file descriptors in subprocess, popen2, os.pepen*

2011-02-22 Thread s7v7nislands

New submission from s7v7nislands s7v7nisla...@gmail.com:

when use popen*() and close_fds is True, python will close unused fds. but the 
MAXFD is not the real max. especially in freebsd, subprocess.MAXFD=655000. so 
python will try to close to many fd, it's too slow, in my test on freebsd, 
using about 3 seconds.

poor english.

patch for 2.7 trunck:
jiangxiaobing@s7v7nislands ~/source/svn/python27 $ svn diff
Index: Lib/subprocess.py
===
--- Lib/subprocess.py   (revision 88499)
+++ Lib/subprocess.py   (working copy)
@@ -1065,11 +1065,16 @@
 
 
 def _close_fds(self, but):
+maxfd = MAX_FD
+try:
+maxfd = os.dup(0) + 1
+except:
+pass
 if hasattr(os, 'closerange'):
 os.closerange(3, but)
-os.closerange(but + 1, MAXFD)
+os.closerange(but + 1, maxfd)
 else:
-for i in xrange(3, MAXFD):
+for i in xrange(3, maxfd):
 if i == but:
 continue
 try:
Index: Lib/popen2.py
===
--- Lib/popen2.py   (revision 88499)
+++ Lib/popen2.py   (working copy)
@@ -82,8 +82,13 @@
 def _run_child(self, cmd):
 if isinstance(cmd, basestring):
 cmd = ['/bin/sh', '-c', cmd]
-os.closerange(3, MAXFD)
+maxfd = MAXFD
 try:
+maxfd = os.dup(0) + 1
+except:
+pass
+os.closerange(3, maxfd)
+try:
 os.execvp(cmd[0], cmd)
 finally:
 os._exit(1)



patch for 3.3 truck:
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index c02fb52..98a25b3 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1112,8 +1112,14 @@ class Popen(object):
 if fd = start_fd:
 os.closerange(start_fd, fd)
 start_fd = fd + 1
-if start_fd = MAXFD:
-os.closerange(start_fd, MAXFD)
+maxfd = MAXFD
+try:
+maxfd = os.dup(0) + 1
+except:
+pass
+
+if start_fd = maxfd:
+os.closerange(start_fd, maxfd)
 
 
 def _execute_child(self, args, executable, preexec_fn, close_fds,

--
components: Library (Lib)
files: py3k.patch
keywords: patch
messages: 129043
nosy: s7v7nislands
priority: normal
severity: normal
status: open
title: slow close file descriptors in subprocess, popen2, os.pepen*
type: performance
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file20834/py3k.patch

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



[issue11284] slow close file descriptors in subprocess, popen2, os.pepen*

2011-02-22 Thread s7v7nislands

Changes by s7v7nislands s7v7nisla...@gmail.com:


Added file: http://bugs.python.org/file20835/python27.patch

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



[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-02-22 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Xavier, I think these efforts are misguided in several ways:

* Many of the undocumented command-line interfaces are
intentionally undocumented -- they were there for the
convenience of the developer for exercising the module
as it was being developed and are not part of the official API.
Most are not production quality and would have been done
much differently if that had been the intent.

* The standard library's primary purpose is to be a library
for use in user programs, not to serve as a suite of applications.
We do have a few applications such as pydoc that assist
development, but that is not what we want to do for most
modules.  Real apps need more features than we usually
offer and they need much faster development cycles than
supported by our 18-24 month release cycle. 

* To the extent the standard library serves as a set of
examples, that is just side benefit.  There are other
ways to make code specifically for examples (we include
tons of examples in the documentation; we had a Demos
directory; there is the wiki; and there is the ASPN
Cookbook site; etc)

* David Murray is correct is pointing-out that converting
to argparse risks changing the semantics and possibly
breaking someone's existing uses of the current interface.

* Though argparse is the shiny new kid on the block and
it should be used for new code, there is no imperative
to go change all existing command-line scripts.  We haven't
even done that same exercise for the new string formatting.

* All that being said, there are some exceptions and it
make may sense to document the interface in some where
we really do want a command-line app.  I'll look at
any patches you want to submit, but try to not go wild
turning the library into a suite of applications.  For
the most part, that is not what the standard library
is about.

--
assignee: docs@python - rhettinger
nosy: +rhettinger
priority: normal - low

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



[issue11284] slow close file descriptors in subprocess, popen2, os.pepen*

2011-02-22 Thread Charles-Francois Natali

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

dup(2) returns the lowest numbered available file descriptor: if there's a 
discontinuity in the FDs allocation, this code is going to close only the FDs 
up to the first available FD.
Imagine for example the following:
open(/tmp/foo) = 3
open(/tmp/bar) = 4
close(3)

Then dup(0) will return 3, and not the max FD.

--
nosy: +neologix

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



[issue11243] email/message.py str conversion

2011-02-22 Thread Steffen Daode Nurpmeso

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

(Of course you're right.  It just reads, passes around and spits out that ... 
of a mail just the same it came in.  Performance is very well, too, just about 
1.5 seconds - some two weeks ago it took about 1.1 seconds, but with Python 2.7 
- so!

P.S.: my very own desire was just to have a single entry point where i can drop 
whatever ... in and get something back which may be just as silly but at least 
conformant, e.g. '__setitem__[x] = ADJUST(__getitem__[x])'; imagine what a 
swiss ;-) would need to do to get to that point with EMail 5.1: 
x=header.decode_header(), if x[1] is None check wether string is ASCII clean, 
otherwise hard-encode with latin1/unknown 8-bit; but even if x[1] is not None 
the content may be malformed; and then remember that all these steps can throw 
exceptions, which need to be handled because the mail *will* be processed.  Of 
course, we're talking about the header here only 8-))

--

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



[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-02-22 Thread Xavier Morel

Xavier Morel xavier.mo...@masklinn.net added the comment:

 any of the undocumented command-line interfaces are intentionally 
 undocumented -- they were there for the convenience of the developer for 
 exercising the module as it was being developed and are not part of the 
 official API.

I can understand that, but it's not clear from the source code which is which, 
and for several of them third-parties have taken up the convenience. Maybe a 
more formal process of defining which tools are to be considered official and 
which are easter-eggs is needed? In any case, even for easter eggs surely a 
good command-line documentation is a good idea (even if the module 
documentation side is not added due to the easter egg status) isn't it?

 The standard library's primary purpose is to be a library for use in user 
 programs, not to serve as a suite of applications.

Sure, and I don't think most of the module-as-scripts have what it takes to be 
seen as applications, but many are useful and/or interesting helpers/shortcuts 
for day to day tasks. http.server and smtpd are good examples of useful 
modules-as-scripts (http.server being the exact opposite of smtpd in that it 
has a module-as-script documentation but no documentation whatsoever on the 
command-line)

 Real apps need more features than we usually offer and they need much faster 
 development cycles than supported by our 18-24 month release cycle. 

I think my suggestion has been misunderstood: I don't want to turn these into 
real apps, they're fine as basic scripts/helpers to spend 5mn on a task instead 
of half an hour. I think they deserve better than to be documented and known 
through StackOverflow or Reddit what are the -m stdlib features lists.

 To the extent the standard library serves as a set of examples, that is just 
 side benefit.  There are other ways to make code specifically for examples 
 (we include tons of examples in the documentation; we had a Demos directory; 
 there is the wiki; and there is the ASPN Cookbook site; etc)

Sure, but I think it's still an important driver of how things are done in 
that they're *concrete* examples, not abstract (of course the Cookbook is 
generally concrete as well). I'm not discounting the importance or quality of 
the rest of the documentation at all, or at least that was not my intention.

 All that being said, there are some exceptions and it make may sense to 
 document the interface in some where we really do want a command-line app.  
 I'll look at any patches you want to submit, but try to not go wild turning 
 the library into a suite of applications.  For the most part, that is not 
 what the standard library is about.

As I said, my only intention here is be to document (and argparsify/formalize) 
what is already there. I considered doing more (e.g. for the specific case of 
smtpd-as-a-script making ports optional even when hosts are specified, that 
kind of things) but decided against this distraction, I really just want to 
make existing module-as-script features simpler to discover and use.

That said, do you have guidelines of which areas this idea would be most 
interestingly/efficiently applied? Maybe a list of modules-as-scripts you know 
are used regularly and could benefit from some improvements in their interface 
or documentation?

--

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



[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-02-22 Thread Xavier Morel

Xavier Morel xavier.mo...@masklinn.net added the comment:

One more note I forgot previously: the conversion of as much scripts as 
possible to argparse would be for three reasons:

* Make behavior consistent across the board (e.g. -h/--help)
* Make CLI documentation format consistent across the board either so users 
know what to expect and when
* Provide easy to reach (for users) examples of using argparse

--

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



[issue10924] Adding salt and Modular Crypt Format to crypt library.

2011-02-22 Thread Sean Reifschneider

Sean Reifschneider j...@tummy.com added the comment:

Committed in r88500.

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

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Antoine Pitrou

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

 Does it matter that _4G  UINT_MAX?

You mean _4G  UINT_MAX, right?
Yes, it matters, otherwise that defeats the point of the test :)

--

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



[issue11280] urllib2 http_error_302 calls undefined getheaders method

2011-02-22 Thread Andres Riancho

Andres Riancho andres.rian...@gmail.com added the comment:

Please take a deeper look. I think you're trusting the old code more than my 
bug report. Some things to keep in mind:

 * The headers parameter is a dict. It will never have a getheaders method

 * The If you search the whole urllib2.py file, you won't find instances of 
headers.getheaders(), you'll find headers.get() , as expected when using a dict.

Also, the call chain to this method is:

 * def error(self, proto, *args)
 * meth_name = 'http_error_%s' % proto
 * args = (dict, proto, meth_name) + args
 * return self._call_chain(*args)
 * Where args comes from:
error('http', request, response, code, msg, hdrs)
 * And the hdrs variable is set here:
code, msg, hdrs = response.code, response.msg, response.info()
 * And as you know, the response object returns a dict when info() is called.

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

'Have no glue, but Ned Daily's patch (msg129011) seems to be required for 
adler, too.  (You know...)

--
nosy: +sdaoden

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Antoine Pitrou

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

Well, it's not a patch, just a traceback :)

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

Wait a few minutes, i'll write this simple patch for adler and crc.  But 
excessive testing and such is beyond my current capabilities.

--

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



[issue11243] email/message.py str conversion

2011-02-22 Thread R. David Murray

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

We might wind up with a relatively quick 3.2.1, in which case we can get this 
fixed then.

The parser is supposed to operate without throwing exceptions (just setting 
defects), so if you find a case where *parsing* throws an exception please open 
an issue.  Once you start manipulating the model, of course, you may get 
exceptions.  I'm not sure what should happen if, say, the charset name is 
invalid (8bit), but certainly throwing an error because it is a Header rather 
than a string is wrong and needs fixing.

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

Sorry - that was a mess.

--
Added file: http://bugs.python.org/file20837/issue11277.patch

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Antoine Pitrou

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

 File: issue11277.patch.
 Hmm.  Two non-register constants and equal code on 32 and 64 bit.
 Does Python has a '64 bit' switch or the like - PY_SSIZE_T_MAX is not
 preprocessor-clean, i would guess.

Er, how is this patch different from r88460?

--

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-22 Thread R. David Murray

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

This sounds like a reasonable feature request.  If you would like to propose a 
patch against trunk (py3k, what will become 3.3), I will take a look at it.

--
nosy: +r.david.murray
stage:  - needs patch
type:  - feature request
versions: +Python 3.3 -Python 2.7

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



[issue10924] Adding salt and Modular Crypt Format to crypt library.

2011-02-22 Thread Ezio Melotti

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

Some buildbots are failing after the commit.

Also in the crypt.py module I still see things that according to msg126453 
should be fixed already:
 * more statements on the same line (e.g. if salt == None: salt = mksalt());
 * the hardcoded salt values instead of string.ascii_letters;

According to the PEP8 there shouldn't be any spaces after the '[' and before 
the ']' (e.g. method_list = [ METHOD_SHA512, METHOD_SHA256, METHOD_MD5 ] and 
in the listcomps) and around the = in the function/method declarations/calls 
(e.g. def crypt(word, salt = None):).

--
keywords: +buildbot
nosy: +ezio.melotti

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

I guess not at all.  Well.

--

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



[issue11280] urllib2 http_error_302 calls undefined getheaders method

2011-02-22 Thread Andres Riancho

Andres Riancho andres.rian...@gmail.com added the comment:

One more comment to be added. Please take a look at the following [0] w3af bug 
report. The interesting part starts at [ Sun Nov 28 01:25:47 2010 - debug ] 
Traceback (most recent call last):.

In there you'll find that my w3af code had a section of urllib2's code in 
logHandler.py (self.original_http_error_302(req, fp, code, msg, headers)) and 
that the error is very clear (to me at least):

[ Sun Nov 28 01:25:47 2010 - debug ] newurl = headers.getheaders('location')[0]
[ Sun Nov 28 01:25:47 2010 - debug ] AttributeError?: 'dict' object has no 
attribute 'getheaders'

[0] https://sourceforge.net/apps/trac/w3af/ticket/160511

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

test_zlib.py (with my patch but that's somewhat identical in the end, say) does

.s...
--
Ran 37 tests in 1.809s

OK (skipped=1)

This is on Snow Leopard 64 bit, 02b70cb59701 (r88451) - Python 3.3a0.
Is there a switch i must trigger?  Just pulled 24 changesets, recompiling and 
trying again with r88460.

--

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



[issue10228] Refleak run of test_dbm fails when several dbm modules are available

2011-02-22 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

It looks like because before the second time running of 
WhichDBTestCase.test_whichdb(), previous dumb files are not cleaned clearly, so 
the gdbm's open() doesn't create a new gdbm database but open an existing dumb 
database.

In fact during the working of #9523, I found this problem and fix it in the 
patch of #9523. Here I extract the fixing, it is simple:


cat patches/issue10228.diff 
Index: Lib/test/test_dbm.py
===
--- Lib/test/test_dbm.py(revision 88499)
+++ Lib/test/test_dbm.py(working copy)
@@ -123,7 +123,7 @@
 name = module.__name__
 if name == 'dbm.dumb':
 continue   # whichdb can't support dbm.dumb
-test.support.unlink(_fname)
+delete_files()
 f = module.open(_fname, 'c')
 f.close()
 self.assertEqual(name, dbm.whichdb(_fname))

--
nosy: +ysj.ray

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



[issue11285] io.py standart stream setup crash

2011-02-22 Thread Steffen Daode Nurpmeso

New submission from Steffen Daode Nurpmeso sdao...@googlemail.com:

Just pulled 64380ee4bbc5 (r88500) and compiled, Python's busted:

Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
  File /Users/steffen/usr/opt/py3k/lib/python3.3/io.py, line 60, in module
Abort trap

--
components: IO
messages: 129065
nosy: sdaoden
priority: normal
severity: normal
status: open
title: io.py standart stream setup crash
type: crash
versions: Python 3.3

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Antoine Pitrou

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

 This is on Snow Leopard 64 bit, 02b70cb59701 (r88451) - Python 3.3a0.
 Is there a switch i must trigger?  Just pulled 24 changesets,
 recompiling and trying again with r88460.

Have you tried ./python -m test -v -uall test_zlib ?

--

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



[issue3783] dbm.sqlite proof of concept

2011-02-22 Thread Ray.Allen

Changes by Ray.Allen ysj@gmail.com:


--
versions: +Python 3.3 -Python 3.2

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

No, i've got no idea of this framework... Just did 'python3 test_zlib.py' 
directly.  Thanks for the switch.  But i can't test your thing due to 
issue11285, so this may take a while (others have more knowledge anyway)..

(P.S.: your constant-folding stack patch is a great thing, just wanted to say 
this once..)

--

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



[issue11285] io.py standart stream setup crash

2011-02-22 Thread Antoine Pitrou

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

Can you try to identify which revision introduced the issue?

--
nosy: +haypo, ned.deily, pitrou
priority: normal - critical

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

So here is this (with my patch, but this is for real: issue11277.2.patch):

== CPython 3.3a0 (py3k, Feb 22 2011, 14:00:52) [GCC 4.2.1 (Apple Inc. build 
5664)]
==   Darwin-10.6.0-i386-64bit little-endian
==   /private/var/folders/Da/DaZX3-k5G8a57zw6MSmjJTM/-Tmp-/test_python_89365
Testing with flags: sys.flags(debug=0, division_warning=0, inspect=0, 
interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, 
ignore_environment=0, verbose=0, bytes_warning=0, quiet=0)
[1/1] test_zlib
test_adler32empty (test.test_zlib.ChecksumTestCase) ... ok
test_adler32start (test.test_zlib.ChecksumTestCase) ... ok
test_crc32_adler32_unsigned (test.test_zlib.ChecksumTestCase) ... ok
test_crc32empty (test.test_zlib.ChecksumTestCase) ... ok
test_crc32start (test.test_zlib.ChecksumTestCase) ... ok
test_penguins (test.test_zlib.ChecksumTestCase) ... ok
test_same_as_binascii_crc32 (test.test_zlib.ChecksumTestCase) ... ok
test_badargs (test.test_zlib.ExceptionTestCase) ... ok
test_badcompressobj (test.test_zlib.ExceptionTestCase) ... ok
test_baddecompressobj (test.test_zlib.ExceptionTestCase) ... ok
test_badlevel (test.test_zlib.ExceptionTestCase) ... ok
test_decompressobj_badflush (test.test_zlib.ExceptionTestCase) ... ok
test_big_compress_buffer (test.test_zlib.CompressTestCase) ... ok
test_big_decompress_buffer (test.test_zlib.CompressTestCase) ... ok
test_incomplete_stream (test.test_zlib.CompressTestCase) ... ok
test_length_overflow (test.test_zlib.CompressTestCase) ... skipped 'not enough 
free memory, need at least 4 GB'
test_speech (test.test_zlib.CompressTestCase) ... ok
test_speech128 (test.test_zlib.CompressTestCase) ... ok
test_badcompresscopy (test.test_zlib.CompressObjectTestCase) ... ok
test_baddecompresscopy (test.test_zlib.CompressObjectTestCase) ... ok
test_big_compress_buffer (test.test_zlib.CompressObjectTestCase) ... ok
test_big_decompress_buffer (test.test_zlib.CompressObjectTestCase) ... ok
test_compresscopy (test.test_zlib.CompressObjectTestCase) ... ok
test_compressincremental (test.test_zlib.CompressObjectTestCase) ... ok
test_compressoptions (test.test_zlib.CompressObjectTestCase) ... ok
test_decompimax (test.test_zlib.CompressObjectTestCase) ... ok
test_decompinc (test.test_zlib.CompressObjectTestCase) ... ok
test_decompincflush (test.test_zlib.CompressObjectTestCase) ... ok
test_decompress_incomplete_stream (test.test_zlib.CompressObjectTestCase) ... ok
test_decompresscopy (test.test_zlib.CompressObjectTestCase) ... ok
test_decompressmaxlen (test.test_zlib.CompressObjectTestCase) ... ok
test_decompressmaxlenflush (test.test_zlib.CompressObjectTestCase) ... ok
test_empty_flush (test.test_zlib.CompressObjectTestCase) ... ok
test_flushes (test.test_zlib.CompressObjectTestCase) ... ok
test_maxlenmisc (test.test_zlib.CompressObjectTestCase) ... ok
test_odd_flush (test.test_zlib.CompressObjectTestCase) ... ok
test_pair (test.test_zlib.CompressObjectTestCase) ... ok

--
Ran 37 tests in 1.789s

OK (skipped=1)
1 test OK.

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

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



[issue11285] io.py standart stream setup crash

2011-02-22 Thread Steffen Daode Nurpmeso

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

Let me see some minutes.

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso sdao...@googlemail.com:


Removed file: http://bugs.python.org/file20837/issue11277.patch

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

(Is not that much help for a 4GB error, huh?)

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

Just stepping ... with c8d1f99f25eb/r88476:

== CPython 3.3a0 (py3k, Feb 22 2011, 14:18:19) [GCC 4.2.1 (Apple Inc. build 
5664)]
==   Darwin-10.6.0-i386-64bit little-endian
==   /private/var/folders/Da/DaZX3-k5G8a57zw6MSmjJTM/-Tmp-/test_python_5126
Testing with flags: sys.flags(debug=0, division_warning=0, inspect=0, 
interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, 
ignore_environment=0, verbose=0, bytes_warning=0, quiet=0)
[1/1] test_zlib
test_adler32empty (test.test_zlib.ChecksumTestCase) ... ok
test_adler32start (test.test_zlib.ChecksumTestCase) ... ok
test_crc32_adler32_unsigned (test.test_zlib.ChecksumTestCase) ... ok
test_crc32empty (test.test_zlib.ChecksumTestCase) ... ok
test_crc32start (test.test_zlib.ChecksumTestCase) ... ok
test_penguins (test.test_zlib.ChecksumTestCase) ... ok
test_same_as_binascii_crc32 (test.test_zlib.ChecksumTestCase) ... ok
test_big_buffer (test.test_zlib.ChecksumBigBufferTestCase) ... 
^C
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C
Bus error

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Antoine Pitrou

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

 Just stepping ... with c8d1f99f25eb/r88476:

Right, that's what we should investigate :)
Could try to diagnose the crash?

--

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



[issue11285] io.py standart stream setup crash

2011-02-22 Thread Steffen Daode Nurpmeso

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

According to adorable but slow Mercurial:

The first bad revision is:
changeset:   9894:fc8a94cc17a4
branch:  py3k
user:raymond.hettinger
date:Tue Feb 22 01:41:50 2011 +0100
summary: [svn r88490] Issue #11085: Moved collections abstract base classes 
into a separate module

--

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



[issue11285] io.py standart stream setup crash

2011-02-22 Thread Antoine Pitrou

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


--
nosy: +rhettinger

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



[issue2159] dbmmodule inquiry function is performance prohibitive

2011-02-22 Thread Ray.Allen

Changes by Ray.Allen ysj@gmail.com:


--
nosy: +ysj.ray

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



[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2

2011-02-22 Thread Jesús Cea Avión

New submission from Jesús Cea Avión j...@jcea.es:

I have 10MB pickled structure generated in Python 2.7. I only use basic
types (no clases) like sets, dictionaries, lists, strings, etc.

The pickle stores a lot of strings. Some of them should be bytes,
while other should be unicode. My idea is to import ALL the strings as
bytes in Python 3.2 and navigate the data structure to convert the
appropiate values to unicode, in a one-time operation (I version the
structure, so I can know if this conversion is already done, simply
storing a new version value).

But I get this error:


Python 3.2 (r32:88445, Feb 21 2011, 13:34:07)
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more information.
  f=open(file.pickle, mode=rb).read()
  len(f)
9847316
  b=pickle.loads(f,encoding=latin1)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: operation forbidden on released memoryview object


I use the encoding latin1 for transparent byte/unicode conversion (do
not touch the values!).

This seems to be a bug in Python 3.2. Any suggestion?.

The bytestream is protocol 2.


PYTHON 3.1.3 loads the pickle just fine.

Trying to generate a testcase. I can't upload the pickle, because it contains 
propietary information.

--
components: Library (Lib)
messages: 129075
nosy: georg.brandl, jcea
priority: release blocker
severity: normal
stage: test needed
status: open
title: Some trivial python 2.x pickles fails to load in Python 3.2
type: behavior
versions: Python 3.2

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



[issue11287] Add context manager support to dbm modules

2011-02-22 Thread Ray.Allen

New submission from Ray.Allen ysj@gmail.com:

dbm objects, including gdbm, ndbm, dumb, should support context manager. That 
is, can be used with 'with' keyword, just like regular file objects.

I'm working out a patch for this.

--
components: Extension Modules
messages: 129076
nosy: ysj.ray
priority: normal
severity: normal
status: open
title: Add context manager support to dbm modules
type: feature request
versions: Python 3.3

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



[issue10882] Add os.sendfile()

2011-02-22 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

Yes I agree it can go in now. Unless someone wants to do some tests on more 
OS's like FreeBSD 7.2, Solaris, etc. (I've only checked on Linux 2.6, FreeBSD 
8.1, OpenIndiana and OS X 10.5).

--

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



[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-02-22 Thread Barry A. Warsaw

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

I'd support updating to argparse *if* you write a test suite for full coverage 
of the existing cli first.  Once that passes, you'll have more confidence in 
your port.  Modernizing the argument parsing in that case would be a useful 
addition.  Not critical, but on the whole I think a good thing.

--

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



[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2

2011-02-22 Thread Jesús Cea Avión

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

I got a trivial (41 bytes long) reproductable case:

Pickle the following structure in Python 2.7, and try to unpickle with Python 
3.2, using a latin1 encoding:


{'ya_volcados': {'comment': ''}}


Load with:


#!/usr/local/bin/python3

import pickle

f=open(z.pickle, rb).read()

a=pickle.loads(f,encoding=latin1)


(I use latin1 because my real pickle includes binary data stored as strings. 
Note that the testcase doesn't content binary data).

Python 3.2, 32 bits. Tested under Solaris and Linux.

This worked in Python 3.1.3, so we have a regression.

--
keywords: +3.2regression
stage: test needed - needs patch
Added file: http://bugs.python.org/file20839/z.pickle

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



[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2

2011-02-22 Thread Antoine Pitrou

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

Ok, so it boils down to:

 pickle.loads(b'\x80\x02}q\x00U\x00q\x01h\x01s.')
{'': ''}
 pickle.loads(b'\x80\x02}q\x00U\x00q\x01h\x01s.', encoding='latin1')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: operation forbidden on released memoryview object

(this is protocol 2, by the way. Protocol 0 works fine.)

--
nosy: +pitrou

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



[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2

2011-02-22 Thread Jesús Cea Avión

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

Storing the pickle using protocol 0, it works OK.

Using protocol 1 or 2, it fails.

--

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



[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2

2011-02-22 Thread Antoine Pitrou

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

This is because of the buffer pointer passed to the codecs machinery being NULL 
when the empty string is being decoded.

Quick patch follows (needs a test). Also, it is not clear whether it is allowed 
to store a NULL pointer in the buf member of a Py_buffer when the length is 
0. Nick, Mark?


Index: Objects/unicodeobject.c
===
--- Objects/unicodeobject.c (révision 88500)
+++ Objects/unicodeobject.c (copie de travail)
@@ -1460,6 +1460,7 @@
 PyObject *buffer = NULL, *unicode;
 Py_buffer info;
 char lower[11];  /* Enough for any encoding shortcut */
+static const char empty[] = ;
 
 if (encoding == NULL)
 encoding = PyUnicode_GetDefaultEncoding();
@@ -1485,6 +1486,8 @@
 
 /* Decode via the codec registry */
 buffer = NULL;
+if (s == NULL)
+s = empty;
 if (PyBuffer_FillInfo(info, NULL, (void *)s, size, 1, PyBUF_FULL_RO)  0)
 goto onError;
 buffer = PyMemoryView_FromBuffer(info);

--
nosy: +mark.dickinson, ncoghlan

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



[issue11280] urllib2 http_error_302 calls undefined getheaders method

2011-02-22 Thread R. David Murray

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

The traceback you point to seems to indicate the getheaders call is in your 
code.

Can you provide a minimal test case that demonstrates the failure mode you are 
concerned about?

--
nosy: +r.david.murray

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



[issue11280] urllib2 http_error_302 calls undefined getheaders method

2011-02-22 Thread Andres Riancho

Andres Riancho andres.rian...@gmail.com added the comment:

Yes, the traceback was in my code because as I stated before: my w3af code had 
a section of urllib2's code in logHandler.py in other words, I copy+pasted a 
section of urllib2 into my code.

Can't provide a test case now, sorry.

--

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-22 Thread Giampaolo Rodola'

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

+1, this has been done for other modules such as ftplib as well and probably 
could be done for others such as httplib and poplib.

--
nosy: +giampaolo.rodola

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

.. even with a self-compiled 1.2.3, INT_MAX/1000 ... nothing.
The problem is not crc32(), but the buffer itself:

   if (pbuf.len  1024*5) {
unsigned char *buf = pbuf.buf;
Py_ssize_t len = pbuf.len;
Py_ssize_t i;
fprintf(stderr, CRC 32 2.1\n);
for(i=0; (size_t)i  (size_t)len;++i)
*buf++ = 1;
fprintf(stderr, CRC 32 2.2\n);

2.2 is never reached (in fact accessing buf[1] already causes fault).
Thus the problem is not zlib, but PyArg_ParseTuple().
But just don't ask me more on that!

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

(P.S.: of course talking about ChecksumBigBufferTestCase and the 4GB, say.)

--

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



[issue11288] Python installed from MSI doesn't work

2011-02-22 Thread Matthew Funke

New submission from Matthew Funke go4...@gmail.com:

I uninstalled Python 3.1.3 and installed the 32-bit version of Python 3.2 on my 
64-bit Win7 box.  (My favorite IDE requires the 32-bit version.)  trying to run 
IDLE crashes; running C:\python32\python.exe returns this error:

Fatal Python error: Py_Initialize: unable to load the file system codec
LookupError: no codec search functions registered: can't find encoding

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I tried Googling the error, but couldn't find much help for it.  Thoughts?

--
components: IDLE, Windows
messages: 129088
nosy: Matthew.Funke
priority: normal
severity: normal
status: open
title: Python installed from MSI doesn't work
versions: Python 3.2

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



[issue10924] Adding salt and Modular Crypt Format to crypt library.

2011-02-22 Thread SilentGhost

SilentGhost ghost@gmail.com added the comment:

Here is the patch fixing pep-8 compatibility and test. It is against the latest 
commit.

--
nosy: +SilentGhost
status: closed - open
Added file: http://bugs.python.org/file20840/crypt.py.diff

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



[issue11288] Python installed from MSI doesn't work

2011-02-22 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
nosy: +brian.curtin, loewis

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Antoine Pitrou

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

 .. even with a self-compiled 1.2.3, INT_MAX/1000 ... nothing.
 The problem is not crc32(), but the buffer itself:
 
if (pbuf.len  1024*5) {
 unsigned char *buf = pbuf.buf;
 Py_ssize_t len = pbuf.len;
 Py_ssize_t i;
 fprintf(stderr, CRC 32 2.1\n);
 for(i=0; (size_t)i  (size_t)len;++i)
 *buf++ = 1;
 fprintf(stderr, CRC 32 2.2\n);

Thank you! So it's perhaps a bug in mmap on Snow Leopard.
Could you try to debug a bit more precisely and see at which buffer
offset (from the start) the fault occurs?

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

Snippet

if (pbuf.len  1024*5) {
volatile unsigned char *buf = pbuf.buf;
Py_ssize_t len = pbuf.len;
Py_ssize_t i = 0;
volatile unsigned char au[100];
volatile unsigned char*x = au;
fprintf(stderr, CRC ENTER, buffer=%p\n, buf);
for (i=0; (size_t)i  (size_t)len; ++i) {
fprintf(stderr, %ld, buf=%p\n, (signed long)i, buf);
*x = *buf++;
}

results in

test_big_buffer (test.test_zlib.ChecksumBigBufferTestCase) ... CRC ENTER, 
buffer=0x1014ab000
0, buf=0x1014ab000

--

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-22 Thread Giampaolo Rodola'

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

 I would like to add source_ip and source_port parameters to 
 smtplib.SMTP, default to '' and 0 respectively.

It would be better to provide a unique source_address parameter defaulting to 
None, for consistency with socket.create_connection() expecting a (addr, port) 
tuple.

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Antoine Pitrou

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

Out of curiosity, could you try the following patch?

Index: Lib/test/test_zlib.py
===
--- Lib/test/test_zlib.py   (révision 88500)
+++ Lib/test/test_zlib.py   (copie de travail)
@@ -70,7 +70,7 @@
 with open(support.TESTFN, wb+) as f:
 f.seek(_4G)
 f.write(basdf)
-f.flush()
+with open(support.TESTFN, rb) as f:
 self.mapping = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
 
 def tearDown(self):

--

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



[issue6549] ttk.Style not translating some Tcl options

2011-02-22 Thread Clayton Darwin

Clayton Darwin claytondar...@gmail.com added the comment:

I have been working with the ttk module (Windows XP, Python 3.1) and have 
encountered some specific issues with ttk.Style() not fully propagating the 
style into the widget.  In my particular case, there seem to be issues with 
setting style in TCombobox and TEntry.  The biggest issue is that you can't 
change the style of the ttk.Combobox popdown.  Style can be set in the top 
window, but not using all methods, but nothing works for the popdown. 

I have included an example script that illustrates the issues I have 
encountered.

Clayton

--
nosy: +claytondarwin
Added file: http://bugs.python.org/file20841/ttk_combobox_test.py

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



[issue11286] Some trivial python 2.x pickles fails to load in Python 3.2

2011-02-22 Thread Antoine Pitrou

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

Here is a patch with tests.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file20842/null_ptr_buffer.patch

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



[issue11289] smtplib context manager

2011-02-22 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' g.rod...@gmail.com:

Patch in attachment provides a context manager for SMTP class so that it can be 
used with the with statement.

--
messages: 129096
nosy: giampaolo.rodola, pitrou
priority: normal
severity: normal
status: open
title: smtplib context manager
versions: Python 3.3

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



[issue11290] ttk.Combobox['values'] String Conversion to Tcl

2011-02-22 Thread Clayton Darwin

New submission from Clayton Darwin claytondar...@gmail.com:

In working with the ttk.Combobox (Windows XP, Python 3.1), I have found that 
setting the values for the popdown using ttk.Combobox['values'] has an problem 
converting the string to the proper Tcl value when (and this is the only 
instance I have found) there is a backslash in the string but no spaces.  In 
this case, the string will translate if it is enclosed in curly brackets 
'{'+mystring+'}', which I believe is the Tcl syntax to not make substitutions.

I have attached a short script that illustrates this issue.

Clayton

--
components: Tkinter
files: tcl_string_test.py
messages: 129097
nosy: claytondarwin
priority: normal
severity: normal
status: open
title: ttk.Combobox['values'] String Conversion to Tcl
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file20843/tcl_string_test.py

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-22 Thread Paulo Scardine

Paulo Scardine pa...@scardine.com.br added the comment:

Seems like the signature of Lib.test.mock_socket.create_connection does not 
match socket.create_connection since 2.7.

I need help with the docs; the last argument is positional and optional, using 
the `[ ]' notation. What is the notation for the new keyword arguments?

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

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



[issue11289] smtplib context manager

2011-02-22 Thread SilentGhost

SilentGhost ghost@gmail.com added the comment:

you didn't attach anything, Giampaolo.

--
components: +Library (Lib)
nosy: +SilentGhost

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-22 Thread Giampaolo Rodola'

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

 Seems like the signature of Lib.test.mock_socket.create_connection does 
 not match socket.create_connection since 2.7.

You can add a fake parameter which does nothing.

 What is the notation for the new keyword arguments?

fun(a, b, c=None, d=None)

--

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-22 Thread Paulo Scardine

Paulo Scardine pa...@scardine.com.br added the comment:

Also, it is my first patch and I have no clue about what I'm doing, I don't 
expect to get it right in the first try - please point any mistakes.

--

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



[issue11289] smtplib context manager

2011-02-22 Thread Giampaolo Rodola'

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

Ouch! Here. =)

--
keywords: +patch
Added file: http://bugs.python.org/file20845/smtplib_context_manager.patch

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-22 Thread Paulo Scardine

Paulo Scardine pa...@scardine.com.br added the comment:

@Giampaolo: should I change the text in Doc/library/smtplib.rst or it is 
infered from the docstrings?

--

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



[issue11289] smtplib context manager

2011-02-22 Thread SilentGhost

SilentGhost ghost@gmail.com added the comment:

is print really necessary in the test?

Also, I think it would be better to unpack the tuple in test, rather then index 
it.

--

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



[issue11289] smtplib context manager

2011-02-22 Thread Giampaolo Rodola'

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

 is print really necessary in the test?

no, my mistake

--

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-22 Thread Giampaolo Rodola'

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

Yes, you must update  Doc/library/smtplib.rst and write tests.
If you're not the one who's gonna commit the patch you can ignore 
Doc/whatsnew/3.3.srt and Misc/NEWS changes.

Updating the docstring is usually optional but I see smtplib module is already 
well documented so I'd update docstrings as well.

As for how to write a patch see:
http://www.python.org/dev/faq/#patches
...or search in the bug tracker for committed patches, such as:
http://bugs.python.org/issue8807
http://svn.python.org/view?view=revisionrevision=84144

--

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



[issue11287] Add context manager support to dbm modules

2011-02-22 Thread Giampaolo Rodola'

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


--
nosy: +giampaolo.rodola

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Charles-Francois Natali

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

 .. even with a self-compiled 1.2.3, INT_MAX/1000 ... nothing.
 The problem is not crc32(), but the buffer itself:
 
if (pbuf.len  1024*5) {
 unsigned char *buf = pbuf.buf;
 Py_ssize_t len = pbuf.len;
 Py_ssize_t i;
 fprintf(stderr, CRC 32 2.1\n);
 for(i=0; (size_t)i  (size_t)len;++i)
 *buf++ = 1;
 fprintf(stderr, CRC 32 2.2\n);

Unless I'm mistaken, in the test the file is mapped with PROT_READ, so it's 
normal to get SIGSEGV when writting to it:

   def setUp(self): 
with open(support.TESTFN, wb+) as f: 
f.seek(_4G) 
f.write(basdf) 
f.flush() 
self.mapping = mmap.mmap(f.fileno(), 0, 
access=mmap.ACCESS_READ) 

 for(i=0; (size_t)i  (size_t)len;++i)
 *buf++ = 1;

But it seems you're also getting segfaults when only reading it, right ?

I've got a stupid question: how much memory do you have ?
Cause there seems to be some issues with page cache when reading mmaped files 
on OS-X:
http://lists.apple.com/archives/darwin-development/2003/Jun/msg00141.html

On Linux, the page cache won't fill forever, so you don't need to have enough 
free memory to accomodate the whole file (the page cache should grow, but not 
forever). But on OS-X, it seems that the page replacement algorithm seems to 
retain mmaped pages in the page cache much longer, which could potentially 
trigger an OOM later (because of overcommitting, mmap can very well return a 
valid address range which leads to a segfault when accessed later).
I'm not sure why it would segfault on the first page, though.

--
nosy: +neologix

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-22 Thread Paulo Scardine

Paulo Scardine pa...@scardine.com.br added the comment:

My first idea was to make the argument a tuple to match 
socket.create_connection(), but SMTP uses host and port arguments, for 
consistency it's better havin separate source_ip and source_port arguments. As 
a side effect, it makes easier to specify only source_port. 

The submited patch includes tests and updated docstrings; 

At the smtplib.rst, for example:

SMTP(host='', port=0, local_hostname=None[, timeout])

Would be ok to change it like:

SMTP(host='', port=0, local_hostname=None[, timeout], source_ip='', 
source_port=0)

--

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



[issue11276] 2to3: imports fixer doesn't update references to modules specified without attributes

2011-02-22 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

While directly referencing a module on its own is useless, this is an issue if 
the module is used in e.g., an assignment: ``blah = cPickle`` is not changed.

--
nosy: +brett.cannon
stage:  - needs patch

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



[issue11199] urllib hangs when closing connection

2011-02-22 Thread rg3

rg3 sarbalap+freshm...@gmail.com added the comment:

  I have to correct myself. I applied the patch manually to my Python
  2.6 installation. In Python 2.6, the line you moved is number 961,
  and I did the same change.
 
 OK. For information, you can apply it using the Unix patch command,
 who can most of the time do all the work for you.

Yes, thanks, I already knew about patch but decided to apply the 
change manually just in case, as it belonged to a different Python 
branch.

 That's expected, it's a consequence of this point I raised earlier:
  Note that I'm not sure why we need to wait for a further message on
  the control channel (maybe it's part of an RFC or something...).

There's no doubt that not hanging is an improvement, but the current 
behavior somewhat defeats the purpose of an early call to close.

To get a broader view, the test case I provided is actually part of a 
much larger program. In that program, I read lines from the Slackware 
change log, stopping when I read a line that the program already knows 
about (because it caches the change log contents). This prevents the 
program from reading more than a single line if no new entries are 
present in the change log, but having to wait for the full file defeats 
the purpose, specially on slow dial-up connections.

--

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



[issue11200] Addition of abiflags breaks distutils

2011-02-22 Thread Toshio Kuratomi

Toshio Kuratomi a.bad...@gmail.com added the comment:

Distribute issue opened and patch based on Antoine's comments attached.

https://bitbucket.org/tarek/distribute/issue/191/distribute-fails-unittests-on-python-32

--

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



[issue11086] add lib2to3/__main__.py

2011-02-22 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

r88503 has the patch in 3.3

Didn't both with documenting it since I only expect core devs who are debugging 
something with 2to3 will want to use this approach.

--
assignee:  - brett.cannon
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-22 Thread Giampaolo Rodola'

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

We already have 3 places where a tuple is used:

socket.socket.bind
socket.create_connection
http.client.HTTPConnection

Changing this notation in smtplib for such a rarely used feature is not worth 
the effort, imo.
Also, I would not add two new SMTP attributes. Passing a tuple to 
socket.create_connection() is just fine. If you want to know the source address 
afterwards you can use socket.getsockname().

PS - I modified smtplib.py in meantime. Please update your local copy.

--

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



[issue11291] poplib suppresses exception on QUIT

2011-02-22 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' g.rod...@gmail.com:

Unlike ftplib, smtplib and probably others, poplib suppresses error_proto 
exceptions on quit().
I'm not sure in what circumstances a POP3 server can return a negative response 
on QUIT but if this happens poplib should raise an exception.
Users who don't care about QUIT response can use the new close() method.
For backward compatibility patch should only be applied to Python 3.3 .

--
files: poplib_quit.patch
keywords: patch
messages: 129114
nosy: giampaolo.rodola, pitrou
priority: normal
severity: normal
status: open
title: poplib suppresses exception on QUIT
versions: Python 3.3
Added file: http://bugs.python.org/file20846/poplib_quit.patch

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



[issue11199] urllib hangs when closing connection

2011-02-22 Thread Charles-Francois Natali

Changes by Charles-Francois Natali neolo...@free.fr:


Removed file: http://bugs.python.org/file20815/urllib_ftp_close_27.diff

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



[issue11199] urllib hangs when closing connection

2011-02-22 Thread Charles-Francois Natali

Changes by Charles-Francois Natali neolo...@free.fr:


Added file: http://bugs.python.org/file20847/urllib_ftp_close_27.diff

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



[issue11199] urllib hangs when closing connection

2011-02-22 Thread Charles-Francois Natali

Changes by Charles-Francois Natali neolo...@free.fr:


Removed file: http://bugs.python.org/file20814/urllib_ftp_close.diff

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



[issue11199] urllib hangs when closing connection

2011-02-22 Thread Charles-Francois Natali

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

Attached are two new versions which don't wait for the end of transfer.

--
Added file: http://bugs.python.org/file20848/urllib_ftp_close.diff

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



[issue11199] urllib hangs when closing connection

2011-02-22 Thread rg3

rg3 sarbalap+freshm...@gmail.com added the comment:

Charles-Francois Natali, Tuesday, February 22, 2011 20:57:
 Attached are two new versions which don't wait for the end of
 transfer.

I tested the one for Python 2.7 applied to Python 2.6 and it appears to 
work perfectly. Thanks for the quick fix!

--

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



[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-02-22 Thread Xavier Morel

Xavier Morel xavier.mo...@masklinn.net added the comment:

Barry, do I correctly understand your comment to mean I should write end-to-end 
tests of the CLI (until reaching the already tested meat of smtpd), not just 
the CLI options parsing?

--

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



[issue11284] slow close file descriptors in subprocess, popen2, os.pepen*

2011-02-22 Thread Charles-Francois Natali

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

To elaborate on this, to my knowledge, there's no portable and reliable way to 
close all open file descriptors.
Even with the current code, it's still possible that some FD aren't properly 
closed, since getconf(SC_OPEN_MAX) often returns RLIMIT_NOFILE soft limit, 
which might have been lowered by the application after having opened a whole 
bunch of files.
Anyway, if the performance hit is too high, I think you only have two options:
- set your FD as CLOEXEC (note that it's already the case for FD used by popen 
and friends), and don't pass close_fds argument
- if you don't need many FD, you could explicitely set RLIMIT_NOFILE to a low 
value so that close_fds doesn't need to try too many FD, e.g.:
import resource
resource.setrlimit(resource.RLIMIT_NOFILE, (1024, 1024))

--

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



[issue8914] Run clang's static analyzer

2011-02-22 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

applied in r88506

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

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

I have a MacBook with 2 GB RAM.  Of course i'm a little bit messy, so an entry 
is half written before it comes to an ... end.  msg129091 is real life, though.

Antoine, your msg129093 patch of test_zlib.py does it (with and without 
fprintf(3)s).  CRC ok etc., it just works.
(Seems mmap(2) has a problem here, i would say; the mentioned bug report is 
from 2003, so the golden sunset watchers may need some more additional time, if 
you allow me that comment.)

--

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



[issue11292] Curses - add A_REVERSE to attributes table

2011-02-22 Thread Sandro Tosi

New submission from Sandro Tosi sandro.t...@gmail.com:

Following up http://mail.python.org/pipermail/docs/2011-February/003142.html 
here's a patch to add A_REVERSE attribute to attribs table.

--
assignee: sandro.tosi
components: Documentation
files: add-a_reverse-py3k.patch
keywords: patch
messages: 129121
nosy: sandro.tosi
priority: low
severity: normal
stage: patch review
status: open
title: Curses - add A_REVERSE to attributes table
versions: Python 3.3
Added file: http://bugs.python.org/file20849/add-a_reverse-py3k.patch

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



[issue11049] add tests for test.support

2011-02-22 Thread Giampaolo Rodola'

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

Can we commit this patch?

--

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



[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-02-22 Thread Barry A. Warsaw

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

On Feb 22, 2011, at 08:15 PM, Xavier Morel wrote:

Barry, do I correctly understand your comment to mean I should write
end-to-end tests of the CLI (until reaching the already tested meat of
smtpd), not just the CLI options parsing?

Given the way the __main__ is written, that's probably more thorough.  Testing
just the parsing alone would be uninteresting I think.

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

(That is to say: i think it's better not to assume that these boys plan to 
*ever* fix it.  (Though mmap(2) is not CoreAudio/AudioUnit.))

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

(neologix: SIGBUS is not the same as SIGSEGV.  You know.  Thanks for this nice 
bug report.  Eight years is a .. time in computer programming - unbelievable, 
thinking of all these nervous wrecks who ever reported a bug to Apple!  Man!!!)

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-22 Thread Steffen Daode Nurpmeso

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

neologix: even with 2 GB RAM top(1) shows more than 600 MB free memory with the 
4 GB test up and running ... in an Mac OS X environment ...  Lucky me, i don't 
believe them a single word...

--

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



[issue11293] Distutils - read the file when using it in long_description

2011-02-22 Thread Sandro Tosi

New submission from Sandro Tosi sandro.t...@gmail.com:

Following up http://mail.python.org/pipermail/docs/2011-February/003087.html 
here's a patch to read the contents of the file for long_description.

--
assignee: sandro.tosi
components: Documentation
files: distutils-read-longdescr-file-py3k.patch
keywords: patch
messages: 129127
nosy: sandro.tosi
priority: low
severity: normal
stage: patch review
status: open
title: Distutils - read the file when using it in long_description
versions: Python 3.3
Added file: 
http://bugs.python.org/file20850/distutils-read-longdescr-file-py3k.patch

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



[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec

2011-02-22 Thread dholth

dholth dho...@fastmail.fm added the comment:

What should this option be called?

connect(strict=True) ?

--
nosy: +dholth

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



[issue11288] Python installed from MSI doesn't work

2011-02-22 Thread Martin v . Löwis

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

Can anybody reproduce this?

--

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



[issue11288] Python installed from MSI doesn't work

2011-02-22 Thread Brian Curtin

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

It works fine for me. Just did a 32-bit Python 3.2 install on a Windows 7 
64-bit machine and IDLE works.

--

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



[issue10924] Adding salt and Modular Crypt Format to crypt library.

2011-02-22 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

I will look at the patch.

--
assignee: jafo - brett.cannon
nosy: +brett.cannon
stage: committed/rejected - patch review

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



  1   2   >