[issue8120] Py_Initialize: Can't initialize system standard streams

2010-03-12 Thread Hamed J.I

New submission from Hamed J.I :

While try to run Python.exe version 3.1 or 3.2 RC2 on
Windows 7 or Windows XP SP2 get the following error:

Py_Initialize: Can't initialize system standard streams
Lookup Error: unknown encoding: cp720

after download and install cp720.py to lib/encodings get the following error:

Py_Initialize: Can't initialize system standard streams
TypeError: 'NoneType' object is not callable

this is while IDLE works fine

--
components: Installation
messages: 100904
nosy: Hamed.ji
severity: normal
status: open
title: Py_Initialize: Can't initialize system standard streams
type: crash
versions: Python 3.1

___
Python tracker 

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



[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

I think this change is worth a sentence in the documentation.
"Improved algorithm" is a bit terse.

--
nosy: +amaury.forgeotdarc
status: closed -> open

___
Python tracker 

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



[issue8120] Py_Initialize: Can't initialize system standard streams

2010-03-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

two questions: 
- where did you obtain cp720.py, are you sure it was a python3 version?
- I've never seen a "3.2 RC2" version. Did you mean the py3k branch?

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

"'None' has always been the documented default for the encoding parameter"

That's probably mostly by accident at least in original ET, but the 1.3 draft 
docs at effbot.org/elementtree does spell it out explicitly for the 'write' 
method:

   Output encoding. If omitted or set to None, defaults to US-ASCII.

Not sure I'd consider this text binding in itself, though (even if I'd argue 
that it's preferred to have the same interpretation of encoding everywhere).

"writing out the Unicode serialisation will result in an incorrect XML 
serialisation"

I think Guido meant the ElementTree.write method; is that broken too?

The file.write(et.tostring()) issue is probably my most pressing concern here; 
that's a common use case (e.g. when using "iterparse" to cut pieces from a big 
document), and the defaults were chosen to increase the chance that this 
automatically do the right thing for non-ASCII even if the programmer never 
tests it.  In 3.X, that construct is suddenly dependent on the interpreter's 
default encoding.

I think I'd prefer old "tostring" behaviour and a separate "tounicode" 
function, and I'm still not convinced that the latter is required for the XML 
use case (which implies that maybe it should live in lxml.html for the HTML 
case, even if it ends up calling the same internal implementation).

Or should that be "tobytes" and "tounicode" to eliminate all ambiguity?

--

___
Python tracker 

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



[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-12 Thread Vinay Sajip

Vinay Sajip  added the comment:

Clarified Misc/NEWS entry and added a paragraph to the documentation on 
TimedRotatingFileHandler (r78855).

--
status: open -> closed

___
Python tracker 

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



[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Thomas Wouters

Thomas Wouters  added the comment:

Things getting worse before they get better? http://docs.python.org/ now shows 
the 2.7a4 documentation, which is really not good. Perhaps we need some 
safeguards to make sure that http://docs.python.org/ is a *stable* version of 
the docs? :P

--
priority:  -> high

___
Python tracker 

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



[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Thomas Wouters

Thomas Wouters  added the comment:

Oh, actually, looks like something was redirecting from docs.python.org to 
docs.python.org/dev. It seems fixed now. (It wasn't just me, though, I got 
complaints from others that it was 2.7a4 for at least an hour.)

--

___
Python tracker 

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



[issue8120] Py_Initialize: Can't initialize system standard streams

2010-03-12 Thread Hamed J.I

Hamed J.I  added the comment:

in fact i'm not sure it is compatible with python 3.1
i have download it from 

http://blog.oneortheother.info/tip/python-fix-cp720-encoding/

--

___
Python tracker 

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



[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Georg Brandl

Georg Brandl  added the comment:

Uh oh. Definitely.

--

___
Python tracker 

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



[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Georg Brandl

Georg Brandl  added the comment:

Oh, just now saw your second message.  At least it's back to semi-broken now :)

--

___
Python tracker 

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



[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Thomas Wouters

Changes by Thomas Wouters :


--

___
Python tracker 

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



[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Thomas Wouters

Changes by Thomas Wouters :


--

___
Python tracker 

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



[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Thomas Wouters

Thomas Wouters  added the comment:

Nevermind the 2.7a4 comments, I think I'm just not all awake yet. The 
complaints I got were about it being 2.6.5c2, my browser showing me 2.7a4 may 
have been stupid autocompletion or something. (Still, please fix :)

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

(what's the Python 3 replacement for the array module, btw?)

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Stefan Behnel

Stefan Behnel  added the comment:

"'None' has always been the documented default for the encoding parameter"

What I meant here was that "help(ET.tostring)" will show you that as the 
default. Also, in the docs, the signature is "tostring(tree, encoding=None)", 
so None is the documented default value for the argument, regardless of the 
internal handling.


> "writing out the Unicode serialisation will result in an incorrect
> XML serialisation"
> I think Guido meant the ElementTree.write method; is that broken too?

Yes, the feature has been implemeted deep down in the _encode() helper 
function, so it impacts the entire serialiser, not only its API.


> I think I'd prefer old "tostring" behaviour and a separate "tounicode" 
> function, and I'm still not convinced that the latter is required for the XML 
> use case (which implies that maybe it should live in lxml.html for the HTML 
> case, even if it ends up calling the same internal implementation).

I obviously agree that the use case for XML is fable, but that alone doesn't 
make this a convincing argument to move it into lxml.html when the 
implementation will stay in lxml.etree anyway. Besides, that's pretty off-topic 
for this bug tracker.


> Or should that be "tobytes" and "tounicode" to eliminate all ambiguity?

That might be the clean break-all-bridges solution, but I don't think the name 
tostring() is so inherently broken in Py3 that it needs fixing. It's not 
"tostr()", for example.

I wouldn't raise much opposition against tobytes() as an alias for tostring(), 
although that sounds more like duplicating an otherwise simple API.

Stefan

--

___
Python tracker 

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



[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-12 Thread Yuriy Taraday

Yuriy Taraday  added the comment:

Can this change be included in the 2.6 release?
It's small enough but necessary for our current development.

--

___
Python tracker 

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



[issue8120] Py_Initialize: Can't initialize system standard streams

2010-03-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

cp720.py was added a few months ago, and will be available with 3.2.
for the impatient, it's here:
http://svn.python.org/view/python/branches/py3k/Lib/encodings/cp720.py?view=markup

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

"Yes, the feature has been implemented deep down in the _encode() helper 
function, so it impacts the entire serialiser, not only its API"

Ouch.

>>> import locale
>>> locale.getpreferredencoding() == "utf-8"
False
>>> from xml.etree.ElementTree import *
>>> e = Element("tag")
>>> e.text = "hellö"
>>> tostring(e)
'hellö'
>>> ElementTree(e).write("out.xml")
>>> tree = parse("out.xml")
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python31\lib\xml\etree\ElementTree.py", line 843, in parse
tree.parse(source, parser)
  File "C:\Python31\lib\xml\etree\ElementTree.py", line 581, in parse
parser.feed(data)
  File "C:\Python31\lib\xml\etree\ElementTree.py", line 1221, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 9

--

___
Python tracker 

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



[issue8121] Typo in cStringIO

2010-03-12 Thread Jean-Michel Fauth

New submission from Jean-Michel Fauth :

There is a malformed string in the module cStringIO.

StringI <--> StringIO


>>> sys.version
2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
>>> StringIO.StringIO('123')

>>> cStringIO.StringIO('123')

>>>

--
components: None
messages: 100920
nosy: jmfauth
severity: normal
status: open
title: Typo in cStringIO
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue8121] Typo in cStringIO

2010-03-12 Thread Georg Brandl

Georg Brandl  added the comment:

That name is actually correct.  cStringIO features two different types, 
depending on whether you call cStringIO.StringIO() with or without an argument. 
 One is called "StringI", the other "StringO".

--
nosy: +georg.brandl
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

"I wouldn't raise much opposition against tobytes() as an alias for tostring(), 
although that sounds more like duplicating an otherwise simple API."

Adding an alias would be a way address the 2.X/3.X terminology overlap; string 
traditionally implies 8-bit in 2.X, and apparently now Unicode in 3.X.  That's 
likely to cause a lot of confusion for people switching over (and to people 
writing 3.X documentation, as well; the array module's documentation is an 
example).

ET isn't the only thing with tostring functionality, of course -- it's  pretty 
much the standard name for "serialize data structure to byte string for later 
transmission" -- so it probably wouldn't hurt with a python-dev pronouncement 
here.

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh

Changes by Fredrik Lundh :


--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

"I wouldn't raise much opposition against tobytes() as an alias for tostring(), 
although that sounds more like duplicating an otherwise simple API."

Adding an alias would be a way address the 2.X/3.X terminology overlap; string 
traditionally implies 8-bit in 2.X, and apparently now Unicode in 3.X.  That's 
likely to cause a lot of confusion for people switching from 2 to 3 (and to 
people writing 3.X documentation, apparently; the array module's documentation 
is an example of that).

(And once everyone has switched over, we can deprecate the tostring spelling... 
:)

ET isn't the only thing with tostring functionality, of course -- it's  pretty 
much the standard name for "serialize data structure to byte string for later 
transmission" -- so it probably wouldn't hurt with a python-dev pronouncement 
here.

--

___
Python tracker 

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



[issue8120] Py_Initialize: Can't initialize system standard streams

2010-03-12 Thread Hamed J.I

Hamed J.I  added the comment:

Thank you very much

Worked well

--

___
Python tracker 

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



[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-12 Thread Vinay Sajip

Vinay Sajip  added the comment:

> From: Yuriy Taraday 

> Can this change be included in the 2.6 release?
> It's small enough but necessary for our current 
> development.

I'm sorry, Yuriy, I don't think it can be, as it's an enhancement rather than a 
bug fix. It does change existing behaviour, and strictly speaking it would 
break backward compatibility, so I can't merge it into the 2.6 maintenance tree 
- where no new features are allowed.

--

___
Python tracker 

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



[issue8122] re.sub doesn't handle properly matches with yes-pattern no-pattern

2010-03-12 Thread oliv

New submission from oliv :

Using python 2.6.4 on Arch Linux

The regular expression syntax in python indicate: 

(?(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.

I used that functionnality but the code doesn't works anymore:
import re
myre = 
re.compile('(?P[0-9]+/(tcp|udp))\s+(?P\S+)\s+(?P[a-zA-Z0-9_-]+)\s*(?P.*)')
myre.sub('(?()\g|\g)',"443/tcp open  ssl  
Microsoft IIS SSL")

> The output is:
'(?()Microsoft IIS SSL|ssl)'
Instead of:
Microsoft IIS SSL

It looks like a bug as it was working earlier...

--
components: Build
messages: 100926
nosy: oliv
severity: normal
status: open
title: re.sub doesn't handle properly matches with yes-pattern no-pattern
versions: Python 2.6

___
Python tracker 

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



[issue8121] Typo in cStringIO

2010-03-12 Thread Jean-Michel Fauth

Jean-Michel Fauth  added the comment:

Wow! I never been aware of this (documentation, dir(), __doc__)
Indeed:

>>> cStringIO.StringIO()

>>> cStringIO.StringIO('abc')


Sorry for the noise.

--

___
Python tracker 

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



[issue6472] Update ElementTree with upstream changes

2010-03-12 Thread Florent Xicluna

Florent Xicluna  added the comment:

Patch to merge ElementTree 1.3 in 3.x.

--
Added file: http://bugs.python.org/file16528/issue6472_upstream_py3k_v3.diff

___
Python tracker 

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



[issue6472] Update ElementTree with upstream changes

2010-03-12 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: 
http://bugs.python.org/file16192/issue6472_etree_upstream_py3k_v2.diff

___
Python tracker 

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



[issue6472] Update ElementTree with upstream changes

2010-03-12 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file16244/issue6472_etree_upstream_v5a.diff

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Florent Xicluna

Florent Xicluna  added the comment:

I plan to merge ET 1.3 in the 3.x branch tomorrow (See #6472)
Currently, the patch is consistent with 3.1 behaviour.
It could be changed later, depending on the pronouncement on this compatibility 
issue.


> Previously, in ElementTree, serialising without an explicit encoding
> was a way to get a byte encoded serialisation without an XML
> declaration header.

Now you can pass keyword argument "xml_declaration=False" to skip the header 
explicitely.


> xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 
> 9

Now it works better.


~ $ ./python 
Python 3.2a0 (py3k:78865M, Mar 12 2010, 13:05:30) 
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getpreferredencoding() == "utf-8"
False
>>> from xml.etree.ElementTree import *
>>> e = Element("tag")
>>> e.text = "hellö"
>>> tostring(e)
'hellö'
>>> ElementTree(e).write("out.xml")
>>> tree = parse("out.xml")
>>> dump(tree)
hellö

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

Interesting.  But isn't the problem with 3.1 that it relies on the standard 
encoding, which results in code that may or may not work depending on a global 
platform setting?  Who's doing the encoding in the new version?  And what ends 
up in the file?

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Florent Xicluna

Florent Xicluna  added the comment:

>>> tree = parse("out.xml")

Actually the test in my previous message does not prove anything.
locale.getpreferredencoding() returns "UTF-8" != "utf-8".

:)

--

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

Oops :)  Yeah, that was pretty lousy way to show what encoding I was using for 
that test:

>>> import locale
>>> locale.getpreferredencoding()
'cp1252'
>>>

(Somewhat related, it would be nice if Python actually normalized 
defaultencoding/preferredencoding to some canonical name for the codec in use, 
i.e. preferred MIME name or at least IANA; we had a rather nice little bug 
recently that wouldn't have happened if that had been the case...)

--

___
Python tracker 

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



[issue3445] Ignore missing attributes in functools.update_wrapper

2010-03-12 Thread Russell Keith-Magee

Russell Keith-Magee  added the comment:

As an extra data point: we just hit this problem in Django ticket #13093 
(http://code.djangoproject.com/ticket/13093). In our case, a decorator was 
using wraps(); however, that decorator was breaking when it was used on a class 
with a __call__ method, because the instance of the class doesn't have a 
__name__ attribute. 

We've implemented the proposed workaround (i.e., check the attributes that are 
available and provide that tuple as the assigned argument), but I don't agree 
that this should be expected behavior. wraps() is used to make a decorated 
callable look like the callable that is being decorated; if there are different 
types of callable objects, I would personally expect wraps() to adapt to the 
differences, not raise an error if it sees anything other than a function. 

True, some attributes (like __doc__) won't always be correct as a result of 
wrapping on non-vanilla functions -- but then, that's true of plain vanilla 
functions, too. A decorator wrapping a function can fundamentally change what 
the wrapped function does, and there's no guarantee that the docstring for the 
wrapped function will still be correct after decoration.

--
nosy: +freakboy3742
versions: +Python 2.5, Python 2.6

___
Python tracker 

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



[issue7774] sys.executable: wrong location if zeroth command argument is modified.

2010-03-12 Thread STINNER Victor

STINNER Victor  added the comment:

> r78835 (trunk) fixes getpath and includes also a fix for sysconfig which 
> should fix test_executable_with_cwd() of test_subprocess.

Backported as r78868 to the py3k branch.

--

___
Python tracker 

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



[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-12 Thread STINNER Victor

STINNER Victor  added the comment:

> Commited to trunk: r78826

Backported to py3k as r78872. But py3k will require extra work: there are some 
PyErr_Clear() somewhere, eating the errors.

--

___
Python tracker 

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



[issue8122] re.sub doesn't handle properly matches with yes-pattern no-pattern

2010-03-12 Thread Brian Curtin

Changes by Brian Curtin :


--
components: +Library (Lib) -Build
priority:  -> normal
stage:  -> test needed
type:  -> behavior

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Guido van Rossum

Guido van Rossum  added the comment:

I propose that we continue to see Fredrik as elementtree's "BDFL". If Fredrik 
wants the API in 3.2 to be changed to be backwards compatible with 2.x, we 
should do that, and damn the torpedoes (um, 3.1 compatibility).

I would do this ASAP; if you can, fix it *before* merging 1.3.

Since I hate XML equally whether it's text or bytes, please leave me out of 
this in the future; I apologize for having cause the problem in the first place 
(but note that apparently nobody cared or noticed until a week ago).

--

___
Python tracker 

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



[issue8122] re.sub doesn't handle properly matches with yes-pattern no-pattern

2010-03-12 Thread Guido van Rossum

Guido van Rossum  added the comment:

You can't use (...) syntax in substitution strings, only \N references.

--
nosy: +gvanrossum
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue8123] TypeError in urllib when trying to use HTTP authentication

2010-03-12 Thread Dmitry Jemerov

New submission from Dmitry Jemerov :

I'm trying to download a file from a site using HTTP authentication. I'm 
subclassing FancyURLOpener, returning my credentials from the 
prompt_user_passwd() method, and using opener.retrieve() to download the file. 
I get the following error:

  File "C:/JetBrains/IDEA/build/eap/downandup.py", line 36, in download
opener.retrieve(url, os.path.join(target_path, name))
  File "C:\Python31\lib\urllib\request.py", line 1467, in retrieve
fp = self.open(url, data)
  File "C:\Python31\lib\urllib\request.py", line 1435, in open
return getattr(self, name)(url)
  File "C:\Python31\lib\urllib\request.py", line 1609, in open_http
return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "C:\Python31\lib\urllib\request.py", line 1605, in _open_generic_http
response.status, response.reason, response.msg, data)
  File "C:\Python31\lib\urllib\request.py", line 1621, in http_error
result = method(url, fp, errcode, errmsg, headers)
  File "C:\Python31\lib\urllib\request.py", line 1859, in http_error_401
return getattr(self,name)(url, realm)
  File "C:\Python31\lib\urllib\request.py", line 1931, in retry_http_basic_auth
return self.open(newurl)
  File "C:\Python31\lib\urllib\request.py", line 1435, in open
return getattr(self, name)(url)
  File "C:\Python31\lib\urllib\request.py", line 1609, in open_http
return self._open_generic_http(http.client.HTTPConnection, url, data)
  File "C:\Python31\lib\urllib\request.py", line 1571, in _open_generic_http
auth = base64.b64encode(user_passwd).strip()
  File "C:\Python31\lib\base64.py", line 56, in b64encode
raise TypeError("expected bytes, not %s" % s.__class__.__name__)
TypeError: expected bytes, not str

The problem happens because _open_generic_http extracts the user password from 
the string URL, and passes the string to the b64encode method, which only 
accepts bytes and not strings. The problem happens with Python 3.1.1 for me, 
but as far as I can see it's still not fixed in the py3k branch as of now.

--
components: Library (Lib)
messages: 100938
nosy: Dmitry.Jemerov
severity: normal
status: open
title: TypeError in urllib when trying to use HTTP authentication
versions: Python 3.1

___
Python tracker 

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



[issue8124] mywrite() ignores PyFile_WriteString() errors

2010-03-12 Thread STINNER Victor

New submission from STINNER Victor :

PyFile_WriteString() calls PyObject_Str() which calls PyErr_CheckSignals(). If 
a signal was catched, the signal handler is called. If the signal handler 
raises an error, PyObject_Str() and then PyFile_WriteString() return NULL.

mywrite() ignores all PyFile_WriteString() errors. It should maybe only ignores 
errors from the file (except IOError: ...) and not any error.

Another problem: mywrite() is called from PySys_WriteStdout() and 
PySys_WriteStderr() which are procedures. 
PySys_WriteStdout()/PySys_WriteStderr() caller cannot detect the error. There 
are 65 calls to PySys_WriteStd...

--
components: Interpreter Core
messages: 100939
nosy: haypo
severity: normal
status: open
title: mywrite() ignores PyFile_WriteString() errors
type: behavior
versions: Python 3.1, Python 3.2

___
Python tracker 

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



[issue8104] socket.recv_into doesn't support a memoryview as an argument

2010-03-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I suppose recvfrom_into() should also be converted.

--

___
Python tracker 

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



[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-12 Thread STINNER Victor

STINNER Victor  added the comment:

Bug related to this issue: #8124, PySys_WriteStdout() and PySys_WriteStderr() 
ignore signal handlers errors.

--

___
Python tracker 

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



[issue8124] mywrite() ignores PyFile_WriteString() errors

2010-03-12 Thread STINNER Victor

STINNER Victor  added the comment:

This bug is related to #3137.

--

___
Python tracker 

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



[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread joseph.h.garvin

New submission from joseph.h.garvin :

shutil.copyfile's behavior is to replace the dst file if it already exists. 
shutil.copytree requires that the destination not already exist, and throws an 
OSError if it does. I see 3 problems with this behavior:

1. It's inconsistent with copyfile

2. It's inconsistent with 'cp', which is what users would be using if they were 
writing shell script. Given shutil's namesake I assume it's supposed to help 
make python a viable shell script replacement.

3. It makes it difficult to use copytree with tempfile.mkdtemp(). If I want to 
make a temporary directory and copy a folder into it, I need to copytree to a 
nonexist subfolder then move all the files down a level or resort to other 
unpythonic hacks. In my project I copy unit test resources to a temp folder 
because they're manipulated throughout the test and I want to keep the 
originals. I imagine that this is a common use case.

That said, if anyone depended on shutil.copytree failing to test whether or not 
a folder exists, changing this would break compatibility, so if it can't be 
changed, maybe a shutil.mergetree would be appropriate.

--
components: Library (Lib)
messages: 100943
nosy: joseph.h.garvin
severity: normal
status: open
title: shutil.copytree behavior is inconsistent with copyfile
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread joseph.h.garvin

Changes by joseph.h.garvin :


--
type:  -> behavior

___
Python tracker 

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



[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> 1. It's inconsistent with copyfile

I think it's ok. When using copyfile you can easily check that the destination 
file doesn't exist, while with copytree it's harder to do the same for *all* 
destination files. Therefore it makes sense for copytree to raise an error in 
this case.

> Given shutil's namesake I assume it's supposed to help make python a viable 
> shell script replacement.

It doesn't mean the semantics have to be exactly the same. Actually, many 
Python users are under Windows where semantics will be different.

> It makes it difficult to use copytree with tempfile.mkdtemp(). If I want to 
> make a temporary directory and copy a folder into it, I need to copytree to a 
> nonexist subfolder then move all the files down a level or resort to other 
> unpythonic hacks.

I actually don't understand your problem. If you are creating a temporary 
directory, it is empty so there isn't any risk of hitting an already existing 
file.

In any case, I don't think your arguments are good enough to warrant breaking 
compatibility with older versions.

--
nosy: +pitrou
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread Brian Curtin

Brian Curtin  added the comment:

Also, keep in mind that shutil.copytree is more of an example than the 
be-all-end-all directory copy function, as stated in both the documentation and 
source code.

--
nosy: +brian.curtin

___
Python tracker 

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



[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-03-12 Thread STINNER Victor

STINNER Victor  added the comment:

I commited unicode_fromformat_U.patch as r78875.

--

___
Python tracker 

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



[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-03-12 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, my ssl_rand_egd_unicode-py3k.patch is complelty broken! It writes a pointer 
to an object into the "char* path" variable :-/

--

___
Python tracker 

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



[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-03-12 Thread STINNER Victor

STINNER Victor  added the comment:

object_pyunicode_asstring-py3k.patch commited as r78876.

--

___
Python tracker 

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



[issue8126] Python 3.1.2rc1 doesn't compile using the 10.4 sdk on a 10.6 Mac

2010-03-12 Thread Palluat de Besset

New submission from Palluat de Besset :

/usr/bin/gcc-4.0 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
 -DPYTHONFRAMEWORK='"Python"' -o pythonw ./Tools/pythonw.c -I.. -I./../Include 
../Python.framework/Versions/3.2/Python
./Tools/pythonw.c:22:19:./Tools/pythonw.c:22:19: error: spawn.h: No such file 
or directory
 error: spawn.h: No such file or directory
./Tools/pythonw.c:91: error: syntax error before ‘*’ token./Tools/pythonw.c:91: 
error: syntax error before ‘*’ token
./Tools/pythonw.c: In function ‘setup_spawnattr’:
./Tools/pythonw.c:95: error: ‘cpu_type_t’ undeclared (first use in this 
function)
./Tools/pythonw.c:95: error: (Each undeclared identifier is reported only once
./Tools/pythonw.c:95: error: for each function it appears in.)
./Tools/pythonw.c:95: error: syntax error before ‘cpu_types’
./Tools/pythonw.c:101: error: ‘spawnattr’ undeclared (first use in this 
function)
./Tools/pythonw.c:122: error: ‘cpu_types’ undeclared (first use in this 
function)
./Tools/pythonw.c:122: error: ‘CPU_TYPE_X86’ undeclared (first use in this 
function)
./Tools/pythonw.c:142: error: ‘POSIX_SPAWN_SETEXEC’ undeclared (first use in 
this function)
./Tools/pythonw.c: In function ‘main’:
./Tools/pythonw.c:158: error: ‘posix_spawn’ undeclared (first use in this 
function)
./Tools/pythonw.c:159: error: ‘posix_spawnattr_t’ undeclared (first use in this 
function)
./Tools/pythonw.c:159: error: syntax error before ‘spawnattr’
./Tools/pythonw.c:161: error: ‘spawnattr’ undeclared (first use in this 
function)

./Tools/pythonw.c: In function ‘setup_spawnattr’:
./Tools/pythonw.c:95: error: ‘cpu_type_t’ undeclared (first use in this 
function)
./Tools/pythonw.c:95: error: (Each undeclared identifier is reported only once
./Tools/pythonw.c:95: error: for each function it appears in.)
./Tools/pythonw.c:95: error: syntax error before ‘cpu_types’
./Tools/pythonw.c:101: error: ‘spawnattr’ undeclared (first use in this 
function)
./Tools/pythonw.c:120: error: ‘cpu_types’ undeclared (first use in this 
function)
./Tools/pythonw.c:120: error: ‘CPU_TYPE_POWERPC’ undeclared (first use in this 
function)
./Tools/pythonw.c:142: error: ‘POSIX_SPAWN_SETEXEC’ undeclared (first use in 
this function)
./Tools/pythonw.c: In function ‘main’:
./Tools/pythonw.c:158: error: ‘posix_spawn’ undeclared (first use in this 
function)
./Tools/pythonw.c:159: error: ‘posix_spawnattr_t’ undeclared (first use in this 
function)
./Tools/pythonw.c:159: error: syntax error before ‘spawnattr’
./Tools/pythonw.c:161: error: ‘spawnattr’ undeclared (first use in this 
function)
lipo: can't figure out the architecture type of: /var/tmp//cct0zueu.out
make[1]: *** [pythonw] Error 1
make: *** [frameworkinstallapps] Error 2

--
components: Build
messages: 100949
nosy: mpalluat
severity: normal
status: open
title: Python 3.1.2rc1 doesn't compile using the 10.4 sdk on a 10.6 Mac
type: compile error
versions: Python 3.1

___
Python tracker 

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



[issue7997] http://www.python.org/dev/faq/ doesn't seem to explain how to regenerate "configure"

2010-03-12 Thread Dave Malcolm

Dave Malcolm  added the comment:

> Nitpick: Various occurrences of 2.6.1 in the above should probably be 2.61.
Good catch - I think my brain or fingers are too used to Python's versioning 
scheme, rather than autoconf's.


Here's a revised set of commands, hopefully fixing that:

$ wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.bz2
$ tar -jxf autoconf-2.61.tar.bz2
$ pushd autoconf-2.61
$ ./configure --prefix=$HOME/autoconf-2.61
$ make ; make install
$ popd
$ PATH=~/autoconf-2.61/bin:$PATH autoreconf

--

___
Python tracker 

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



[issue8107] test_distutils fails on Windows in 2.6.5rc2

2010-03-12 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

done in r78877

--
status: open -> closed

___
Python tracker 

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



[issue8107] test_distutils fails on Windows in 2.6.5rc2

2010-03-12 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Tarek, r78877 is not the fix I recommended in

http://bugs.python.org/issue8107#msg100858

Are you sure you're more comfortable with the one you committed than the one I 
suggested?

--

___
Python tracker 

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



[issue8104] socket.recv_into doesn't support a memoryview as an argument

2010-03-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a patch.

--
keywords: +patch
priority:  -> normal
stage:  -> patch review
type:  -> feature request
Added file: http://bugs.python.org/file16529/recvinto.patch

___
Python tracker 

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



[issue5099] subprocess.POpen.__del__() AttributeError (os module == None!)

2010-03-12 Thread tormen

tormen  added the comment:

I ran into the same problem today :(
The patch resolved it :)

BUT:
Could anyone comment on when this patch will or will not live?!

...
As the bug is fairly old and already has duplicates and everyone seems to agree 
on the issue.
...
Plus it seems easy enough to edit the patch to include the try: / finally: and 
to incorporate the remove_stderr_debug_decorations() suggestion.

--
nosy: +tormen

___
Python tracker 

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



[issue8107] test_distutils fails on Windows in 2.6.5rc2

2010-03-12 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

This will skip the whole test class if srcdir is not found, removing all tests 
run in test_build_ext.

Are you sure you want to skip the whole test class if the srcdir is not there 
for 2.6.5 final ? (we have important tests in there, related to options like 
inplace etc)

If so, I'll change it like you said (so test_build_ext is completely skipped 
under some environments).

--
status: closed -> open

___
Python tracker 

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



[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb

New submission from Andrew McNabb :

The What's New documentation for Python 3.0 and 3.1 have sections called 
"Porting to Python 3.0".  It would be great to add a link to the Python wiki 
page about porting Python to Python 3:

http://wiki.python.org/moin/PortingPythonToPy3k

--
assignee: georg.brandl
components: Documentation
messages: 100956
nosy: amcnabb, georg.brandl
severity: normal
status: open
title: Add link to PortingPythonToPy3k to What's New documentation
versions: Python 3.1

___
Python tracker 

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2010-03-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Florent's patch makes sense to me.

--
nosy: +pitrou

___
Python tracker 

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2010-03-12 Thread Michael Foord

Changes by Michael Foord :


--
nosy:  -michael.foord

___
Python tracker 

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



[issue4473] POP3 missing support for starttls

2010-03-12 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +janssen
priority:  -> normal
stage:  -> patch review
type:  -> feature request
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Bill Janssen

Bill Janssen  added the comment:

Victor, I'll take a look.

--

___
Python tracker 

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



[issue8107] test_distutils fails on Windows in 2.6.5rc2

2010-03-12 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Hi Martin,

Can you just double check that the addition of xxmodule.c won't cause problems 
with the Windows installer.  If it's okay (no problems), please close this bug 
and we'll keep the fix.

Thanks.

--
assignee: tarek -> loewis

___
Python tracker 

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



[issue8102] test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"

2010-03-12 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
priority: high -> release blocker

___
Python tracker 

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



[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

-1. The page contains bad advice, and shouldn't be recommended in its current 
form. 

That probably could be fixed, but points to the core problem: in the wiki, 
anybody can add text, even if it's not properly reviewed.

It would IMO be better if a reviewed and rewritten version of that text was 
contributed to the documentation directly.

--
nosy: +loewis

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Bill Janssen

Bill Janssen  added the comment:

What's happening is that the new state returns from SSL_shutdown() are saying, 
"the shutdown you asked for didn't happen this time, but call me again when you 
get a chance.  And here is a hint about why it didn't happen, so that if you 
are sophisticated enough, you can get better information about whether 
subsequent calls to shutdown() will succeed."

Given the underlying architectures we are dealing with, is it possible to 
handle this properly?  Basically, what the SSL_shutdown code is saying is that 
all higher-level event loops should understand an additional kind of event, 
"shutting down the SSL socket", on a par with "read bytes" and "write bytes".  
But our event processing handlers, like asyncore, basically only deal with read 
and write.  I don't see how to tell them that a "close" operation should turn 
into a "read" or "write".

We could also think about turning non-blocking sockets into blocking sockets, 
by adding a time.sleep(0.1) and re-calling SSL_shutdown().  But maybe the right 
thing to do would be for the write handler in the asyncore loop to catch this, 
and re-try the write when it gets a chance.

--

___
Python tracker 

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



[issue7997] http://www.python.org/dev/faq/ doesn't seem to explain how to regenerate "configure"

2010-03-12 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee: georg.brandl -> brett.cannon

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

I'm not sure this should be handled in ssl.py.
ssl.py correctly raises ERROR_WANT_READ/WRITE if the shutdown operation didn't 
complete and that's ok.
It should be up to the upper application (in our case asyncore) to deal with 
that.

Moreover, the patch tries to solve the issue by using a while loop which is 
*evil* for asynchronous environments (a similar problem is debated in issue 
3890).

My suggestion is to modify the SSLConnection.close() method of the test server 
so that it just "return" in case of ERROR_WANT_READ/WRITE errors without 
calling the original asyncore's close method since the socket object must 
remain in the select loop as long as the connection is still around.

A subsequent call to handle_read() and/or handle_write() should not be 
necessary as they should automatically be called by asyncore on the next poll() 
loop but I'm not 100% sure about this. 

In both cases I'd say that the only thing needed to be fixed here is the test 
server.

--

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Bill Janssen

Bill Janssen  added the comment:

Looking at this further, what we're seeing is the trace of an ineffective 
attempt to handle an exception presumably raised from the FTP code.  Can we see 
that exception?  What's the actual state of the TCP connection at this point?

--

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Bill Janssen

Bill Janssen  added the comment:

I think Giampaolo is right about this not being an ssl.py issue.  Could the 
exception handling in ftp.py perhaps also be made more sophisticated?  I'd 
really love to understand what the state of the TCP connection is here.  I'm 
presuming that it's still open, because otherwise you'd get a different error 
from OpenSSL.  So what's the error that's triggering this call?  Is it simply 
that the sender has run out of stuff to send?

Also, I think that asyncore.py is stingy about what information it sends.  At 
the very least, it could invoke handle_error() with the exception it's handling 
as an argument.

--

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Bill Janssen

Bill Janssen  added the comment:

And it would be interesting to know why all the SSL module tests don't fail in 
the same way.

--

___
Python tracker 

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



[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
priority:  -> normal

___
Python tracker 

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



[issue8123] TypeError in urllib when trying to use HTTP authentication

2010-03-12 Thread Ezio Melotti

Ezio Melotti  added the comment:

Could you provide a script (or even better a unittest) to reproduce the problem?

--
nosy: +ezio.melotti
priority:  -> normal
stage:  -> test needed
type:  -> behavior
versions: +Python 3.2

___
Python tracker 

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



[issue8118] PYTHON_API_VERSION needs to be bumped?

2010-03-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Is PYTHON_API_VERSION actually useful right now? It seems to me that we need 
Martin's ABI stability PEP to be implemented before extension modules can be 
safely shared between several non-bugfix releases.

--
nosy: +loewis, pitrou

___
Python tracker 

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



[issue8114] python 2.6.4 installation is not working for the single user mode in vista.

2010-03-12 Thread Ezio Melotti

New submission from Ezio Melotti :

Can you provide more information about what exactly is not working and how to 
reproduce the problem?

--
nosy: +brian.curtin, ezio.melotti
priority:  -> normal

___
Python tracker 

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



[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb

Andrew McNabb  added the comment:

What advice in particular do you consider bad?  I would be happy to submit some 
changes to the wiki page for anything that's wrong.

I think it would be great to have a reviewed version in the documentation 
directly, but I think the world needs a little more experience with Python 3 
before it could be done well.  In the meantime, I think it's important to get 
the discussion moving towards finding a set of best practices.  Raising the 
visibility of the wiki page seems like a great way to encourage participation 
and to get things moving forward.

Right now, there's no sense of best practices in porting to Python 3, and it's 
leaving people with the impression that it's too hard and not worth it.

--

___
Python tracker 

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



[issue8126] Python 3.1.2rc1 doesn't compile using the 10.4 sdk on a 10.6 Mac

2010-03-12 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> ronaldoussoren
components: +Macintosh -Build
nosy: +ronaldoussoren
priority:  -> normal
stage:  -> needs patch

___
Python tracker 

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



[issue8126] Python 3.1.2rc1 doesn't compile using the 10.4 sdk on a 10.6 Mac

2010-03-12 Thread Ned Deily

Ned Deily  added the comment:

Note: "Python.framework/Versions/3.2/Python".
You appear to be building from py3k (which will become 3.2), and not Python 
3.1.2rc2.  There are pending fixes for py3k for OS X framework targeted builds 
and there is at least one as yet unmerged fix for 3.1.2.  At the moment, 
building any branch of Python on 10.6 and targeting earlier systems does not 
work correctly; extension module building should be OK as long as the 10.4u SDK 
is available and gcc 4.0 is used.  Until that is fixed, if you really need to 
target 10.3, you should build Python on 10.5 or 10.4, otherwise, build just for 
10.6 on 10.6 (to do so you may need to set MACOSX_DEPLOYMENT_TARGET=10.6).

--
nosy: +ned.deily

___
Python tracker 

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



[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb

Andrew McNabb  added the comment:

By the way, I just noticed your notes on the wiki page and added a 
response/question.  It seems that the advice that you consider bad is the 
official porting story (upgrade to 2.6 and use 2to3).  I agree that it's easier 
and better to not drop support for 2.4 and 2.5, but this seems to be officially 
discouraged.  The current content on the What's New page only talks about 
upgrading to 2.6 and using 2to3.

In any case, most of the current content on the wiki page is about supporting 
Python 2 and Python 3 simultaneously.  I think this is actually better than the 
official documentation.

--

___
Python tracker 

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



[issue8102] test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"

2010-03-12 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Ok so, this file is lost during the installation process only for the Mac OS X 
install it seems. I need to dig into the Mac OS X build process.

If I "./configure && make && make install" with the 2.6.5rc+ tarball, 
the files are properly copied.

Btw, how do you run the tests exactly Ned ?

$ python2.6 test/regrtest.py -v test_distutils

--
nosy: +ronaldoussoren
priority: release blocker -> high

___
Python tracker 

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



[issue8118] PYTHON_API_VERSION needs to be bumped?

2010-03-12 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> Is PYTHON_API_VERSION actually useful right now? It seems to me that
> we need Martin's ABI stability PEP to be implemented before extension
> modules can be safely shared between several non-bugfix releases.

Today, PYTHON_API_VERSION primarily serves as a check that the extension
you load had been compiled for the Python release that its being loaded
into. We promise ABI stability across bug fix releases for the same
feature release, so yes, it is useful.

The original motivation (allowing to share extensions across feature
releases) was last relevant in the 1.x series, IIRC.

--

___
Python tracker 

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



[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> What advice in particular do you consider bad?  I would be happy to
> submit some changes to the wiki page for anything that's wrong.

See my comments on the page. The first headline is IMO fairly
counter-productive, as it (essentially) suggests that you can't start
supporting 3.x until you can leave 2.5 behind - which for most projects
will still be several years in the future.

> Right now, there's no sense of best practices in porting to Python 3,
> and it's leaving people with the impression that it's too hard and
> not worth it.

Then discuss the page and its contents on the python-porting list.

--
title: Add link to PortingPythonToPy3k to What's New documentation -> Add link 
to PortingPythonToPy3k to What's New documentation

___
Python tracker 

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



[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Andrew McNabb wrote:
> Andrew McNabb  added the comment:
> 
> By the way, I just noticed your notes on the wiki page and added a
> response/question.  It seems that the advice that you consider bad is
> the official porting story (upgrade to 2.6 and use 2to3).

No, "drop support for Python older than 2.6" is completely, entirely
different from "upgrade to 2.6".

> I agree
> that it's easier and better to not drop support for 2.4 and 2.5, but
> this seems to be officially discouraged.

Says who?

> In any case, most of the current content on the wiki page is about
> supporting Python 2 and Python 3 simultaneously.  I think this is
> actually better than the official documentation.

If, by "official documentation", you refer to the 3 paragraphs in
"what's new", then I agree that the text could be improved. However,
I completely disagree that your Wiki page is better wrt. to running code
 simultaneously on 2.x and 3.x unmodified.

Your page encourages such a style, and "what's new" discourages,
pointing out that it leads to contorted code. I completely agree that it
does, and the approaches proposed should be the absolute exception in
any porting strategy.

--

___
Python tracker 

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



[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb

Andrew McNabb  added the comment:

Thanks for your advice.  I just signed up for the python-porting list, and I'll 
start a discussion there.

I'm trying to improve the wiki page to address your concerns.  There are 
multiple valid approaches to take, and I'm trying to make the page show this.  
I'll remove the inline notes for now (since they clutter things), and I'll try 
to incorporate your changes.  I apologize in advance if I make any mistakes.

--

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

> I'd really love to understand what the state of the TCP connection 
> is here. I'm presuming that it's still open, because otherwise you'd 
> get a different error from OpenSSL.  So what's the error that's 
> triggering this call?  Is it simply that the sender has run out of 
> stuff to send?

"almost closed"? :)
I don't know but I wouldn't label this as an "unexpected error" because when 
dealing with non blocking sockets errors like this one are perfectly legitimate 
as they "tell" the upper application what it is expected to do (for example 
EWOULDBLOCK on send() means "retry later").

A patch is in attachment but I have not been able to reproduce this issue on 
python 2.7 r78878 on Ubuntu 8.04 so it might not work (I suspect it might end 
up in an endless loop).

If this doesn't work we can try the second option of calling handle_read/write 
right after shutdown().

--
Added file: http://bugs.python.org/file16530/testftpd.patch

___
Python tracker 

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2010-03-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

What does the patch achieve?

--

___
Python tracker 

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



[issue8057] Impreciseness in bz2 module documentation?

2010-03-12 Thread Ezio Melotti

Ezio Melotti  added the comment:

Fixed in r78884 (py3k) and r78885 (release31-maint), thanks for the report!

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

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread STINNER Victor

STINNER Victor  added the comment:

I posted on openssl-users mailing list. The author of patch (change 
SSL_shutdown() behaviour for non blocking socket) replied!
http://marc.info/?l=openssl-users&m=126838806919896&w=2

--

___
Python tracker 

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



[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread joseph.h.garvin

joseph.h.garvin  added the comment:

Sorry I wasn't terribly clear explaining the problem with mkdtemp. Say you 
create your temporary folder, /tmp/foo. Now you have a regular folder bar laid 
out like so:

bar/
  blarg1.ext
  blarg2.ext
  subdir/
blarg3.ext
blarg4.ext

I'd like this to be the result of copying:

/tmp
  /foo
blarg1.ext
blarg2.ext
subdir/
  blarg3.ext
  blarg4.ext

Basically, I'd like to copy bar/ to /tmp/foo such that the paths of the files 
relative to bar/ are the same as the paths of the copied files relative to 
/tmp/foo. AFAICT there's no easy way to do this with copytree's current 
behavior. Because tempfile.mkdtemp() creates /tmp/foo to start, you can't use 
copytree to do this. 

But now I realize copy tree wants to copy the source directory as a directory, 
so you always get /tmp/foo/bar. What I wanted was copy(recursive_glob(src, 
"*"), dst). That would give you the effect you normally get from a utility like 
'cp'.

> It doesn't mean the semantics have to be exactly the same. Actually, many 
> Python users are under Windows where semantics will be different.

I believe 'copy' has the same cp-like semantics I desire under Windows, but 
it's been quite some time since I used it.

So, not a bug, but sticks out to me as missing. Might make sense someday to 
have a keyword arg to copytree that would make it behave this way.

--

___
Python tracker 

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



[issue7818] Improve set().test_c_api(): don't expect a set("abc"), modify the content

2010-03-12 Thread STINNER Victor

STINNER Victor  added the comment:

Commited: r78886 (trunk), r7 (py3k).

--

___
Python tracker 

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



[issue7818] Improve set().test_c_api(): don't expect a set("abc"), modify the content

2010-03-12 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue8011] traceback tb_lineno example needs correction for Python3

2010-03-12 Thread Ezio Melotti

Ezio Melotti  added the comment:

Fixed in r77895 (trunk), r77896 (py3k) and r77897 (release31-maint), thanks for 
the report!

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

___
Python tracker 

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



[issue8128] String interpolation with unicode subclass fails to call __str__

2010-03-12 Thread Steven D'Aprano

New submission from Steven D'Aprano :

String interpolation % operates on unicode strings directly without calling the 
__str__ method. In Python 2.5 and 2.6:

>>> class K(unicode):
... def __str__(self): return "Surprise!"
...
>>> u"%s" % K("some text")
u'some text'

but subclasses of str do call __str__:

>>> class K(str):
... def __str__(self): return "Surprise!"
...
>>> "%s" % K("some text")
'Surprise!'

In Python 3.1, the above example for subclassing str operates like the unicode 
example, i.e. it fails to call __str__.

The documentation for string interpolation states that str() is called for all 
Python objects.

http://docs.python.org/library/stdtypes.html#string-formatting-operations

If the behaviour for unicode (2.5/2.6, str in 3.1) is considered correct, then 
the documentation should be updated to say that unicode is an exception to the 
rule. Otherwise the behaviour is incorrect, and it should call __str__ the same 
as everything else.

--
messages: 100984
nosy: stevenjd
severity: normal
status: open
title: String interpolation with unicode subclass fails to call __str__
versions: Python 2.5, Python 2.6, Python 3.1

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I posted on openssl-users mailing list. The author of patch (change
> SSL_shutdown() behaviour for non blocking socket) replied!
> http://marc.info/?l=openssl-users&m=126838806919896&w=2

Interesting read, thank you.
AFAICT, his proposed "quick fix" snippet should be good enough for us.
Also, it seems the new "graceful shutdown" logic is really trying to
handle at the transport level things which should be handled by the
application protocol (detecting whether the other end still has things
to send).

--

___
Python tracker 

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



[issue8102] test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"

2010-03-12 Thread Ned Deily

Ned Deily  added the comment:

You are correct: setuptools_build_ext.py should have been there.  It turns out 
the file was missing in my installer builds due to a combination of issues 
summarized below.  The bottom line is that this is not a problem for 2.6.5 and 
my apologies for causing extra work for you, Tarek.  On the plus side, there 
was some good in all this by causing me to find a couple of serious flaws in my 
testing process and in the current hg support.

The rest of the story: to manage patches, I use hg on top of svn mirrors of the 
various source trees.  hg supports use of a top-level .hgignore file to specify 
files to ignore for revision control.  There is an .hgignore file checked into 
the svn trees but it turns out to have at least one subtly incorrect entry in 
it which causes hg to ignore all files with "build" anywhere in their names.  
As a result, "setuptools_build_ext.py" has not been carried along into builds 
in my build process and I haven't noticed it up to now.
   -> After further investigation, I will open a new issue for the faulty 
.hgignore files.
   -> I'll add some auditing checks to my build process to make sure files 
aren't being unexpectedly ignored.

For future reference, testing the tests requires an OS X framework build.  The 
tests themselves are installed into the lib directory of the framework:
{...}Library/Frameworks/Python.framework/Versions/m.n/lib/pythonm.n/distutils/tests/

If you do not want to disturb an existing framework installation (in 
/Library/Frameworks/Python.frameworks), you can try something like this:

# using the Python-2.6.5rc2 tarball
$ ./configure --enable-framework=/tmp/x/Library/Frameworks && make && make 
install
#   ... ignore frameworkinstallapps permission errors 
$ cd /tmp/x/Library/Frameworks/Python.framework/Versions/2.6
$ bin/python2.6 -m test.regrtest -v test_distutils
test_distutils
test_build_ext: Cannot find source code (test must run in python build dir)
test_get_exe_bytes (distutils.tests.test_bdist_wininst.BuildWinInstTestCase) 
... ok
test_dont_write_bytecode (distutils.tests.test_build_py.BuildPyTestCase) ... ok
[...]

Due to the problem documented in Issue8107, the rest of the test is skipped.  
(In the original report, the OS X installer builds use separate source and 
build directories and the build directory is usually still around when the 
tests are run, so the xxconfig.c *was* found and the test suite was attempted 
resulting in the reported error - another process issue for me.)  If I copy in 
the two updated files (test_build_ext.py and xxmodule.c) from r78877, 
test_build_ext now completes as expected:

$ bin/python2.6 -m test.regrtest -v test_distutils
test_get_exe_bytes (distutils.tests.test_bdist_wininst.BuildWinInstTestCase) 
... ok
test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_build_ext_inplace (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_build_ext_path_cross_platform 
(distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_build_ext_path_with_os_sep 
(distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_check_extensions_list (distutils.tests.test_build_ext.BuildExtTestCase) 
... ok
test_compiler_option (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_ext_fullpath (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_finalize_options (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_get_source_files (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_setuptools_compat (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_solaris_enable_shared (distutils.tests.test_build_ext.BuildExtTestCase) 
... ok
test_dont_write_bytecode (distutils.tests.test_build_py.BuildPyTestCase) ... ok
[...]

--
status: open -> closed

___
Python tracker 

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



[issue8129] Wrong arguments in sqlite3.connect() documentation

2010-03-12 Thread STINNER Victor

New submission from STINNER Victor :

Python documentation has the prototype:

sqlite3.connect(database[, timeout, isolation_level, detect_types, factory])

http://docs.python.org/library/sqlite3.html#sqlite3.connect

Source code:

 - sqlite.rst: .. function:: connect(database[, timeout, isolation_level, 
detect_types, factory])
 - connect() documentation: connect(database[, 
timeout, isolation_level, detect_types, factory])
 - module_connect(): char *kwlist[] = {"database", "timeout", "detect_types", 
"isolation_level", "check_same_thread", "factory", "cached_statements", NULL, 
NULL};
 - pysqlite_connection_init(): char *kwlist[] = {"database", "timeout", 
"detect_types", "isolation_level", "check_same_thread", "factory", 
"cached_statements", NULL, NULL};

module_connect() and pysqlite_connection_init() use the same keyword list, but 
the documentation invert arguments detect_types and isolation_level, and miss 
check_same_thread and cached_statements arguments.

--

Example:

>>> import sqlite3
>>> con=sqlite3.connect(':memory:', 2.0, 'DEFER')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: an integer is required
>>> con=sqlite3.connect(':memory:', 2.0, True)
>>> con=sqlite3.connect(':memory:', 2.0, isolation_level='DEFER')

The third argument is a boolean, it's the detect_types option (not the 
isolation level, a string).

--
assignee: georg.brandl
components: Documentation
messages: 100987
nosy: georg.brandl, haypo
severity: normal
status: open
title: Wrong arguments in sqlite3.connect() documentation
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue6351] Compiler warning in _cursesmodule.c

2010-03-12 Thread Ezio Melotti

Ezio Melotti  added the comment:

This has been fixed in r74051 on trunk and r74054 on py3k.

--
nosy: +ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue1616] compiler warnings

2010-03-12 Thread Ezio Melotti

Ezio Melotti  added the comment:

After fixing some warning on _cursesmodule.c in r78900 I found this issue and 
generated an updated list of all the warnings on trunk on the buildbots. When 
two or more buildbots had the same warnings I grouped them together, showing 
the url of the buildbot first and then the warnings.

http://www.python.org/dev/buildbot/builders/x86%20XP-4%20trunk
http://www.python.org/dev/buildbot/builders/x86%20XP-5%20trunk
http://www.python.org/dev/buildbot/builders/x86%20Windows7%20trunk
7>..\Objects\bufferobject.c(406) : warning C4018: '<=' : signed/unsigned 
mismatch
7>..\Modules\zlib\gzio.c(131) : warning C4996: 'strcpy': This function or 
variable may be unsafe. Consider using strcpy_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
7>..\Modules\zlib\gzio.c(181) : warning C4996: 'fopen': This function or 
variable may be unsafe. Consider using fopen_s instead. To disable deprecation, 
use _CRT_SECURE_NO_WARNINGS. See online help for details.
7>..\Modules\zlib\gzio.c(226) : warning C4996: 'sprintf': This function or 
variable may be unsafe. Consider using sprintf_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
7>..\Modules\zlib\gzio.c(627) : warning C4996: '_vsnprintf': This function or 
variable may be unsafe. Consider using _vsnprintf_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
7>..\Modules\zlib\gzio.c(1001) : warning C4996: 'strerror': This function or 
variable may be unsafe. Consider using strerror_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
7>..\Modules\zlib\gzio.c(1008) : warning C4996: 'strcpy': This function or 
variable may be unsafe. Consider using strcpy_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
7>..\Modules\zlib\gzio.c(1009) : warning C4996: 'strcat': This function or 
variable may be unsafe. Consider using strcat_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
7>..\Modules\zlib\gzio.c(1010) : warning C4996: 'strcat': This function or 
variable may be unsafe. Consider using strcat_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
21>..\Modules\_ctypes\libffi_msvc\ffi.c(113) : warning C4018: '>' : 
signed/unsigned mismatch
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; 
use /NODEFAULTLIB:library

http://www.python.org/dev/buildbot/builders/x86%20Ubuntu%20trunk
http://www.python.org/dev/buildbot/builders/i386%20Ubuntu%20trunk
http://www.python.org/dev/buildbot/builders/alpha%20Debian%20trunk
http://www.python.org/dev/buildbot/builders/amd64%20gentoo%20trunk
http://www.python.org/dev/buildbot/builders/AMD64%20Ubuntu%20trunk
http://www.python.org/dev/buildbot/builders/AMD64%20Ubuntu%20wide%20trunk
/home/db3l/buildarea/trunk.bolen-ubuntu/build/./Modules/posixmodule.c:7223: 
warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/home/db3l/buildarea/trunk.bolen-ubuntu/build/./Modules/posixmodule.c:7178: 
warning: the use of `tempnam' is dangerous, better use `mkstemp'

http://www.python.org/dev/buildbot/builders/ia64%20Ubuntu%20trunk
/home/pybot/buildarea/trunk.klose-debian-ia64/build/./Modules/posixmodule.c:7223:
 warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/home/pybot/buildarea/trunk.klose-debian-ia64/build/./Modules/posixmodule.c:7178:
 warning: the use of `tempnam' is dangerous, better use `mkstemp'
/home/pybot/buildarea/trunk.klose-debian-ia64/build/Modules/_ctypes/libffi/src/ia64/ffi.c:401:
 warning: function declaration isn't a prototype

http://www.python.org/dev/buildbot/builders/sparc%20solaris10%20gcc%20trunk
/home2/buildbot/slave/trunk.loewis-sun/build/Modules/_cursesmodule.c:706: 
warning: implicit declaration of function `mvwchgat'
/home2/buildbot/slave/trunk.loewis-sun/build/Modules/_cursesmodule.c:710: 
warning: implicit declaration of function `wchgat'

http://www.python.org/dev/buildbot/builders/x86%20FreeBSD%20trunk
./Modules/posixmodule.c:7225: warning: warning: tmpnam() possibly used 
unsafely; consider using mkstemp()
./Modules/posixmodule.c:7178: warning: warning: tempnam() possibly used 
unsafely; consider using mkstemp()
/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Modules/_ssl.c:706: warning: 
passing arg 2 of `ASN1_item_d2i' from incompatible pointer type
/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Modules/_ssl.c:710: warning: 
passing arg 2 of pointer to function from incompatible pointer type
/usr/local/include/gdbm.h:85: warning: function declaration isn't a prototype
/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Modules/dlmodule.c:189: 
warning: initialization discards qualifiers from pointer target type
/usr/home/db3l/buildarea/trunk.bolen-freebsd/build/Modules/_ctypes/callproc.c:1411:
 warning: initialization discards qualifiers from

  1   2   >